diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 2f8df6f486123b..a8d328268951bf 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,11 +22,17 @@ jobs: uses: actions/checkout@v4 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.5 + uses: natiginfo/action-detekt-all@1.23.6 # Detekt seems not to like circular symlinks, so we set up # explicit paths below + # + # In particular, if symlinks exist and recurse, detekt tries to + # follow, so for example `examples/android/CHIPTest` as a path + # will never end (and eventually run out of HEAP) because + # `examples/android/CHIPTest/third_party/connectedhomeip` is + # circular with: - args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java + args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest/app,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java ktlint: name: "Format check" diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 17cc5885460379..30c7efbde3d623 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -28,7 +28,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 60b6480176d518..0cb630900c3ddf 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2355,7 +2355,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; - ram attribute clusterRevision default = 6; + ram attribute clusterRevision default = 5; handle command MoveToLevel; handle command Move; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 9e293bcd3032d1..437aac9d67bdac 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -4288,7 +4288,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 3531a31ffde406..cdc711cdc1c252 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -26,7 +26,7 @@ app_data_model = "${chip_root}/examples/lit-icd-app/lit-icd-common" # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index 9d06737d622a2d..4b49740513c555 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -29,7 +29,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/examples/lock-app/silabs/build_for_wifi_args.gni b/examples/lock-app/silabs/build_for_wifi_args.gni index 25c5a2435d332f..84596e9258fbcc 100644 --- a/examples/lock-app/silabs/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/build_for_wifi_args.gni @@ -24,7 +24,7 @@ app_data_model = "${chip_root}/examples/lock-app/lock-common" # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # ICD Matter Configuration flags sl_idle_mode_duration_s = 600 # 10min Idle Mode Duration diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 3bfa566596aeaf..8d1c75d267238c 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -28,7 +28,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 9be9f07fe3c759..d85f10d0612ea1 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -54,10 +54,13 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #endif #include "SilabsDeviceDataProvider.h" -#include "SilabsTestEventTriggerDelegate.h" #include #include +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED +#include "SilabsTestEventTriggerDelegate.h" // nogncheck +#endif + #if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED #include #else @@ -219,12 +222,6 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event } } -#if SILABS_TEST_EVENT_TRIGGER_ENABLED -static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff }; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED - CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) { CHIP_ERROR err; @@ -283,18 +280,10 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) initParams.reportScheduler = &sReportScheduler; -#if SILABS_TEST_EVENT_TRIGGER_ENABLED - if (Encoding::HexToBytes(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, strlen(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY), - sTestEventTriggerEnableKey, - TestEventTriggerDelegate::kEnableKeyLength) != TestEventTriggerDelegate::kEnableKeyLength) - { - SILABS_LOG("Failed to convert the EnableKey string to octstr type value"); - memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); - } - // TODO(#31723): Show to customers that they can do `Server::GetInstance().GetTestEventTriggerDelegate().AddHandler()` - static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED + static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate; initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED +#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED #if CHIP_CRYPTO_PLATFORM && !(defined(SLI_SI91X_MCU_INTERFACE)) // When building with EFR32 crypto, use the opaque key store @@ -303,13 +292,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) initParams.operationalKeystore = &gOperationalKeystore; #endif -#ifdef PERFORMANCE_TEST_ENABLED - // Set up Test Event Trigger command of the General Diagnostics cluster. Used only in performance testing - // TODO(#31723): Show to customers that they can do `Server::GetInstance().GetTestEventTriggerDelegate().AddHandler()` - static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(kTestEventTriggerEnableKey) }; - initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; -#endif - // Initialize the remaining (not overridden) providers to the SDK example defaults (void) initParams.InitializeStaticResourcesBeforeServerInit(); diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 73e70c18e1d7f8..87df30d1a186c9 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -34,9 +34,6 @@ declare_args() { # Argument to force enable WPA3 security on rs91x rs91x_wpa3_transition = true - # use commissionable data for SiWx917 - siwx917_commissionable_data = false - #default WiFi SSID chip_default_wifi_ssid = "" @@ -44,11 +41,11 @@ declare_args() { chip_default_wifi_psk = "" # Enable TestEventTrigger in GeneralDiagnostics cluster - silabs_test_event_trigger_enabled = false + sl_enable_test_event_trigger = false # The EnableKey in hex string format used by TestEventTrigger command in - # GeneralDiagnostics cluster. The length of the string should be 32. - silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" + # GeneralDiagnostics cluster. The length of the string should be 16 bytes. + sl_test_event_trigger_enable_key = "00112233445566778899AABBCCDDEEFF" } # Sanity check @@ -80,6 +77,30 @@ config("chip_examples_project_config") { ] } +config("test-event-trigger-config") { + defines = [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLED" ] + + if (is_debug) { + defines += [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${sl_test_event_trigger_enable_key}\"" ] + } +} + +source_set("test-event-trigger") { + sources = [ + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp", + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.h", + ] + + public_configs = [ ":test-event-trigger-config" ] + + public_deps = [ + ":silabs-factory-data-provider", + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + source_set("siwx917-matter-shell") { if (chip_build_libshell) { defines = [ "ENABLE_CHIP_SHELL" ] @@ -129,6 +150,10 @@ source_set("silabs-factory-data-provider") { ] public_configs = [ ":siwx917-common-config" ] + + if (sl_enable_test_event_trigger) { + public_configs += [ ":test-event-trigger-config" ] + } } config("siwx917-common-config") { @@ -152,10 +177,6 @@ config("siwx917-common-config") { defines += [ "HEAP_MONITORING" ] } - if (siwx917_commissionable_data) { - defines += [ "SIWX917_USE_COMISSIONABLE_DATA=1" ] - } - ldflags = [ "-Wl,--no-warn-rwx-segment" ] } @@ -274,18 +295,16 @@ source_set("siwx917-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (silabs_test_event_trigger_enabled) { - sources += - [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] - defines += [ "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"" ] - } - public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", ] + if (sl_enable_test_event_trigger) { + public_deps += [ ":test-event-trigger" ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.cpp b/examples/platform/silabs/SilabsDeviceDataProvider.cpp index c487c334819dd5..0bf11cde951ab4 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.cpp +++ b/examples/platform/silabs/SilabsDeviceDataProvider.cpp @@ -23,13 +23,6 @@ #include #include -#ifdef SIWX917_USE_COMISSIONABLE_DATA -#include "DeviceConfig.h" -#include "silabs_utils.h" -#include -#include -#endif // SIWX917_USE_COMISSIONABLE_DATA - #include namespace chip { @@ -39,142 +32,6 @@ namespace Silabs { // using namespace chip::Credentials; using namespace chip::DeviceLayer::Internal; -// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 -#ifdef SIWX917_USE_COMISSIONABLE_DATA -void SilabsDeviceDataProvider::setupPayload(uint8_t * outBuf) -{ - SetupPayload payload; - std::string result; - ChipError err = CHIP_NO_ERROR; - payload.version = 0; - payload.discriminator.SetLongValue(discriminatorValue); - payload.setUpPINCode = passcode; - payload.rendezvousInformation.SetValue(static_cast(rendezvousFlag)); - payload.commissioningFlow = static_cast(commissionableFlow); - payload.vendorID = vendorId; - payload.productID = productId; - - QRCodeSetupPayloadGenerator generator(payload); - err = generator.payloadBase38Representation(result); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("Failed to get the payload: %d", err); - } - SILABS_LOG("Payload value in string format : %s", result.c_str()); - std::vector result1; - // skipping the MT: from the payload during decoding - err = base38Decode(result.substr(3), result1); - if (err == CHIP_NO_ERROR) - { - for (uint8_t i = 0; i < result1.size(); i++) - { - outBuf[i] = result1.at(i); - } - } -} - -// writing to the flash based on the value given in the DeviceConfig.h -CHIP_ERROR SilabsDeviceDataProvider::FlashFactoryData() -{ - // flashing the value to the nvm3 section of the flash - // TODO: remove this once it is removed SiWx917 have the nvm3 simiplicity commander support - CHIP_ERROR err; - // Checking for the value of CM and flag - if ((commissionableFlow > 3) || (rendezvousFlag > 7)) - { - return CHIP_ERROR_INTERNAL; - } - if (discriminatorValue != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_SetupDiscriminator, discriminatorValue); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - uint8_t payload[kTotalPayloadDataSizeInBytes]; - setupPayload(payload); - err = SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_SetupPayloadBitSet, payload, kTotalPayloadDataSizeInBytes); - if (err != CHIP_NO_ERROR) - { - return err; - } - if (spake2Interation != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_Spake2pIterationCount, spake2Interation); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (spake2Salt != NULL) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_Spake2pSalt, spake2Salt); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (spake2Verifier != NULL) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_Spake2pVerifier, spake2Verifier); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (productId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_ProductId, productId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (vendorId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_VendorId, vendorId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(productName) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_ProductName, productName); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(vendorName) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_VendorName, vendorName); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(hwVersionString) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, hwVersionString); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (rotatingId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_UniqueId, rotatingId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - return CHIP_NO_ERROR; -} -#endif - CHIP_ERROR SilabsDeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) { CHIP_ERROR err; @@ -510,6 +367,43 @@ CHIP_ERROR SilabsDeviceDataProvider::GetProductLabel(char * buf, size_t bufSize) return SilabsConfig::ReadConfigValueStr(SilabsConfig::KConfigKey_ProductLabel, buf, bufSize, productLabelLen); } +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED +/** + * @brief Reads the test event trigger key from NVM. If the key isn't present, returns default value if defined. + * + * @param[out] keySpan output buffer. Must be at least large enough for 16 bytes (ken length) + * @return CHIP_ERROR + */ +CHIP_ERROR SilabsDeviceDataProvider::GetTestEventTriggerKey(MutableByteSpan & keySpan) +{ + constexpr size_t kEnableKeyLength = 16; // Expected byte size of the EnableKey + CHIP_ERROR err = CHIP_NO_ERROR; + size_t keyLength = 0; + + VerifyOrReturnError(keySpan.size() >= kEnableKeyLength, CHIP_ERROR_BUFFER_TOO_SMALL); + + err = SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_Test_Event_Trigger_Key, keySpan.data(), kEnableKeyLength, + keyLength); +#ifndef NDEBUG + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + + constexpr char enableKey[] = SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY; + if (Encoding::HexToBytes(enableKey, strlen(enableKey), keySpan.data(), kEnableKeyLength) != kEnableKeyLength) + { + // enableKey Hex String doesn't have the correct length + memset(keySpan.data(), 0, keySpan.size()); + return CHIP_ERROR_INTERNAL; + } + err = CHIP_NO_ERROR; + } +#endif // NDEBUG + + keySpan.reduce_size(kEnableKeyLength); + return err; +} +#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED + SilabsDeviceDataProvider & SilabsDeviceDataProvider::GetDeviceDataProvider() { static SilabsDeviceDataProvider sDataProvider; diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.h b/examples/platform/silabs/SilabsDeviceDataProvider.h index f29e6be24d9d72..76caac04bd60b8 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.h +++ b/examples/platform/silabs/SilabsDeviceDataProvider.h @@ -37,12 +37,6 @@ class SilabsDeviceDataProvider : public CommissionableDataProvider, Internal::GenericDeviceInstanceInfoProvider(ConfigurationManagerImpl::GetDefaultInstance()) {} -// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 -#ifdef SIWX917_USE_COMISSIONABLE_DATA - void setupPayload(uint8_t * outBuf); - CHIP_ERROR FlashFactoryData(); -#endif /* SIWX917_USE_COMISSIONABLE_DATA */ - static SilabsDeviceDataProvider & GetDeviceDataProvider(); CHIP_ERROR GetSetupPayload(MutableCharSpan & payloadBuf); // ===== Members functions that implement the CommissionableDataProvider @@ -68,6 +62,9 @@ class SilabsDeviceDataProvider : public CommissionableDataProvider, CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override; CHIP_ERROR GetProductURL(char * buf, size_t bufSzie) override; CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override; + + // ===== Member functions that are Silabs Specific + CHIP_ERROR GetTestEventTriggerKey(MutableByteSpan & keySpan); }; } // namespace Silabs diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp index f9a11df74d7ae9..ef42c0d3a9dfd2 100644 --- a/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp @@ -17,6 +17,7 @@ */ #include "SilabsTestEventTriggerDelegate.h" +#include "SilabsDeviceDataProvider.h" using namespace ::chip::DeviceLayer; @@ -24,7 +25,14 @@ namespace chip { bool SilabsTestEventTriggerDelegate::DoesEnableKeyMatch(const ByteSpan & enableKey) const { - return !mEnableKey.empty() && mEnableKey.data_equal(enableKey); + uint8_t storedEnableKey[TestEventTriggerDelegate::kEnableKeyLength]; + MutableByteSpan enableKeySpan(storedEnableKey); + + // Return false if we were not able to get the enableKey + VerifyOrReturnValue( + Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetTestEventTriggerKey(enableKeySpan) == CHIP_NO_ERROR, false); + + return (!enableKeySpan.empty() && enableKeySpan.data_equal(enableKey)); } } // namespace chip diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h index 03ceabd69a7898..8359e489a16029 100644 --- a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h @@ -46,10 +46,7 @@ namespace chip { class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEventTriggerHandler { public: - explicit SilabsTestEventTriggerDelegate(const ByteSpan & enableKey) : mEnableKey(enableKey) - { - VerifyOrDie(AddHandler(this) == CHIP_NO_ERROR); - } + explicit SilabsTestEventTriggerDelegate() { VerifyOrDie(AddHandler(this) == CHIP_NO_ERROR); } /** * @brief Checks to see if `enableKey` provided matches value chosen by the manufacturer. @@ -69,9 +66,6 @@ class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEven // WARNING: LEGACY SUPPORT ONLY, DO NOT EXTEND FOR STANDARD CLUSTERS return (emberAfHandleEventTrigger(eventTrigger)) ? CHIP_NO_ERROR : CHIP_ERROR_INVALID_ARGUMENT; } - -private: - ByteSpan mEnableKey; }; } // namespace chip diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 8b7b1ebf86e264..ee0b891a2565f8 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -41,11 +41,11 @@ declare_args() { chip_default_wifi_psk = "" # Enable TestEventTrigger in GeneralDiagnostics cluster - silabs_test_event_trigger_enabled = false + sl_enable_test_event_trigger = false # The EnableKey in hex string format used by TestEventTrigger command in - # GeneralDiagnostics cluster. The length of the string should be 32. - silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" + # GeneralDiagnostics cluster. The length of the string should be 16 bytes. + sl_test_event_trigger_enable_key = "00112233445566778899AABBCCDDEEFF" } silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" @@ -94,6 +94,30 @@ config("chip_examples_project_config") { ] } +config("test-event-trigger-config") { + defines = [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLED" ] + + if (is_debug) { + defines += [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${sl_test_event_trigger_enable_key}\"" ] + } +} + +source_set("test-event-trigger") { + sources = [ + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp", + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.h", + ] + + public_configs = [ ":test-event-trigger-config" ] + + public_deps = [ + ":silabs-factory-data-provider", + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + source_set("openthread_core_config_efr32_chip_examples") { if (chip_enable_openthread) { sources = [ "project_include/OpenThreadConfig.h" ] @@ -157,6 +181,10 @@ source_set("silabs-factory-data-provider") { "${chip_root}/src/platform:platform_base", "${chip_root}/src/setup_payload", ] + + if (sl_enable_test_event_trigger) { + public_configs = [ ":test-event-trigger-config" ] + } } config("efr32-common-config") { @@ -206,6 +234,7 @@ config("silabs-wifi-config") { if (sl_wfx_config_softap) { defines += [ "SL_WFX_CONFIG_SOFTAP" ] } + if (sl_wfx_config_scan) { defines += [ "SL_WFX_CONFIG_SCAN" ] } @@ -213,6 +242,7 @@ config("silabs-wifi-config") { if (chip_enable_wifi_ipv4) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (rs91x_wpa3_transition) { # TODO: Change this macro once WF200 support is provided defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1" ] @@ -322,15 +352,6 @@ source_set("efr32-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (silabs_test_event_trigger_enabled) { - sources += - [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] - defines += [ - "SILABS_TEST_EVENT_TRIGGER_ENABLED=true", - "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"", - ] - } - public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/app/server", @@ -338,6 +359,10 @@ source_set("efr32-common") { "${chip_root}/src/setup_payload", ] + if (sl_enable_test_event_trigger) { + public_deps += [ ":test-event-trigger" ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index b5548b69f24f54..03ff976deca183 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -384,10 +384,10 @@ features can easily be toggled on or off. Here is a short list of options : ### Enabling test event trigger -`silabs_test_event_trigger_enabled, silabs_test_event_trigger_enable_key` +`sl_enable_test_event_trigger` ``` - The value of silabs_test_event_trigger_enable_key is specific to each device manufacturer + The enable the test event trigger, `sl_enable_test_event_trigger` must be true. - $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A silabs_test_event_trigger_enabled=true silabs_test_event_trigger_enable_key=\"00112233445566778899aabbccddeeff\" + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A sl_enable_test_event_trigger=true ``` diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni index 047de7f34492df..0619082413530d 100644 --- a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni @@ -21,3 +21,17 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" + +sl_enable_test_event_trigger = true + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_syncing = true +icd_enforce_sit_slow_poll_limit = true +chip_enable_icd_lit = true + +# ICD Matter Configuration flags +sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration +sl_active_mode_duration_ms = 0 # 0 Active Mode Duration +sl_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold diff --git a/examples/smoke-co-alarm-app/silabs/openthread.gni b/examples/smoke-co-alarm-app/silabs/openthread.gni index 650b338de86f93..845b2220b4570a 100644 --- a/examples/smoke-co-alarm-app/silabs/openthread.gni +++ b/examples/smoke-co-alarm-app/silabs/openthread.gni @@ -25,3 +25,22 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +sl_enable_test_event_trigger = true + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_syncing = true +icd_enforce_sit_slow_poll_limit = true +chip_icd_report_on_active_mode = true +chip_enable_icd_lit = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 3600000 # 60mins Idle Polling Interval +sl_ot_active_interval_ms = 1000 # 1000ms Active Polling Interval + +# ICD Matter Configuration flags +sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration +sl_active_mode_duration_ms = 0 # 0 Active Mode Duration +sl_active_mode_threshold_ms = 5000 # 5s Active Mode Threshold diff --git a/examples/virtual-device-app/android/App/app/build.gradle.kts b/examples/virtual-device-app/android/App/app/build.gradle.kts index e5998ddc554d6d..c9b40ccd5abc1d 100644 --- a/examples/virtual-device-app/android/App/app/build.gradle.kts +++ b/examples/virtual-device-app/android/App/app/build.gradle.kts @@ -76,7 +76,8 @@ dependencies { implementation(project(":core:data")) implementation(project(":core:domain")) implementation(project(":core:model")) - implementation(project(":core:ui")) + implementation(project(":core:ui")) + implementation(project(":feature:closure")) implementation(project(":feature:control")) implementation(project(":feature:main")) implementation(project(":feature:qrcode")) diff --git a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml index a5e06ead94b64c..87d075c431ea82 100644 --- a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml +++ b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt index 2e24a9246888b5..8adad6a4495d4d 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt @@ -35,6 +35,9 @@ object DeepLink { Device.OnOffSwitch -> "android-app://com.matter.virtual.device.app.feature.control/onOffSwitchFragment/${setting}" .toUri() + Device.DoorLock -> + "android-app://com.matter.virtual.device.app.feature.closure/doorLockFragment/${setting}" + .toUri() Device.Unknown -> throw UnsupportedOperationException("Unsupported device") } diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt index 067898bbd79d93..05b114f3385b70 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt @@ -22,6 +22,10 @@ sealed class Device( 3841 ) + @Serializable + object DoorLock : + Device("doorlock", R.string.matter_door_lock, R.drawable.round_lock_24, 0x000A, 3842) + @Serializable object Unknown : Device("unknown", R.string.matter_device, R.drawable.round_device_unknown_24, 65535, 3840) diff --git a/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml new file mode 100644 index 00000000000000..74cd8a77ffc307 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt index 0365727b110d25..623c0bbb978a7d 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt @@ -15,10 +15,10 @@ import androidx.navigation.NavOptions import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager import com.matter.virtual.device.app.core.common.DeepLink +import com.matter.virtual.device.app.core.common.Device import com.matter.virtual.device.app.core.common.MatterSettings import com.matter.virtual.device.app.core.ui.SharedViewModel import com.matter.virtual.device.app.feature.main.databinding.FragmentMainBinding -import com.matter.virtual.device.app.feature.main.model.Menu import dagger.hilt.android.AndroidEntryPoint import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.encodeToString @@ -84,15 +84,15 @@ class MainFragment : Fragment() { ) } MainUiState.Start -> { - val itemList = arrayListOf(Menu.ON_OFF_SWITCH) + val itemList = arrayListOf(Device.OnOffSwitch, Device.DoorLock) val menuAdapter = MenuAdapter( object : MenuAdapter.ItemHandler { - override fun onClick(item: Menu) { + override fun onClick(item: Device) { viewModel.consumeUiState() - val matterSettings = MatterSettings(device = item.device) + val matterSettings = MatterSettings(device = item) val jsonSettings = Json.encodeToString(matterSettings) try { findNavController() diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt index c3212333d7ec13..8df42477871afc 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt @@ -5,17 +5,17 @@ import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView +import com.matter.virtual.device.app.core.common.Device import com.matter.virtual.device.app.feature.main.databinding.ItemMenuBinding -import com.matter.virtual.device.app.feature.main.model.Menu internal class MenuAdapter(private val itemHandler: ItemHandler) : - ListAdapter( - object : DiffUtil.ItemCallback() { - override fun areItemsTheSame(oldItem: Menu, newItem: Menu): Boolean { - return oldItem.titleResId == newItem.titleResId + ListAdapter( + object : DiffUtil.ItemCallback() { + override fun areItemsTheSame(oldItem: Device, newItem: Device): Boolean { + return oldItem.deviceNameResId == newItem.deviceNameResId } - override fun areContentsTheSame(oldItem: Menu, newItem: Menu): Boolean { + override fun areContentsTheSame(oldItem: Device, newItem: Device): Boolean { return oldItem == newItem } } @@ -23,7 +23,7 @@ internal class MenuAdapter(private val itemHandler: ItemHandler) : inner class MenuViewHolder(private val binding: ItemMenuBinding) : RecyclerView.ViewHolder(binding.root) { - fun bind(item: Menu) { + fun bind(item: Device) { binding.item = item binding.itemHandler = itemHandler } @@ -41,6 +41,6 @@ internal class MenuAdapter(private val itemHandler: ItemHandler) : } interface ItemHandler { - fun onClick(item: Menu) + fun onClick(item: Device) } } diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt deleted file mode 100644 index 67e2658c5bed44..00000000000000 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.matter.virtual.device.app.feature.main.model - -import androidx.annotation.DrawableRes -import androidx.annotation.StringRes -import com.matter.virtual.device.app.core.common.Device -import com.matter.virtual.device.app.feature.main.R - -enum class Menu( - @DrawableRes val iconResId: Int, - @StringRes val titleResId: Int, - val isDim: Boolean = false, - val device: Device = Device.Unknown -) { - ON_OFF_SWITCH( - R.drawable.round_toggle_on_24, - R.string.matter_on_off_switch, - device = Device.OnOffSwitch - ) -} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml index b9b12400969d84..23239f41667e6e 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml @@ -10,15 +10,14 @@ + type="com.matter.virtual.device.app.core.common.Device" /> @@ -35,10 +34,10 @@ android:layout_marginTop="@dimen/menu_item_image_margin_top" android:layout_marginBottom="@dimen/menu_item_image_margin_bottom" android:tint="@color/device_image_tint" + app:imageSrc="@{item.deviceIconResId}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:imageSrc="@{item.iconResId}" /> + app:layout_constraintTop_toTopOf="parent" /> - diff --git a/examples/window-app/silabs/openthread.gni b/examples/window-app/silabs/openthread.gni index d3d50ab878b211..9fd09bd510a840 100644 --- a/examples/window-app/silabs/openthread.gni +++ b/examples/window-app/silabs/openthread.gni @@ -29,7 +29,7 @@ openthread_external_platform = chip_enable_icd_server = true enable_synchronized_sed = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 1000 # 1s Idle Intervals diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index ce6b12f1df330d..23b8087ff54460 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -56,6 +56,29 @@ _install_additional_pip_requirements() { unset _SETUP_PLATFORM } +_submodules_need_updating() { + # Validates if a set of submodules that should always be checked out are up to date. + + # Pigweed will be up to date on an initial setup, however it may change over time. + # The rest are a small subset of things that are always checked out (have no platform attachment). + _SUBMODULE_PATHS=( + "third_party/pigweed/repo" + "third_party/openthread/repo" + "third_party/editline/repo" + ) + + for submodule_path in "${_SUBMODULE_PATHS[@]}"; do + if git submodule status "$submodule_path" | grep -E '^-' >/dev/null 2>&1; then + echo "git shows that $submodule_path has changes" + unset _SUBMODULE_PATHS + return 0 # Success + fi + done + + unset _SUBMODULE_PATHS + return 1 # Failure +} + _bootstrap_or_activate() { if [ -n "$BASH" ]; then local _BOOTSTRAP_PATH="${BASH_SOURCE[0]}" @@ -164,6 +187,20 @@ unset -f _install_additional_pip_requirements pw_cleanup +if _submodules_need_updating; then + # yellow output + if which tput >/dev/null; then tput setaf 3; fi + + echo "Some submodules seem out of date." + echo "For a clean checkout, consider running:" + echo " ./scripts/checkout_submodules.py --shallow --platform " + echo "OR for a full checkout:" + echo " git submodules update -f --init --recursive" + + # reset output + if which tput >/dev/null; then tput sgr0; fi +fi + unset _ACTION_TAKEN unset _CHIP_ROOT unset PW_CIPD_INSTALL_DIR diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml index 7c353c2b2382b5..9738fefb7024fe 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml @@ -100,10 +100,13 @@ tests: } - label: - "Step 2: TH binds GroupId to GroupKeySet with entries as follows: List - item 1: GroupId: 0x0103, GroupKeySetId: 0x01a3, List item 2: GroupId: - 0x0104, GroupKeySetId: 0x01a4, List item 3: GroupId: 0x0105, - GroupKeySetId: 0x01a3" + "Step 2: TH binds GroupIds 0x0101 and 0x0102 with GroupKeySetID 0x01a1 + and GroupId 0x0103 with GroupKeySetID 0x01a3 in the GroupKeyMap + attribute list on GroupKeyManagement cluster by writing the + GroupKeyMap attribute with three entries as follows: List item 1: + GroupId: 0x0101, GroupKeySetId: 0x01a1, List item 2: GroupId: 0x0102, + GroupKeySetId: 0x01a1, List item 3: GroupId: 0x0103, GroupKeySetId: + 0x01a3" cluster: "Group Key Management" command: "writeAttribute" attribute: "GroupKeyMap" @@ -175,7 +178,7 @@ tests: - label: "Step 5: TH sends a AddGroup Command to the Groups cluster on Endpoint - PIXIT.G.ENDPOINT over CASE with the GroupID field set to 0x0101 and + PIXIT.G.ENDPOINT over CASE with the GroupID field set to 0x0104 and the GroupName set to an empty string" cluster: "Groups" endpoint: Groups.Endpoint @@ -183,7 +186,7 @@ tests: arguments: values: - name: GroupID - value: 0x0101 + value: 0x0104 - name: GroupName value: "" response: diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index 2c7be1eebcf05e..be5f6f789c5c04 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -59,7 +59,6 @@ tests: - name: "Status" value: 0 - #Issue: https://github.com/project-chip/connectedhomeip/issues/28992 - label: "Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product maker." diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml index ac024c5644ef45..7955c2fa199d11 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml @@ -29,37 +29,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml index 64335127d530ae..4d3f94418afef9 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml @@ -36,32 +36,6 @@ config: defaultValue: "hex:70617373776f7264313233" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml index ec89cc137f89e4..c8d8fa91f34633 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml @@ -43,32 +43,6 @@ tests: - name: "expectedValue" value: "y" - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml index 36fa1ca62ceb30..49422e215be178 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml @@ -43,37 +43,6 @@ tests: - name: "expectedValue" value: "y" - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after successfull Commission" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml index b8fed5f79afbc5..6b5eb06b47e5cf 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml @@ -29,37 +29,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Step 1: TH sends ScanNetworks command to the DUT with the SSID field omitted and the Breadcrumb field set to 1" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml index aaf348393320e1..f020b75bee18dd 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml @@ -29,32 +29,6 @@ config: defaultValue: "hex:47524C50726976617465" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition : Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml index 892ae4e63059b5..cb12c7a35ac6ed 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml @@ -32,32 +32,6 @@ config: defaultValue: "hex:70617373776f7264313233" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml index aeac82e7857335..9ec38988742f85 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml @@ -28,37 +28,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network" - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index 66e3207b24c22b..8ba579ca9266ba 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -29,32 +29,6 @@ config: defaultValue: "hex:7A6967626565686F6D65" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml index 1fbbdab81d8a26..638b78cd2ac59d 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml @@ -36,10 +36,10 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner) or tv-casting-app (when DUT is a commissionee): - ./chip-tool contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' 1 1 + ./chip-tool contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 1 1 --Data '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' - ./chip-tv-casting-app contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' 1 1 + ./chip-tv-casting-app contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 1 1 --Data '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' On TH (tv-app), Verify the launch content command is received successfully. diff --git a/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml index 832b21e12ac63b..b2f927d14fd554 100644 --- a/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml @@ -48,9 +48,9 @@ tests: On the TH(Chip-tool) Log, Verify featureMap value is 0 and below is the sample log provided for the raspi platform: - [1705923720.577354][23553:23555] CHIP:DMG: } - [1705923720.577393][23553:23555] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_FFFC DataVersion: 2217281174 - [1705923720.577412][23553:23555] CHIP:TOO: FeatureMap: 1 + [1707803263.396282][12695:12697] CHIP:DMG: } + [1707803263.396447][12695:12697] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_FFFC DataVersion: 3404644350 + [1707803263.396492][12695:12697] CHIP:TOO: FeatureMap: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 734282a82e7ca8..2ce0e296bbc2d5 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -136,82 +136,87 @@ tests: verification: | For all the Endpoint id’s listed in step 1a run the following steps. For all the server list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + The cluster ID's listed in the below log is from the All-Cluster-app. Please run the below command in all the Reference apps (bridge-app, tv-app, microwave-oven-app, Lock-app, Energy-Management-app and Thermostat-app). + ./chip-tool descriptor read server-list 1 1 - Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 70. - - [1693218196.392903][13451:13453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3853201227 - [1693218196.393030][13451:13453] CHIP:TOO: ServerList: 70 entries - [1693218196.393047][13451:13453] CHIP:TOO: [1]: 3 - [1693218196.393059][13451:13453] CHIP:TOO: [2]: 4 - [1693218196.393071][13451:13453] CHIP:TOO: [3]: 5 - [1693218196.393081][13451:13453] CHIP:TOO: [4]: 6 - [1693218196.393092][13451:13453] CHIP:TOO: [5]: 7 - [1693218196.393103][13451:13453] CHIP:TOO: [6]: 8 - [1693218196.393114][13451:13453] CHIP:TOO: [7]: 15 - [1693218196.393125][13451:13453] CHIP:TOO: [8]: 29 - [1693218196.393136][13451:13453] CHIP:TOO: [9]: 30 - [1693218196.393147][13451:13453] CHIP:TOO: [10]: 37 - [1693218196.393159][13451:13453] CHIP:TOO: [11]: 47 - [1693218196.393169][13451:13453] CHIP:TOO: [12]: 59 - [1693218196.393180][13451:13453] CHIP:TOO: [13]: 64 - [1693218196.393191][13451:13453] CHIP:TOO: [14]: 65 - [1693218196.393201][13451:13453] CHIP:TOO: [15]: 69 - [1693218196.393212][13451:13453] CHIP:TOO: [16]: 80 - [1693218196.393222][13451:13453] CHIP:TOO: [17]: 81 - [1693218196.393233][13451:13453] CHIP:TOO: [18]: 82 - [1693218196.393244][13451:13453] CHIP:TOO: [19]: 83 - [1693218196.393254][13451:13453] CHIP:TOO: [20]: 84 - [1693218196.393265][13451:13453] CHIP:TOO: [21]: 85 - [1693218196.393276][13451:13453] CHIP:TOO: [22]: 86 - [1693218196.393286][13451:13453] CHIP:TOO: [23]: 87 - [1693218196.393297][13451:13453] CHIP:TOO: [24]: 89 - [1693218196.393308][13451:13453] CHIP:TOO: [25]: 91 - [1693218196.393318][13451:13453] CHIP:TOO: [26]: 92 - [1693218196.393329][13451:13453] CHIP:TOO: [27]: 93 - [1693218196.393340][13451:13453] CHIP:TOO: [28]: 96 - [1693218196.393350][13451:13453] CHIP:TOO: [29]: 97 - [1693218196.393362][13451:13453] CHIP:TOO: [30]: 113 - [1693218196.393373][13451:13453] CHIP:TOO: [31]: 114 - [1693218196.393384][13451:13453] CHIP:TOO: [32]: 257 - [1693218196.393394][13451:13453] CHIP:TOO: [33]: 258 - [1693218196.393405][13451:13453] CHIP:TOO: [34]: 259 - [1693218196.393416][13451:13453] CHIP:TOO: [35]: 512 - [1693218196.393427][13451:13453] CHIP:TOO: [36]: 513 - [1693218196.393437][13451:13453] CHIP:TOO: [37]: 514 - [1693218196.393448][13451:13453] CHIP:TOO: [38]: 516 - [1693218196.393459][13451:13453] CHIP:TOO: [39]: 768 - [1693218196.393470][13451:13453] CHIP:TOO: [40]: 769 - [1693218196.393481][13451:13453] CHIP:TOO: [41]: 1024 - [1693218196.393492][13451:13453] CHIP:TOO: [42]: 1026 - [1693218196.393503][13451:13453] CHIP:TOO: [43]: 1027 - [1693218196.393514][13451:13453] CHIP:TOO: [44]: 1028 - [1693218196.393525][13451:13453] CHIP:TOO: [45]: 1029 - [1693218196.393536][13451:13453] CHIP:TOO: [46]: 1030 - [1693218196.393546][13451:13453] CHIP:TOO: [47]: 1036 - [1693218196.393557][13451:13453] CHIP:TOO: [48]: 1037 - [1693218196.393568][13451:13453] CHIP:TOO: [49]: 1043 - [1693218196.393579][13451:13453] CHIP:TOO: [50]: 1045 - [1693218196.393590][13451:13453] CHIP:TOO: [51]: 1066 - [1693218196.393601][13451:13453] CHIP:TOO: [52]: 1067 - [1693218196.393611][13451:13453] CHIP:TOO: [53]: 1068 - [1693218196.393622][13451:13453] CHIP:TOO: [54]: 1069 - [1693218196.393633][13451:13453] CHIP:TOO: [55]: 1070 - [1693218196.393643][13451:13453] CHIP:TOO: [56]: 1071 - [1693218196.393654][13451:13453] CHIP:TOO: [57]: 1283 - [1693218196.393664][13451:13453] CHIP:TOO: [58]: 1284 - [1693218196.393675][13451:13453] CHIP:TOO: [59]: 1285 - [1693218196.393686][13451:13453] CHIP:TOO: [60]: 1286 - [1693218196.393697][13451:13453] CHIP:TOO: [61]: 1287 - [1693218196.393708][13451:13453] CHIP:TOO: [62]: 1288 - [1693218196.393718][13451:13453] CHIP:TOO: [63]: 1289 - [1693218196.393729][13451:13453] CHIP:TOO: [64]: 1290 - [1693218196.393740][13451:13453] CHIP:TOO: [65]: 1291 - [1693218196.393750][13451:13453] CHIP:TOO: [66]: 1292 - [1693218196.393761][13451:13453] CHIP:TOO: [67]: 1293 - [1693218196.393772][13451:13453] CHIP:TOO: [68]: 1294 - [1693218196.393783][13451:13453] CHIP:TOO: [69]: 2820 - [1693218196.393794][13451:13453] CHIP:TOO: [70]: 4294048773 + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, + + [1707996554.409850][20755:20757] CHIP:DMG: } + [1707996554.410814][20755:20757] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3583190746 + [1707996554.410955][20755:20757] CHIP:TOO: ServerList: 71 entries + [1707996554.410990][20755:20757] CHIP:TOO: [1]: 3 + [1707996554.411002][20755:20757] CHIP:TOO: [2]: 4 + [1707996554.411013][20755:20757] CHIP:TOO: [3]: 6 + [1707996554.411024][20755:20757] CHIP:TOO: [4]: 7 + [1707996554.411034][20755:20757] CHIP:TOO: [5]: 8 + [1707996554.411045][20755:20757] CHIP:TOO: [6]: 15 + [1707996554.411056][20755:20757] CHIP:TOO: [7]: 29 + [1707996554.411067][20755:20757] CHIP:TOO: [8]: 30 + [1707996554.411078][20755:20757] CHIP:TOO: [9]: 37 + [1707996554.411092][20755:20757] CHIP:TOO: [10]: 47 + [1707996554.411103][20755:20757] CHIP:TOO: [11]: 59 + [1707996554.411113][20755:20757] CHIP:TOO: [12]: 64 + [1707996554.411124][20755:20757] CHIP:TOO: [13]: 65 + [1707996554.411135][20755:20757] CHIP:TOO: [14]: 69 + [1707996554.411146][20755:20757] CHIP:TOO: [15]: 72 + [1707996554.411156][20755:20757] CHIP:TOO: [16]: 73 + [1707996554.411167][20755:20757] CHIP:TOO: [17]: 74 + [1707996554.411177][20755:20757] CHIP:TOO: [18]: 80 + [1707996554.411188][20755:20757] CHIP:TOO: [19]: 81 + [1707996554.411199][20755:20757] CHIP:TOO: [20]: 82 + [1707996554.411209][20755:20757] CHIP:TOO: [21]: 83 + [1707996554.411220][20755:20757] CHIP:TOO: [22]: 84 + [1707996554.411231][20755:20757] CHIP:TOO: [23]: 85 + [1707996554.411240][20755:20757] CHIP:TOO: [24]: 86 + [1707996554.411251][20755:20757] CHIP:TOO: [25]: 87 + [1707996554.411261][20755:20757] CHIP:TOO: [26]: 89 + [1707996554.411271][20755:20757] CHIP:TOO: [27]: 91 + [1707996554.411282][20755:20757] CHIP:TOO: [28]: 92 + [1707996554.411293][20755:20757] CHIP:TOO: [29]: 93 + [1707996554.411303][20755:20757] CHIP:TOO: [30]: 94 + [1707996554.411313][20755:20757] CHIP:TOO: [31]: 96 + [1707996554.411323][20755:20757] CHIP:TOO: [32]: 97 + [1707996554.411334][20755:20757] CHIP:TOO: [33]: 98 + [1707996554.411345][20755:20757] CHIP:TOO: [34]: 113 + [1707996554.411355][20755:20757] CHIP:TOO: [35]: 114 + [1707996554.411367][20755:20757] CHIP:TOO: [36]: 128 + [1707996554.411376][20755:20757] CHIP:TOO: [37]: 129 + [1707996554.411387][20755:20757] CHIP:TOO: [38]: 144 + [1707996554.411396][20755:20757] CHIP:TOO: [39]: 145 + [1707996554.411406][20755:20757] CHIP:TOO: [40]: 152 + [1707996554.411417][20755:20757] CHIP:TOO: [41]: 153 + [1707996554.411427][20755:20757] CHIP:TOO: [42]: 157 + [1707996554.411437][20755:20757] CHIP:TOO: [43]: 159 + [1707996554.411449][20755:20757] CHIP:TOO: [44]: 258 + [1707996554.411459][20755:20757] CHIP:TOO: [45]: 259 + [1707996554.411469][20755:20757] CHIP:TOO: [46]: 512 + [1707996554.411480][20755:20757] CHIP:TOO: [47]: 513 + [1707996554.411490][20755:20757] CHIP:TOO: [48]: 514 + [1707996554.411500][20755:20757] CHIP:TOO: [49]: 516 + [1707996554.411511][20755:20757] CHIP:TOO: [50]: 768 + [1707996554.411521][20755:20757] CHIP:TOO: [51]: 769 + [1707996554.411532][20755:20757] CHIP:TOO: [52]: 1024 + [1707996554.411559][20755:20757] CHIP:TOO: [53]: 1026 + [1707996554.411562][20755:20757] CHIP:TOO: [54]: 1027 + [1707996554.411565][20755:20757] CHIP:TOO: [55]: 1028 + [1707996554.411568][20755:20757] CHIP:TOO: [56]: 1029 + [1707996554.411571][20755:20757] CHIP:TOO: [57]: 1030 + [1707996554.411575][20755:20757] CHIP:TOO: [58]: 1036 + [1707996554.411578][20755:20757] CHIP:TOO: [59]: 1037 + [1707996554.411581][20755:20757] CHIP:TOO: [60]: 1043 + [1707996554.411584][20755:20757] CHIP:TOO: [61]: 1045 + [1707996554.411587][20755:20757] CHIP:TOO: [62]: 1066 + [1707996554.411589][20755:20757] CHIP:TOO: [63]: 1067 + [1707996554.411592][20755:20757] CHIP:TOO: [64]: 1068 + [1707996554.411595][20755:20757] CHIP:TOO: [65]: 1069 + [1707996554.411598][20755:20757] CHIP:TOO: [66]: 1070 + [1707996554.411601][20755:20757] CHIP:TOO: [67]: 1071 + [1707996554.411604][20755:20757] CHIP:TOO: [68]: 1283 + [1707996554.411607][20755:20757] CHIP:TOO: [69]: 1288 + [1707996554.411610][20755:20757] CHIP:TOO: [70]: 2820 + [1707996554.411613][20755:20757] CHIP:TOO: [71]: 4294048773 + ./chip-tool descriptor read server-list 1 2 @@ -233,6 +238,8 @@ tests: verification: | For all the Endpoint id’s listed in step 1a run the following steps. For all the client list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + The cluster ID's listed in the below log is from the All-Cluster-app. Please run the below command in all the Reference apps (bridge-app, tv-app, microwave-oven-app, Lock-app, Energy-Management-app and Thermostat-app). + ./chip-tool descriptor read client-list 1 1 Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 1. @@ -242,7 +249,6 @@ tests: [1676367470.160282][9805:9807] CHIP:TOO: ClientList: 1 entries [1676367470.160289][9805:9807] CHIP:TOO: [1]: 6 - ./chip-tool descriptor read client-list 1 2 Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 0. diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml index ea416ee91e96b3..769dc5d3cba3ac 100644 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml @@ -48,9 +48,9 @@ tests: On the TH(Chip-tool) Log, Verify featureMap value is 0 and below is the sample log provided for the raspi platform: - [1705995388.110138][7525:7527] CHIP:DMG: } - [1705995388.110173][7525:7527] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_FFFC DataVersion: 1324786556 - [1705995388.110192][7525:7527] CHIP:TOO: FeatureMap: 1 + [1707803286.349129][12699:12701] CHIP:DMG: } + [1707803286.349183][12699:12701] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_FFFC DataVersion: 811903427 + [1707803286.349202][12699:12701] CHIP:TOO: FeatureMap: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP diff --git a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml index 7f718a160bb9a0..bbafb43b2725fd 100644 --- a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml @@ -17,6 +17,7 @@ name: 125.3.2. [TC-G-3.2] Groups Cluster Commands [DUT-Client] PICS: - G.C + - GRPKEY.C config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml index 3fe5afe83a8510..365d820bccf00f 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml @@ -35,6 +35,47 @@ tests: 2c.TH reads from the DUT the RegisteredClients attribute. Verify that the DUT response contains empty list of registered clients. disabled: true + - label: + "Step 0a: Preconfition 1: Read 'register-clients' by sending the + command below and note the check-in nodeID for the entries" + verification: | + ./chip-tool icdmanagement read registered-clients 1 0 + + [1704888897.027204][71644:71646] CHIP:DMG: } + [1704888897.027313][71644:71646] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0003 DataVersion: 852105378 + [1704888897.027351][71644:71646] CHIP:TOO: RegisteredClients: 1 entries + [1704888897.027394][71644:71646] CHIP:TOO: [1]: { + [1704888897.027412][71644:71646] CHIP:TOO: CheckInNodeID: 112233 + [1704888897.027421][71644:71646] CHIP:TOO: MonitoredSubject: 112233 + [1704888897.027431][71644:71646] CHIP:TOO: FabricIndex: 1 + [1704888897.027440][71644:71646] CHIP:TOO: } + [1704888897.027521][71644:71646] CHIP:EM: <<< [E:49337i S:30873 M:176023643 (Ack:200282364)] (S) Msg TX to 1:0000000000000001 [5BF5] [UDP:[fe80::a70c:61dc:df51:6945%enxd03745ce8f62]:5540] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 0b: Preconfition 2: Please send the 'unregister client' command + using the check-in nodeID received from the previous read" + verification: | + ./chip-tool icdmanagement unregister-client 112233 1 0 + + [1704888949.629057][71657:71659] CHIP:DMG: + [1704888949.629066][71657:71659] CHIP:DMG: InteractionModelRevision = 11 + [1704888949.629074][71657:71659] CHIP:DMG: }, + [1704888949.629125][71657:71659] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0002 Status=0x0 + [1704888949.629153][71657:71659] CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 0c: Preconfition 3: Verify that all entries have been + successfully unregistered by reading 'register-clients'" + verification: | + ./chip-tool icdmanagement read registered-clients 1 0 + [1704889092.945869][71700:71702] CHIP:DMG: } + [1704889092.945955][71700:71702] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0003 DataVersion: 852105378 + [1704889092.945989][71700:71702] CHIP:TOO: RegisteredClients: 0 entries + [1704889092.946079][71700:71702] CHIP:EM: <<< [E:63454i S:39669 M:600516 (Ack:156383188)] (S) + disabled: true + - label: "Step 1: TH sends RegisterClient command. - CheckInNodeID: registering clients node ID - MonitoredSubject: monitored subject ID - Key: shared diff --git a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml index b3535b13ceec51..a1641587411efa 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml @@ -101,7 +101,6 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - saveAs: Step6_current_mode_dut constraints: type: int8u minValue: 0 diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml index 09e18d01b69f9c..b913c30975d85b 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml @@ -119,11 +119,3 @@ tests: verification: | Out of scope disabled: true - - - label: - "Step 6: Perform the OTA Update on DUT using vendor specific - mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to initiate OTA Update and verify that the software image is transferred to the DUT - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml index 60e55dc65e397b..f58d180b4170bf 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml @@ -157,11 +157,3 @@ tests: [1653636406.637617][11116:11121] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000A DataVersion: 1527020963 [1653636406.637708][11116:11121] CHIP:TOO: SoftwareVersion: 1 disabled: true - - - label: - "Step 6: Apply the OTA Update on DUT using vendor specific mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to apply OTA Update and verify that the DUT starts updating its software. - Once the update is finished verify the software version on the DUT to match the version downloaded for the software update. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml index fe03bc98caeb3d..a4fad4cc9fbe35 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml @@ -121,11 +121,3 @@ tests: verification: | Out of scope disabled: true - - - label: - "Step 6: Perform the OTA Update from DUT using vendor specific - mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to initiate OTA Update and verify that the software image is transferred from the DUT - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml deleted file mode 100644 index 409fdf5b82f1ec..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml +++ /dev/null @@ -1,209 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 31.15.1. [TC-SU-4.2] Tests for verifying cluster attributes from Admin(DUT) - -PICS: - - MCORE.ACL.Administrator - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT sends a write request for the DefaultOTAProviders - Attribute to the TH." - verification: | - Verify that the OTA Requestor App receives the write command and does not reject the value as invalid. - - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - - - Verify write request for the DefaultOTAProviders attribute on TH [OTA-REQ] Logs: - - [1662651310.444641][30167:30167] CHIP:IM: Received Write request - [1662651310.444820][30167:30167] CHIP:DMG: IM WH moving to [Initialized] - [1662651310.444952][30167:30167] CHIP:DMG: WriteRequestMessage = - [1662651310.445036][30167:30167] CHIP:DMG: { - [1662651310.445112][30167:30167] CHIP:DMG: suppressResponse = false, - [1662651310.445225][30167:30167] CHIP:DMG: timedRequest = false, - [1662651310.445335][30167:30167] CHIP:DMG: AttributeDataIBs = - [1662651310.445455][30167:30167] CHIP:DMG: [ - [1662651310.445565][30167:30167] CHIP:DMG: AttributeDataIB = - [1662651310.445698][30167:30167] CHIP:DMG: { - [1662651310.445826][30167:30167] CHIP:DMG: AttributePathIB = - [1662651310.445974][30167:30167] CHIP:DMG: { - [1662651310.446124][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651310.446289][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651310.446457][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651310.446620][30167:30167] CHIP:DMG: } - [1662651310.446772][30167:30167] CHIP:DMG: - [1662651310.446905][30167:30167] CHIP:DMG: Data = [ - [1662651310.447049][30167:30167] CHIP:DMG: - [1662651310.447158][30167:30167] CHIP:DMG: ], - [1662651310.447246][30167:30167] CHIP:DMG: }, - [1662651310.447338][30167:30167] CHIP:DMG: - [1662651310.447410][30167:30167] CHIP:DMG: AttributeDataIB = - [1662651310.447490][30167:30167] CHIP:DMG: { - [1662651310.447570][30167:30167] CHIP:DMG: AttributePathIB = - [1662651310.447661][30167:30167] CHIP:DMG: { - [1662651310.447754][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651310.447854][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651310.447955][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651310.448054][30167:30167] CHIP:DMG: ListIndex = Null, - [1662651310.448171][30167:30167] CHIP:DMG: } - [1662651310.448270][30167:30167] CHIP:DMG: - [1662651310.448360][30167:30167] CHIP:DMG: Data = - [1662651310.448449][30167:30167] CHIP:DMG: { - [1662651310.448540][30167:30167] CHIP:DMG: 0x1 = 123, - [1662651310.448641][30167:30167] CHIP:DMG: 0x2 = 0, - [1662651310.448742][30167:30167] CHIP:DMG: }, - [1662651310.448831][30167:30167] CHIP:DMG: }, - [1662651310.448913][30167:30167] CHIP:DMG: - [1662651310.448979][30167:30167] CHIP:DMG: ], - [1662651310.449053][30167:30167] CHIP:DMG: - [1662651310.449111][30167:30167] CHIP:DMG: moreChunkedMessages = false, - [1662651310.449178][30167:30167] CHIP:DMG: InteractionModelRevision = 1 - [1662651310.449244][30167:30167] CHIP:DMG: }, - [1662651310.449361][30167:30167] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002A e=0 p=o - [1662651310.449426][30167:30167] CHIP:DMG: AccessControl: allowed - disabled: true - - - label: - "Step 2: DUT sends a read request to read the DefaultOTAProviders - Attribute to the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read default-otaproviders 321 0 - - Verify read request for the DefaultOTAProviders attribute on TH [OTA-REQ] Logs: - [1662651381.708529][30167:30167] CHIP:IM: Received Read request - [1662651381.708619][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651381.708648][30167:30167] CHIP:DMG: { - [1662651381.708671][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651381.708733][30167:30167] CHIP:DMG: [ - [1662651381.708762][30167:30167] CHIP:DMG: AttributePathIB = - [1662651381.708813][30167:30167] CHIP:DMG: { - [1662651381.708865][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651381.708920][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651381.708975][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651381.709027][30167:30167] CHIP:DMG: } - [1662651381.709079][30167:30167] CHIP:DMG: - [1662651381.709127][30167:30167] CHIP:DMG: ], - [1662651381.709159][30167:30167] CHIP:DMG: - [1662651381.709189][30167:30167] CHIP:DMG: isFabricFiltered = true, - disabled: true - - - label: - "Step 3: DUT sends a read request to read the UpdatePossible attribute - from the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-possible 321 0 - - Verify UpdatePossible attribute on TH [OTA-REQ] Logs: - - [1662651426.055059][30167:30167] CHIP:IM: Received Read request - [1662651426.055180][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651426.055225][30167:30167] CHIP:DMG: { - [1662651426.055264][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651426.055308][30167:30167] CHIP:DMG: [ - [1662651426.055349][30167:30167] CHIP:DMG: AttributePathIB = - [1662651426.055397][30167:30167] CHIP:DMG: { - [1662651426.055444][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651426.055500][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651426.055553][30167:30167] CHIP:DMG: Attribute = 0x0000_0001, - [1662651426.055603][30167:30167] CHIP:DMG: } - [1662651426.055654][30167:30167] CHIP:DMG: - [1662651426.055701][30167:30167] CHIP:DMG: ], - [1662651426.055747][30167:30167] CHIP:DMG: - disabled: true - - - label: - "Step 4: DUT sends a read request to read the UpdateState Attribute - from the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-state 321 0 - - Verify UpdateState attribute on TH [OTA-REQ] Logs: - - [1662651459.324406][30167:30167] CHIP:IM: Received Read request - [1662651459.324545][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651459.324597][30167:30167] CHIP:DMG: { - [1662651459.324641][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651459.324692][30167:30167] CHIP:DMG: [ - [1662651459.324739][30167:30167] CHIP:DMG: AttributePathIB = - [1662651459.324847][30167:30167] CHIP:DMG: { - [1662651459.324914][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651459.324973][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651459.325030][30167:30167] CHIP:DMG: Attribute = 0x0000_0002, - [1662651459.325083][30167:30167] CHIP:DMG: } - [1662651459.325138][30167:30167] CHIP:DMG: - [1662651459.325188][30167:30167] CHIP:DMG: ], - [1662651459.325240][30167:30167] CHIP:DMG: - disabled: true - - - label: - "Step 5: TH should start initiating the Software update process. While - the TH is downloading the image, DUT sends a read request to read the - UpdateStateProgress attribute from the TH." - verification: | - Write the acl entry to allow the software update: - - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [321], "targets": null}]' 123 0 - - [1686306394.095355][30543:30545] CHIP:DMG: StatusIB = - [1686306394.095380][30543:30545] CHIP:DMG: { - [1686306394.095404][30543:30545] CHIP:DMG: status = 0x00 (SUCCESS), - [1686306394.095436][30543:30545] CHIP:DMG: }, - - Run the announce ota provider command to start the software update and check the UpdateStateProgress - - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - - where 321 is OTA Requestor node ID and 123 is OTA Provider node ID - - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-state-progress 321 0 - - Verify UpdateStateProgress attribute on TH [OTA-REQ] Logs: - - [1662651648.244248][30167:30167] CHIP:IM: Received Read request - [1662651648.244329][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651648.244353][30167:30167] CHIP:DMG: { - [1662651648.244372][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651648.244399][30167:30167] CHIP:DMG: [ - [1662651648.244430][30167:30167] CHIP:DMG: AttributePathIB = - [1662651648.244457][30167:30167] CHIP:DMG: { - [1662651648.244492][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651648.244523][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651648.244558][30167:30167] CHIP:DMG: Attribute = 0x0000_0003, - [1662651648.244584][30167:30167] CHIP:DMG: } - [1662651648.244618][30167:30167] CHIP:DMG: - [1662651648.244643][30167:30167] CHIP:DMG: ], - [1662651648.244676][30167:30167] CHIP:DMG: - [1662651648.244700][30167:30167] CHIP:DMG: isFabricFiltered = true, - [1662651648.244721][30167:30167] CHIP:DMG: InteractionModelRevision = 1 - [1662651648.244749][30167:30167] CHIP:DMG: }, - [1662651648.244822][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 859204e549f7b2..b39a2e762a1113 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -309,11 +309,10 @@ tests: to G1, the SceneID field set to 0x01, the TransitionTime field set to 1000 (1s) and a set of extension fields appropriate to AC1." verification: | - ./chip-tool scenesmanagement add-scene GroupID SceneID TransitionTime "SceneName" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' nodeId endpointId + ./chip-tool scenesmanagement add-scene 0x0101 0x01 1000 "scene name" '[{"clusterID": "0x0006", "attributeValueList":[{"attributeID": "0x0001", "attributeValue": "0x01"}, ]}, {"clusterID": "0x0008", "attributeValueList":[{"attributeID": "0x0000", "attributeValue": "0x64"}, ]}]' 1 1 - Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application + Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 257 and the SceneID field set to 0x01 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1705680175.863785][5823:5825] CHIP:DMG: }, [1705680175.863851][5823:5825] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0000 [1705680175.863880][5823:5825] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0000 @@ -613,11 +612,12 @@ tests: set to G1 and the SceneID field set to 0x03." PICS: S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP verification: | - ./chip-tool scenesmanagement view-scene GroupId SceneId Node-Id EndpointId + ./chip-tool scenesmanagement view-scene 0x0101 0x03 1 1 - Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application + Verify DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 257, the SceneID field set to 0x03, the TransitionTime field set to 1 and a set of extension fields appropriate to AC1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + NOTE: The values below are expected to match the values from the specific AC tested - Verify that the extension fields in the log match the ones expected and that the log output is similar to the following: [1707285444.028460][13682:13684] CHIP:DMG: }, [1707285444.028553][13682:13684] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 [1707285444.028579][13682:13684] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 @@ -627,13 +627,13 @@ tests: [1707285444.028706][13682:13684] CHIP:TOO: sceneID: 3 [1707285444.028717][13682:13684] CHIP:TOO: transitionTime: 1 [1707285444.028728][13682:13684] CHIP:TOO: sceneName: scene name - [1707285444.028766][13682:13684] CHIP:TOO: extensionFieldSets: XX entries - [1707285444.028814][13682:13684] CHIP:TOO: [XX]: { - [1707285444.028828][13682:13684] CHIP:TOO: ClusterID: XX - [1707285444.028853][13682:13684] CHIP:TOO: AttributeValueList: XX entries - [1707285444.028882][13682:13684] CHIP:TOO: [XX]: { - [1707285444.028896][13682:13684] CHIP:TOO: AttributeID: XX - [1707285444.028913][13682:13684] CHIP:TOO: AttributeValue: XX + [1707285444.028766][13682:13684] CHIP:TOO: extensionFieldSets: 1 entries + [1707285444.028814][13682:13684] CHIP:TOO: [1]: { + [1707285444.028828][13682:13684] CHIP:TOO: ClusterID: 768 + [1707285444.028853][13682:13684] CHIP:TOO: AttributeValueList: 1 entries + [1707285444.028882][13682:13684] CHIP:TOO: [1]: { + [1707285444.028896][13682:13684] CHIP:TOO: AttributeID: 16386 + [1707285444.028913][13682:13684] CHIP:TOO: AttributeValue: 1 [1707285444.028925][13682:13684] CHIP:TOO: } [1707285444.028937][13682:13684] CHIP:TOO: } [1707285444.028950][13682:13684] CHIP:TOO: } diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml index c3ba72dcf05b80..196d08a4eb46cf 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml @@ -440,7 +440,7 @@ tests: response: value: 100 - - label: "DUT transitions to AC2 over 20." + - label: "DUT transitions to AC1 over 20s." verification: | Is the transition done over 20s? cluster: "LogCommands" @@ -449,7 +449,7 @@ tests: arguments: values: - name: "message" - value: "Please confirm that transition to AC2 was made over 5s" + value: "Please confirm that transition to AC1 was made over 20s" - name: "expectedValue" value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml index e0a2998e06d965..8616c15665531e 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml @@ -17,7 +17,6 @@ name: 132.2.5. [TC-S-2.5] RemainingCapacity functionality with DUT as Server PICS: - S.S - - S.S.F03 config: nodeId: 0x12344321 @@ -250,7 +249,7 @@ tests: to 20000 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x01 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0001 0x01 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -331,7 +330,7 @@ tests: 8a." PICS: S.S.C04.Rsp verification: | - ./chiptool scenesmanagement store-scene 0x0001 0x02 1 1 + scenesmanagement store-scene 0x0001 0x02 1 1 Verify the StoreSceneResponse with following fields: Status is SUCCESS @@ -412,7 +411,7 @@ tests: field sets. If RemainingCapacity is 0, continue to Step 8a." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x03 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0001 0x03 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -491,7 +490,7 @@ tests: set to G1 and the SceneID field set to 0x01." PICS: S.S.C02.Rsp verification: | - ./chip-tool scenesmanagement remove-scene 0x0001 0x01 1 1 + scenesmanagement remove-scene 0x0001 0x01 1 1 Verify the RemoveScenesResponse with following fields: Status is SUCCESS @@ -646,7 +645,7 @@ tests: KeySetRemove command to the GroupKeyManagement cluster with the GroupKeySetID field set to 0x01a1" verification: | - ./chip-tool groupkeymanagement key-set-remove 0x01a1 1 0 + groupkeymanagement key-set-remove 0x01a1 1 0 Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml index 2c8d0ce4e5a820..5a578eeb8a7866 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml @@ -19,7 +19,6 @@ name: PICS: - S.S - - S.S.F03 config: nodeId: 0x12344321 @@ -30,7 +29,7 @@ tests: - label: "Precondition: Commission DUT to TH1" verification: | Once DUT reach the commissionable state send the following command on TH1: - ./chip-tool pairing onnetwork 1 20202021 + pairing onnetwork 1 20202021 Verify the commissioning completed with success on TH(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true @@ -39,7 +38,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + pairing open-commissioning-window 1 1 400 2000 3841 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -53,7 +52,7 @@ tests: verification: | Now send the below command for commissionin DUT to TH2 with Manual pairing code generated in TH1 using open commission window - ./chip-tool pairing code 2 36253605617 --commissioner-name beta + pairing code 2 36253605617 --commissioner-name beta Verify the commissioning completed with success on TH2(chip-tool) from DUT @@ -65,7 +64,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3842 + pairing open-commissioning-window 1 1 400 2000 3842 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -79,7 +78,7 @@ tests: verification: | send the below command for commissionin DUT to TH3 with Manual pairing code generated in TH1 using open commission window - ./chip-tool pairing code 3 36545248276 --commissioner-name gamma + pairing code 3 36545248276 --commissioner-name gamma Verify the commissioning completed with success on TH3(chip-tool) from DUT @@ -92,7 +91,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 1 1 + scenesmanagement remove-all-scenes 0x0000 1 1 Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -108,7 +107,7 @@ tests: - label: "Step 1b: Repeat Step 1a with TH2." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta + scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -125,7 +124,7 @@ tests: - label: "Step 1C: Repeat Step 1a with TH3." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma + scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -141,7 +140,7 @@ tests: - label: "Step 2a: TH1 reads from the DUT the SceneTableSize attribute" verification: | - ./chip-tool scenesmanagement read scene-table-size 1 1 + scenesmanagement read scene-table-size 1 1 Verify the "SceneTableSize" attribute value is SceneTableSize(minimum=16) which is recorded into SceneTableSize on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -156,7 +155,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -236,7 +235,7 @@ tests: Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -296,7 +295,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -358,7 +357,7 @@ tests: set to 20000 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x01 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0000 0x01 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -381,7 +380,7 @@ tests: FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity equals (MaxRemainingCapacity-1)." verification: | - ./chipt-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data to TH1 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into Remaining1stCapacity and is equals to (MaxRemainingCapacity-1) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -441,7 +440,7 @@ tests: becomes 0." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 20000 scene2 [] 1 1 + scenesmanagement add-scene 0x0000 0x02 20000 scene2 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -457,7 +456,7 @@ tests: [1700827508.579697][16026:16028] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data messages after the MinIntervalFloor time to TH1 for RemainingCapacity field in FabricSceneInfo for that fabric with updated valueon the TH1 (Chip-tool) and below is the sample log provided for the raspi platform: [1701243677.717829][7642:7644] CHIP:DMG: ReportDataMessage = [1701243677.717834][7642:7644] CHIP:DMG: { @@ -508,7 +507,7 @@ tests: . . . - ./chip-tool scenesmanagement add-scene 0x0000 0x07 20000 scene8 [] 1 1 + scenesmanagement add-scene 0x0000 0x07 20000 scene8 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -524,7 +523,7 @@ tests: [1700827941.415498][16068:16070] CHIP:TOO: sceneID: 7 [1700827941.415508][16068:16070] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data messages after the MinIntervalFloor time to TH1 for RemainingCapacity field in FabricSceneInfo for that fabric with updated valueon the TH1 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -583,7 +582,7 @@ tests: field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x08 20000 scene9 [] 1 1 + scenesmanagement add-scene 0x0000 0x08 20000 scene9 [] 1 1 Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH1(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -601,7 +600,7 @@ tests: - label: "Step 5a: Repeat Step 4a with TH2" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -617,7 +616,7 @@ tests: [1700828173.261638][16115:16117] CHIP:TOO: sceneID: 2 [1700828173.261640][16115:16117] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify the DUT sends a report data messages after the MinIntervalFloor time to TH2 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -670,7 +669,7 @@ tests: . . . - ./chip-tool scenesmanagement add-scene 0x0000 0x08 0x0014 scene7 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x08 0x0014 scene7 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -685,7 +684,7 @@ tests: [1700829509.052521][16198:16200] CHIP:TOO: sceneID: 8 [1700829509.052532][16198:16200] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify the DUT sends a report data messages after the MinIntervalFloor time to TH2 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value(decreasing to 0) on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -736,7 +735,7 @@ tests: [1701245132.870584][7824:7826] CHIP:TOO: FabricIndex: 2 [1701245132.870594][7824:7826] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 3 1 --commissioner-name gamma + scenesmanagement subscribe fabric-scene-info 100 200 3 1 --commissioner-name gamma Verify that the DUT sends report data messages after the MinIntervalFloor time to TH3 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value (decreasing to SceneTableSize - (2 * MaxRemainingCapacity)) on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -791,7 +790,7 @@ tests: - label: "Step 5b: Repeat Step 4b with TH2" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x09 0x0014 scene8 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x09 0x0014 scene8 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH2(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -808,7 +807,7 @@ tests: - label: "Step 6a: Repeat Step 4a with TH3" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 3 1 --commissioner-name gamma + scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 3 1 --commissioner-name gamma Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -951,7 +950,7 @@ tests: set to 20000 20s and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chipt-tool scenesmanagement add-scene 0x0000 0x01 20000 scene [] 3 1 --commissioner-name gamma + scenesmanagement add-scene 0x0000 0x01 20000 scene [] 3 1 --commissioner-name gamma Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -971,7 +970,7 @@ tests: set to 0x0000, the SceneID field set to 0x01." PICS: S.S.C04.Rsp verification: | - ./chipt-tool scenesmanagement store-scene 0x0000 0x01 3 1 --commissioner-name gamma + scenesmanagement store-scene 0x0000 0x01 3 1 --commissioner-name gamma Verify the StoreSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -993,7 +992,7 @@ tests: to 0x0000 and the scene identifier to field set to 0xFE." PICS: S.S.C40.Rsp verification: | - ./chipt-tool scenesmanagement copy-scene 0x00 0x0000 0x02 0x0000 0x00 3 1 --commissioner-name gamma + scenesmanagement copy-scene 0x00 0x0000 0x02 0x0000 0x00 3 1 --commissioner-name gamma Verify the CopySceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1013,7 +1012,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chipt-tool scenesmanagement remove-all-scenes 0x0000 1 1 + scenesmanagement remove-all-scenes 0x0000 1 1 Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -1038,7 +1037,7 @@ tests: should send 'empty' report data since there is no update for this attribute for TH2)." verification: | - ./chipt-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify that the DUT sends a report data to TH1 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry the reported in FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity equals (MaxRemainingCapacity) on TH1(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1097,7 +1096,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chipt-tool scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta + scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -1119,7 +1118,7 @@ tests: FabricSceneInfo into Remaining2ndCapacity; verify Remaining2ndCapacity equals (MaxRemainingCapacity)." verification: | - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify that the DUT sends a report data to TH2 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into Remaining2ndCapacity; verify Remaining2ndCapacity equals (MaxRemainingCapacity) on TH2(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1141,7 +1140,7 @@ tests: "Step 11a: TH1 removes the TH2 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th2FabricIndex" verification: | - ./chip-tool operationalcredentials remove-fabric th2FabricIndex 1 0 + operationalcredentials remove-fabric th2FabricIndex 1 0 On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) @@ -1158,7 +1157,7 @@ tests: "Step 11b: TH1 removes the TH3 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th3FabricIndex" verification: | - ./chip-tool operationalcredentials remove-fabric th3FabricIndex 1 0 + operationalcredentials remove-fabric th3FabricIndex 1 0 On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml index 66912006363345..ffb3023c67b862 100644 --- a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml @@ -154,16 +154,34 @@ tests: - label: "Step 0d: Precondition 4: TH sends a RemoveAllGroups command to DUT." verification: | - Please execute the below commands before starting the test case : - ./chip-tool groups remove-all-groups 1 1 - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1653485455.344097][11508:11513] CHIP:DMG: StatusIB = - [1653485455.344141][11508:11513] CHIP:DMG: { - [1653485455.344190][11508:11513] CHIP:DMG: status = 0x00 (SUCCESS), - [1653485455.344236][11508:11513] CHIP:DMG: }, + Verify the RemoveAllGroups attribute On TH (all-Clusters-app) log and below is the sample log provided for the raspi platform: + + [1707992121.754676][18074:18074] CHIP:DMG: InvokeRequestMessage = + [1707992121.754689][18074:18074] CHIP:DMG: { + [1707992121.754697][18074:18074] CHIP:DMG: suppressResponse = false, + [1707992121.754707][18074:18074] CHIP:DMG: timedRequest = false, + [1707992121.754714][18074:18074] CHIP:DMG: InvokeRequests = + [1707992121.754730][18074:18074] CHIP:DMG: [ + [1707992121.754744][18074:18074] CHIP:DMG: CommandDataIB = + [1707992121.754756][18074:18074] CHIP:DMG: { + [1707992121.754766][18074:18074] CHIP:DMG: CommandPathIB = + [1707992121.754776][18074:18074] CHIP:DMG: { + [1707992121.754788][18074:18074] CHIP:DMG: EndpointId = 0x1, + [1707992121.754801][18074:18074] CHIP:DMG: ClusterId = 0x4, + [1707992121.754810][18074:18074] CHIP:DMG: CommandId = 0x4, + [1707992121.754827][18074:18074] CHIP:DMG: }, + [1707992121.754841][18074:18074] CHIP:DMG: + [1707992121.754852][18074:18074] CHIP:DMG: CommandFields = + [1707992121.754863][18074:18074] CHIP:DMG: { + [1707992121.754874][18074:18074] CHIP:DMG: }, + [1707992121.754883][18074:18074] CHIP:DMG: }, + [1707992121.754899][18074:18074] CHIP:DMG: + [1707992121.754907][18074:18074] CHIP:DMG: ], + [1707992121.754924][18074:18074] CHIP:DMG: + [1707992121.754934][18074:18074] CHIP:DMG: InteractionModelRevision = 11 + [1707992121.754943][18074:18074] CHIP:DMG: }, disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml deleted file mode 100644 index a239c77b01dd05..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 7.2.1. [TC-TMP-2.1] Attributes with server as DUT - -PICS: - - TMP.S - -config: - nodeId: 0x12344321 - cluster: "Temperature Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Commission DUT to TH" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads the MinMeasuredValue attribute from the DUT" - PICS: TMP.S.A0001 - command: "readAttribute" - attribute: "MinMeasuredValue" - response: - saveAs: CurrentMinMeasured - constraints: - type: int16s - minValue: -27315 - maxValue: 32766 - - - label: "Step 3: TH reads the MaxMeasuredValue attribute from the DUT" - PICS: TMP.S.A0002 - command: "readAttribute" - attribute: "MaxMeasuredValue" - response: - saveAs: CurrentMaxMeasured - constraints: - type: int16s - minValue: CurrentMinMeasured+1 - maxValue: 32767 - - - label: "Step 4: TH reads the MeasuredValue attribute from the DUT" - PICS: TMP.S.A0000 - command: "readAttribute" - attribute: "MeasuredValue" - response: - constraints: - type: int16s - minValue: CurrentMinMeasured - maxValue: CurrentMaxMeasured - - - label: "Step 5: TH reads the Tolerance attribute from the DUT" - PICS: TMP.S.A0003 - command: "readAttribute" - attribute: "Tolerance" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 2048 diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 066267b9117be0..333a81dc7b71a8 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -85,17 +85,17 @@ tests: constraints: type: list - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." command: "readAttribute" - attribute: "AcceptedCommandList" + attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the AcceptedCommandList attribute." command: "readAttribute" - attribute: "GeneratedCommandList" + attribute: "AcceptedCommandList" response: value: [] constraints: diff --git a/src/app/util/mock/Functions.h b/src/app/util/mock/Functions.h index 32ba08d316f484..16fe45d9045b9e 100644 --- a/src/app/util/mock/Functions.h +++ b/src/app/util/mock/Functions.h @@ -36,7 +36,15 @@ namespace Test { CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const app::ConcreteAttributePath & aPath, app::AttributeReportIBs::Builder & aAttributeReports, app::AttributeValueEncoder::AttributeEncodeState * apEncoderState); + +/// Increase the current value for `GetVersion` void BumpVersion(); + +/// Sets GetVersion to return 0 +void ResetVersion(); + +/// Gets the current value for the version that will +/// be returned by emberAfDataVersionStorage DataVersion GetVersion(); /// Configures the singular global mock attribute storage to use the specified configuration. diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp index e7c04fa546e5c9..79c886f532a8a2 100644 --- a/src/app/util/mock/MockNodeConfig.cpp +++ b/src/app/util/mock/MockNodeConfig.cpp @@ -70,6 +70,22 @@ MockClusterConfig::MockClusterConfig(ClusterId aId, std::initializer_list(mEmberEventList.size()); mEmberCluster.eventList = mEmberEventList.data(); + + for (auto & attr : attributes) + { + mAttributeMetaData.push_back(attr.attributeMetaData); + } + + // Make sure ember side has access to attribute metadata + mEmberCluster.attributes = mAttributeMetaData.data(); +} + +MockClusterConfig::MockClusterConfig(const MockClusterConfig & other) : + id(other.id), attributes(other.attributes), events(other.events), mEmberCluster(other.mEmberCluster), + mEmberEventList(other.mEmberEventList), mAttributeMetaData(other.mAttributeMetaData) +{ + // Fix self-referencial dependencies after data copy + mEmberCluster.attributes = mAttributeMetaData.data(); } const MockAttributeConfig * MockClusterConfig::attributeById(AttributeId attributeId, ptrdiff_t * outIndex) const diff --git a/src/app/util/mock/MockNodeConfig.h b/src/app/util/mock/MockNodeConfig.h index fc8f185fd80a56..aa711589eff432 100644 --- a/src/app/util/mock/MockNodeConfig.h +++ b/src/app/util/mock/MockNodeConfig.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include @@ -28,10 +29,35 @@ namespace chip { namespace Test { +namespace internal { + +constexpr EmberAfAttributeMetadata DefaultAttributeMetadata(chip::AttributeId id) +{ + return EmberAfAttributeMetadata{ + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = id, + .size = 4, + .attributeType = ZCL_INT32U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE, + }; +} + +} // namespace internal + struct MockAttributeConfig { - MockAttributeConfig(AttributeId aId) : id(aId) {} + MockAttributeConfig(AttributeId aId) : id(aId), attributeMetaData(internal::DefaultAttributeMetadata(aId)) {} + MockAttributeConfig(AttributeId aId, EmberAfAttributeType type, + EmberAfAttributeMask mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE) : + id(aId), + attributeMetaData(internal::DefaultAttributeMetadata(aId)) + { + attributeMetaData.attributeType = type; + attributeMetaData.mask = mask; + } + const AttributeId id; + EmberAfAttributeMetadata attributeMetaData; }; struct MockEventConfig @@ -45,6 +71,10 @@ struct MockClusterConfig MockClusterConfig(ClusterId aId, std::initializer_list aAttributes = {}, std::initializer_list aEvents = {}); + // Cluster-config is self-referential: mEmberCluster.attributes references mAttributeMetaData.data() + MockClusterConfig(const MockClusterConfig & other); + MockClusterConfig & operator=(const MockClusterConfig &) = delete; + const MockAttributeConfig * attributeById(AttributeId attributeId, ptrdiff_t * outIndex = nullptr) const; const EmberAfCluster * emberCluster() const { return &mEmberCluster; } @@ -55,13 +85,14 @@ struct MockClusterConfig private: EmberAfCluster mEmberCluster; std::vector mEmberEventList; + std::vector mAttributeMetaData; }; struct MockEndpointConfig { MockEndpointConfig(EndpointId aId, std::initializer_list aClusters = {}); - // Cluster-config is self-referntial: mEmberCluster.clusters references mEmberClusters + // Endpoint-config is self-referential: mEmberEndpoint.clusters references mEmberClusters.data() MockEndpointConfig(const MockEndpointConfig & other); MockEndpointConfig & operator=(const MockEndpointConfig &) = delete; diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 6aa872956dbe7a..716460026591ee 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -307,8 +307,14 @@ void EnabledEndpointsWithServerCluster::EnsureMatchingEndpoint() } } // namespace app + namespace Test { +void ResetVersion() +{ + dataVersion = 0; +} + void BumpVersion() { dataVersion++; @@ -407,5 +413,15 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co return attributeReport.EndOfAttributeReportIB(); } +void SetMockNodeConfig(const MockNodeConfig & config) +{ + mockConfig = &config; +} + +void ResetMockNodeConfig() +{ + mockConfig = nullptr; +} + } // namespace Test } // namespace chip diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index a5ae3904156367..9997b370320e7b 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -1522,14 +1522,14 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) while (readRequestsNext.count) { // Can only read up to 9 paths at a time, per spec if (readRequestsCurrent.count >= 9) { - MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, item is full [%@:%@:%@:%@]", workItemID, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, item is full [0x%016llX:%@:0x%llx:0x%llx]", workItemID, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); return outcome; } // if params don't match then they cannot be merged if (![readRequestsNext[0][MTRDeviceReadRequestFieldParamsIndex] isEqual:readRequestsCurrent[0][MTRDeviceReadRequestFieldParamsIndex]]) { - MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, parameter mismatch [%@:%@:%@:%@]", workItemID, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, parameter mismatch [0x%016llX:%@:0x%llx:0x%llx]", workItemID, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); return outcome; } @@ -1537,8 +1537,8 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) auto readItem = readRequestsNext.firstObject; [readRequestsNext removeObjectAtIndex:0]; [readRequestsCurrent addObject:readItem]; - MTR_LOG_INFO("Batching read attribute work item [%llu]: added %@ (now %tu requests total) [%@:%@:%@:%@]", - workItemID, readItem, readRequestsCurrent.count, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: added %@ (now %tu requests total) [0x%016llX:%@:0x%llx:0x%llx]", + workItemID, readItem, readRequestsCurrent.count, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); outcome = MTRBatchedPartially; } NSCAssert(readRequestsNext.count == 0, @"should have batched everything or returned early"); @@ -1548,7 +1548,7 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) mtr_hide(self); // don't capture self accidentally for (NSArray * readItem in readRequests) { if ([readItem isEqual:opaqueItemData]) { - MTR_LOG_DEFAULT("Read attribute work item [%llu] report duplicate %@ [%@:%@:%@:%@]", workItemID, readItem, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_DEFAULT("Read attribute work item [%llu] report duplicate %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, readItem, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); *isDuplicate = YES; *stop = YES; return; @@ -1585,23 +1585,23 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) if (values) { // Since the format is the same data-value dictionary, this looks like an // attribute report - MTR_LOG_INFO("Read attribute work item [%llu] result: %@ [%@:%@:%@:%@]", workItemID, values, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Read attribute work item [%llu] result: %@ [0x%016llX:%@:0x%llX:0x%llX]", workItemID, values, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); [self _handleAttributeReport:values]; } // TODO: better retry logic if (error && (retryCount < 2)) { - MTR_LOG_ERROR("Read attribute work item [%llu] failed (will retry): %@ [%@:%@:%@:%@]", workItemID, error, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_ERROR("Read attribute work item [%llu] failed (will retry): %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, error, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); completion(MTRAsyncWorkNeedsRetry); } else { if (error) { - MTR_LOG_DEFAULT("Read attribute work item [%llu] failed (giving up): %@ [%@:%@:%@:%@]", workItemID, error, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_DEFAULT("Read attribute work item [%llu] failed (giving up): %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, error, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); } completion(MTRAsyncWorkComplete); } }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ %@ %@ %@", self.nodeID, endpointID, clusterID, attributeID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; } return attributeValueToReturn; @@ -1669,7 +1669,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID completion(MTRAsyncWorkComplete); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ %@ %@ %@", self.nodeID, endpointID, clusterID, attributeID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; } - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID @@ -1819,7 +1819,7 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID workDone(values, error); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ %@ %@", endpointID, clusterID, commandID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, commandID.unsignedLongLongValue]; } - (void)_invokeKnownCommandWithEndpointID:(NSNumber *)endpointID @@ -2157,13 +2157,9 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray str: + return "[TC-TMP-2.1] Attributes with Server as DUT" + + def pics_TC_TMP_2_1(self): + return ["TMP.S"] + + def steps_TC_TMP_2_1(self) -> list[TestStep]: + return [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep( + 2, "Set default bounds `min_bound` = -27315, `max_bound` = 32767"), + TestStep(3, "TH reads the MinMeasuredValue attribute from the DUT and saves as `min_measured_value`. If `min_measured_value` is not null, set `min_bound` to `min_measured_value`"), + TestStep(4, "TH reads the MaxMeasuredValue attribute from the DUT and saves as `max_measured_value`. If `max_measured_value` is not null, set `max_bound` to `max_measured_value", + "Verify that `max_measured_value` is either null or an int16 where min_bound < `max_measured_value` ≤ 32767."), + TestStep(5, "If `min_measured_value` is not null, verify min measured value range", + "Verify that -27315 ≤ `min_measured_value` < `max_bound`"), + TestStep(6, "TH reads the MeasuredValue attribute from the DUT", + "Verify that the DUT response contains either null or a int16 where `min_bound` ≤ MeasuredValue ≤ `max_bound`."), + TestStep(7, "TH reads the Tolerance attribute from the DUT", + "Verify that Tolerance is in the range of 0 to 2048"), + ] + + @async_test_body + async def test_TC_TMP_2_1(self): + cluster = Clusters.TemperatureMeasurement + attr = Clusters.TemperatureMeasurement.Attributes + + # Commission DUT - already done + self.step(1) + + self.step(2) + min_bound = -27315 + max_bound = 32767 + + self.step(3) + min_measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MinMeasuredValue) + if min_measured_value != NullValue: + min_bound = min_measured_value + + self.step(4) + max_measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MaxMeasuredValue) + if max_measured_value != NullValue: + max_bound = max_measured_value + asserts.assert_greater(max_measured_value, min_bound, + "MaxMeasuredValue is not greater than the minimum bound") + asserts.assert_less_equal( + max_measured_value, 32767, "MaxMeasuredValue is not less than or equal to than 32767") + + self.step(5) + if min_measured_value != NullValue: + asserts.assert_greater_equal(min_measured_value, -27315, "MinMeasuredValue is out of range") + asserts.assert_less(min_measured_value, max_bound, "MinMeasuredValue is out of range") + else: + self.mark_current_step_skipped() + + self.step(6) + measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MeasuredValue) + if measured_value != NullValue: + print(measured_value) + print(min_bound) + asserts.assert_greater_equal( + measured_value, min_bound, "Measured value is less than min bound") + asserts.assert_less_equal( + measured_value, max_bound, "Measured value is greater than max bound") + + self.step(7) + tolerance = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.Tolerance) + asserts.assert_greater_equal(tolerance, 0, "Tolerance is less than 0") + asserts.assert_less_equal( + tolerance, 2048, "Tolerance is greater than 2048") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index f56acdcd61d040..9ec12dca5fb081 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1656,7 +1656,7 @@ def get_test_info(test_class: MatterBaseTest, matter_test_config: MatterTestConf return info -def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks) -> None: +def run_tests_no_exit(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks, default_controller=None, external_stack=None) -> bool: get_test_info(test_class, matter_test_config) @@ -1668,7 +1668,10 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, if len(matter_test_config.tests) > 0: tests = matter_test_config.tests - stack = MatterStackState(matter_test_config) + if external_stack: + stack = external_stack + else: + stack = MatterStackState(matter_test_config) with TracingContext() as tracing_ctx: for destination in matter_test_config.trace_to: @@ -1678,12 +1681,12 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, # TODO: Steer to right FabricAdmin! # TODO: If CASE Admin Subject is a CAT tag range, then make sure to issue NOC with that CAT tag - - default_controller = stack.certificate_authorities[0].adminList[0].NewController( - nodeId=matter_test_config.controller_node_id, - paaTrustStorePath=str(matter_test_config.paa_trust_store_path), - catTags=matter_test_config.controller_cat_tags - ) + if not default_controller: + default_controller = stack.certificate_authorities[0].adminList[0].NewController( + nodeId=matter_test_config.controller_node_id, + paaTrustStorePath=str(matter_test_config.paa_trust_store_path), + catTags=matter_test_config.controller_cat_tags + ) test_config.user_params["default_controller"] = stash_globally(default_controller) test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) @@ -1732,10 +1735,16 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks.stop(duration=duration) # Shutdown the stack when all done - stack.Shutdown() + if not external_stack: + stack.Shutdown() if ok: logging.info("Final result: PASS !") else: logging.error("Final result: FAIL !") + return ok + + +def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks, default_controller=None, external_stack=None) -> None: + if not run_tests_no_exit(test_class, matter_test_config, hooks, default_controller, external_stack): sys.exit(1) diff --git a/src/python_testing/test_testing/MockTestRunner.py b/src/python_testing/test_testing/MockTestRunner.py new file mode 100644 index 00000000000000..79f6e21e2b434e --- /dev/null +++ b/src/python_testing/test_testing/MockTestRunner.py @@ -0,0 +1,57 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import importlib +import os +import sys +from pathlib import Path +from unittest.mock import MagicMock + +from chip.clusters import Attribute + +try: + from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit +except ImportError: + sys.path.append(os.path.abspath( + os.path.join(os.path.dirname(__file__), '..'))) + from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit + + +class AsyncMock(MagicMock): + async def __call__(self, *args, **kwargs): + return super(AsyncMock, self).__call__(*args, **kwargs) + + +class MockTestRunner(): + def __init__(self, filename: str, classname: str, test: str): + self.config = MatterTestConfig( + tests=[test], endpoint=1, dut_node_ids=[1]) + self.stack = MatterStackState(self.config) + self.default_controller = self.stack.certificate_authorities[0].adminList[0].NewController( + nodeId=self.config.controller_node_id, + paaTrustStorePath=str(self.config.paa_trust_store_path), + catTags=self.config.controller_cat_tags + ) + module = importlib.import_module(Path(os.path.basename(filename)).stem) + self.test_class = getattr(module, classname) + + def Shutdown(self): + self.stack.Shutdown() + + def run_test_with_mock_read(self, read_cache: Attribute.AsyncReadTransaction.ReadResponse): + self.default_controller.Read = AsyncMock(return_value=read_cache) + return run_tests_no_exit(self.test_class, self.config, None, self.default_controller, self.stack) diff --git a/src/python_testing/test_testing/test_TC_TMP_2_1.py b/src/python_testing/test_testing/test_TC_TMP_2_1.py new file mode 100644 index 00000000000000..5693aced8ba505 --- /dev/null +++ b/src/python_testing/test_testing/test_TC_TMP_2_1.py @@ -0,0 +1,180 @@ +#!/usr/bin/env -S python3 -B +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import typing +from dataclasses import dataclass + +import chip.clusters as Clusters +from chip.clusters import Attribute +from chip.clusters.Types import NullValue +from MockTestRunner import MockTestRunner + + +@dataclass +class TestSpec(): + min: typing.Optional[int] + max: typing.Optional[int] + measured: int + tolerance: int + expect_pass: bool + + +TEST_CASES = [ + # ============================== + # Measured Test cases + # ============================== + # -------- + # Neither min nor max specified + # -------- + # Measured lowest + TestSpec(NullValue, NullValue, -27315, 10, True), + # Measured highest + TestSpec(NullValue, NullValue, 32767, 10, True), + # Measured below + TestSpec(NullValue, NullValue, -27316, 10, False), + # Measured above + TestSpec(NullValue, NullValue, 32768, 10, False), + # Measured null + TestSpec(NullValue, NullValue, NullValue, 10, True), + + # -------- + # min only + # -------- + # Measured lowest + TestSpec(5, NullValue, 5, 10, True), + # Measured highest + TestSpec(5, NullValue, 32767, 10, True), + # Measured below + TestSpec(5, NullValue, 4, 10, False), + # Measured above + TestSpec(5, NullValue, 32768, 10, False), + # Measured null + TestSpec(5, NullValue, NullValue, 10, True), + + # -------- + # max only + # -------- + # Measured lowest + TestSpec(NullValue, 5, -27315, 10, True), + # Measured highest + TestSpec(NullValue, 5, 5, 10, True), + # Measured below + TestSpec(NullValue, 5, -27316, 10, False), + # Measured above + TestSpec(NullValue, 5, 6, 10, False), + # Measured null + TestSpec(NullValue, 5, NullValue, 10, True), + + # -------- + # both + # -------- + # Measured lowest + TestSpec(-5, 5, -5, 10, True), + # Measured highest + TestSpec(-5, 5, 5, 10, True), + # Measured below + TestSpec(-5, 5, -6, 10, False), + # Measured above + TestSpec(-5, 5, 6, 10, False), + # Measured null + TestSpec(-5, 5, NullValue, 10, True), + + # ============================== + # Min Test cases + # ============================== + # Max not specified, min OK bottom + TestSpec(-27315, NullValue, 0, 10, True), + # Max not specified, min OK top + TestSpec(32766, NullValue, 32767, 10, True), + # Max not specified, min out of range below + TestSpec(-27316, NullValue, 0, 10, False), + # Max not specified, min out of range above + TestSpec(32767, NullValue, 32767, 10, False), + # Max specified, min OK bottom + TestSpec(-27315, 5, 0, 10, True), + # Max specified, min OK top + TestSpec(4, 5, 4, 10, True), + # Max specified, min out of range below + TestSpec(-27316, 5, 0, 10, False), + # Max specified, min out of range above + TestSpec(5, 5, 5, 10, False), + + # ============================== + # Min Test cases + # ============================== + # min not specified, max OK bottom + TestSpec(NullValue, -27314, -27315, 10, True), + # min not specified, max OK top + TestSpec(NullValue, 32767, 0, 10, True), + # min not specified, max out of range bottom + TestSpec(NullValue, -27315, -27315, 10, False), + # min not specified, max out of range top + TestSpec(NullValue, 32768, 0, 10, False), + # min specified, max OK bottom + TestSpec(0, 1, 0, 10, True), + # min specified, max OK top + TestSpec(0, 32767, 0, 10, True), + # min specified, max out of range bottom + TestSpec(0, 0, 0, 10, False), + # min specified, max out of range top + TestSpec(0, 32768, 0, 10, False), + + # ============================== + # Tolerance test cases + # ============================== + # Tolerance OK bottom + TestSpec(NullValue, NullValue, 0, 0, True), + # Tolerance OK top + TestSpec(NullValue, NullValue, 0, 2048, True), + # Tolerance out of range bottom + TestSpec(NullValue, NullValue, 0, -1, False), + # Tolerance out of range top + TestSpec(NullValue, NullValue, 0, 2049, False), + +] + + +def test_spec_to_attribute_cache(test_spec: TestSpec) -> Attribute.AsyncReadTransaction.ReadResponse: + c = Clusters.TemperatureMeasurement + attr = Clusters.TemperatureMeasurement.Attributes + resp = Attribute.AsyncReadTransaction.ReadResponse({}, [], {}) + resp.attributes = {1: {c: {attr.MaxMeasuredValue: test_spec.max, + attr.MinMeasuredValue: test_spec.min, attr.MeasuredValue: test_spec.measured, attr.Tolerance: test_spec.tolerance}}} + return resp + + +def main(): + test_runner = MockTestRunner('TC_TMP_2_1', 'TC_TMP_2_1', 'test_TC_TMP_2_1') + failures = [] + for idx, t in enumerate(TEST_CASES): + ok = test_runner.run_test_with_mock_read(test_spec_to_attribute_cache(t)) == t.expect_pass + if not ok: + failures.append(f"Measured test case failure: {idx} {t}") + + test_runner.Shutdown() + print( + f"Test of tests: run {len(TEST_CASES)}, test response correct: {len(TEST_CASES) - len(failures)} test response incorrect: {len(failures)}") + for f in failures: + print(f) + + return 1 if failures else 0 + + +if __name__ == "__main__": + sys.exit(main())