diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2a1ead454e3ac4..0b195ba9a244e5 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -632,6 +632,7 @@ hci hciattach hciconfig hdlc +HEPA HKDF HMAC hoc @@ -641,7 +642,6 @@ HomePods hostapd hostname href -HEPA HTTPS HW hwadr @@ -652,6 +652,7 @@ IasWd iaszone ibb ICA +ICD iCloud ICMP IDF diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 35d62da349d4f0..76bbb9cf6da05c 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 options: --user root steps: @@ -64,8 +64,6 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - name: CI Examples ESP32 shell: bash run: | diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 1db7aa8a082846..c30cc044f35b33 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -95,10 +95,12 @@ jobs: - name: Build example OTA Provider run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false - - name: Build OTA image files with software version number 5 + - name: Build OTA image files with software version number 5 and 10 run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=5 chip_device_config_device_software_version_string='"5.0"' - cp out/debug/chip-ota-requestor-app /tmp/ota-test005-raw-image + cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v5 + scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=10 chip_device_config_device_software_version_string='"10.0"' + cp out/debug/chip-ota-requestor-app /tmp/ota-raw-image-v10 - name: Build example OTA Requestor run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 @@ -120,6 +122,7 @@ jobs: # And a different port from the test harness too; the test harness uses port 5541. ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5542 --discriminator 1111 --KVS /tmp/chip-ota-requestor-kvs1 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image1 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-1.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-1.log >&2) & ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5543 --discriminator 1112 --KVS /tmp/chip-ota-requestor-kvs2 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image2 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-2.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-2.log >&2) & + ../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5544 --discriminator 1113 --KVS /tmp/chip-ota-requestor-kvs3 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image3 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-3.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-3.log >&2) & # Disable BLE because the app does not have the permission to use # it and that may crash the CI. # diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c4c164f880cd0c..5ccb16bfab073a 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:1 + image: ghcr.io/project-chip/chip-build-ameba:4 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 13f4b1d81f871d..685a641e5a552a 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -61,22 +61,42 @@ jobs: scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker rm -rf ./out/ - - name: Build some BRD4187C variants + - name: Build some BRD4187C variants (1) run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ --enable-flashbundle \ - --target efr32-brd4187c-window-covering-additional_data_advertising \ --target efr32-brd4187c-thermostat-openthread_mtd \ --target efr32-brd4187c-switch-sed-shell-use_ot_coap_lib \ --target efr32-brd4187c-unit-test \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Clean out build output + run: rm -rf ./out + - name: Build some BRD4187C variants (2) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ --target efr32-brd4187c-light-use_ot_lib \ - --target efr32-brd4187c-light-rpc \ --target efr32-brd4187c-pump \ --target efr32-brd4187c-lock-rpc-shell-enable_heap_monitoring \ build \ --copy-artifacts-to out/artifacts \ " + - name: Clean out build output + run: rm -rf ./out + - name: Build BRD4187C variants (3) + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd4187c-window-covering-additional_data_advertising \ + --target efr32-brd4187c-light-rpc \ + build \ + --copy-artifacts-to out/artifacts \ + " - name: Prepare some bloat report from the previous builds run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 99c74c80eb7f27..3757d952b29fda 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -46,9 +46,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Set up environment for size reports uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} @@ -130,7 +127,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -142,9 +139,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build example Bridge App run: scripts/examples/esp_example.sh bridge-app diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 86ff03e6754071..7c2b76b1b8841d 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -72,6 +72,15 @@ jobs: examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ /tmp/bloat_reports/ + - name: "Test: shell example" + if: steps.build_shell.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' + + - name: Clean shell output + run: rm -rf examples/shell/openiotsdk/build + - name: Build lock-app example (mbedtls) # Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026 if: false @@ -93,6 +102,18 @@ jobs: examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: tv-app example" + if: steps.build_tv_app.outcome == 'success' + timeout-minutes: 10 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean tv-app output + run: rm -rf examples/tv-app/openiotsdk/build + - name: Build all-clusters-app example id: build_all_clusters_app timeout-minutes: 10 @@ -103,6 +124,18 @@ jobs: examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \ /tmp/bloat_reports/ + - name: "Test: all-clusters-app example" + if: steps.build_all_clusters_app.outcome == 'success' + timeout-minutes: 5 + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: Clean all-clusters-app output + run: rm -rf examples/all-clusters-app/openiotsdk/build + - name: Build ota-requestor-app example id: build_ota_requestor_app timeout-minutes: 10 @@ -127,12 +160,6 @@ jobs: run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false - - name: "Test: shell example" - if: steps.build_shell.outcome == 'success' - run: | - scripts/run_in_python_env.sh out/venv \ - 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' - - name: "Test: lock-app example (mbedtls)" if: steps.build_lock_app_mbedtls.outcome == 'success' run: | @@ -141,24 +168,6 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: tv-app example" - if: steps.build_tv_app.outcome == 'success' - timeout-minutes: 10 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - - name: "Test: all-clusters-app example" - if: steps.build_all_clusters_app.outcome == 'success' - timeout-minutes: 5 - run: | - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up - scripts/run_in_python_env.sh out/venv \ - 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app' - scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: ota-requestor-app example" if: steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success' timeout-minutes: 30 @@ -189,11 +198,6 @@ jobs: examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ /tmp/bloat_reports/ - - name: Build unit tests (psa) - id: build_unit_tests_psa - run: | - scripts/examples/openiotsdk_example.sh -b psa unit-tests - - name: "Test: lock-app example (psa)" if: steps.build_lock_app_psa.outcome == 'success' run: | @@ -202,6 +206,11 @@ jobs: 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + - name: Build unit tests (psa) + id: build_unit_tests_psa + run: | + scripts/examples/openiotsdk_example.sh -b psa unit-tests + - name: "Test: unit-tests (psa)" if: steps.build_unit_tests_psa.outcome == 'success' run: | diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 921e89528d7ee5..8ea7eb2fe8d388 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.0 + uses: natiginfo/action-detekt-all@1.23.1 # Detekt seems not to like circular symlinks, so we set up # explicit paths below with: diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 078b4dd960c679..13badfcf8340b6 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:1 + image: ghcr.io/project-chip/chip-build-esp32-qemu:2 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -50,9 +50,6 @@ jobs: with: platform: esp32 - - name: Fixup GdbGui requirement - run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt - - name: Build ESP32 QEMU test images run: | scripts/run_in_build_env.sh " \ diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index a6c14d8401a5c2..5cbcc9b53308b9 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:1 + image: ghcr.io/project-chip/chip-build-esp32:2 steps: - name: Checkout diff --git a/build/chip/java/config.gni b/build/chip/java/config.gni index ca18c9231fef1d..fbc1d95755863f 100644 --- a/build/chip/java/config.gni +++ b/build/chip/java/config.gni @@ -15,6 +15,9 @@ java_path = getenv("JAVA_PATH") declare_args() { java_matter_controller_dependent_paths = [] + + # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters) + matter_enable_java_generated_api = true matter_enable_java_compilation = false if (java_path != "" && current_os == "linux") { java_matter_controller_dependent_paths += [ "${java_path}/include/" ] @@ -27,6 +30,7 @@ declare_args() { [ "${java_path}/include/linux/" ] } + matter_enable_java_generated_api = false matter_enable_java_compilation = true } } diff --git a/config/efr32/lib/pw_rpc/BUILD.gn b/config/efr32/lib/pw_rpc/BUILD.gn index 32a95488dbdf30..ed2e3a47bc1305 100644 --- a/config/efr32/lib/pw_rpc/BUILD.gn +++ b/config/efr32/lib/pw_rpc/BUILD.gn @@ -24,7 +24,7 @@ static_library("pw_rpc") { public_deps = [ "$dir_pw_rpc:server", "$dir_pw_rpc/nanopb:echo_service", - "${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32", + "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs", "${dir_pigweed}/pw_hdlc:pw_rpc", dir_pw_assert, dir_pw_checksum, diff --git a/config/efr32/lib/pw_rpc/pw_rpc.gni b/config/efr32/lib/pw_rpc/pw_rpc.gni index a72cb4d90f6dd1..101112c12dadc9 100644 --- a/config/efr32/lib/pw_rpc/pw_rpc.gni +++ b/config/efr32/lib/pw_rpc/pw_rpc.gni @@ -19,7 +19,7 @@ pw_log_BACKEND = "$dir_pw_log_basic" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" pw_sys_io_BACKEND = - "${chip_root}/examples/platform/silabs/efr32/pw_sys_io:pw_sys_io_efr32" + "${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs" pw_build_LINK_DEPS = [ "$dir_pw_assert:impl", diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index d35791cf1ed3c0..6aa824bdcba6f3 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -124,6 +124,10 @@ if(CONFIG_DISABLE_IPV4) chip_gn_arg_append("chip_inet_config_enable_ipv4" "false") endif() +if(CONFIG_DISABLE_READ_CLIENT) + chip_gn_arg_append("chip_enable_read_client" "false") +endif() + if(CHIP_CODEGEN_PREGEN_DIR) chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"") endif() @@ -462,26 +466,11 @@ foreach(phy_blob ${phy_blobs}) list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a") endforeach() -idf_component_get_property(esp_event_lib esp_event COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(hal_lib hal COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(soc_lib soc COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(efuse_lib efuse COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(vfs_lib vfs COMPONENT_LIB) -list(APPEND chip_libraries $) - -idf_component_get_property(driver_lib driver COMPONENT_LIB) -list(APPEND chip_libraries $) +set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos) +foreach(component ${components_to_link}) + idf_component_get_property(lib_name ${component} COMPONENT_LIB) + list(APPEND chip_libraries $) +endforeach() target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group ${chip_libraries} diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 99de12afa97e6e..5c871c2d043a30 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -108,6 +108,12 @@ menu "CHIP Core" help Matter spec is based on IPv6 communication only. Enabling this option may save some flash/ram. + config DISABLE_READ_CLIENT + bool "Disable read client in Interaction Model" + default n + help + Some device types don't require the read client. Enabling this option may save some flash/ram. + config BUILD_CHIP_TESTS bool "Build CHIP tests" default n diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der index 880b441bd42cc6..298ff89c7b2b44 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem index e9568978ab1aea..3358474d6e9094 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem @@ -1,15 +1,15 @@ -----BEGIN CERTIFICATE----- -MIICUDCCAfagAwIBAgIISW372zteskMwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICVDCCAfqgAwIBAgIIUtCsZ7IM3pUwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFQx JjAkBgNVBAMMHU1hdHRlciBUZXN0IERBQyAwMDAwIFR3byBDRFBzMRQwEgYKKwYB BAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTATBgcqhkjOPQIB -BggqhkjOPQMBBwNCAARKrV70IfqHoglq9IBcx7bK3w/30LA1NNMRJ5LYnAHfE7cV -AfLEBWiSm/ibuygPsGeTDUwoQvlzUhJXOY+2MpLco4G9MIG6MAwGA1UdEwEB/wQC -MAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBRF3Pw1yhkocaPuFrIVi2gb4+mK -jDAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAjMCGg -H6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wLAYDVR0fBCUwIzAhoB+g -HYYbaHR0cDovL2V4YW1wbGUuY29tL2NybDIucGVtMAoGCCqGSM49BAMCA0gAMEUC -ICo4AL07AB1JwKlxGLhw/UsJVGsGYQev7ZWa7wxbASuPAiEA4YlR6OPubKM9Z7Jg -jBq99l+UvHneNRsmIWpB3JKzESI= +BggqhkjOPQMBBwNCAASsgCGhsRN1iFKxLNSXHtoVcN6ebVO3SxolfKEcVpdvSLD0 +cRW62iJ1LmYYw/DeGAjwKl4upeXOrRDd20Gjgdfzo4HBMIG+MAwGA1UdEwEB/wQC +MAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBTaYnYN2crY0SgzWZSbQpqh1NSi +GTAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAjMCGg +H6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wMAYDVR0fBCkwJzAloCOg +IYYfaHR0cDovL2V4YW1wbGUuY29tL3Rlc3RfY3JsLnBlbTAKBggqhkjOPQQDAgNI +ADBFAiAHYetn4ktZNrIEQRRWjaaXCMeilfOJv2fP4lBEa2C8lwIhAOXWAJwIFMnC +7KxuBeBvaVUBzjpJv84fVYHQQU3x4kvz -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.der new file mode 100644 index 00000000000000..554445538704cc Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem new file mode 100644 index 00000000000000..7c9bd7d3e287ce --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIIClzCCAj2gAwIBAgIIXCI6h/Z1+CEwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGEx +MzAxBgNVBAMMKk1hdHRlciBUZXN0IERBQyAwMDAwIDJDRFBzIElzc3VlciBQQUEg +RkZGMTEUMBIGCisGAQQBgqJ8AgEMBEZGRjExFDASBgorBgEEAYKifAICDAQ4MDAw +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEiTPxz9Z7u+upismfmBkZWxFxqD9J +I/aUCvDyIHumWN9aZm+TtfjsXrrtjMwi9GsRUEUnJIpfKTZdQyidR8NneKOB9zCB +9DAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNVHQ4EFgQUEK+MZWCD +7o2moQZ7+3n7MpquaWIwHwYDVR0jBBgwFoAUr0K3CU3r1RXsbs8zuBEVIl8yUogw +YgYDVR0fBFswWTBXoB+gHYYbaHR0cHM6Ly9leGFtcGxlLmNvbS9jcmwucGVtojSk +MjAwMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUExFDASBgorBgEEAYKifAIBDARG +RkYxMDAGA1UdHwQpMCcwJaAjoCGGH2h0dHA6Ly9leGFtcGxlLmNvbS90ZXN0X2Ny +bC5wZW0wCgYIKoZIzj0EAwIDSAAwRQIhALMAG/L7IvNMFCME4VhQmPE06CfedMeQ ++pMQPk2j746XAiB0jYFKg08EALAN4XX/uq5ial2WEOEUyt77IdstnRmARw== +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.der new file mode 100644 index 00000000000000..6abefaeebc776d Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem new file mode 100644 index 00000000000000..f206bc9a74d358 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHYhVwcgCQxIEyle/FNqtFHuZfLD5yL7RMO9eKBYeVXboAoGCCqGSM49 +AwEHoUQDQgAEiTPxz9Z7u+upismfmBkZWxFxqD9JI/aUCvDyIHumWN9aZm+Ttfjs +XrrtjMwi9GsRUEUnJIpfKTZdQyidR8NneA== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.der new file mode 100644 index 00000000000000..d1d24277ebb1e9 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem new file mode 100644 index 00000000000000..2fa675509e0c06 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICyzCCAnGgAwIBAgIIbAFKueTP2kwwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMG0x +PzA9BgNVBAMMNk1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFJIEZG +RjIgODAwNCBUd28gQ0RQczEUMBIGCisGAQQBgqJ8AgEMBEZGRjExFDASBgorBgEE +AYKifAICDAQ4MDAwMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoKslrxdoASyp +DelJX4WlTkznPxn5a3Aef7B/b6Jixb2uyAibJ65CCU+4b2EX/8/y2qX9pV3gEuKj +SucVzXGGK6OCAR4wggEaMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0G +A1UdDgQWBBQtclLs9MPAl7HpGMTVL+uUGVHecDAfBgNVHSMEGDAWgBSvQrcJTevV +FexuzzO4ERUiXzJSiDCBuQYDVR0fBIGxMIGuMFWgH6AdhhtodHRwczovL2V4YW1w +bGUuY29tL2NybC5wZW2iMqQwMC4xLDAqBgNVBAMMI01hdHRlciBUZXN0IFBBSSBN +dmlkOkZGRjIgTXBpZDo4MDA0MFWgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2Ny +bC5wZW2iMqQwMC4xLDAqBgNVBAMMI01hdHRlciBUZXN0IFBBSSBNdmlkOkZGRjIg +TXBpZDo4MDA0MAoGCCqGSM49BAMCA0gAMEUCIHrNu003uNEQbzYy5BaEjmTKustw +FMMxGLEhtknEGk5fAiEAkIOUuczHJpV7IQ71uxkQ/fTUlsqW0m6iHr6R7izLm3I= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der new file mode 100644 index 00000000000000..0a87f1aac2ea43 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem new file mode 100644 index 00000000000000..e97bdf13bffe85 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIBRFh5ZCbhMIojNnvMeHkKUMKPYyH5ouapq+oxtrv86KoAoGCCqGSM49 +AwEHoUQDQgAEoKslrxdoASypDelJX4WlTkznPxn5a3Aef7B/b6Jixb2uyAibJ65C +CU+4b2EX/8/y2qX9pV3gEuKjSucVzXGGKw== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.der index 6db711ca7bde9c..93c8e6273c7a75 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem index 39a7c256c79722..db0e8adfd47fac 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIJj6QtgPRpxFxnBqp0m+IYABttjI2ijEbkXYSlxoqN9+oAoGCCqGSM49 -AwEHoUQDQgAESq1e9CH6h6IJavSAXMe2yt8P99CwNTTTESeS2JwB3xO3FQHyxAVo -kpv4m7soD7Bnkw1MKEL5c1ISVzmPtjKS3A== +MHcCAQEEIDlWdRYuYEI4U1YxR0HpbMhxoA2xXiV2oVil2MILNzLioAoGCCqGSM49 +AwEHoUQDQgAErIAhobETdYhSsSzUlx7aFXDenm1Tt0saJXyhHFaXb0iw9HEVutoi +dS5mGMPw3hgI8CpeLqXlzq0Q3dtBo4HX8w== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der new file mode 100644 index 00000000000000..4118bf261aab77 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem new file mode 100644 index 00000000000000..0b0ec0b21ba4bd --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICnjCCAkSgAwIBAgIIDD65yMbjjlowCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGIx +NDAyBgNVBAMMK01hdHRlciBUZXN0IERBQyAwMDAwIENEUCAyIElzc3VlcnMgUEFB +IEZGRjExFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAw +MDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABHdENpq382J8M7KbpUCO6AbDdjGD +C+j2vO+k9Vm/ZhvgsV5ZK8myxnGahJ7qFFESbyl7pi9AbwNFMsYngor+ZrWjgf0w +gfowDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFGDqR8k9 ++Qj4XKPNUyASa2H1CgW9MB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKI +MIGZBgNVHR8EgZEwgY4wgYugH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5w +ZW2iaKQyMDAxGDAWBgNVBAMMD01hdHRlciBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8 +AgEMBEZGRjGkMjAwMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUExFDASBgorBgEE +AYKifAIBDARGRkYxMAoGCCqGSM49BAMCA0gAMEUCIFyAMO8Vuu78OINK4gmh7ZRR +ZN+X3i2WHxDW+fXlspuYAiEAlF+aOo7LicpMdqYDAXgPBrm9jiCeB0M69lohBWH+ +pwk= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der new file mode 100644 index 00000000000000..4804d20a9b02c9 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem new file mode 100644 index 00000000000000..ab76ccba59e990 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIHY6bi0QinM2T9Bb0IGb5T3MkGRhdTKXv9uKZXA8u9PLoAoGCCqGSM49 +AwEHoUQDQgAEd0Q2mrfzYnwzspulQI7oBsN2MYML6Pa876T1Wb9mG+CxXlkrybLG +cZqEnuoUURJvKXumL0BvA0UyxieCiv5mtQ== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.der new file mode 100644 index 00000000000000..58eb46a620f981 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem new file mode 100644 index 00000000000000..5a900044e8eb34 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICTjCCAfSgAwIBAgIIHF6aHFFi4O8wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMF0x +LzAtBgNVBAMMJk1hdHRlciBUZXN0IERBQyAwMDAwIFR3byBDRFAgKFR3byBEUHMp +MRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTAT +BgcqhkjOPQIBBggqhkjOPQMBBwNCAASb9ykSyJRWBjmlO0LzR0CmtUjsLsrdWAOu +uHNvMsCbNvmsFiTplPL5JEMSA2svQywlpLnTCrVJdZuJORjf2zygo4GyMIGvMAwG +A1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSMKnIYf3kO1sth +4tJPGfpXzzCXYDAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBPBgNV +HR8ESDBGMCGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wIaAfoB2G +G2h0dHBzOi8vZXhhbXBsZS5jb20vY3JsLnBlbTAKBggqhkjOPQQDAgNIADBFAiEA +5tWf3JRbqaBa0Iu3U13jFO1alfhfqQpU7uTfa0gZns0CIDUdAZUHKdNtQG3tf/cW +VNJ5r5PNSIMDs8+OQ7FF+JXI +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der new file mode 100644 index 00000000000000..7ec21313ce8a16 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem new file mode 100644 index 00000000000000..ec6200464d4953 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIDswq010l3FqQbHx5gMHNVZ8aEM6n2rKLVxtvk7IfEw3oAoGCCqGSM49 +AwEHoUQDQgAEm/cpEsiUVgY5pTtC80dAprVI7C7K3VgDrrhzbzLAmzb5rBYk6ZTy ++SRDEgNrL0MsJaS50wq1SXWbiTkY39s8oA== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der index 3e725cc85cd818..d33c10b313a065 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem index 966c5025d8811f..9ef90b3c13ada7 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem @@ -1,15 +1,15 @@ -----BEGIN CERTIFICATE----- -MIICSjCCAfCgAwIBAgIIXzwUpXaaVS0wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICRTCCAeugAwIBAgIIedzpTfkjH8YwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFox LDAqBgNVBAMMI01hdHRlciBUZXN0IERBQyAwMDAwIENEUCAoVHdvIFVSSXMpMRQw EgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTATBgcq -hkjOPQIBBggqhkjOPQMBBwNCAATaRkJ2yopbD59Iy6YH/+2S9qgTFGdh+Hu5AO9s -Q2voAeanxcjpYgnLEQRq76+OKwOZtin1IANCtIw0epGZh+NXo4GxMIGuMAwGA1Ud -EwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBTMrHgJmsR/rXoOuQEs -yPQiiAmrYTAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBOBgNVHR8E -RzBFMCCgHqAchhpodHRwOi8vZXhhbXBsZS5jb20vY3JsLnBlbTAhoB+gHYYbaHR0 -cDovL2V4YW1wbGUuY29tL2NybDIucGVtMAoGCCqGSM49BAMCA0gAMEUCIGoUNMNM -07VMHKebxQhC593V7bd4xaKF6a5UYf8ddjl/AiEA7U3iA9Ja1dNx+7NNXJz3vqkS -1ohFXkrf4C9/CWQ/iLw= +hkjOPQIBBggqhkjOPQMBBwNCAATFl5Uusyxgiw7xY1NxnbqsUoPsGo6KykCMkvCi +VkZf4Lc2x+JrwEDwWMKgFDd4W9/5Uttt933Vh5eXWIUo8bclo4GsMIGpMAwGA1Ud +EwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBQ+GIMVnCpzzCgkFu2D +kBLxh15mBzAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBJBgNVHR8E +QjBAMD6gPKA6hhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW2GG2h0dHBzOi8v +ZXhhbXBsZS5jb20vY3JsLnBlbTAKBggqhkjOPQQDAgNIADBFAiEArTGKdI9FBJ6+ +K+bFpZC4SasAumm8X8hA9V5LqPWBRPgCIA9Z4f1fcM1zgh2QbU70x2HbPNo/qOhY +0eHoBevPFem4 -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.der index db0b5753f9dd5c..5aab47d59f2b31 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem index 63ce1fe337d991..ee83f6d2537196 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIL3FzD2bhQ0UC24d6vXSt8tj/HH2TmyomvM0uZhDfm3HoAoGCCqGSM49 -AwEHoUQDQgAE2kZCdsqKWw+fSMumB//tkvaoExRnYfh7uQDvbENr6AHmp8XI6WIJ -yxEEau+vjisDmbYp9SADQrSMNHqRmYfjVw== +MHcCAQEEIHtIYEKgxKRFBwIw9cvZ5z6duS4DxjgLw27LTNYyEiT9oAoGCCqGSM49 +AwEHoUQDQgAExZeVLrMsYIsO8WNTcZ26rFKD7BqOispAjJLwolZGX+C3Nsfia8BA +8FjCoBQ3eFvf+VLbbfd91YeXl1iFKPG3JQ== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.der new file mode 100644 index 00000000000000..9a5454f6b16a53 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem new file mode 100644 index 00000000000000..41e61730040441 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICyjCCAnGgAwIBAgIIQxhVWOWQV3UwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGkx +OzA5BgNVBAMMMk1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFBIEZG +RjEgKFR3byBEUHMpMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8 +AgIMBDgwMDAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR9+IPNXtxyeBSegAs8 +MCTkRcWUuRGFzeMIWH9OrraFWZlqD64ZUB2fs78RElHFeZZd1llPmohOXG85EXj4 +K+lXo4IBIjCCAR4wDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O +BBYEFDyDtYoyvCACrYNrl98Q4RyBlpmPMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7P +M7gRFSJfMlKIMIG9BgNVHR8EgbUwgbIwV6AfoB2GG2h0dHBzOi8vZXhhbXBsZS5j +b20vY3JsLnBlbaI0pDIwMDEYMBYGA1UEAwwPTWF0dGVyIFRlc3QgUEFBMRQwEgYK +KwYBBAGConwCAQwERkZGMTBXoB+gHYYbaHR0cHM6Ly9leGFtcGxlLmNvbS9jcmwu +cGVtojSkMjAwMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUExFDASBgorBgEEAYKi +fAIBDARGRkYxMAoGCCqGSM49BAMCA0cAMEQCIGexvA7j+1LBWr85HvbYPOSoMHMB +qngfF/X36as8BrKJAiBX4IZO+BaNybFQ9VvQ7bEKoheWVm5PYHm1uR0ImYuSqw== +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.der new file mode 100644 index 00000000000000..01aca914e0993d Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem new file mode 100644 index 00000000000000..46a29d94440698 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIFWV0iWHjIr3pIPZDxF7O3KHJEI4ABbwTG0QR8wFsOYvoAoGCCqGSM49 +AwEHoUQDQgAEffiDzV7ccngUnoALPDAk5EXFlLkRhc3jCFh/Tq62hVmZag+uGVAd +n7O/ERJRxXmWXdZZT5qITlxvORF4+CvpVw== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.der index 5733c1377e82ce..5ac428433b2476 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem index c4fb6b4f2ffcf2..79ff3bb3ec121b 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem @@ -1,14 +1,14 @@ -----BEGIN CERTIFICATE----- -MIICIzCCAcmgAwIBAgIIcWVtG3ouFqQwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICJDCCAcmgAwIBAgIISP/f/e5jGkMwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFYx KDAmBgNVBAMMH01hdHRlciBUZXN0IERBQyAwMDAwIENEUCAoSFRUUCkxFDASBgor BgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMDBZMBMGByqGSM49 -AgEGCCqGSM49AwEHA0IABOMBHt6fUVqz6bqTJf7yO5bNcVw66jjOgR6I/G3nrDAm -I/unBos+CdP+VJsRzF8OWWxO284+e6InH7jQmvQhnj2jgY4wgYswDAYDVR0TAQH/ -BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFGhDyDOjOZ+YQhU+sazPL5VY -XxpQMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKIMCsGA1UdHwQkMCIw -IKAeoByGGmh0dHA6Ly9leGFtcGxlLmNvbS9jcmwucGVtMAoGCCqGSM49BAMCA0gA -MEUCIGVKTBM7ydpNFHg1q/wk1Szso6CPovTm6sKuYEEfNvWkAiEAqhyhkx+8mv/W -RzKr8x6o9hPBZx8PIqQxZ+KOnayTHhg= +AgEGCCqGSM49AwEHA0IABEGudrd83quAXEV30le2nqnmJE8oscF5j9A97FTcDoSl +C5Ke3Sm+MdOGcSXvFWaevZMR72ZcdCE4aMStnK4EVMmjgY4wgYswDAYDVR0TAQH/ +BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFO94heCX0xX9CTsQrlXJ9HAR +E+eNMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKIMCsGA1UdHwQkMCIw +IKAeoByGGmh0dHA6Ly9leGFtcGxlLmNvbS9jcmwucGVtMAoGCCqGSM49BAMCA0kA +MEYCIQCDovqIsCGqvf7CCK/mjf3nKzoLOOOnMCr7cZoYEQFWaQIhAP3aA67zZnA0 +96ua2GVBOlNFoRAap8e+KDPEztHcMw0N -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.der index 4022bc555b6494..7ea6546c058ccb 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem index 1cc3bfe2334852..039ba4be4caec0 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem @@ -1,14 +1,14 @@ -----BEGIN CERTIFICATE----- -MIICJTCCAcugAwIBAgIINKhBW30/Kx4wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICJDCCAcugAwIBAgIIF/5ta+m+0hMwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFcx KTAnBgNVBAMMIE1hdHRlciBUZXN0IERBQyAwMDAwIENEUCAoSFRUUFMpMRQwEgYK KwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAwWTATBgcqhkjO -PQIBBggqhkjOPQMBBwNCAATZKyTeUWuOzT5oYt6H/Dv3fnARcccLWYz/XwJ/Argg -5/oHutTk2L4mHAj7MZXVqDSCOijMRwO3xRV+FJ5eqngFo4GPMIGMMAwGA1UdEwEB -/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBSjAjP4b0DRGsVfgKXAqSpQ -b+qfMTAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAj +PQIBBggqhkjOPQMBBwNCAATquEbdfR+IT+cXiiJBp99dMfS5G8a7egh0CbmZNSrP +A67ITJJb9sIBIu7oTX6BErvOwjHjtCIanWEY3HlLbr2Ho4GPMIGMMAwGA1UdEwEB +/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBTjvqcpltz3a7mw8R0ZK7oX +6Vwy+DAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDAsBgNVHR8EJTAj MCGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW0wCgYIKoZIzj0EAwID -SAAwRQIgU+zq2jxdS7dQy+f40QlZEtTI5fsf7zAkH8+VgylA0JoCIQC1V168pxuE -fnfV1dFBBruHvzedkqSd6o0QoOGLSBAuHw== +RwAwRAIgKsdqVtekuX52LJVQiEHi1VRVGgaPyDIG2LJ/5a5Vdl4CICC7pUnHzZ2+ +ZAvoLGij/DawsO31X3D9sXyyRYEAg9Z1 -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der index 1c41899873d8c2..7dfce53143d887 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem index ccd6216112c5e8..06aa1bcc785316 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIASkFQOGOdFOYpJvRhpiVdejCwvcrGqYzfiLFnAqcp87oAoGCCqGSM49 -AwEHoUQDQgAE2Ssk3lFrjs0+aGLeh/w7935wEXHHC1mM/18CfwK4IOf6B7rU5Ni+ -JhwI+zGV1ag0gjoozEcDt8UVfhSeXqp4BQ== +MHcCAQEEIHdGJ9I40do6+NTljaY1aXltvfmJ/OrWgQbi7R7KPCj3oAoGCCqGSM49 +AwEHoUQDQgAE6rhG3X0fiE/nF4oiQaffXTH0uRvGu3oIdAm5mTUqzwOuyEySW/bC +ASLu6E1+gRK7zsIx47QiGp1hGNx5S269hw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der new file mode 100644 index 00000000000000..86107412c50400 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem new file mode 100644 index 00000000000000..a6cf14d4fa227b --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICZDCCAgmgAwIBAgIIFwLEEE21lM8wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMF8x +MTAvBgNVBAMMKE1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFBIEZG +RjExFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMDBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABDbTJt218OPmus07M/tVBe+5yqPA751R +HY55IS5pxKdjuDDWcVA5es2iTsb+Us6NdXi2j3WL2SYrokQL4/heR6ijgcUwgcIw +DAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFNII/K23jxNe +9BkK8vZIMYJ5CHruMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKIMGIG +A1UdHwRbMFkwV6AfoB2GG2h0dHBzOi8vZXhhbXBsZS5jb20vY3JsLnBlbaI0pDIw +MDEYMBYGA1UEAwwPTWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZG +MTAKBggqhkjOPQQDAgNJADBGAiEA6tCCg0An5BeTLg3cJuUMFvn9JoCWnDP6QMz4 +xCLxx/cCIQCnCLBe5osm2m1kRGG8Qp+iX1Yt0iujVaeZNya5Ofsu0A== +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.der new file mode 100644 index 00000000000000..a50eb62b578852 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem new file mode 100644 index 00000000000000..899b1bcebb6c79 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIBDtAN7we14dK7MkR4BwbP62++cqVVnAOnPTqZ84f86foAoGCCqGSM49 +AwEHoUQDQgAENtMm3bXw4+a6zTsz+1UF77nKo8DvnVEdjnkhLmnEp2O4MNZxUDl6 +zaJOxv5Szo11eLaPdYvZJiuiRAvj+F5HqA== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.der new file mode 100644 index 00000000000000..fe055874b7c51e Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem new file mode 100644 index 00000000000000..03a69bccb767b6 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICTjCCAfSgAwIBAgIISpgV1Lndz3MwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGAx +MjAwBgNVBAMMKU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFBIE5v +VklEMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQBgqJ8AgIMBDgwMDAw +WTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARqK+3HFrVjZH5m25o+Lc1F8L9YTYWn +0t/4/7F0tdVefxxUlL59e8TinBGAmiA3YVVuORV1Hh0gGquWfjzsvPsho4GvMIGs +MAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgeAMB0GA1UdDgQWBBQgqFG1WVqL +MShpA6Y/yTYAFznAPjAfBgNVHSMEGDAWgBSvQrcJTevVFexuzzO4ERUiXzJSiDBM +BgNVHR8ERTBDMEGgH6AdhhtodHRwczovL2V4YW1wbGUuY29tL2NybC5wZW2iHqQc +MBoxGDAWBgNVBAMMD01hdHRlciBUZXN0IFBBQTAKBggqhkjOPQQDAgNIADBFAiEA +g9PU5fUk6hZsFEXtQgil4yb4/9238aG4z7nyOAbC5R8CIH9YZoySudmq+rGTtzCC +4jmFmZ8i2MDgDmYZnQgGIFJA +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der new file mode 100644 index 00000000000000..e52705cea55248 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem new file mode 100644 index 00000000000000..361e6d28861455 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIEbZnx2NZaBNb6+b53sybHtOZR+F0JsAvwIDixLl9viJoAoGCCqGSM49 +AwEHoUQDQgAEaivtxxa1Y2R+ZtuaPi3NRfC/WE2Fp9Lf+P+xdLXVXn8cVJS+fXvE +4pwRgJogN2FVbjkVdR4dIBqrln487Lz7IQ== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der new file mode 100644 index 00000000000000..5bc8d661076a02 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem new file mode 100644 index 00000000000000..983259f524e460 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICZjCCAgygAwIBAgIIX/XGBLygc2EwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMGQx +NjA0BgNVBAMMLU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBJc3N1ZXIgUEFJIEZG +RjIgODAwNDEUMBIGCisGAQQBgqJ8AgEMBEZGRjExFDASBgorBgEEAYKifAICDAQ4 +MDAwMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZov4ECQtzUqPDMONcUCCtZ9E +++knHOZqXRv043j2gbwZ9Kt6y4ozuE47SuBEqeNeqgRTpJapBQXxV8JSaf5Pt6OB +wzCBwDAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNVHQ4EFgQUzoDA +AjObxgDU+Urwle5k8ClCMuIwHwYDVR0jBBgwFoAUr0K3CU3r1RXsbs8zuBEVIl8y +UogwYAYDVR0fBFkwVzBVoB+gHYYbaHR0cHM6Ly9leGFtcGxlLmNvbS9jcmwucGVt +ojKkMDAuMSwwKgYDVQQDDCNNYXR0ZXIgVGVzdCBQQUkgTXZpZDpGRkYyIE1waWQ6 +ODAwNDAKBggqhkjOPQQDAgNIADBFAiAIjNObC+8wMAde7s+wPK2m7MdGi+dXm3Vr +reJ/LMA9IQIhAITmPczDK75NcHcrav/swSodNNLD4UnOsbmIJRa8NBvP +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der new file mode 100644 index 00000000000000..a67c3deb440a4e Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem new file mode 100644 index 00000000000000..24e06cb2664d46 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIP500CK5Bdg4fm+/IhKa3tra58l4DLtRFBbdWumGNqHMoAoGCCqGSM49 +AwEHoUQDQgAEZov4ECQtzUqPDMONcUCCtZ9E++knHOZqXRv043j2gbwZ9Kt6y4oz +uE47SuBEqeNeqgRTpJapBQXxV8JSaf5Ptw== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.der new file mode 100644 index 00000000000000..f290ae62208386 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem new file mode 100644 index 00000000000000..3e232f154bdfe4 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICjDCCAjOgAwIBAgIIerMwp8ofkZUwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDsx +DTALBgNVBAMMBExvbmcxFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGC +onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH3QCDBDf/vXBwk4 +STGEtLxWRk99gQDN7zP4kpk5vryNUzaV1x9MDam/HI6Ef91wi1zTq9Yu4zWBab0y +CFo1KN2jggESMIIBDjAMBgNVHRMBAf8EAjAAMA4GA1UdDwEB/wQEAwIHgDAdBgNV +HQ4EFgQUHfNSWZ1B4LBsEwIG/8FXpzLM96QwHwYDVR0jBBgwFoAUr0K3CU3r1RXs +bs8zuBEVIl8yUogwga0GA1UdHwSBpTCBojCBn6BpoGeGZWh0dHBzOi8vZXhhbXBs +ZS5jb20vdGhpcy1pcy1hbi1leGFtcGxlLW9mLWNybC1kaXN0cmlidXRpb24tcG9p +bnQtZXh0ZW5zaW9uLXdoaWNoLWlzLTEwMS1jaGFycy9jcmwucGVtojKkMDAuMSww +KgYDVQQDDCNNYXR0ZXIgVGVzdCBQQUkgTXZpZDpGRkYyIE1waWQ6ODAwNDAKBggq +hkjOPQQDAgNHADBEAiATKPP6OqNo60+Ncy+7DyjPDavE6UROADyEhIW5cHu9/wIg +XQyY1QEUXaI66m/s2rP00py/PnC0U4NGvM6BGyR05Dg= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der new file mode 100644 index 00000000000000..d0d68ddb316e08 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem new file mode 100644 index 00000000000000..6c4c6ed8fa1805 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIIRhGcS4/FkEWZhcGUZqsEsOm/+ykn35zm/rR4JrHc44oAoGCCqGSM49 +AwEHoUQDQgAEfdAIMEN/+9cHCThJMYS0vFZGT32BAM3vM/iSmTm+vI1TNpXXH0wN +qb8cjoR/3XCLXNOr1i7jNYFpvTIIWjUo3Q== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der index 7d63f00c9bcfa4..1a2b0e85953ccc 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem index 48fe09ad29812d..2a870d125cd900 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIAZZ8hZ3GOkPEiO670Qo8bDOxHK1X7sH6ofXOYmc9zFqoAoGCCqGSM49 -AwEHoUQDQgAE4wEe3p9RWrPpupMl/vI7ls1xXDrqOM6BHoj8beesMCYj+6cGiz4J -0/5UmxHMXw5ZbE7bzj57oicfuNCa9CGePQ== +MHcCAQEEICX4wFLUjmqH7k3OddrzY9Zg+QE2WM0wVT4huFuiur4DoAoGCCqGSM49 +AwEHoUQDQgAEQa52t3zeq4BcRXfSV7aeqeYkTyixwXmP0D3sVNwOhKULkp7dKb4x +04ZxJe8VZp69kxHvZlx0IThoxK2crgRUyQ== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der index 1ece300335a5fe..66fd52a1409ef8 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem index 4cadfd7818c829..338be69c639d36 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem @@ -1,15 +1,15 @@ -----BEGIN CERTIFICATE----- -MIICUzCCAfmgAwIBAgIIHW5tUEGGAAcwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICUzCCAfmgAwIBAgIILY0sRa5oU0UwCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDsx DTALBgNVBAMMBExvbmcxFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGC -onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEMo+7hxQow14iSz -f56AZANfssxy+PFxGFNGwyDhqIW15AkJXuyFX31Sr5eh0G92cWyHNn4ZiM6hGdbX -9CUrxy+jgdkwgdYwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O -BBYEFPZMe/GotuC6EI6960/h9nd8ySwpMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7P +onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABG+9MRPxTgC1VBrl +JjpH4WsZd3XpEhSkIPTZeu1rpJNVHKXA1pX6PrkI8TKaVLudXeWXTPqoxfDFxDCM +rhrG4XejgdkwgdYwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O +BBYEFKg0y+z9b0dDBuV9kH5M9K0/ffxPMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7P M7gRFSJfMlKIMHYGA1UdHwRvMG0wa6BpoGeGZWh0dHBzOi8vZXhhbXBsZS5jb20v dGhpcy1pcy1hbi1leGFtcGxlLW9mLWNybC1kaXN0cmlidXRpb24tcG9pbnQtZXh0 ZW5zaW9uLXdoaWNoLWlzLTEwMS1jaGFycy9jcmwucGVtMAoGCCqGSM49BAMCA0gA -MEUCIENDYnRVRbgQ6zM9WS0/RoI8U/VhGfCGROJ5TLpK2rexAiEAr1GXakRNQ566 -F7ihY3WBUwmT9hjCdBiH0+beR5GkyaQ= +MEUCIQDwVWE6yxHLdt90w+FyrmPLoC+zbB4FKxgk6oNmxhQV2gIgASWvP3RvYo8m +623+yUj++jXV0ukEY/HzitbvkNu25oM= -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.der index 5282d103be84bb..03cab3608d7d67 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem index d868b79ee31833..c39f44e59c369a 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEINFUmafW3jhThp3mpGxLUtE7c1kW1Kq9UCaqrR5yeWbroAoGCCqGSM49 -AwEHoUQDQgAEQyj7uHFCjDXiJLN/noBkA1+yzHL48XEYU0bDIOGohbXkCQle7IVf -fVKvl6HQb3ZxbIc2fhmIzqEZ1tf0JSvHLw== +MHcCAQEEIKEE7TjXp337hySJtfM1UeZefmg2BDNOe26ap+SLlL/3oAoGCCqGSM49 +AwEHoUQDQgAEb70xE/FOALVUGuUmOkfhaxl3dekSFKQg9Nl67Wukk1UcpcDWlfo+ +uQjxMppUu51d5ZdM+qjF8MXEMIyuGsbhdw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der index 2ad2f7c7190a4d..2315cfa58c79bf 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem index c53dbb8fbd6498..8cecc4118bc767 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem @@ -1,13 +1,14 @@ -----BEGIN CERTIFICATE----- -MIICBTCCAaugAwIBAgIIcAYIqqHXrW0wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP +MIICJzCCAcygAwIBAgIIb9f/C9WkmD8wCgYIKoZIzj0EAwIwRjEYMBYGA1UEAwwP TWF0dGVyIFRlc3QgUEFJMRQwEgYKKwYBBAGConwCAQwERkZGMTEUMBIGCisGAQQB -gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDsx -DTALBgNVBAMMBExvbmcxFDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGC -onwCAgwEODAwMDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPzNyCm6Yjd8xsez -bqfBr3bNFcMovEtujQd4ull/u/MK5xK2V9L58rkV+CNMh+KjO/XnWXbgTmrQPYUL -0WQ588+jgYswgYgwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0O -BBYEFAcwHO+LnkQm0uRuxvo607dEHe+9MB8GA1UdIwQYMBaAFK9CtwlN69UV7G7P -M7gRFSJfMlKIMCgGA1UdHwQhMB8wHaAboBmGF3d3dy5leGFtcGxlLmNvbS9jcmwu -cGVtMAoGCCqGSM49BAMCA0gAMEUCIQDmuIge7Q6mcILAYH5G9sqEBDGr4JHWF12B -DDih5PBFdwIgOQZfvvn9pBs3r8ux9t8JDhpEO6xuZSw72sED9NOsTnY= +gqJ8AgIMBDgwMDAwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMFwx +LjAsBgNVBAMMJU1hdHRlciBUZXN0IERBQyAwMDAwIENEUCBXcm9uZyBQcmVmaXgx +FDASBgorBgEEAYKifAIBDARGRkYxMRQwEgYKKwYBBAGConwCAgwEODAwMDBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABN7MEuDcPRs5oP/GZoX9Gj3a9NB04LNqU6i9 +LByz7f34e3E8xI5yGXWJuXHfX1keyM1OvnP6T99wogdJwoSS2T+jgYswgYgwDAYD +VR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCB4AwHQYDVR0OBBYEFFhBPuTtrS9Eps0G +q8Bso0he5sHxMB8GA1UdIwQYMBaAFK9CtwlN69UV7G7PM7gRFSJfMlKIMCgGA1Ud +HwQhMB8wHaAboBmGF3d3dy5leGFtcGxlLmNvbS9jcmwucGVtMAoGCCqGSM49BAMC +A0kAMEYCIQC1L5VTRp0BOJuuug+FrSmsiZ6PFBodLWz30/9XXAW5KwIhANfV2l6L +6zYEWzUS+DY9s6CsjB0UfC27P5VYyfWL5YCB -----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der index ab268e2e51f69e..938339c0443c9e 100644 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der and b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem index f9c33a94072281..930bf855c472d0 100644 --- a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem +++ b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem @@ -1,5 +1,5 @@ -----BEGIN EC PRIVATE KEY----- -MHcCAQEEIKUdzfzZVduHJDVshxIakL0TGFN4p6mMcfRwRKKm2+vboAoGCCqGSM49 -AwEHoUQDQgAE/M3IKbpiN3zGx7Nup8Gvds0Vwyi8S26NB3i6WX+78wrnErZX0vny -uRX4I0yH4qM79edZduBOatA9hQvRZDnzzw== +MHcCAQEEIMvLZ9J7u86+dBfD5a6+ELPGEgBOCIXuPmA94ty3ns7KoAoGCCqGSM49 +AwEHoUQDQgAE3swS4Nw9Gzmg/8Zmhf0aPdr00HTgs2pTqL0sHLPt/fh7cTzEjnIZ +dYm5cd9fWR7IzU6+c/pP33CiB0nChJLZPw== -----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der b/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der deleted file mode 100644 index 287b7d0e23a2ce..00000000000000 Binary files a/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-000A-Key.der and /dev/null differ diff --git a/credentials/test/gen-test-attestation-certs.sh b/credentials/test/gen-test-attestation-certs.sh index 04d0ba6130dac8..0efa01088ce4f8 100755 --- a/credentials/test/gen-test-attestation-certs.sh +++ b/credentials/test/gen-test-attestation-certs.sh @@ -353,44 +353,101 @@ cert_lifetime=4294967295 dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Key" dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Cert" - cdp_example="URI:http://example.com/crl.pem" + cdp_uri="http://example.com/crl.pem" - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (HTTP)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (HTTP)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-HTTPS-Key" dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-HTTPS-Cert" - cdp_example="URI:https://example.com/crl.pem" + cdp_uri="https://example.com/crl.pem" - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (HTTPS)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (HTTPS)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem - dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Key" - dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Cert" + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2URIs-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2URIs-Cert" - cdp_example2="URI:http://example.com/crl2.pem" + cdp_error_inject="ext-cdp-uri-duplicate" - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac Two CDPs" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example" --cpd-ext "$cdp_example2" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (Two URIs)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem - dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2URIs-Key" - dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2URIs-Cert" + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2DPs-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2DPs-Cert" + + cdp_error_inject="ext-cdp-dist-point-duplicate" - cdp_example2in1="URI:http://example.com/crl.pem,URI:http://example.com/crl2.pem" + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac Two CDP (Two DPs)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP (Two URIs)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example2in1" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Cert" + + cdp_error_inject="ext-cdp-add" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac Two CDPs" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Long-Key" dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Long-Cert" - cdp_example="URI:https://example.com/this-is-an-example-of-crl-distribution-point-extension-which-is-101-chars/crl.pem" + cdp_uri="https://example.com/this-is-an-example-of-crl-distribution-point-extension-which-is-101-chars/crl.pem" - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Long" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Long" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Wrong-Prefix-Key" dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Wrong-Prefix-Cert" - cdp_example="URI:www.example.com/crl.pem" + cdp_uri="www.example.com/crl.pem" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Wrong Prefix" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAA-FFF1-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAA-FFF1-Cert" + issuer_cert_file="$dest_dir/Chip-Test-PAA-$vid-Cert" + + cdp_uri="https://example.com/crl.pem" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Issuer PAA FFF1" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2CRLIssuers-PAA-FFF1-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-2CRLIssuers-PAA-FFF1-Cert" + cdp_error_inject="ext-cdp-crl-issuer-duplicate" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP 2 Issuers PAA FFF1" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert" + cdp_error_inject="ext-cdp-dist-point-duplicate" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Issuer PAA FFF1 (Two DPs)" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Issuer-PAA-FFF1-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Issuer-PAA-FFF1-Cert" + cdp_error_inject="ext-cdp-add" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac 2CDPs Issuer PAA FFF1" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" -I -E "$cdp_error_inject" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAA-NoVID-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAA-NoVID-Cert" + issuer_cert_file="$dest_dir/Chip-Test-PAA-NoVID-Cert" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Issuer PAA NoVID" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAI-FFF2-8004-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAI-FFF2-8004-Cert" + issuer_cert_file="$dest_dir/Chip-Test-PAI-FFF2-8004-FB-Cert" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Issuer PAI FFF2 8004" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Issuer-PAI-FFF2-8004-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-2CDPs-Issuer-PAI-FFF2-8004-Cert" + cdp_error_inject="ext-cdp-dist-point-duplicate" + + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac CDP Issuer PAI FFF2 8004 Two CDPs" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem -I -E "$cdp_error_inject" + + dac_key_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAI-FFF2-8004-Long-Key" + dac_cert_file="$dest_dir/Chip-Test-DAC-$vid-$pid-$dac-CDP-Issuer-PAI-FFF2-8004-Long-Cert" + cdp_uri="https://example.com/this-is-an-example-of-crl-distribution-point-extension-which-is-101-chars/crl.pem" - "$chip_cert_tool" gen-att-cert --type d --subject-cn "Long" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cpd-ext "$cdp_example" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem + "$chip_cert_tool" gen-att-cert --type d --subject-cn "Long" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --cdp-uri "$cdp_uri" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem --crl-issuer-cert "$issuer_cert_file".pem } # In addition to PEM format also create certificates in DER form. diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 2561a6cdd6c754..49fe4ad48a83da 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -980,15 +980,15 @@ Complete the following steps: fabric by using the following command pattern: ``` - $ ./chip-tool pairing code --commissioner-name + $ ./chip-tool pairing code --commissioner-name ``` In this command: - - __ is the the QR code payload or a manual pairing code generated - by the first commissioner instance when opened commissioning window - __ is the user-defined ID of the node being commissioned. It doesn't need to be the same ID, as for the first fabric. + - __ is the the QR code payload or a manual pairing code generated + by the first commissioner instance when opened commissioning window - __ is the name of the second fabric. Valid values are "alpha", "beta", "gamma", and integers greater than or equal to 4. The default if not specified is "alpha". @@ -996,7 +996,7 @@ Complete the following steps: **Example of command:** ``` - $ ./chip-tool pairing code 36281602573 1 --commissioner-name beta + $ ./chip-tool pairing code 1 36281602573 --commissioner-name beta ``` #### Step 5: Test reception of commands diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ff5ee40c60aed8..ef57e61ca3c3ac 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -13,42 +13,32 @@ step. ### Install Prerequisites -- [Linux](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/linux-setup.html) -- [macOS](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/get-started/macos-setup.html) +- [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-linux-users) +- [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.1/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v4.4.4 +### Get IDF v5.1 - Clone ESP-IDF - [v4.4.4 release](https://github.com/espressif/esp-idf/releases/tag/v4.4.4) + [v5.1 release](https://github.com/espressif/esp-idf/releases/tag/v5.1) ``` - $ git clone -b v4.4.4 --recursive https://github.com/espressif/esp-idf.git + $ git clone -b v5.1 --recursive --depth 1 --shallow-submodule https://github.com/espressif/esp-idf.git $ cd esp-idf $ ./install.sh ``` -- To update an existing esp-idf toolchain to v4.4.4: +- To update an existing esp-idf toolchain to v5.1: ``` $ cd path/to/esp-idf $ git fetch origin - $ git checkout v4.4.4 - $ git reset --hard origin/v4.4.4 + $ git checkout v5.1 + $ git reset --hard origin/v5.1 $ git submodule update --recursive --init $ git clean -fdx $ ./install.sh ``` -- For ESP32C6 & ESP32H2, please use commit - [ea5e0ff](https://github.com/espressif/esp-idf/tree/ea5e0ff). - - ``` - $ cd esp-idf - $ git checkout ea5e0ff - $ git submodule update --init - $ ./install.sh - ``` - ## Setup Matter environment ### Install Prerequisites @@ -80,22 +70,6 @@ below: python3 -m pip install esptool ``` -For MacOS, `gdbgui` python package will not be installed using `bootstrap.sh` -script as it is restricted only for x64 Linux platforms. It is restricted -because, building wheels for `gevent` (dependency of `gdbgui`) fails on MacOS. - -For ARM-based Mac, no further installation steps are necessary if Python3 -version is greater than or equal to 3.11. - -If Python3 version is less than 3.11 or you are using x86(Intel-based) Mac then -please run the below commands after every bootstrapping to install gdbgui wheels -as binary - -``` -python3 -m pip install -c scripts/setup/constraints.txt --no-cache --prefer-binary gdbgui==0.13.2.0 -deactivate -``` - --- Once IDF and Matter environment is set up, head over to diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 32c8d1fe1b3c0a..44a852efa8d887 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2295,6 +2295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -6360,7 +6364,6 @@ endpoint 0 { ram attribute supportsDNSResolve default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0B; ram attribute clusterRevision default = 2; @@ -6415,7 +6418,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -6596,7 +6598,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6609,7 +6610,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6622,7 +6622,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6635,7 +6634,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6646,7 +6644,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -6659,7 +6656,6 @@ endpoint 1 { ram attribute supported default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6672,7 +6668,6 @@ endpoint 1 { callback attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6682,7 +6677,6 @@ endpoint 1 { ram attribute airQuality default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 15; ram attribute clusterRevision default = 1; @@ -6725,7 +6719,6 @@ endpoint 1 { ram attribute supported default = 15; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -6742,7 +6735,6 @@ endpoint 1 { callback attribute operationalError; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6759,7 +6751,6 @@ endpoint 1 { callback attribute operationalError default = 0; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; - callback attribute eventList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -6774,7 +6765,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -6789,7 +6779,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; @@ -7095,7 +7084,6 @@ endpoint 1 { ram attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7115,7 +7103,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7135,7 +7122,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7155,7 +7141,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7175,7 +7160,6 @@ endpoint 1 { ram attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7195,7 +7179,6 @@ endpoint 1 { ram attribute levelValue default = 2; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7215,7 +7198,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7235,7 +7217,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7255,7 +7236,6 @@ endpoint 1 { ram attribute levelValue default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; @@ -7275,7 +7255,6 @@ endpoint 1 { ram attribute levelValue default = 3; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 63; ram attribute clusterRevision default = 3; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 365337854727ed..f7983bd036f737 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5798,7 +5798,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6937,7 +6937,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13554,15 +13554,15 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "SetTemperature", + "name": "ChangeToMode", "code": 0, "mfgCode": null, "source": "client", @@ -13606,21 +13606,31 @@ ] }, { - "name": "Temperature Control", - "code": 86, + "name": "Laundry Washer Mode", + "code": 81, "mfgCode": null, - "define": "TEMPERATURE_CONTROL_CLUSTER", + "define": "LAUNDRY_WASHER_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "TemperatureSetpoint", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13630,13 +13640,13 @@ "reportableChange": 0 }, { - "name": "MinTemperature", + "name": "CurrentMode", "code": 1, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13646,13 +13656,13 @@ "reportableChange": 0 }, { - "name": "MaxTemperature", + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13662,13 +13672,13 @@ "reportableChange": 0 }, { - "name": "Step", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "temperature", - "included": 0, - "storageOption": "RAM", + "type": "int8u", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13678,24 +13688,24 @@ "reportableChange": 0 }, { - "name": "SelectedTemperatureLevel", - "code": 4, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedTemperatureLevels", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -13710,12 +13720,12 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13726,8 +13736,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -13742,48 +13752,68 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "array", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, + "mfgCode": null, + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "server", + "side": "client", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13793,7 +13823,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -13808,56 +13838,82 @@ ] }, { - "name": "Refrigerator Alarm", - "code": 87, + "name": "Refrigerator And Temperature Controlled Cabinet Mode", + "code": 82, "mfgCode": null, - "define": "REFRIGERATOR_ALARM_CLUSTER", + "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], "attributes": [ { - "name": "Mask", + "name": "SupportedModes", "code": 0, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "State", + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", "code": 2, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Supported", + "name": "OnMode", "code": 3, "mfgCode": null, "side": "server", - "type": "AlarmMap", + "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13901,7 +13957,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13959,22 +14015,13 @@ "maxInterval": 65534, "reportableChange": 0 } - ], - "events": [ - { - "name": "Notify", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14023,10 +14070,10 @@ ] }, { - "name": "Laundry Washer Mode", - "code": 81, + "name": "RVC Run Mode", + "code": 84, "mfgCode": null, - "define": "LAUNDRY_WASHER_MODE_CLUSTER", + "define": "RVC_RUN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14047,7 +14094,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14063,7 +14110,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14079,7 +14126,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14095,7 +14142,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14111,7 +14158,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14127,7 +14174,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14142,8 +14189,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14159,7 +14206,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14203,10 +14250,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "client", "enabled": 0, "commands": [ @@ -14255,10 +14302,10 @@ ] }, { - "name": "Refrigerator And Temperature Controlled Cabinet Mode", - "code": 82, + "name": "RVC Clean Mode", + "code": 85, "mfgCode": null, - "define": "REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER", + "define": "RVC_CLEAN_MODE_CLUSTER", "side": "server", "enabled": 1, "commands": [ @@ -14279,7 +14326,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14295,7 +14342,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14311,7 +14358,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14327,7 +14374,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14343,7 +14390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14359,7 +14406,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14374,8 +14421,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14391,7 +14438,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14435,15 +14482,15 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ChangeToMode", + "name": "SetTemperature", "code": 0, "mfgCode": null, "source": "client", @@ -14487,31 +14534,21 @@ ] }, { - "name": "RVC Run Mode", - "code": 84, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "RVC_RUN_MODE_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "TemperatureSetpoint", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14521,13 +14558,13 @@ "reportableChange": 0 }, { - "name": "CurrentMode", + "name": "MinTemperature", "code": 1, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14537,13 +14574,13 @@ "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "MaxTemperature", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14553,13 +14590,13 @@ "reportableChange": 0 }, { - "name": "OnMode", + "name": "Step", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", + "type": "temperature", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14569,24 +14606,24 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "SelectedTemperatureLevel", + "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "SupportedTemperatureLevels", + "code": 5, "mfgCode": null, "side": "server", "type": "array", @@ -14601,8 +14638,8 @@ "reportableChange": 0 }, { - "name": "EventList", - "code": 65530, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -14617,8 +14654,8 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -14633,68 +14670,48 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "RVC Clean Mode", - "code": 85, - "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ + }, { "name": "FeatureMap", "code": 65532, "mfgCode": null, - "side": "client", + "side": "server", "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14704,7 +14721,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -14719,82 +14736,56 @@ ] }, { - "name": "RVC Clean Mode", - "code": 85, + "name": "Refrigerator Alarm", + "code": 87, "mfgCode": null, - "define": "RVC_CLEAN_MODE_CLUSTER", + "define": "REFRIGERATOR_ALARM_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "SupportedModes", + "name": "Mask", "code": 0, "mfgCode": null, "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "StartUpMode", + "name": "State", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OnMode", + "name": "Supported", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "AlarmMap", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -14838,7 +14829,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14896,6 +14887,15 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "Notify", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -14975,7 +14975,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14991,7 +14991,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15007,7 +15007,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15023,7 +15023,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15039,7 +15039,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15055,7 +15055,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15070,8 +15070,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15087,7 +15087,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15234,7 +15234,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15531,7 +15531,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -15909,7 +15909,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16206,7 +16206,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16494,7 +16494,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16764,7 +16764,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17018,7 +17018,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22470,7 +22470,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22794,7 +22794,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22855,10 +22855,10 @@ ] }, { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", "enabled": 0, "attributes": [ @@ -22897,12 +22897,12 @@ ] }, { - "name": "Nitric Oxide Concentration Measurement", - "code": 1042, + "name": "Nitrogen Dioxide Concentration Measurement", + "code": 1043, "mfgCode": null, - "define": "NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", + "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { "name": "MeasuredValue", @@ -22914,7 +22914,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22930,7 +22930,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22946,7 +22946,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "150", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22958,11 +22958,11 @@ "mfgCode": null, "side": "server", "type": "single", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22974,11 +22974,11 @@ "mfgCode": null, "side": "server", "type": "elapsed_s", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "120", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22990,11 +22990,11 @@ "mfgCode": null, "side": "server", "type": "single", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23006,11 +23006,11 @@ "mfgCode": null, "side": "server", "type": "elapsed_s", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "120", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23026,7 +23026,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23042,331 +23042,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementMedium", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "MeasurementMediumEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LevelValue", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "LevelValueEnum", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Nitrogen Dioxide Concentration Measurement", - "code": 1043, - "mfgCode": null, - "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Nitrogen Dioxide Concentration Measurement", - "code": 1043, - "mfgCode": null, - "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "150", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValue", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PeakMeasuredValueWindow", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "120", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValue", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AverageMeasuredValueWindow", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "elapsed_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "120", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Uncertainty", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "single", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MeasurementUnit", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "MeasurementUnitEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -23442,7 +23118,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23766,7 +23442,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24090,7 +23766,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24414,7 +24090,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24738,7 +24414,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25062,7 +24738,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25386,7 +25062,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25710,7 +25386,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -33378,4 +33054,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h new file mode 100644 index 00000000000000..15a72482726ba0 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace LaundryWasherControls { + +/** + * The application delegate to statically define the options. + */ + +class LaundryWasherControlDelegate : public Delegate +{ + static const CharSpan spinSpeedsNameOptions[]; + static const NumberOfRinsesEnum supportRinsesOptions[]; + static LaundryWasherControlDelegate instance; + +public: + CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed); + CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse); + + LaundryWasherControlDelegate() = default; + ~LaundryWasherControlDelegate() = default; + + static inline LaundryWasherControlDelegate & getLaundryWasherControlDelegate() { return instance; } +}; + +} // namespace LaundryWasherControls +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp new file mode 100644 index 00000000000000..6c70ef98cb4736 --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include +#include +#include + +using namespace chip; +using namespace chip::app::Clusters::LaundryWasherControls; + +const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = { + CharSpan::fromCharString("Off"), + CharSpan::fromCharString("Low"), + CharSpan::fromCharString("Medium"), + CharSpan::fromCharString("High"), +}; + +const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = { + NumberOfRinsesEnum::kNormal, + NumberOfRinsesEnum::kExtra, +}; + +LaundryWasherControlDelegate LaundryWasherControlDelegate::instance; + +CHIP_ERROR LaundryWasherControlDelegate::GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) +{ + if (index >= ArraySize(spinSpeedsNameOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + return chip::CopyCharSpanToMutableCharSpan(LaundryWasherControlDelegate::spinSpeedsNameOptions[index], spinSpeed); +} + +CHIP_ERROR LaundryWasherControlDelegate::GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) +{ + if (index >= ArraySize(supportRinsesOptions)) + { + return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; + } + supportedRinse = LaundryWasherControlDelegate::supportRinsesOptions[index]; + return CHIP_NO_ERROR; +} diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index d02447ebfb6330..cb07a50deba7e1 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index dc92f0c65b2e19..d5508c4197d790 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-app) diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 14015338230788..1b4b6ff21e6296 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -110,8 +110,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -119,9 +125,10 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) +set(PRIV_REQUIRES_LIST chip QRCode bt app_update nvs_flash spi_flash openthread) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-app/esp32/partitions.csv b/examples/all-clusters-app/esp32/partitions.csv index 2211b30fa01a74..47172e25774ebb 100644 --- a/examples/all-clusters-app/esp32/partitions.csv +++ b/examples/all-clusters-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1900K, diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index d824c990600f65..c3b10929d4120d 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_MBEDTLS_HKDF_C=y # This example uses the older version of RMT driver to work with both # idf-v4.4.3 and idf-v5.0, so supressing the warnings by setting below option CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 72cd65ba55bc9e..766b482e5a4600 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-controls-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/laundry-washer-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/operational-state-delegates.cpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 727bddb955056b..71e86397ce7120 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -20,6 +20,7 @@ #include "WindowCoveringManager.h" #include "dishwasher-mode.h" #include "include/tv-callbacks.h" +#include "laundry-washer-controls-delegate-impl.h" #include "laundry-washer-mode.h" #include "rvc-modes.h" #include "tcc-mode.h" @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -205,6 +207,12 @@ void ApplicationShutdown() } } +using namespace chip::app::Clusters::LaundryWasherControls; +void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) +{ + LaundryWasherControlsServer::SetDefaultDelegate(1, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); +} + void emberAfLowPowerClusterInitCallback(EndpointId endpoint) { ChipLogProgress(NotSpecified, "Setting LowPower default delegate to global manager"); diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 92932cfd83c333..1f31c58a314f35 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1934,6 +1934,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -4311,7 +4315,6 @@ endpoint 1 { callback attribute supportedTemperatureLevels; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index a878ee8613a494..2c6f2767baab80 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2732,7 +2732,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11390,7 +11390,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12739,7 +12739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23137,7 +23137,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 21d7c94f4859f0..f4ae242ea0aa05 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 ``` - Setup build environment: diff --git a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt index 0d6aa7b68931f6..0af660ce2990e2 100644 --- a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt @@ -26,12 +26,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) + if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() project(chip-all-clusters-minimal-app) diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index c445c54d32e370..33582927c19d26 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -100,8 +100,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -110,8 +116,9 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" endif (CONFIG_ENABLE_PW_RPC) set(PRIV_REQUIRES_LIST chip QRCode bt driver app_update nvs_flash spi_flash openthread) -if(CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft spidrier screen-framework) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) endif() if(CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM) diff --git a/examples/all-clusters-minimal-app/esp32/partitions.csv b/examples/all-clusters-minimal-app/esp32/partitions.csv index 43acef25d0245d..47172e25774ebb 100644 --- a/examples/all-clusters-minimal-app/esp32/partitions.csv +++ b/examples/all-clusters-minimal-app/esp32/partitions.csv @@ -1,8 +1,8 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, -ota_0, app, ota_0, , 1500K, -ota_1, app, ota_1, , 1500K, +ota_0, app, ota_0, , 1900K, +ota_1, app, ota_1, , 1900K, ot_storage, data, 0x3a, , 0x2000, diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults index dcceac3858cd3e..fda02fbf7c9bae 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig.defaults @@ -66,3 +66,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults index 24d4fe754ebdc8..8d7455d0d7610f 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_c3devkit.defaults @@ -50,3 +50,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults index a7d058bc7fe30a..287262d17e57cc 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack.defaults @@ -70,3 +70,6 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults index e0cf1a0f22a874..213d44fe9c616e 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -74,3 +74,9 @@ CONFIG_MBEDTLS_HKDF_C=y # Build chip tests CONFIG_BUILD_CHIP_TESTS=y + +# Move functions from IRAM to flash +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# to avoid dram overflow, reduce the critical loggin buffer to 1K +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 54b3350c3a3805..9ef1be662e38d9 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1546,6 +1546,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 4fd1ae893aaada..51a214d8750447 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7625,5 +7625,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/bridge-app/esp32/partitions.csv b/examples/bridge-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/bridge-app/esp32/partitions.csv +++ b/examples/bridge-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/chef/common/chef-channel-manager.cpp b/examples/chef/common/chef-channel-manager.cpp index 58a07edd730958..6077fd3d20b6f0 100644 --- a/examples/chef/common/chef-channel-manager.cpp +++ b/examples/chef/common/chef-channel-manager.cpp @@ -134,9 +134,9 @@ void ChefChannelManager::HandleChangeChannel(CommandResponseHelper 1) + if (totalMatchedChannels > 1) { response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kMultipleMatches; helper.Success(response); } - else if (matchedChannels.size() == 0) + else if (totalMatchedChannels == 0) { // Error: Found no match response.status = chip::app::Clusters::Channel::ChannelStatusEnum::kNoMatches; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 4bff8df11f908b..3fa94f796969e9 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1431,6 +1431,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 05a923ced5d212..9ab03f1604e7fe 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7514,5 +7514,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 8219da431bdf80..a10059b8f5d77d 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -898,6 +898,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2034,6 +2038,19 @@ endpoint 2 { ram attribute clusterRevision default = 4; } + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster AirQuality { ram attribute airQuality default = 0; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 33e807fc0b5906..0647999f636f36 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -5478,7 +5478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7354,7 +7354,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -7370,7 +7370,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7386,7 +7386,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7402,7 +7402,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7418,7 +7418,7 @@ "side": "server", "type": "epoch_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7434,7 +7434,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7450,7 +7450,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7466,7 +7466,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7482,7 +7482,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7498,7 +7498,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7598,7 +7598,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "100", @@ -7614,7 +7614,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7630,7 +7630,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -7646,7 +7646,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -7662,7 +7662,7 @@ "side": "server", "type": "epoch_s", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7678,7 +7678,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7694,7 +7694,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7710,7 +7710,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7726,7 +7726,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7742,7 +7742,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9160,7 +9160,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9176,7 +9176,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9192,7 +9192,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9208,7 +9208,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10960,7 +10960,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10976,7 +10976,235 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -10988,7 +11216,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11004,7 +11232,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11020,7 +11248,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11036,7 +11264,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11071,7 +11299,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11152,7 +11380,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11168,7 +11396,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11184,7 +11412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11200,7 +11428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11364,7 +11592,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11380,7 +11608,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11396,7 +11624,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11412,7 +11640,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11576,7 +11804,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11592,7 +11820,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11608,7 +11836,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11624,7 +11852,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11900,7 +12128,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11916,7 +12144,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11932,7 +12160,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11948,7 +12176,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12224,7 +12452,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12240,7 +12468,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12256,7 +12484,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12272,7 +12500,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12548,7 +12776,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12564,7 +12792,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12580,7 +12808,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12596,7 +12824,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12872,7 +13100,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12888,7 +13116,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12904,7 +13132,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12920,7 +13148,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13196,7 +13424,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13212,7 +13440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13228,7 +13456,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13244,7 +13472,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13520,7 +13748,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13536,7 +13764,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13552,7 +13780,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13568,7 +13796,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13844,7 +14072,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13860,7 +14088,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13876,7 +14104,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13892,7 +14120,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14168,7 +14396,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14184,7 +14412,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14200,7 +14428,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14216,7 +14444,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14492,7 +14720,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14508,7 +14736,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14524,7 +14752,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14540,7 +14768,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14816,7 +15044,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14832,7 +15060,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14848,7 +15076,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14864,7 +15092,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14994,7 +15222,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15010,7 +15238,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15022,7 +15250,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15038,7 +15266,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15054,7 +15282,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15070,7 +15298,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15170,7 +15398,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15186,11 +15414,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15202,11 +15430,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15218,11 +15446,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15234,7 +15462,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15250,7 +15478,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15266,7 +15494,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15282,7 +15510,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15298,7 +15526,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15462,7 +15690,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15478,7 +15706,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15494,7 +15722,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15510,7 +15738,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15640,7 +15868,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15656,7 +15884,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15668,7 +15896,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15684,7 +15912,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15700,7 +15928,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15716,7 +15944,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15816,7 +16044,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15832,11 +16060,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15848,11 +16076,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15864,11 +16092,11 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -15880,7 +16108,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15896,7 +16124,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15912,7 +16140,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15928,7 +16156,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -15944,7 +16172,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16108,7 +16336,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16124,7 +16352,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16140,7 +16368,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16156,7 +16384,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16286,7 +16514,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16302,7 +16530,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16314,7 +16542,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16330,7 +16558,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16346,7 +16574,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16362,7 +16590,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16424,7 +16652,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16446,11 +16674,11 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16466,7 +16694,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16482,7 +16710,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16498,7 +16726,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16514,7 +16742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -16578,7 +16806,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16594,7 +16822,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16610,7 +16838,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16626,7 +16854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16642,7 +16870,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16658,7 +16886,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16674,7 +16902,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16690,7 +16918,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16706,7 +16934,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17600,7 +17828,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17616,7 +17844,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17632,7 +17860,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -17648,7 +17876,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 46a8708f546889..169129dd542a12 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1131,6 +1131,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index fe08e80ffffc39..d4ed8ae7833f32 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1191,6 +1191,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1688,7 +1692,6 @@ endpoint 1 { ram attribute identifyType default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1698,7 +1701,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1712,7 +1714,6 @@ endpoint 1 { ram attribute startUpOnOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1726,7 +1727,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1739,7 +1739,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1778,7 +1777,6 @@ endpoint 1 { ram attribute startUpColorTemperatureMireds; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0010; ram attribute clusterRevision default = 5; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index e6acf1565b0276..6287c65ac3867c 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5537,7 +5537,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5785,7 +5785,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6169,7 +6169,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6447,7 +6447,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6885,7 +6885,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7097,7 +7097,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8231,7 +8231,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 8d3d9e60304b56..e757bfca40c244 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index e89aecd12781ae..8642b2a170521d 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6319,5 +6319,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b8afaea3572f59..ecddba32229e2a 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 7fba5c4134daf5..0ab727ecd5abc2 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7539,5 +7539,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index aeb594c5de3e2e..cb7af5398cb2d9 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 5a46308f437617..da96d4569de5ef 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9312,5 +9312,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 076ebe9ded9b6b..cd0309d8576232 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 79e9cc632850e1..c38514edfb40ae 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8609,5 +8609,6 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index d851670914addd..5253394dac1473 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1132,6 +1132,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 321bbb3b20bf07..1975bfaf97c3e3 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index e2d092aadc74da..5f7dc401654574 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 886a475473db1f..37a010401215f4 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 774 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 95067271e9bdbf..5c16ff4316165a 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1289,6 +1289,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 945ddd6d1e5ce8..b95ce7015634cb 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 51539608f77c93..282e57cb787065 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index b978f4ec63924f..e7267012c6188a 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 775 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 046c96f788b42c..60663594687e76 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index f9afc87acb29fe..57b5f0a2cb1180 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6383,5 +6383,6 @@ "endpointVersion": 1, "deviceIdentifier": 262 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 5f4df720ab7645..159d6df5d0c559 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 3afbcce18145ec..01c4eefa322d6c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6495,5 +6495,6 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index cdc5ce1f05fc1f..82a253ba91ab62 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1295,6 +1295,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 936482b5b5f361..f134cca90449a2 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index aad75b19c1c549..3e3de2c710e365 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1259,6 +1259,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 0f1824d8ea2bea..5205af24b4419f 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7491,5 +7491,6 @@ "endpointVersion": 1, "deviceIdentifier": 259 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 062beadb18923b..0f341394b711b3 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1194,6 +1194,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index fbecf55ef040e4..e6984ffac25eae 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7167,5 +7167,6 @@ "endpointVersion": 1, "deviceIdentifier": 266 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 348af0da8d066d..eadffeffcfd559 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index bc3b79d37dc51b..1145564264c61e 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6447,5 +6447,6 @@ "endpointVersion": 1, "deviceIdentifier": 773 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 81a95b1aa42e46..f461f2e7c49151 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -844,6 +844,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1021,7 +1025,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 2; @@ -1035,7 +1038,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1056,7 +1058,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1067,7 +1068,6 @@ endpoint 0 { callback attribute supportedLocales; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1077,7 +1077,6 @@ endpoint 0 { persist attribute hourFormat default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1086,7 +1085,6 @@ endpoint 0 { server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1100,7 +1098,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1117,7 +1114,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1129,7 +1125,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1141,7 +1136,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1156,7 +1150,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1169,7 +1162,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1183,7 +1175,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1193,7 +1184,6 @@ endpoint 1 { ram attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -1206,7 +1196,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; @@ -1222,7 +1211,6 @@ endpoint 1 { ram attribute operationMode default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index f83aac1598fd68..a20540b631e664 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -972,7 +972,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1184,7 +1184,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1652,7 +1652,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -2084,7 +2084,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2246,7 +2246,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2376,7 +2376,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2640,7 +2640,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2976,7 +2976,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3152,7 +3152,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3438,7 +3438,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5462,7 +5462,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5790,7 +5790,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6020,7 +6020,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6358,7 +6358,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6728,7 +6728,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6940,7 +6940,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7456,7 +7456,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7538,5 +7538,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter new file mode 100644 index 00000000000000..8fb00caaadd6a7 --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -0,0 +1,1475 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for scene configuration and manipulation. */ +server cluster Scenes = 5 { + bitmap Feature : BITMAP32 { + kSceneNames = 0x1; + } + + bitmap ScenesCopyMode : BITMAP8 { + kCopyAllScenes = 0x1; + } + + struct AttributeValuePair { + attrib_id attributeID = 0; + int32u attributeValue = 1; + } + + struct ExtensionFieldSet { + cluster_id clusterID = 0; + AttributeValuePair attributeValueList[] = 1; + } + + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute group_id currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly attribute int16u sceneTableSize = 6; + readonly attribute int8u remainingCapacity = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct ViewSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RemoveAllScenesRequest { + group_id groupID = 0; + } + + request struct StoreSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + } + + request struct RecallSceneRequest { + group_id groupID = 0; + INT8U sceneID = 1; + optional nullable INT16U transitionTime = 2; + } + + request struct GetSceneMembershipRequest { + group_id groupID = 0; + } + + response struct AddSceneResponse = 0 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct ViewSceneResponse = 1 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + optional INT16U transitionTime = 3; + optional CHAR_STRING sceneName = 4; + optional ExtensionFieldSet extensionFieldSets[] = 5; + } + + response struct RemoveSceneResponse = 2 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct RemoveAllScenesResponse = 3 { + status status = 0; + group_id groupID = 1; + } + + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + INT8U sceneID = 2; + } + + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable INT8U capacity = 1; + group_id groupID = 2; + optional INT8U sceneList[] = 3; + } + + fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; + fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +server cluster Switch = 59 { + bitmap Feature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U previousPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcRunMode = 84 { + enum ModeTag : ENUM16 { + kIdle = 16384; + kCleaning = 16385; + } + + enum StatusCode : ENUM8 { + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + kBatteryLow = 72; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** Attributes and commands for selecting a mode from a list of supported options. */ +server cluster RvcCleanMode = 85 { + enum ModeTag : ENUM16 { + kDeepClean = 16384; + kVacuum = 16385; + kMop = 16386; + } + + enum StatusCode : ENUM8 { + kCleaningInProgress = 64; + } + + bitmap Feature : BITMAP32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + ENUM8 status = 0; + optional CHAR_STRING statusText = 1; + } + + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + +/** This cluster supports remotely monitoring and, where supported, changing the operational state of a Robotic Vacuum. */ +server cluster RvcOperationalState = 97 { + enum ErrorStateEnum : ENUM8 { + kFailedToFindChargingDock = 64; + kStuck = 65; + kDustBinMissing = 66; + kDustBinFull = 67; + kWaterTankEmpty = 68; + kWaterTankMissing = 69; + kWaterTankLidOpen = 70; + kMopCleaningPadMissing = 71; + } + + enum OperationalStateEnum : ENUM8 { + kSeekingCharger = 64; + kCharging = 65; + kDocked = 66; + } + + struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; + } + + struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; + } + + critical event OperationalError = 0 { + ErrorStateStruct errorState = 0; + } + + info event OperationCompletion = 1 { + ENUM8 completionErrorCode = 0; + optional nullable elapsed_s totalOperationalTime = 1; + optional nullable elapsed_s pausedTime = 2; + } + + readonly attribute nullable CHAR_STRING phaseList[] = 0; + readonly attribute nullable int8u currentPhase = 1; + readonly attribute OperationalStateStruct operationalStateList[] = 3; + readonly attribute enum8 operationalState = 4; + readonly attribute ErrorStateStruct operationalError = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + command Pause(): OperationalCommandResponse = 0; + command Resume(): OperationalCommandResponse = 3; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 116, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster Scenes { + callback attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; + ram attribute nameSupport default = 0x00; + ram attribute sceneTableSize; + callback attribute remainingCapacity; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcRunMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcCleanMode { + callback attribute supportedModes; + callback attribute currentMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster RvcOperationalState { + emits event OperationalError; + emits event OperationCompletion; + callback attribute phaseList; + callback attribute currentPhase; + callback attribute operationalStateList; + callback attribute operationalState; + callback attribute operationalError; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap new file mode 100644 index 00000000000000..746259df3636b6 --- /dev/null +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -0,0 +1,10848 @@ +{ + "featureLevel": 97, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-robotic-vacuum-cleaner", + "deviceTypeCode": 116, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Run Mode", + "code": 84, + "mfgCode": null, + "define": "RVC_RUN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Clean Mode", + "code": 85, + "mfgCode": null, + "define": "RVC_CLEAN_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpMode", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnMode", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Pause", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Resume", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "RVC Operational State", + "code": 97, + "mfgCode": null, + "define": "OPERATIONAL_STATE_RVC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OperationalCommandResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "PhaseList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPhase", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CountdownTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStateList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalError", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ErrorStateStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "OperationalError", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "OperationCompletion", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 116 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter new file mode 100644 index 00000000000000..4d2c91b819da14 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -0,0 +1,1335 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; +} + +struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; +} + +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + +struct ErrorStateStruct { + enum8 errorStateID = 0; + optional char_string<64> errorStateLabel = 1; + optional char_string<64> errorStateDetails = 2; +} + +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +struct OperationalStateStruct { + enum8 operationalStateID = 0; + optional char_string<64> operationalStateLabel = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +server cluster Identify = 3 { + enum EffectIdentifierEnum : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : ENUM8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : ENUM8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +server cluster Groups = 4 { + bitmap Feature : BITMAP32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : BITMAP8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + CHAR_STRING groupName = 1; + } + + response struct AddGroupResponse = 0 { + ENUM8 status = 0; + group_id groupID = 1; + } + + response struct ViewGroupResponse = 1 { + ENUM8 status = 0; + group_id groupID = 1; + CHAR_STRING groupName = 2; + } + + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupID = 1; + } + + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : ENUM8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : ENUM8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + + bitmap Feature : BITMAP32 { + kLighting = 0x1; + kDeadFront = 0x2; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly nosubscribe attribute boolean onOff = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +server cluster Descriptor = 29 { + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +server cluster AccessControl = 31 { + enum AccessControlEntryAuthModeEnum : ENUM8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable INT16U adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute char_string<16> manufacturingDate = 11; + readonly attribute char_string<32> partNumber = 12; + readonly attribute long_char_string<256> productURL = 13; + readonly attribute char_string<64> productLabel = 14; + readonly attribute char_string<32> serialNumber = 15; + attribute access(write: manage) boolean localConfigDisabled = 16; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +server cluster GeneralCommissioning = 48 { + enum CommissioningErrorEnum : ENUM8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + CHAR_STRING debugText = 1; + } + + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatusEnum : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : ENUM8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : BITMAP32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + } + + bitmap WiFiSecurityBitmap : BITMAP8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute int8u scanMaxTimeSeconds = 2; + readonly attribute int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING<32> ssid = 0; + optional INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING<32> ssid = 0; + OCTET_STRING<64> credentials = 1; + optional INT64U breadcrumb = 2; + } + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING<254> operationalDataset = 0; + optional INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING<32> networkID = 0; + optional INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING<32> networkID = 0; + INT8U networkIndex = 1; + optional INT64U breadcrumb = 2; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING<512> debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +server cluster DiagnosticLogs = 50 { + enum IntentEnum : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : ENUM8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional CHAR_STRING<32> transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +server cluster GeneralDiagnostics = 51 { + enum BootReasonEnum : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + OCTET_STRING<16> enableKey = 0; + INT64U eventTrigger = 1; + } + + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatusEnum : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable int16u adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEPasscodeVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +server cluster OperationalCredentials = 62 { + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute OCTET_STRING trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + Int64u caseAdminSubject = 3; + VENDOR_ID adminVendorId = 4; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCACertificate = 0; + } + + response struct AttestationResponse = 1 { + OCTET_STRING attestationElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional CHAR_STRING debugText = 2; + } + + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicyEnum : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + INT16U groupKeySetIDs[] = 0; + } + + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap Feature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct ThermostatScheduleTransition { + int16u transitionTime = 0; + nullable int16s heatSetpoint = 1; + nullable int16s coolSetpoint = 2; + } + + readonly attribute nullable int16s localTemperature = 0; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute access(write: manage) int16s minCoolSetpointLimit = 23; + attribute access(write: manage) int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; + attribute access(write: manage) enum8 systemMode = 28; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +/** An interface for controlling a fan in a heating/cooling system. */ +server cluster FanControl = 514 { + enum AirflowDirectionEnum : ENUM8 { + kForward = 0; + kReverse = 1; + } + + enum FanModeEnum : ENUM8 { + kOff = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; + kOn = 4; + kAuto = 5; + kSmart = 6; + } + + enum FanModeSequenceEnum : ENUM8 { + kOffLowMedHigh = 0; + kOffLowHigh = 1; + kOffLowMedHighAuto = 2; + kOffLowHighAuto = 3; + kOffOnAuto = 4; + kOffOn = 5; + } + + enum StepDirectionEnum : ENUM8 { + kIncrease = 0; + kDecrease = 1; + } + + bitmap Feature : BITMAP32 { + kMultiSpeed = 0x1; + kAuto = 0x2; + kRocking = 0x4; + kWind = 0x8; + kStep = 0x10; + kAirflowDirection = 0x20; + } + + bitmap RockBitmap : BITMAP8 { + kRockLeftRight = 0x1; + kRockUpDown = 0x2; + kRockRound = 0x4; + } + + bitmap WindBitmap : BITMAP8 { + kSleepWind = 0x1; + kNaturalWind = 0x2; + } + + attribute FanModeEnum fanMode = 0; + attribute FanModeSequenceEnum fanModeSequence = 1; + attribute nullable Percent percentSetting = 2; + readonly attribute Percent percentCurrent = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ +server cluster ThermostatUserInterfaceConfiguration = 516 { + attribute enum8 temperatureDisplayMode = 0; + attribute access(write: manage) enum8 keypadLockout = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +endpoint 0 { + device type rootdevice = 22, version 1; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision default = 10; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location default = "XX"; + callback attribute hardwareVersion default = 0; + callback attribute hardwareVersionString; + callback attribute softwareVersion default = 0; + callback attribute softwareVersionString; + callback attribute manufacturingDate default = "20210614123456ZZ"; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus default = 0; + callback attribute adminFabricIndex default = 1; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type anonymousEndpointType = 114, version 1; + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OnOff { + ram attribute onOff default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 5; + } + + server cluster Descriptor { + callback attribute deviceTypeList default = 0; + callback attribute serverList default = 0; + callback attribute clientList default = 0; + callback attribute partsList default = 0; + callback attribute generatedCommandList default = 0; + callback attribute acceptedCommandList default = 0; + callback attribute eventList; + callback attribute attributeList default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster Thermostat { + ram attribute localTemperature; + ram attribute absMinCoolSetpointLimit default = 1600; + ram attribute absMaxCoolSetpointLimit default = 3000; + ram attribute occupiedCoolingSetpoint default = 2600; + ram attribute minCoolSetpointLimit default = 1600; + ram attribute maxCoolSetpointLimit default = 3000; + ram attribute controlSequenceOfOperation default = 0x00; + ram attribute systemMode default = 0x03; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 6; + } + + server cluster FanControl { + ram attribute fanMode default = 0; + ram attribute fanModeSequence default = 2; + ram attribute percentSetting default = 0; + ram attribute percentCurrent default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ThermostatUserInterfaceConfiguration { + ram attribute temperatureDisplayMode default = 0x01; + ram attribute keypadLockout default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } +} + + diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap new file mode 100644 index 00000000000000..e050bc914a2c61 --- /dev/null +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -0,0 +1,11622 @@ +{ + "featureLevel": 97, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "id": 2, + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceTypeRefs": [ + 2 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/off Switch Configuration", + "code": 7, + "mfgCode": null, + "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "switch type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "switch actions", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "XX", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "20210614123456ZZ", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Reachable", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OTAUpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 0, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0 + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + }, + "deviceTypes": [ + { + "id": 43, + "code": 114, + "profileId": 259, + "label": "MA-room-airconditioner", + "name": "MA-room-airconditioner" + } + ], + "deviceTypeRefs": [ + 43 + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 114 + ], + "deviceTypeName": "MA-room-airconditioner", + "deviceTypeCode": 114, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "SceneCount", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentScene", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentGroup", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "group_id", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneValid", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NameSupport", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConfiguredBy", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "node_id", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SceneTableSize", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingCapacity", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "OnOffStartUpOnOff", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToLevel", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Move", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Step", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Stop", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToLevelWithOnOff", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveWithOnOff", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepWithOnOff", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopWithOnOff", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Level Control", + "code": 8, + "mfgCode": null, + "define": "LEVEL_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentLevel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentFrequency", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinFrequency", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxFrequency", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "LevelControlOptions", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnOffTransitionTime", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnLevel", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OnTransitionTime", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OffTransitionTime", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultMoveRate", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpCurrentLevel", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TagList", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "LockDoor", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnlockDoor", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetUser", + "code": 26, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "GetUser", + "code": 27, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearUser", + "code": 29, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredential", + "code": 34, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "ClearCredential", + "code": 38, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Door Lock", + "code": 257, + "mfgCode": null, + "define": "DOOR_LOCK_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "GetUserResponse", + "code": 28, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "SetCredentialResponse", + "code": 35, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "LockState", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LockType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActuatorEnabled", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorState", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "DoorStateEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorOpenEvents", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DoorClosedEvents", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OpenPeriod", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfTotalUsersSupported", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPINUsersSupported", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfRFIDUsersSupported", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeekDaySchedulesSupportedPerUser", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfYearDaySchedulesSupportedPerUser", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfHolidaySchedulesSupported", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPINCodeLength", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinPINCodeLength", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxRFIDCodeLength", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinRFIDCodeLength", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CredentialRulesSupport", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "DlCredentialRuleMask", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Language", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LEDSettings", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AutoRelockTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SoundVolume", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperatingMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "OperatingModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedOperatingModes", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "DlSupportedOperatingModes", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFF6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultConfigurationRegister", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "DlDefaultConfigurationRegister", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableLocalProgramming", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableOneTouchLocking", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnableInsideStatusLED", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalProgrammingFeatures", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "DlLocalProgrammingFeatures", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SendPINOverTheAir", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpiringUserTimeout", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "BarrierControlGoToPercent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "BarrierControlStop", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Barrier Control", + "code": 259, + "mfgCode": null, + "define": "BARRIER_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "barrier moving state", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier safety status", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier capabilities", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open events", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close events", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command open events", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier command close events", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier open period", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier close period", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "barrier position", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OutdoorTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Occupancy", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinHeatSetpointLimit", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxHeatSetpointLimit", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinCoolSetpointLimit", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxCoolSetpointLimit", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PICoolingDemand", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIHeatingDemand", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HVACSystemTypeConfiguration", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTemperatureCalibration", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedCoolingSetpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedHeatingSetpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedCoolingSetpoint", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedHeatingSetpoint", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinHeatSetpointLimit", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxHeatSetpointLimit", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCoolSetpointLimit", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCoolSetpointLimit", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinSetpointDeadBand", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "25", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemoteSensing", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlSequenceOfOperation", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "ThermostatControlSequence", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SystemMode", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningMode", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartOfWeek", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTransitions", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTransitions", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHold", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHoldDuration", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatProgrammingOperationMode", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThermostatRunningState", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSource", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeAmount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointChangeSourceTimestamp", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetback", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMin", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupiedSetbackMax", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetback", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMin", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UnoccupiedSetbackMax", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EmergencyHeatDelta", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACType", + "code": 64, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacity", + "code": 65, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACRefrigerantType", + "code": 66, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCompressorType", + "code": 67, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACErrorCode", + "code": 68, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACLouverPosition", + "code": 69, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCoilTemperature", + "code": 70, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ACCapacityformat", + "code": 71, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fan Control", + "code": 514, + "mfgCode": null, + "define": "FAN_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "FanMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "FanModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FanModeSequence", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "FanModeSequenceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentSetting", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PercentCurrent", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "Percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedMax", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedSetting", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpeedCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSupport", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RockSetting", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "RockBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSupport", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WindSetting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "WindBitmap", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AirflowDirection", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "AirflowDirectionEnum", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureDisplayMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "KeypadLockout", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleProgrammingVisibility", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StopMoveStep", + "code": 71, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "MoveColorTemperature", + "code": 75, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "StepColorTemperature", + "code": 76, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "CurrentHue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentSaturation", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x616B", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentY", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x607D", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DriftCompensation", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CompensationText", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTemperatureMireds", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorMode", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Options", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "bitmap8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPrimaries", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1X", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Y", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary1Intensity", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2X", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Y", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary2Intensity", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3X", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Y", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary3Intensity", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4X", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Y", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary4Intensity", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5X", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Y", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary5Intensity", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6X", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Y", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Primary6Intensity", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointX", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WhitePointY", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRX", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRY", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointRIntensity", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGX", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGY", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointGIntensity", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBX", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBY", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorPointBIntensity", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedCurrentHue", + "code": 16384, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnhancedColorMode", + "code": 16385, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopActive", + "code": 16386, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopDirection", + "code": 16387, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopTime", + "code": 16388, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0019", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStartEnhancedHue", + "code": 16389, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x2300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorLoopStoredEnhancedHue", + "code": 16390, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorCapabilities", + "code": 16394, + "mfgCode": null, + "side": "server", + "type": "bitmap16", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMinMireds", + "code": 16395, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ColorTempPhysicalMaxMireds", + "code": 16396, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFEFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StartUpColorTemperatureMireds", + "code": 16400, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMPERATURE_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Occupancy Sensing", + "code": 1030, + "mfgCode": null, + "define": "OCCUPANCY_SENSING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Occupancy", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "OccupancyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OccupancySensorTypeBitmap", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "OccupancySensorTypeBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedDelay", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PIRUnoccupiedToOccupiedThreshold", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicOccupiedToUnoccupiedDelay", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedDelay", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 707711726b0578..d452974aac5c8e 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1289,6 +1289,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2a6dbf5b9ce81d..3e9137e4de49c1 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6599,5 +6599,6 @@ "endpointVersion": 1, "deviceIdentifier": 34 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 11c8f04ded349e..b4eb0ec4c22094 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1220,6 +1220,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index f1dbfdd711a930..ec498c5a4cb846 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6367,5 +6367,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 6d8d1131ec69b0..57f3f09d4a4963 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 4ab16c9f1ee7b1..e71fbc336eceaf 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7847,5 +7847,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 445dc383e2fc42..a5e2ad2299635d 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1145,6 +1145,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index df025f16b7344f..2ed25d1db597e8 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7049,5 +7049,6 @@ "endpointVersion": 1, "deviceIdentifier": 514 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index e32c5499af3b2c..3df60484a7fb27 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5478,7 +5478,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5494,7 +5494,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5537,8 +5537,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5742,7 +5742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5785,8 +5785,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6010,11 +6010,11 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6030,7 +6030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6046,7 +6046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6062,7 +6062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6078,7 +6078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6122,7 +6122,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6138,7 +6138,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6154,7 +6154,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6169,8 +6169,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6186,7 +6186,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6392,7 +6392,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6408,7 +6408,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6423,8 +6423,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6440,7 +6440,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6610,7 +6610,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -6830,7 +6830,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6846,7 +6846,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6861,8 +6861,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6878,7 +6878,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6998,7 +6998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7014,7 +7014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7030,7 +7030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -7073,8 +7073,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7237,8 +7237,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8006,7 +8006,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8022,7 +8022,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8037,8 +8037,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8054,7 +8054,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8332,7 +8332,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8348,7 +8348,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8363,8 +8363,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8380,7 +8380,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8630,7 +8630,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8678,7 +8678,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8694,7 +8694,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8726,7 +8726,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8742,7 +8742,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8758,7 +8758,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8774,7 +8774,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8790,7 +8790,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8806,7 +8806,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8822,7 +8822,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8838,7 +8838,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8854,7 +8854,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8870,7 +8870,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8886,7 +8886,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8902,7 +8902,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8918,7 +8918,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8934,7 +8934,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8950,7 +8950,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8966,7 +8966,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8982,7 +8982,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8998,7 +8998,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9014,7 +9014,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9030,7 +9030,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9046,7 +9046,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9062,7 +9062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9078,7 +9078,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9094,7 +9094,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9110,7 +9110,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9126,7 +9126,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9142,7 +9142,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9158,7 +9158,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9174,7 +9174,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9190,7 +9190,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9206,7 +9206,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9222,7 +9222,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9238,7 +9238,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9254,7 +9254,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9270,7 +9270,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9286,7 +9286,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9302,7 +9302,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0019", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9350,7 +9350,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9366,7 +9366,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9382,7 +9382,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9398,7 +9398,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9414,7 +9414,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -9426,7 +9426,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9442,7 +9442,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9457,8 +9457,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9474,7 +9474,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9638,7 +9638,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9654,7 +9654,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9669,8 +9669,8 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "RAM", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9686,7 +9686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/chef/esp32/partitions.csv b/examples/chef/esp32/partitions.csv index b338ff11a11589..c0855b66229dc4 100644 --- a/examples/chef/esp32/partitions.csv +++ b/examples/chef/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB factory, app, factory, , 1945K, diff --git a/examples/chef/esp32/sdkconfig.defaults b/examples/chef/esp32/sdkconfig.defaults index ca2cd09fcd1541..bd714ab0202833 100644 --- a/examples/chef/esp32/sdkconfig.defaults +++ b/examples/chef/esp32/sdkconfig.defaults @@ -59,3 +59,6 @@ CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/chef/esp32/sdkconfig_rpc.defaults b/examples/chef/esp32/sdkconfig_rpc.defaults index caac0212b3b17a..a1506dd52891bc 100644 --- a/examples/chef/esp32/sdkconfig_rpc.defaults +++ b/examples/chef/esp32/sdkconfig_rpc.defaults @@ -58,3 +58,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# IRAM optimizations +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index b09cbf7fe26778..53b418e1fc916d 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -41,5 +41,7 @@ "Video Remote Control": 42, "Mode Select": 39, "Air Purifier": 45, - "Air Quality Sensor": 44 + "Air Quality Sensor": 44, + "Robotic Vacuum Cleaner": 116, + "Room Air Conditioner": 114 } diff --git a/examples/chef/silabs/BUILD.gn b/examples/chef/silabs/BUILD.gn index a7a30e2c6396f8..cecef1c71bc050 100644 --- a/examples/chef/silabs/BUILD.gn +++ b/examples/chef/silabs/BUILD.gn @@ -56,7 +56,7 @@ chip_data_model("chef-common") { efr32_sdk("sdk") { sources = [ "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ @@ -133,7 +133,7 @@ silabs_executable("chef_app") { "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:ot_cli_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:thread_service.nanopb_rpc", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs", ] deps += pw_build_LINK_DEPS @@ -144,7 +144,7 @@ silabs_executable("chef_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 5c612365b2ee24..0b6339ab60f5ed 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -33,21 +33,24 @@ class ModelCommand : public CHIPCommand mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), mSupportsMultipleEndpoints(supportsMultipleEndpoints) {} - void AddArguments() + void AddArguments(bool skipEndpoints = false) { AddArgument( "destination-id", 0, UINT64_MAX, &mDestinationId, "64-bit node or group identifier.\n Group identifiers are detected by being in the 0xFFFF'FFFF'FFFF'xxxx range."); - if (mSupportsMultipleEndpoints) + if (skipEndpoints == false) { - AddArgument("endpoint-ids", 0, UINT16_MAX, &mEndPointId, - "Comma-separated list of endpoint ids (e.g. \"1\" or \"1,2,3\").\n Allowed to be 0xFFFF to indicate a " - "wildcard endpoint."); - } - else - { - AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId, - "Endpoint the command is targeted at."); + if (mSupportsMultipleEndpoints) + { + AddArgument("endpoint-ids", 0, UINT16_MAX, &mEndPointId, + "Comma-separated list of endpoint ids (e.g. \"1\" or \"1,2,3\").\n Allowed to be 0xFFFF to indicate a " + "wildcard endpoint."); + } + else + { + AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId, + "Endpoint the command is targeted at."); + } } AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } diff --git a/examples/chip-tool/commands/clusters/ReportCommand.h b/examples/chip-tool/commands/clusters/ReportCommand.h index e90fb5ddf28f14..eefd938c2d0717 100644 --- a/examples/chip-tool/commands/clusters/ReportCommand.h +++ b/examples/chip-tool/commands/clusters/ReportCommand.h @@ -415,6 +415,33 @@ class SubscribeEvent : public SubscribeCommand std::vector mEventIds; }; +class ReadNone : public ReadCommand +{ +public: + ReadNone(CredentialIssuerCommands * credsIssuerConfig) : ReadCommand("read-none", credsIssuerConfig) + { + AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, + "Boolean indicating whether to do a fabric-filtered read. Defaults to true."); + AddArgument("data-versions", 0, UINT32_MAX, &mDataVersions, + "Comma-separated list of data versions for the clusters being read."); + AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); + ReadCommand::AddArguments(true /* skipEndpoints */); + } + + ~ReadNone() {} + + void OnDone(chip::app::ReadClient * aReadClient) override + { + InteractionModelReports::CleanupReadClient(aReadClient); + SetCommandExitStatus(mError); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + return ReadCommand::ReadNone(device); + } +}; + class ReadAll : public ReadCommand { public: @@ -456,6 +483,31 @@ class ReadAll : public ReadCommand std::vector mEventIds; }; +class SubscribeNone : public SubscribeCommand +{ +public: + SubscribeNone(CredentialIssuerCommands * credsIssuerConfig) : SubscribeCommand("subscribe-none", credsIssuerConfig) + { + AddArgument("min-interval", 0, UINT16_MAX, &mMinInterval, + "The requested minimum interval between reports. Sets MinIntervalFloor in the Subscribe Request."); + AddArgument("max-interval", 0, UINT16_MAX, &mMaxInterval, + "The requested maximum interval between reports. Sets MaxIntervalCeiling in the Subscribe Request."); + AddArgument("fabric-filtered", 0, 1, &mFabricFiltered, + "Boolean indicating whether to do a fabric-filtered read. Defaults to true."); + AddArgument("event-min", 0, UINT64_MAX, &mEventNumber); + AddArgument("keepSubscriptions", 0, 1, &mKeepSubscriptions, + "false - Terminate existing subscriptions from initiator.\n true - Leave existing subscriptions in place."); + SubscribeCommand::AddArguments(true /* skipEndpoints */); + } + + ~SubscribeNone() {} + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + return SubscribeCommand::SubscribeNone(device); + } +}; + class SubscribeAll : public SubscribeCommand { public: diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index 2c02811f865845..e57bfe29b6af76 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -22,7 +22,9 @@ 'SubscribeById', 'ReadEventById', 'SubscribeEventById', + 'ReadNone', 'ReadAll', + 'SubscribeNone', 'SubscribeAll', ] @@ -79,6 +81,9 @@ 'EventId': 'event-id', }, }, + 'ReadNone': { + 'alias': 'read-none', + }, 'ReadAll': { 'alias': 'read-all', 'arguments': { @@ -87,6 +92,9 @@ 'EventId': 'event-ids', }, }, + 'SubscribeNone': { + 'alias': 'subscribe-none', + }, 'SubscribeAll': { 'alias': 'subscribe-all', 'arguments': { @@ -99,6 +107,14 @@ }, 'AnyCommands': { 'alias': 'any', + 'commands': { + 'ReadNone': { + 'has_endpoint': False, + }, + 'SubscribeNone': { + 'has_endpoint': False, + } + } }, 'CommissionerCommands': { 'alias': 'pairing', diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 60d327821b05d5..224ea8e5f8c2eb 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -132,7 +132,9 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // }; diff --git a/examples/common/m5stack-tft/repo b/examples/common/m5stack-tft/repo index 3344a8105f8dfe..a6299b6c7c0b2e 160000 --- a/examples/common/m5stack-tft/repo +++ b/examples/common/m5stack-tft/repo @@ -1 +1 @@ -Subproject commit 3344a8105f8dfecb95832f369733cf6f863a1662 +Subproject commit a6299b6c7c0b2e3eb62fa08ee4bf7155c39bad1f diff --git a/examples/common/screen-framework/CMakeLists.txt b/examples/common/screen-framework/CMakeLists.txt index 5b5739e12c2df5..af304459ea69e3 100644 --- a/examples/common/screen-framework/CMakeLists.txt +++ b/examples/common/screen-framework/CMakeLists.txt @@ -1,6 +1,12 @@ +set(require_list chip driver) + +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND require_list tft) +endif() + idf_component_register(SRCS "Display.cpp" "ScreenManager.cpp" "Screen.cpp" "ListScreen.cpp" INCLUDE_DIRS "include" - PRIV_REQUIRES tft chip driver) + REQUIRES ${require_list}) diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 15ebf07c2d6673..965124f01f4518 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1356,6 +1356,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index fc310d97ca9bdd..cbc839b2f547a2 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8785,5 +8785,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h index 334d2339536b15..04d65bdf565db0 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.h @@ -28,6 +28,7 @@ @property MTRDeviceController * commissioner; @property MTRCommissioningParameters * params; +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status; - (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError *)error; - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSError *)error; diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index b5166d8b707b54..b3476119c224b5 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -23,7 +23,7 @@ @interface CHIPToolDeviceControllerDelegate () @end @implementation CHIPToolDeviceControllerDelegate -- (void)onStatusUpdate:(MTRCommissioningStatus)status +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status { NSLog(@"Pairing Status Update: %tu", status); switch (status) { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 6994217884c894..cabe702de3ad44 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -976,6 +976,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1312,7 +1316,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1331,7 +1334,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1341,7 +1343,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1358,7 +1359,6 @@ endpoint 1 { callback attribute operationalError default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index a332a0fc94299a..ecf62fc64b33d5 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -3110,7 +3110,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6369,7 +6369,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7713,7 +7713,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7877,7 +7877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8503,7 +8503,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8757,7 +8757,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8900,7 +8900,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8932,7 +8932,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8979,7 +8979,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9191,7 +9191,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9479,7 +9479,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 03ee7caacb0447..8c45c2ee225d0c 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/light-switch-app/esp32/partitions.csv b/examples/light-switch-app/esp32/partitions.csv index 9c801081f71c04..eb41fc9c431ff0 100644 --- a/examples/light-switch-app/esp32/partitions.csv +++ b/examples/light-switch-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1500K, diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 61eda622d41fb6..5faea0c1c4648e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1859,6 +1859,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2532,7 +2536,6 @@ endpoint 0 { ram attribute supportsDNSResolve default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0B; ram attribute clusterRevision default = 1; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index c93571c2996316..fd8e23449ecf4e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4879,7 +4879,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "3", @@ -4895,7 +4895,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4958,7 +4958,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/light-switch-app/silabs/BUILD.gn b/examples/light-switch-app/silabs/BUILD.gn index 0707f6dbf52622..fc52c0b96b03b7 100644 --- a/examples/light-switch-app/silabs/BUILD.gn +++ b/examples/light-switch-app/silabs/BUILD.gn @@ -52,7 +52,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -75,7 +75,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -170,7 +170,7 @@ silabs_executable("light_switch_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -181,7 +181,7 @@ silabs_executable("light_switch_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/light-switch-app/silabs/README.md b/examples/light-switch-app/silabs/README.md index 9ca79a80e2bd41..197a2ae7ea424c 100644 --- a/examples/light-switch-app/silabs/README.md +++ b/examples/light-switch-app/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index bd764b23558643..8297c2a3bb2dbc 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 7c7332cc0306b2..f68eff373f0a5d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1464,6 +1464,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 852948f8da1431..f70ddb258429ec 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 67de97758bf6d0..27a1971fb2239d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1374,6 +1374,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 90bd7a21ea76f9..181fd612155a8a 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index b37c8154a45208..356a3cd14d6b64 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -26,15 +26,14 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common" ) if(${IDF_TARGET} STREQUAL "esp32") - list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/tft" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver" - "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/screen-framework") + list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/m5stack-tft/repo/components") endif() + project(chip-lighting-app) # WARNING: This is just an example for using key for decrypting the encrypted OTA image diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index b6e29691bacd23..fcb0121d9f6d78 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -69,6 +69,10 @@ set(SRC_DIRS_LIST set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash) +if(${IDF_TARGET} STREQUAL "esp32") + list(APPEND PRIV_REQUIRES_LIST spidriver screen-framework) +endif() + if (CONFIG_ENABLE_PW_RPC) # Append additional directories for RPC build set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" @@ -77,8 +81,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" @@ -86,10 +96,6 @@ set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" ) endif (CONFIG_ENABLE_PW_RPC) -if (CONFIG_HAVE_DISPLAY) - list(APPEND PRIV_REQUIRES_LIST tft screen-framework) -endif() - idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST} SRC_DIRS ${SRC_DIRS_LIST} PRIV_REQUIRES ${PRIV_REQUIRES_LIST}) diff --git a/examples/lighting-app/esp32/partitions.csv b/examples/lighting-app/esp32/partitions.csv index 3753d8bcf13a35..428d873fa54a05 100644 --- a/examples/lighting-app/esp32/partitions.csv +++ b/examples/lighting-app/esp32/partitions.csv @@ -1,7 +1,7 @@ # Name, Type, SubType, Offset, Size, Flags # Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted -nvs, data, nvs, 0x10000, 0x6000, +nvs, data, nvs, 0x10000, 0xC000, nvs_keys, data, nvs_keys,, 0x1000, otadata, data, ota, , 0x2000 phy_init, data, phy, , 0x1000, diff --git a/examples/lighting-app/esp32/partitions_encrypted.csv b/examples/lighting-app/esp32/partitions_encrypted.csv index 807ee35dc8e645..94ec9f7a2b7f17 100644 --- a/examples/lighting-app/esp32/partitions_encrypted.csv +++ b/examples/lighting-app/esp32/partitions_encrypted.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, encrypted phy_init, data, phy, , 0x1000, encrypted ota_0, app, ota_0, , 1500K, encrypted diff --git a/examples/lighting-app/esp32/partitions_h2.csv b/examples/lighting-app/esp32/partitions_h2.csv index 6d04b8d05e3a0a..16a8b0f7453040 100644 --- a/examples/lighting-app/esp32/partitions_h2.csv +++ b/examples/lighting-app/esp32/partitions_h2.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, ota_0, app, ota_0, , 1500K, diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 59c0af656896f0..f87a164ae41dd2 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -58,3 +58,6 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Disable Read Client +CONFIG_DISABLE_READ_CLIENT=y diff --git a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults index 95d805aa75b55e..be4c85a9c4bb14 100644 --- a/examples/lighting-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/lighting-app/esp32/sdkconfig_m5stack.defaults @@ -65,3 +65,7 @@ CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y + +# Optimize IRAM +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index ea56e7d7138aa4..90c4d57386023d 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1723,6 +1723,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2354,6 +2358,7 @@ endpoint 0 { } server cluster Switch { + emits event SwitchLatched; ram attribute numberOfPositions default = 2; ram attribute currentPosition; ram attribute featureMap default = 0; @@ -2427,7 +2432,6 @@ endpoint 1 { callback attribute remainingCapacity; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 8ca915a66c1a70..b972b176452241 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4009,6 +4009,15 @@ "maxInterval": 65534, "reportableChange": 0 } + ], + "events": [ + { + "name": "SwitchLatched", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { @@ -5341,7 +5350,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7749,5 +7758,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/examples/lighting-app/linux/args.gni b/examples/lighting-app/linux/args.gni index d07e8c87cdb15c..4c205a5cef34a5 100644 --- a/examples/lighting-app/linux/args.gni +++ b/examples/lighting-app/linux/args.gni @@ -27,3 +27,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] matter_enable_tracing_support = true + +chip_enable_read_client = false diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 6e3048786bdbc4..b2781f7c7efc0e 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1290,6 +1290,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index c21d9c92bbd394..80af441b327af0 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -9113,5 +9113,6 @@ "endpointVersion": 1, "deviceIdentifier": 256 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 09c2343a8aae9c..6b1ccd4ce982ce 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1356,6 +1356,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1747,7 +1751,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1763,7 +1766,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1794,7 +1796,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1810,7 +1811,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1824,7 +1824,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1841,7 +1840,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1850,7 +1848,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1872,7 +1869,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1885,7 +1881,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark default = 0x0000000000000000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1954,7 +1949,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; @@ -1966,7 +1960,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1981,7 +1974,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1994,7 +1986,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2004,7 +1995,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2014,7 +2004,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2028,7 +2017,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2038,7 +2026,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2052,7 +2039,6 @@ endpoint 1 { persist attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2071,7 +2057,6 @@ endpoint 1 { persist attribute startUpCurrentLevel default = 255; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; ram attribute clusterRevision default = 5; @@ -2084,7 +2069,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2094,7 +2078,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2104,7 +2087,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2152,7 +2134,6 @@ endpoint 1 { ram attribute startUpColorTemperatureMireds; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 5; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 1b658aeaf1cffc..d1924fe594705d 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -972,7 +972,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1184,7 +1184,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1652,7 +1652,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -2025,7 +2025,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2558,7 +2558,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2894,7 +2894,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3018,7 +3018,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3304,7 +3304,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3540,7 +3540,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4690,7 +4690,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5509,7 +5509,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5837,7 +5837,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6067,7 +6067,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6197,7 +6197,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6327,7 +6327,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6533,7 +6533,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6781,7 +6781,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7157,7 +7157,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7435,7 +7435,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7873,7 +7873,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8085,7 +8085,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8249,7 +8249,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8785,7 +8785,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8949,7 +8949,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10083,7 +10083,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lighting-app/silabs/BUILD.gn b/examples/lighting-app/silabs/BUILD.gn index 63a206ee8ffaab..9c314b025f63fd 100644 --- a/examples/lighting-app/silabs/BUILD.gn +++ b/examples/lighting-app/silabs/BUILD.gn @@ -68,7 +68,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -91,7 +91,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -191,7 +191,7 @@ silabs_executable("lighting_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -202,7 +202,7 @@ silabs_executable("lighting_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/lighting-app/silabs/README.md b/examples/lighting-app/silabs/README.md index 4d7c873aeff09a..4834ef56a9ac1c 100644 --- a/examples/lighting-app/silabs/README.md +++ b/examples/lighting-app/silabs/README.md @@ -123,9 +123,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: 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 4a96f5b54e78a4..89681a67ce9e42 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1816,6 +1816,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2469,7 +2473,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2502,7 +2505,6 @@ endpoint 1 { callback attribute remainingCapacity default = 8; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -2561,7 +2563,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; 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 d29ae36af304de..978b68609f1e6d 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -2146,7 +2146,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5574,7 +5574,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5590,7 +5590,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5606,7 +5606,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5638,7 +5638,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5654,7 +5654,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5701,7 +5701,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6411,7 +6411,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7760,7 +7760,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7807,7 +7807,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 77979c8eee896e..f199cdf557122a 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1705,6 +1705,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2279,7 +2283,6 @@ endpoint 1 { callback attribute remainingCapacity; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; @@ -2337,7 +2340,6 @@ endpoint 1 { callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 82c4b264bcc764..048d6ef499fe67 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -2172,7 +2172,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6133,7 +6133,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7854,7 +7854,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7901,7 +7901,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/lock-app/esp32/main/CMakeLists.txt b/examples/lock-app/esp32/main/CMakeLists.txt index bf9edad36d7f7e..a6aded6af0065c 100644 --- a/examples/lock-app/esp32/main/CMakeLists.txt +++ b/examples/lock-app/esp32/main/CMakeLists.txt @@ -19,6 +19,13 @@ get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) if (CONFIG_ENABLE_PW_RPC) + +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -30,7 +37,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" "${CMAKE_CURRENT_LIST_DIR}/include" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" @@ -43,6 +50,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -67,6 +75,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" PRIV_REQUIRES bt chip QRCode nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) @@ -155,6 +164,7 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" @@ -182,7 +192,8 @@ idf_component_register(PRIV_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock" PRIV_REQUIRES chip QRCode bt nvs_flash driver) add_dependencies(${COMPONENT_LIB} app-codegen) diff --git a/examples/lock-app/esp32/partitions.csv b/examples/lock-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/lock-app/esp32/partitions.csv +++ b/examples/lock-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 0e9be617da8907..61dbeb11e226af 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1564,6 +1564,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1658,6 +1662,30 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +server cluster IcdManagement = 70 { + bitmap Feature : BITMAP32 { + kCheckInProtocolSupport = 0x1; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive octet_string<16> key = 3; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** An interface to a generic way to secure a door */ server cluster DoorLock = 257 { enum AlarmCodeEnum : ENUM8 { @@ -2537,6 +2565,14 @@ endpoint 0 { ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } + + server cluster IcdManagement { + callback attribute idleModeInterval default = 500; + callback attribute activeModeInterval default = 300; + callback attribute activeModeThreshold default = 300; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type doorlock = 10, version 1; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 12eaaaa40f4a66..c097b1b20df20b 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5322,6 +5322,260 @@ } ] }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RegisterClientResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "300", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RegisteredClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ICDCounter", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientsSupportedPerFabric", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Occupancy Sensing", "code": 1030, diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 397452eb07fa79..8bf3d16ee20939 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -908,6 +908,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 3503d6e3b35e36..e570feec238688 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6720,5 +6720,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index c07134be9d7262..04faba95ce4713 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1189,6 +1189,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1781,7 +1785,6 @@ endpoint 0 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -1797,7 +1800,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric default = 4; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1828,7 +1830,6 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1844,7 +1845,6 @@ endpoint 0 { ram attribute updateStateProgress default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1858,7 +1858,6 @@ endpoint 0 { callback attribute supportsConcurrentConnection default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1875,7 +1874,6 @@ endpoint 0 { ram attribute lastConnectErrorValue; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -1884,7 +1882,6 @@ endpoint 0 { server cluster DiagnosticLogs { callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1906,7 +1903,6 @@ endpoint 0 { callback attribute testEventTriggersEnabled default = false; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1919,7 +1915,6 @@ endpoint 0 { callback attribute currentHeapHighWatermark default = 0x0000000000000000; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -1988,7 +1983,6 @@ endpoint 0 { callback attribute activeNetworkFaultsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 1; @@ -2000,7 +1994,6 @@ endpoint 0 { callback attribute adminVendorId default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; @@ -2015,7 +2008,6 @@ endpoint 0 { callback attribute currentFabricIndex; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2028,7 +2020,6 @@ endpoint 0 { callback attribute maxGroupKeysPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2038,7 +2029,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2048,7 +2038,6 @@ endpoint 0 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2062,7 +2051,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2072,7 +2060,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2085,7 +2072,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2095,7 +2081,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2105,7 +2090,6 @@ endpoint 1 { callback attribute labelList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2134,7 +2118,6 @@ endpoint 1 { ram attribute requirePINforRemoteOperation default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x181; ram attribute clusterRevision default = 6; diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 3884fdd557478c..b51392cfaf1cc6 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -738,7 +738,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -932,7 +932,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1400,7 +1400,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 1, "bounded": 0, @@ -1773,7 +1773,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2495,7 +2495,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2831,7 +2831,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2955,7 +2955,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3241,7 +3241,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3477,7 +3477,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4627,7 +4627,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5364,7 +5364,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5692,7 +5692,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5922,7 +5922,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6052,7 +6052,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6182,7 +6182,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6472,7 +6472,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6704,7 +6704,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7398,7 +7398,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8112,7 +8112,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8276,7 +8276,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9180,7 +9180,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9401,4 +9401,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lock-app/silabs/BUILD.gn b/examples/lock-app/silabs/BUILD.gn index f4bf7db01c2612..f5d00f7d48ab63 100644 --- a/examples/lock-app/silabs/BUILD.gn +++ b/examples/lock-app/silabs/BUILD.gn @@ -52,7 +52,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -75,7 +75,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -172,7 +172,7 @@ silabs_executable("lock_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -183,7 +183,7 @@ silabs_executable("lock_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/lock-app/silabs/README.md b/examples/lock-app/silabs/README.md index 2d6cb8722a8dce..67fb889b41eb7e 100644 --- a/examples/lock-app/silabs/README.md +++ b/examples/lock-app/silabs/README.md @@ -130,10 +130,10 @@ Mac OS X $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/lock-app/silabs/openthread.gn b/examples/lock-app/silabs/openthread.gn index b05216fc9d7eae..27aa6c766a17e6 100644 --- a/examples/lock-app/silabs/openthread.gn +++ b/examples/lock-app/silabs/openthread.gn @@ -23,7 +23,7 @@ check_system_includes = true default_args = { target_cpu = "arm" target_os = "freertos" - chip_openthread_ftd = true + chip_openthread_ftd = false import("//openthread.gni") } diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 9d7fbf28634308..570d5e804f6c4d 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -24,3 +24,17 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals +sl_ot_active_interval_ms = 500 # 500ms Active Intervals + +# ICD Matter Configuration flags +sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval +sl_active_mode_interval_ms = 10000 # 10s Active Mode Interval +sl_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index ee666599859620..7308cbab74cd68 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -498,6 +498,7 @@ server cluster OperationalCredentials = 62 { } endpoint 0 { + device type anonymousEndpointType = 0, version 1; binding cluster DiagnosticLogs; server cluster AccessControl { diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index 81fc0a96b3a020..471aecc6982341 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -3527,5 +3527,6 @@ "endpointVersion": 1, "deviceIdentifier": null } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-provider-app/esp32/partitions.csv b/examples/ota-provider-app/esp32/partitions.csv index 0d8e94e5c1f16a..009b96d704d596 100644 --- a/examples/ota-provider-app/esp32/partitions.csv +++ b/examples/ota-provider-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.6MB factory, app, factory, , 1600K, diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 18b9e1e99e5ed3..7adf53eed5a933 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -889,6 +889,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index f8dd677884022c..ecce96b7a0caab 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4991,5 +4991,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index cb175df24d9116..534db2f8b18b62 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/ota-requestor-app/esp32/main/CMakeLists.txt b/examples/ota-requestor-app/esp32/main/CMakeLists.txt index 6a3633f442ac64..10c61e162900f2 100644 --- a/examples/ota-requestor-app/esp32/main/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/main/CMakeLists.txt @@ -72,8 +72,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" diff --git a/examples/ota-requestor-app/esp32/partitions.csv b/examples/ota-requestor-app/esp32/partitions.csv index 56849bb3037058..421f1bef343436 100644 --- a/examples/ota-requestor-app/esp32/partitions.csv +++ b/examples/ota-requestor-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, otadata, data, ota, , 0x2000, phy_init, data, phy, , 0x1000, # OTA partitions of size 1.5M each diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index fe4652795026ba..23bd852d592ed9 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -1072,6 +1072,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 5fbd879ead4619..5a2b1f80a99eef 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7468,5 +7468,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/persistent-storage/esp32/partitions.csv b/examples/persistent-storage/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/persistent-storage/esp32/partitions.csv +++ b/examples/persistent-storage/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 77ea1e196429f7..4f6ed1830b6cce 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:1 + $ docker pull ghcr.io/project-chip/chip-build-ameba:4 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:1 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:4 - Setup build environment: diff --git a/examples/pigweed-app/ameba/chip_main.cmake b/examples/pigweed-app/ameba/chip_main.cmake index e18ecb62bdf48c..1f0db465a6878b 100644 --- a/examples/pigweed-app/ameba/chip_main.cmake +++ b/examples/pigweed-app/ameba/chip_main.cmake @@ -100,9 +100,9 @@ list( APPEND chip_main_cpp_flags -Wno-unused-parameter - -std=gnu++17 + -std=c++17 -fno-rtti - -fno-use-cxa-atexit + -fno-use-cxa-atexit ) target_compile_definitions(${chip_main} PRIVATE ${chip_main_flags} ) target_compile_options(${chip_main} PRIVATE ${chip_main_cpp_flags}) diff --git a/examples/pigweed-app/esp32/main/CMakeLists.txt b/examples/pigweed-app/esp32/main/CMakeLists.txt index 005f587b70b50c..e06bb5a5296a14 100644 --- a/examples/pigweed-app/esp32/main/CMakeLists.txt +++ b/examples/pigweed-app/esp32/main/CMakeLists.txt @@ -14,6 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (${IDF_VERSION_MAJOR} LESS 5) + set(freertos_include_path "${IDF_PATH}/components/freertos/include/freertos") +else() + set(freertos_include_path "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + idf_component_register(INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" @@ -21,7 +27,7 @@ idf_component_register(INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" + "${freertos_include_path}" SRC_DIRS "${CMAKE_CURRENT_LIST_DIR}" diff --git a/examples/pigweed-app/esp32/partitions.csv b/examples/pigweed-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/pigweed-app/esp32/partitions.csv +++ b/examples/pigweed-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index d9380b5ace2a41..1b3474c8da9562 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6478,7 +6478,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7100,7 +7099,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7110,7 +7108,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7124,7 +7121,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7138,7 +7134,6 @@ endpoint 1 { ram attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 5; @@ -7161,7 +7156,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7174,7 +7168,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 6b478ee3bb461c..a13f3c1ac90309 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -338,7 +338,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1708,7 +1708,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10884,7 +10884,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11132,7 +11132,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11484,7 +11484,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11762,7 +11762,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12200,7 +12200,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12412,7 +12412,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14553,7 +14553,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index abf76c3a9de16d..0eff28c93b1e8b 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6437,7 +6437,6 @@ endpoint 0 { callback attribute accessControlEntriesPerFabric; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -7076,7 +7075,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7086,7 +7084,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -7100,7 +7097,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7114,7 +7110,6 @@ endpoint 1 { ram attribute startUpOnOff default = 0xFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 5; @@ -7135,7 +7130,6 @@ endpoint 1 { ram attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; @@ -7148,7 +7142,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 060de8d5a9ae17..28aee033676628 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -338,7 +338,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11168,7 +11168,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11416,7 +11416,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11768,7 +11768,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12046,7 +12046,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12484,7 +12484,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12696,7 +12696,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14579,7 +14579,7 @@ ], "endpoints": [ { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, diff --git a/examples/platform/esp32/PigweedLogger.cpp b/examples/platform/esp32/PigweedLogger.cpp index e7bb260f9da034..d10b89bcd9f69f 100644 --- a/examples/platform/esp32/PigweedLogger.cpp +++ b/examples/platform/esp32/PigweedLogger.cpp @@ -138,7 +138,7 @@ extern "C" void __wrap_esp_log_writev(esp_log_level_t level, const char * tag, c PigweedLogger::putString(logColor, strlen(logColor)); char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%u) %s: ", esp_log_timestamp(), tag); + size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%" PRIu32 ") %s: ", esp_log_timestamp(), tag); PigweedLogger::putString(formattedMsg, len); memset(formattedMsg, 0, sizeof formattedMsg); diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/BaseApplication.cpp similarity index 99% rename from examples/platform/silabs/efr32/BaseApplication.cpp rename to examples/platform/silabs/BaseApplication.cpp index 77a91236554ae5..b0d1dd0ea8a414 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/BaseApplication.cpp @@ -242,7 +242,12 @@ CHIP_ERROR BaseApplication::Init() } PlatformMgr().AddEventHandler(OnPlatformEvent, 0); +#ifdef SL_WIFI + sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); +#endif /* SL_WIFI */ +#if CHIP_ENABLE_OPENTHREAD sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); +#endif return err; } diff --git a/examples/platform/silabs/efr32/BaseApplication.h b/examples/platform/silabs/BaseApplication.h similarity index 99% rename from examples/platform/silabs/efr32/BaseApplication.h rename to examples/platform/silabs/BaseApplication.h index f2bc073c4ee9b2..9e99580811293c 100644 --- a/examples/platform/silabs/efr32/BaseApplication.h +++ b/examples/platform/silabs/BaseApplication.h @@ -29,6 +29,7 @@ #include "AppEvent.h" #include "FreeRTOS.h" #include "timers.h" // provides FreeRTOS timer support +#include #include #include #include @@ -47,10 +48,6 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED -#ifndef SL_STATUS_LED -#define SL_STATUS_LED 1 -#endif - /********************************************************** * Defines *********************************************************/ diff --git a/examples/platform/silabs/efr32/FreeRTOSConfig.h b/examples/platform/silabs/FreeRTOSConfig.h similarity index 100% rename from examples/platform/silabs/efr32/FreeRTOSConfig.h rename to examples/platform/silabs/FreeRTOSConfig.h diff --git a/examples/platform/silabs/ICDSubscriptionCallback.cpp b/examples/platform/silabs/ICDSubscriptionCallback.cpp deleted file mode 100644 index eba28968085d60..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ - -#include "ICDSubscriptionCallback.h" -#include - -CHIP_ERROR ICDSubscriptionCallback::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) -{ - using namespace chip::System::Clock; - - Seconds32 interval_s32 = std::chrono::duration_cast(CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL); - - if (interval_s32 > Seconds16::max()) - { - interval_s32 = Seconds16::max(); - } - uint32_t decidedMaxInterval = interval_s32.count(); - - uint16_t requestedMinInterval = 0; - uint16_t requestedMaxInterval = 0; - aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); - - // If requestedMinInterval is greater than IdleTimeInterval, select next wake up time as max interval - if (requestedMinInterval > decidedMaxInterval) - { - uint16_t ratio = requestedMinInterval / decidedMaxInterval; - if (requestedMinInterval % decidedMaxInterval) - { - ratio++; - } - - decidedMaxInterval *= ratio; - } - - // Verify that decidedMaxInterval is an acceptable value - if (decidedMaxInterval > Seconds16::max().count()) - { - decidedMaxInterval = Seconds16::max().count(); - } - - // Verify that the decidedMaxInterval respects MAX(SUBSCRIPTION_MAX_INTERVAL_PUBLISHER_LIMIT, MaxIntervalCeiling) - uint16_t maximumMaxInterval = std::max(kSubscriptionMaxIntervalPublisherLimit, requestedMaxInterval); - if (decidedMaxInterval > maximumMaxInterval) - { - decidedMaxInterval = maximumMaxInterval; - } - - return aReadHandler.SetMaxReportingInterval(decidedMaxInterval); -} diff --git a/examples/platform/silabs/ICDSubscriptionCallback.h b/examples/platform/silabs/ICDSubscriptionCallback.h deleted file mode 100644 index c9f77e6df2a3c6..00000000000000 --- a/examples/platform/silabs/ICDSubscriptionCallback.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2023 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. - */ -#pragma once - -#include - -/** - * @brief The goal of the ICDSubscriptionCallback class is to negotiate the max interval subscription to match the idle interval of - * the IC device. When a subscription is requested, the device will change the requested max interval to match its idle time - * interval through the OnSubscriptionRequested function. - */ -class ICDSubscriptionCallback : public chip::app::ReadHandler::ApplicationCallback -{ - /** - * @brief Function called when a subscription is requested. - * An ICD will use this function to negotiate the subscription max interval to match its idle time interval - */ - CHIP_ERROR OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, - chip::Transport::SecureSession & aSecureSession) override; -}; diff --git a/examples/platform/silabs/efr32/matter_config.cpp b/examples/platform/silabs/MatterConfig.cpp similarity index 91% rename from examples/platform/silabs/efr32/matter_config.cpp rename to examples/platform/silabs/MatterConfig.cpp index c876abd6eaea1b..836e2a777c3699 100644 --- a/examples/platform/silabs/efr32/matter_config.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -19,7 +19,7 @@ #include "AppConfig.h" #include "OTAConfig.h" -#include +#include #include @@ -58,10 +58,6 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -ICDSubscriptionCallback SilabsMatterConfig::mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - #if CHIP_ENABLE_OPENTHREAD #include #include @@ -165,6 +161,12 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) SILABS_LOG("Init CHIP Stack"); // Init Chip memory management before the stack ReturnErrorOnFailure(chip::Platform::MemoryInit()); + +// WiFi needs to be initialized after Memory Init for some reason +#ifdef SL_WIFI + InitWiFi(); +#endif + ReturnErrorOnFailure(PlatformMgr().InitChipStack()); SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); @@ -216,11 +218,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // Init Matter Server and Start Event Loop err = chip::Server::GetInstance().Init(initParams); -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - // Register ICD subscription callback to match subscription max intervals to its idle time interval - chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&mICDSubscriptionHandler); -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); ReturnErrorOnFailure(err); @@ -231,10 +228,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) SILABS_LOG("Starting Platform Manager Event Loop"); ReturnErrorOnFailure(PlatformMgr().StartEventLoopTask()); -#ifdef SL_WIFI - InitWiFi(); -#endif - #ifdef ENABLE_CHIP_SHELL chip::startShellTask(); #endif @@ -251,15 +244,14 @@ void SilabsMatterConfig::InitWiFi(void) #ifdef SL_WFX_USE_SECURE_LINK wfx_securelink_task_start(); // start securelink key renegotiation task #endif // SL_WFX_USE_SECURE_LINK -#endif /* WF200_WIFI */ - -#ifdef RS911X_WIFI - /* - * Start up any RSI interface stuff - * (Not required) - Note that wfx_wifi_start will deal with - * starting up a rsi task - which will initialize the SPI interface. - */ -#endif +#elif defined(SIWX_917) + SILABS_LOG("Init RSI 917 Platform"); + if (wfx_rsi_platform() != SL_STATUS_OK) + { + SILABS_LOG("RSI init failed"); + return CHIP_ERROR_INTERNAL; + } +#endif /* WF200_WIFI */ } #endif // SL_WIFI diff --git a/examples/platform/silabs/matter_config.h b/examples/platform/silabs/MatterConfig.h similarity index 80% rename from examples/platform/silabs/matter_config.h rename to examples/platform/silabs/MatterConfig.h index 4983abac4189b1..2c565f7caa7321 100644 --- a/examples/platform/silabs/matter_config.h +++ b/examples/platform/silabs/MatterConfig.h @@ -22,10 +22,6 @@ #include #include -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS -#include "ICDSubscriptionCallback.h" -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - class SilabsMatterConfig { public: @@ -36,8 +32,4 @@ class SilabsMatterConfig static void InitWiFi(void); static void ConnectivityEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static void InitOTARequestorHandler(chip::System::Layer * systemLayer, void * appState); - -#ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS - static ICDSubscriptionCallback mICDSubscriptionHandler; -#endif // CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS }; diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 392663f7b16624..3fd6164b576ea1 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -247,7 +247,9 @@ source_set("siwx917-common") { ] sources = [ + "${silabs_common_plat_dir}/BaseApplication.cpp", "${silabs_common_plat_dir}/LEDWidget.cpp", + "${silabs_common_plat_dir}/MatterConfig.cpp", "${silabs_common_plat_dir}/SoftwareFaultReports.cpp", "${silabs_common_plat_dir}/heap_4_silabs.c", "${silabs_common_plat_dir}/silabs_utils.cpp", @@ -256,11 +258,8 @@ source_set("siwx917-common") { "${wifi_sdk_dir}/ethernetif.cpp", "${wifi_sdk_dir}/lwip_netif.cpp", "${wifi_sdk_dir}/wfx_notify.cpp", - "BaseApplication.cpp", "SiWx917/rsi_if.c", "SiWx917/wfx_rsi_host.c", - "init_ccpPlatform.cpp", - "matter_config.cpp", ] if (chip_enable_pw_rpc || chip_build_libshell) { diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp deleted file mode 100644 index feab970b95fe5b..00000000000000 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ /dev/null @@ -1,637 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -/********************************************************** - * Includes - *********************************************************/ - -#include "AppConfig.h" -#include "AppEvent.h" -#include "AppTask.h" - -#include "LEDWidget.h" - -#ifdef DISPLAY_ENABLED -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED - -#include "SilabsDeviceDataProvider.h" -#include "rsi_board.h" -#include "rsi_chip.h" -#include "silabs_utils.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef SL_WIFI -#include "wfx_host_events.h" -#include -#include -#endif // SL_WIFI - -/********************************************************** - * Defines and Constants - *********************************************************/ - -#define FACTORY_RESET_TRIGGER_TIMEOUT 7000 -#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 -#define FACTORY_RESET_LOOP_COUNT 5 -#ifndef APP_TASK_STACK_SIZE -#define APP_TASK_STACK_SIZE (4096) -#endif -#define APP_TASK_PRIORITY 2 -#define APP_EVENT_QUEUE_SIZE 10 -#define EXAMPLE_VENDOR_ID 0xcafe -#define APP_STATE_LED 0 - -using namespace chip; -using namespace chip::app; -using namespace ::chip::DeviceLayer; -using namespace ::chip::DeviceLayer::Silabs; - -namespace { - -/********************************************************** - * Variable declarations - *********************************************************/ - -TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. -TimerHandle_t sLightTimer; - -TaskHandle_t sAppTaskHandle; -QueueHandle_t sAppEventQueue; - -LEDWidget sStatusLED; - -#ifdef SL_WIFI -app::Clusters::NetworkCommissioning::Instance - sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::SlWiFiDriver::GetInstance())); -#endif /* SL_WIFI */ - -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - -bool sIsProvisioned = false; -bool sIsEnabled = false; -bool sIsAttached = false; -bool sHaveBLEConnections = false; - -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - -uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; -StaticQueue_t sAppEventQueueStruct; - -StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; -StaticTask_t appTaskStruct; - -BaseApplication::Function_t mFunction; -bool mFunctionTimerActive; - -#ifdef DISPLAY_ENABLED -SilabsLCD slLCD; -#endif - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - -Identify gIdentify = { - chip::EndpointId{ 1 }, - BaseApplication::OnIdentifyStart, - BaseApplication::OnIdentifyStop, - Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, - BaseApplication::OnTriggerIdentifyEffect, -}; - -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER -} // namespace - -/********************************************************** - * AppTask Definitions - *********************************************************/ - -CHIP_ERROR BaseApplication::StartAppTask(TaskFunction_t taskFunction) -{ - sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); - if (sAppEventQueue == NULL) - { - SILABS_LOG("Failed to allocate app event queue"); - appError(APP_ERROR_EVENT_QUEUE_FAILED); - } - - // Start App task. - sAppTaskHandle = - xTaskCreateStatic(taskFunction, APP_TASK_NAME, ArraySize(appStack), &sAppEventQueue, 1, appStack, &appTaskStruct); - if (sAppTaskHandle == nullptr) - { - SILABS_LOG("Failed to create app task"); - appError(APP_ERROR_CREATE_TASK_FAILED); - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR BaseApplication::Init() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - -#ifdef SL_WIFI - /* - * Wait for the WiFi to be initialized - */ - SILABS_LOG("APP: Wait WiFi Init"); - while (!wfx_hw_ready()) - { - vTaskDelay(10); - } - SILABS_LOG("APP: Done WiFi Init"); - /* We will init server when we get IP */ - - chip::DeviceLayer::PlatformMgr().LockChipStack(); - sWiFiNetworkCommissioningInstance.Init(); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - -#endif - - // Create FreeRTOS sw timer for Function Selection. - sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(1), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = app task obj context - FunctionTimerEventHandler // timer callback handler - ); - if (sFunctionTimer == NULL) - { - SILABS_LOG("funct timer create failed"); - appError(APP_ERROR_CREATE_TIMER_FAILED); - } - - // Create FreeRTOS sw timer for LED Management. - sLightTimer = xTimerCreate("LightTmr", // Text Name - pdMS_TO_TICKS(10), // Default timer period - true, // reload timer - (void *) this, // Timer Id - LightTimerEventHandler // Timer callback handler - ); - if (sLightTimer == NULL) - { - SILABS_LOG("Light Timer create failed"); - appError(APP_ERROR_CREATE_TIMER_FAILED); - } - - SILABS_LOG("Current Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - SILABS_LOG("Current Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - - sStatusLED.Init(APP_STATE_LED); - - ConfigurationMgr().LogDeviceConfig(); - - // Create buffer for QR code that can fit max size and null terminator. - char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; - chip::MutableCharSpan QRCode(qrCodeBuffer); - - if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) - { - // Print setup info on LCD if available -#ifdef QR_CODE_ENABLED - slLCD.SetQRCode((uint8_t *) QRCode.data(), QRCode.size()); - slLCD.ShowQRCode(true, true); -#else - PrintQrCodeURL(QRCode); -#endif // QR_CODE_ENABLED - } - else - { - SILABS_LOG("Getting QR code failed!"); - } - - return err; -} - -void BaseApplication::FunctionTimerEventHandler(TimerHandle_t xTimer) -{ - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = (void *) xTimer; - event.Handler = FunctionEventHandler; - PostEvent(&event); -} - -void BaseApplication::FunctionEventHandler(AppEvent * aEvent) -{ - if (aEvent->Type != AppEvent::kEventType_Timer) - { - return; - } -} - -void BaseApplication::FunctionFactoryReset(void) -{ - SILABS_LOG("#################################################################"); - SILABS_LOG("################### Factory reset triggered #####################"); - SILABS_LOG("#################################################################"); - - // Actually trigger Factory Reset - mFunction = kFunction_NoneSelected; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - - chip::Server::GetInstance().ScheduleFactoryReset(); -} - -bool BaseApplication::ActivateStatusLedPatterns() -{ - bool isPatternSet = false; -#if defined(ENABLE_WSTK_LEDS) && defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER - if (gIdentify.mActive) - { - // Identify in progress - // Do a steady blink on the status led - sStatusLED.Blink(250, 250); - isPatternSet = true; - } - else if (sIdentifyEffect != Clusters::Identify::EffectIdentifierEnum::kStopEffect) - { - // Identify trigger effect received. Do some on/off patterns on the status led - if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBlink) - { - // Fast blink - sStatusLED.Blink(50, 50); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kBreathe) - { - // Slow blink - sStatusLED.Blink(1000, 1000); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kOkay) - { - // Pulse effect - sStatusLED.Blink(300, 700); - } - else if (sIdentifyEffect == Clusters::Identify::EffectIdentifierEnum::kChannelChange) - { - // Alternate between Short and Long pulses effect - static uint64_t mLastChangeTimeMS = 0; - static bool alternatePattern = false; - uint32_t onTimeMS = alternatePattern ? 50 : 700; - uint32_t offTimeMS = alternatePattern ? 950 : 300; - - uint64_t nowMS = chip::System::SystemClock().GetMonotonicMilliseconds64().count(); - if (nowMS >= mLastChangeTimeMS + 1000) // each pattern is done over a 1 second period - { - mLastChangeTimeMS = nowMS; - alternatePattern = !alternatePattern; - sStatusLED.Blink(onTimeMS, offTimeMS); - } - } - isPatternSet = true; - } -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER - -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - // Identify Patterns have priority over Status patterns - if (!isPatternSet) - { - // Apply different status feedbacks - if (sIsProvisioned && sIsEnabled) - { - if (sIsAttached) - { - sStatusLED.Set(true); - } - else - { - sStatusLED.Blink(950, 50); - } - } - else if (sHaveBLEConnections) - { - sStatusLED.Blink(100, 100); - } - else - { - sStatusLED.Blink(50, 950); - } - isPatternSet = true; - } -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER -#endif // ENABLE_WSTK_LEDS) && SL_CATALOG_SIMPLE_LED_LED1_PRESENT - return isPatternSet; -} - -void BaseApplication::LightEventHandler() -{ - // Collect connectivity and configuration state from the CHIP stack. Because - // the CHIP event loop is being run in a separate task, the stack must be - // locked while these values are queried. However we use a non-blocking - // lock request (TryLockCHIPStack()) to avoid blocking other UI activities - // when the CHIP task is busy (e.g. with a long crypto operation). -#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) - if (PlatformMgr().TryLockChipStack()) - { -#ifdef SL_WIFI - sIsProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); - sIsEnabled = ConnectivityMgr().IsWiFiStationEnabled(); - sIsAttached = ConnectivityMgr().IsWiFiStationConnected(); -#endif /* SL_WIFI */ -#if CHIP_ENABLE_OPENTHREAD - sIsProvisioned = ConnectivityMgr().IsThreadProvisioned(); - sIsEnabled = ConnectivityMgr().IsThreadEnabled(); - sIsAttached = ConnectivityMgr().IsThreadAttached(); -#endif /* CHIP_ENABLE_OPENTHREAD */ - sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); - PlatformMgr().UnlockChipStack(); - } -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER - - // Update the status LED if factory reset has not been initiated. - // - // If system has "full connectivity", keep the LED On constantly. - // - // If thread and service provisioned, but not attached to the thread network - // yet OR no connectivity to the service OR subscriptions are not fully - // established THEN blink the LED Off for a short period of time. - // - // If the system has ble connection(s) uptill the stage above, THEN blink - // the LEDs at an even rate of 100ms. - // - // Otherwise, blink the LED ON for a very short time. - if (mFunction != kFunction_FactoryReset) - { - ActivateStatusLedPatterns(); - } - sStatusLED.Animate(); -} - -void BaseApplication::ButtonHandler(AppEvent * aEvent) -{ - uint8_t count = FACTORY_RESET_LOOP_COUNT; - - // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< - // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the - // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + - // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after - // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. - // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs - // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (aEvent->ButtonEvent.Action == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - if ((!mFunctionTimerActive) && (mFunction == kFunction_NoneSelected)) - { - mFunction = kFunction_FactoryReset; - - // Wait for sometime to determine button is pressed for Factory reset - // other functionality - vTaskDelay(1000); // Delay of 1sec before we check the button status - } - } - - while (!(RSI_NPSSGPIO_GetPin(NPSS_GPIO_0))) - { - if (count == 0) - { - FunctionFactoryReset(); - break; - } - - // Turn off status LED before starting blink to make sure blink is - // co-ordinated. - sStatusLED.Set(false); - sStatusLED.Blink(500); - SILABS_LOG("Factory reset triggering in %d sec release button to cancel", count--); - - // Delay of 1sec before checking the button status again - vTaskDelay(1000); - } - - if (count > 0) - { - sStatusLED.Set(false); - SILABS_LOG("Factory Reset has been Canceled"); // button held past Timeout wait till button is released - } - - // If the button was released before factory reset got initiated, start BLE advertissement in fast mode - if (mFunction == kFunction_FactoryReset) - { - mFunction = kFunction_NoneSelected; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif - - if (!ConnectivityMgr().IsWiFiStationProvisioned()) - { - // Enable BLE advertisements - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - ConnectivityMgr().SetBLEAdvertisingMode(ConnectivityMgr().kFastAdvertising); - } - else - { - SILABS_LOG("Network is already provisioned, Ble advertissement not enabled"); - } - } -} - -void BaseApplication::CancelFunctionTimer() -{ - if (xTimerStop(sFunctionTimer, pdMS_TO_TICKS(0)) == pdFAIL) - { - SILABS_LOG("app timer stop() failed"); - appError(APP_ERROR_STOP_TIMER_FAILED); - } - - mFunctionTimerActive = false; -} - -void BaseApplication::StartFunctionTimer(uint32_t aTimeoutInMs) -{ - if (xTimerIsTimerActive(sFunctionTimer)) - { - SILABS_LOG("app timer already started!"); - CancelFunctionTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ms if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sFunctionTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("app timer start() failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } - - mFunctionTimerActive = true; -} - -void BaseApplication::StartStatusLEDTimer() -{ - if (pdPASS != xTimerStart(sLightTimer, pdMS_TO_TICKS(0))) - { - SILABS_LOG("Light Time start failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -void BaseApplication::StopStatusLEDTimer() -{ - sStatusLED.Set(false); - - if (xTimerStop(sLightTimer, pdMS_TO_TICKS(100)) != pdPASS) - { - SILABS_LOG("Light Time start failed"); - appError(APP_ERROR_START_TIMER_FAILED); - } -} - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -void BaseApplication::OnIdentifyStart(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStart"); - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StartStatusLEDTimer(); -#endif -} - -void BaseApplication::OnIdentifyStop(Identify * identify) -{ - ChipLogProgress(Zcl, "onIdentifyStop"); - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif -} - -void BaseApplication::OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) -{ - ChipLogProgress(Zcl, "Trigger Identify Complete"); - sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StopStatusLEDTimer(); -#endif -} - -void BaseApplication::OnTriggerIdentifyEffect(Identify * identify) -{ - sIdentifyEffect = identify->mCurrentEffectIdentifier; - - if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) - { - ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); - } - -#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 - StartStatusLEDTimer(); -#endif - - switch (sIdentifyEffect) - { - case Clusters::Identify::EffectIdentifierEnum::kBlink: - case Clusters::Identify::EffectIdentifierEnum::kOkay: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kBreathe: - case Clusters::Identify::EffectIdentifierEnum::kChannelChange: - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(10), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, - identify); - break; - case Clusters::Identify::EffectIdentifierEnum::kStopEffect: - (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); - break; - default: - sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; - ChipLogProgress(Zcl, "No identifier effect"); - } -} -#endif // EMBER_AF_PLUGIN_IDENTIFY_SERVER - -void BaseApplication::LightTimerEventHandler(TimerHandle_t xTimer) -{ - LightEventHandler(); -} - -#ifdef DISPLAY_ENABLED -SilabsLCD & BaseApplication::GetLCD(void) -{ - return slLCD; -} -#endif - -void BaseApplication::PostEvent(const AppEvent * aEvent) -{ - if (sAppEventQueue != NULL) - { - BaseType_t status; - if (xPortIsInsideInterrupt()) - { - BaseType_t higherPrioTaskWoken = pdFALSE; - status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); - -#ifdef portYIELD_FROM_ISR - portYIELD_FROM_ISR(higherPrioTaskWoken); -#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR - portEND_SWITCHING_ISR(higherPrioTaskWoken); -#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR -#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" -#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR - } - else - { - status = xQueueSend(sAppEventQueue, aEvent, 1); - } - - if (!status) - { - SILABS_LOG("Failed to post event to app task event queue"); - } - } - else - { - SILABS_LOG("Event Queue is NULL should never happen"); - } -} - -void BaseApplication::DispatchEvent(AppEvent * aEvent) -{ - if (aEvent->Handler) - { - aEvent->Handler(aEvent); - } - else - { - SILABS_LOG("Event received with no handler. Dropping event."); - } -} diff --git a/examples/platform/silabs/SiWx917/BaseApplication.h b/examples/platform/silabs/SiWx917/BaseApplication.h deleted file mode 100644 index badb42a84db54b..00000000000000 --- a/examples/platform/silabs/SiWx917/BaseApplication.h +++ /dev/null @@ -1,205 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -#pragma once - -/********************************************************** - * Includes - *********************************************************/ - -#include -#include - -#include "AppEvent.h" -#include "FreeRTOS.h" -#include "timers.h" // provides FreeRTOS timer support -#include -#include -#include -#include -#include - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER -#include -#endif - -#ifdef DISPLAY_ENABLED -#include "demo-ui.h" -#include "lcd.h" -#ifdef QR_CODE_ENABLED -#include "qrcodegen.h" -#endif // QR_CODE_ENABLED -#endif // DISPLAY_ENABLED - -/********************************************************** - * Defines - *********************************************************/ - -// Application-defined error codes in the CHIP_ERROR space. -#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) -#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) -#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) -#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) -#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) -#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) - -/********************************************************** - * BaseApplication Declaration - *********************************************************/ - -class BaseApplication -{ - -public: - BaseApplication() = default; - virtual ~BaseApplication(){}; - - /** - * @brief Create AppTask task and Event Queue - * If an error occurs during creation, application will hang after printing out error code - * - * @return CHIP_ERROR CHIP_NO_ERROR if no errors - */ - CHIP_ERROR StartAppTask(TaskFunction_t taskFunction); - - /** - * @brief PostEvent function that add event to AppTask queue for processing - * - * @param event AppEvent to post - */ - static void PostEvent(const AppEvent * event); - -#ifdef DISPLAY_ENABLED - /** - * @brief Return LCD object - */ - static SilabsLCD & GetLCD(void); -#endif - - /** - * @brief Function called to start the LED light timer - */ - static void StartStatusLEDTimer(void); - - /** - * @brief Function to stop LED light timer - * Turns off Status LED before stopping timer - */ - static void StopStatusLEDTimer(void); - -#ifdef EMBER_AF_PLUGIN_IDENTIFY_SERVER - // Idenfiy server command callbacks. - static void OnIdentifyStart(Identify * identify); - static void OnIdentifyStop(Identify * identify); - static void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState); - static void OnTriggerIdentifyEffect(Identify * identify); -#endif - - enum Function_t - { - kFunction_NoneSelected = 0, - kFunction_SoftwareUpdate = 0, - kFunction_StartBleAdv = 1, - kFunction_FactoryReset = 2, - - kFunction_Invalid - } Function; - -protected: - CHIP_ERROR Init(); - - /** - * @brief Function called to start the function timer - * - * @param aTimeoutMs timer duration in ms - */ - static void StartFunctionTimer(uint32_t aTimeoutMs); - - /** - * @brief Function to stop function timer - */ - static void CancelFunctionTimer(void); - - /** - * @brief Function call event callback function for processing - * - * @param event triggered event to be processed - */ - void DispatchEvent(AppEvent * event); - - /** - * @brief Function Timer finished callback function - * Post an FunctionEventHandler event - * - * @param xTimer timer that finished - */ - static void FunctionTimerEventHandler(TimerHandle_t xTimer); - - /** - * @brief Factory reset trigger function - * Trigger factory if called - * - */ - static void FunctionFactoryReset(void); - - /** - * @brief Timer Event processing function - * Trigger factory if Press and Hold duration is respected - * - * @param aEvent post event being processed - */ - static void FunctionEventHandler(AppEvent * aEvent); - - /** - * @brief PB0 Button event processing function - * Press and hold will trigger a factory reset timer start - * Press and release will restart BLEAdvertising if not commisionned - * - * @param aEvent button event being processed - */ - static void ButtonHandler(AppEvent * aEvent); - - /** - * @brief Light Timer finished callback function - * Calls LED processing function - * - * @param xTimer timer that finished - */ - static void LightTimerEventHandler(TimerHandle_t xTimer); - - /** - * @brief Activate a set of Led patterns of the Status led - * Identify patterns and Trigger effects have priority - * If no identification patterns are in progress, we provide - * commissioning status feedback. - * - * @return True if a Led pattern was set, otherwise, returns false. - */ - static bool ActivateStatusLedPatterns(); - - /** - * @brief Updates device LEDs - */ - static void LightEventHandler(); - - /********************************************************** - * Protected Attributes declaration - *********************************************************/ - bool mSyncClusterToButtonAction; -}; diff --git a/examples/platform/silabs/SiWx917/FreeRTOSConfig.h b/examples/platform/silabs/SiWx917/FreeRTOSConfig.h deleted file mode 100644 index cfbc571454a209..00000000000000 --- a/examples/platform/silabs/SiWx917/FreeRTOSConfig.h +++ /dev/null @@ -1,256 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ - -/*************************************************************************** - * # License - * - * The licensor of this software is Silicon Laboratories Inc. Your use of this - * software is governed by the terms of Silicon Labs Master Software License - * Agreement (MSLA) available at - * www.silabs.com/about-us/legal/master-software-license-agreement. This - * software is Third Party Software licensed by Silicon Labs from a third party - * and is governed by the sections of the MSLA applicable to Third Party - * Software and the additional terms set forth below. - * - ******************************************************************************/ -/* - FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. - All rights reserved - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception. - - *************************************************************************** - >>! NOTE: The modification to the GPL is included to allow you to !<< - >>! distribute a combined work that includes FreeRTOS without being !<< - >>! obliged to provide the source code for proprietary components !<< - >>! outside of the FreeRTOS kernel. !<< - *************************************************************************** - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available on the following - link: http://www.freertos.org/a00114.html - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that is more than just the market leader, it * - * is the industry's de facto standard. * - * * - * Help yourself get started quickly while simultaneously helping * - * to support the FreeRTOS project by purchasing a FreeRTOS * - * tutorial book, reference manual, or both: * - * http://www.FreeRTOS.org/Documentation * - * * - *************************************************************************** - - http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading - the FAQ page "My application does not run, what could be wrong?". Have you - defined configASSERT()? - - http://www.FreeRTOS.org/support - In return for receiving this top quality - embedded software for free we request you assist our global community by - participating in the support forum. - - http://www.FreeRTOS.org/training - Investing in training allows your team to - be as productive as possible as early as possible. Now you can receive - FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers - Ltd, and the world's leading authority on the world's leading RTOS. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. - Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. - - http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High - Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and commercial middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#include - -/*----------------------------------------------------------- - * Application specific definitions. - * - * These definitions should be adjusted for your particular hardware and - * application requirements. - * - * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE - * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. - * - * See http://www.freertos.org/a00110.html. - *----------------------------------------------------------*/ - -extern uint32_t SystemCoreClock; - -/* Energy saving modes. */ -#if defined(SL_CATALOG_POWER_MANAGER_PRESENT) -#define configUSE_TICKLESS_IDLE 1 -#else -#define configUSE_TICKLESS_IDLE 0 -#endif // SL_CATALOG_POWER_MANAGER_PRESENT - -#define configTICK_RATE_HZ (1000) -/* Definition used by Keil to replace default system clock source. */ -#define configOVERRIDE_DEFAULT_TICK_CONFIGURATION 1 - -/* Hook function related definitions. */ -#define configUSE_TICK_HOOK (1) -#define configCHECK_FOR_STACK_OVERFLOW (2) -#define configUSE_MALLOC_FAILED_HOOK (1) -#define configUSE_IDLE_HOOK (0) - -/* Main functions*/ -/* Run time stats gathering related definitions. */ -#define configGENERATE_RUN_TIME_STATS (0) - -/* Co-routine related definitions. */ -#define configUSE_CO_ROUTINES (0) -#define configMAX_CO_ROUTINE_PRIORITIES (1) - -/* Software timer related definitions. */ -#define configUSE_TIMERS (1) -#define configTIMER_TASK_PRIORITY (40) /* Highest priority */ -#define configTIMER_QUEUE_LENGTH (10) -#define configTIMER_TASK_STACK_DEPTH (1024) - -/* Interrupt priorities used by the kernel port layer itself. These are generic -to all Cortex-M ports, and do not rely on any particular library functions. */ -#define configKERNEL_INTERRUPT_PRIORITY (255) -/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! -See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ -#define configMAX_SYSCALL_INTERRUPT_PRIORITY 48 -#define configENABLE_FPU 0 -#define configENABLE_MPU 0 -/* FreeRTOS Secure Side Only and TrustZone Security Extension */ -#define configRUN_FREERTOS_SECURE_ONLY 1 -#define configENABLE_TRUSTZONE 0 -/* FreeRTOS MPU specific definitions. */ -#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS (0) - -#define configCPU_CLOCK_HZ (SystemCoreClock) -#define configUSE_PREEMPTION (1) -#define configUSE_TIME_SLICING (1) -#define configUSE_PORT_OPTIMISED_TASK_SELECTION (0) -#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG (1) /* See into vPortSuppressTicksAndSleep source code for explanation */ -#define configMAX_PRIORITIES (56) -#define configMINIMAL_STACK_SIZE (320) /* Number of words to use for Idle and Timer stacks */ -#define configMAX_TASK_NAME_LEN (10) -#define configUSE_16_BIT_TICKS (0) -#define configIDLE_SHOULD_YIELD (1) -#define configUSE_MUTEXES (1) -#define configUSE_RECURSIVE_MUTEXES (1) -#define configUSE_COUNTING_SEMAPHORES (1) -#define configUSE_TASK_NOTIFICATIONS 1 -#define configUSE_TRACE_FACILITY 1 -#define configQUEUE_REGISTRY_SIZE (10) -#define configUSE_QUEUE_SETS (0) -#define configUSE_NEWLIB_REENTRANT (1) -#define configENABLE_BACKWARD_COMPATIBILITY (1) -#define configSUPPORT_STATIC_ALLOCATION (1) -#define configSUPPORT_DYNAMIC_ALLOCATION (1) - -#ifndef configTOTAL_HEAP_SIZE -#ifdef DIC_ENABLE -#define configTOTAL_HEAP_SIZE ((size_t)(50 * 1024)) -#else -#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024)) -#endif // DIC_ENABLE -#endif // configTOTAL_HEAP_SIZE - -/* Optional functions - most linkers will remove unused functions anyway. */ -#define INCLUDE_vTaskPrioritySet (1) -#define INCLUDE_uxTaskPriorityGet (1) -#define INCLUDE_vTaskDelete (1) -#define INCLUDE_vTaskSuspend (1) -#define INCLUDE_xResumeFromISR (1) -#define INCLUDE_vTaskDelayUntil (1) -#define INCLUDE_vTaskDelay (1) -#define INCLUDE_xTaskGetSchedulerState (1) -#define INCLUDE_xTaskGetCurrentTaskHandle (1) -#define INCLUDE_uxTaskGetStackHighWaterMark (1) -#define INCLUDE_xTaskGetIdleTaskHandle (1) -#define INCLUDE_xTimerGetTimerDaemonTaskHandle (1) -#define INCLUDE_pcTaskGetTaskName (1) -#define INCLUDE_eTaskGetState (1) -#define INCLUDE_xEventGroupSetBitFromISR (1) -#define INCLUDE_xEventGroupSetBitsFromISR (1) -#define INCLUDE_xSemaphoreGetMutexHolder (1) -#define INCLUDE_xTimerPendFunctionCall (1) -#define INCLUDE_xTaskGetHandle (1) - -/* Stop if an assertion fails. */ -#define configASSERT(x) \ - if ((x) == 0) \ - { \ - taskDISABLE_INTERRUPTS(); \ - printf("\nFREERTOS ASSERT ( %s )\n", #x); \ - for (;;) \ - ; \ - } -#define configASSERTNULL(x) \ - if ((x) == NULL) \ - { \ - taskDISABLE_INTERRUPTS(); \ - for (;;) \ - ; \ - } - -/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS -standard names. */ -#define vPortSVCHandler SVC_Handler -#define xPortPendSVHandler PendSV_Handler -/* Ensure Cortex-M port compatibility. */ -#define SysTick_Handler xPortSysTickHandler - -/* Thread local storage pointers used by the SDK */ -#ifndef configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS -#define configNUM_SDK_THREAD_LOCAL_STORAGE_POINTERS 0 -#endif - -#if defined(__GNUC__) -/* For the linker. */ -#define fabs __builtin_fabs -#endif - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp b/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp deleted file mode 100644 index 3723d72f090c5b..00000000000000 --- a/examples/platform/silabs/SiWx917/init_ccpPlatform.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -#include "AppConfig.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#include "init_ccpPlatform.h" - -void initAntenna(void); - -/* GPIO button config */ -void RSI_Wakeupsw_config(void); -void RSI_Wakeupsw_config_gpio0(void); - -void init_ccpPlatform(void) -{ - - RSI_Wakeupsw_config(); - - RSI_Wakeupsw_config_gpio0(); -#if SILABS_LOG_ENABLED - silabsInitLog(); -#endif -} - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/init_ccpPlatform.h b/examples/platform/silabs/SiWx917/init_ccpPlatform.h deleted file mode 100644 index 986e2fecb18dd9..00000000000000 --- a/examples/platform/silabs/SiWx917/init_ccpPlatform.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2020 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. - */ -/*******************************************************************************/ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -void init_ccpPlatform(void); -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/SiWx917/matter_config.cpp b/examples/platform/silabs/SiWx917/matter_config.cpp deleted file mode 100644 index e0a7dc1e570079..00000000000000 --- a/examples/platform/silabs/SiWx917/matter_config.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2022 Silabs. - * 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. - */ - -#include "AppConfig.h" -#include "OTAConfig.h" -#include - -#include - -#include - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef SL_WIFI -#include "wfx_host_events.h" -#endif /* SL_WIFI */ -#ifdef __cplusplus -} -#endif - -#if PW_RPC_ENABLED -#include "Rpc.h" -#endif - -#ifdef ENABLE_CHIP_SHELL -#include "matter_shell.h" -#endif - -#ifdef HEAP_MONITORING -#include "MemMonitoring.h" -#endif - -using namespace ::chip; -using namespace ::chip::Inet; -using namespace ::chip::DeviceLayer; - -#include -// If building with the SiWx917-provided crypto backend, we can use the - -#include "SilabsDeviceDataProvider.h" -#include "SilabsTestEventTriggerDelegate.h" -#include - -#if SILABS_OTA_ENABLED -void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState) -{ -#if 0 // TODO : OTA is not planned now for CCP - OTAConfig::Init(); -#endif -} -#endif - -void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg) -{ - // Initialize OTA only when Thread or WiFi connectivity is established - /*if (((event->Type == DeviceEventType::kThreadConnectivityChange) && - (event->ThreadConnectivityChange.Result == kConnectivity_Established)) || - ((event->Type == DeviceEventType::kInternetConnectivityChange) && - (event->InternetConnectivityChange.IPv6 == kConnectivity_Established))) - { - SILABS_LOG("Scheduling OTA Requestor initialization") - chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(OTAConfig::kInitOTARequestorDelaySec), - InitOTARequestorHandler, nullptr); - }*/ - SILABS_LOG("Scheduling OTA Requestor initialization") -} - -#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; - - mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); - - SILABS_LOG("=================================================="); - SILABS_LOG("%s starting", appName); - SILABS_LOG("=================================================="); - -#if PW_RPC_ENABLED - chip::rpc::Init(); -#endif - -#ifdef HEAP_MONITORING - MemMonitoring::startHeapMonitoring(); -#endif - //============================================== - // Init Matter Stack - //============================================== - SILABS_LOG("Init CHIP Stack"); - // Init Chip memory management before the stack - ReturnErrorOnFailure(chip::Platform::MemoryInit()); - - SILABS_LOG("Init RSI 911x Platform"); - int32_t deviceInit = wfx_rsi_platform(); - if (deviceInit != SL_STATUS_OK) - { - SILABS_LOG("RSI init failed"); - return CHIP_ERROR_INTERNAL; - } - ReturnErrorOnFailure(PlatformMgr().InitChipStack()); - - SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); - SetCommissionableDataProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); - -#ifdef SIWX917_USE_COMISSIONABLE_DATA - err = Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().FlashFactoryData(); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("Flashing to the device failed"); - return err; - } -#endif - chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName); - - // Stop Matter event handling while setting up resources - chip::DeviceLayer::PlatformMgr().LockChipStack(); - - // Create initParams with SDK example defaults here - static chip::CommonCaseDeviceServerInitParams initParams; - -#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)); - } - static SilabsTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; - initParams.testEventTriggerDelegate = &testEventTriggerDelegate; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED - - // Initialize the remaining (not overridden) providers to the SDK example defaults - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - // Init Matter Server and Start Event Loop - err = chip::Server::GetInstance().Init(initParams); - chip::DeviceLayer::PlatformMgr().UnlockChipStack(); - - ReturnErrorOnFailure(err); - - // OTA Requestor initialization will be triggered by the connectivity events - // TODO - // PlatformMgr().AddEventHandler(ConnectivityEventCallback, reinterpret_cast(nullptr)); - - SILABS_LOG("Starting Platform Manager Event Loop"); - ReturnErrorOnFailure(PlatformMgr().StartEventLoopTask()); - -#ifdef SL_WIFI - InitWiFi(); -#endif - -#ifdef ENABLE_CHIP_SHELL - chip::startShellTask(); -#endif - - return CHIP_NO_ERROR; -} - -#ifdef SL_WIFI -void SilabsMatterConfig::InitWiFi(void) -{ -#ifdef RS911X_WIFI - /* - * Start up any RSI interface stuff - * (Not required) - Note that wfx_wifi_start will deal with - * starting up a rsi task - which will initialize the SPI interface. - */ -#endif -} -#endif // SL_WIFI - -// ================================================================================ -// FreeRTOS Callbacks -// ================================================================================ -extern "C" void vApplicationIdleHook(void) -{ - // FreeRTOS Idle callback -} diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn b/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn deleted file mode 100644 index 20547c3b7beabc..00000000000000 --- a/examples/platform/silabs/SiWx917/pw_sys_io/BUILD.gn +++ /dev/null @@ -1,39 +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. - -import("//build_overrides/chip.gni") -import("//build_overrides/pigweed.gni") - -import("$dir_pw_build/target_types.gni") - -examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" - -config("default_config") { - include_dirs = [ "public" ] -} - -pw_source_set("pw_sys_io_efr32") { - sources = [ "sys_io_efr32.cc" ] - - deps = [ - "$dir_pw_sys_io:default_putget_bytes", - "$dir_pw_sys_io:facade", - ] - - cflags = [ "-Wconversion" ] - - public_configs = [ ":default_config" ] - - include_dirs = [ "${examples_plat_dir}" ] -} diff --git a/examples/platform/silabs/SiWx917/uart.h b/examples/platform/silabs/SiWx917/uart.h deleted file mode 100644 index 035d5b3b0ede7d..00000000000000 --- a/examples/platform/silabs/SiWx917/uart.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * Copyright (c) 2021 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. - */ - -#pragma once - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void uartConsoleInit(void); -int16_t uartConsoleWrite(const char * Buf, uint16_t BufLength); -int16_t uartConsoleRead(char * Buf, uint16_t NbBytesToRead); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/examples/platform/silabs/efr32/TemperatureSensor.cpp b/examples/platform/silabs/TemperatureSensor.cpp similarity index 100% rename from examples/platform/silabs/efr32/TemperatureSensor.cpp rename to examples/platform/silabs/TemperatureSensor.cpp diff --git a/examples/platform/silabs/efr32/TemperatureSensor.h b/examples/platform/silabs/TemperatureSensor.h similarity index 100% rename from examples/platform/silabs/efr32/TemperatureSensor.h rename to examples/platform/silabs/TemperatureSensor.h diff --git a/examples/platform/silabs/SiWx917/board_config.h b/examples/platform/silabs/board_config.h similarity index 98% rename from examples/platform/silabs/SiWx917/board_config.h rename to examples/platform/silabs/board_config.h index ed92fdd145a1c7..fa6779f583afd1 100644 --- a/examples/platform/silabs/SiWx917/board_config.h +++ b/examples/platform/silabs/board_config.h @@ -28,7 +28,7 @@ /** * @file - * This file includes dev board compile-time configuration constants for SiWx917. + * This file includes dev board compile-time configuration constants for Silabs board. * */ diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 38d77a45e19498..5bb628ad4f99e6 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -40,9 +40,6 @@ declare_args() { #default Wifi Password chip_default_wifi_psk = "" - # Use default handler to negotiate subscription max interval - chip_config_use_icd_subscription_callbacks = chip_enable_icd_server - # Enable TestEventTrigger in GeneralDiagnostics cluster silabs_test_event_trigger_enabled = false @@ -197,21 +194,6 @@ source_set("silabs-factory-data-provider") { ] } -config("ICD-subscription-callback-config") { - defines = [ "CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS=1" ] -} - -source_set("efr32-ICD-subscription-callback") { - sources = [ - "${silabs_common_plat_dir}/ICDSubscriptionCallback.cpp", - "${silabs_common_plat_dir}/ICDSubscriptionCallback.h", - ] - - public_deps = [ "${chip_root}/src/app:app" ] - - public_configs = [ ":ICD-subscription-callback-config" ] -} - config("efr32-common-config") { defines = [ "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_sec}" ] @@ -285,14 +267,13 @@ source_set("efr32-common") { include_dirs = [ "." ] sources = [ + "${silabs_common_plat_dir}/BaseApplication.cpp", "${silabs_common_plat_dir}/LEDWidget.cpp", + "${silabs_common_plat_dir}/MatterConfig.cpp", "${silabs_common_plat_dir}/SoftwareFaultReports.cpp", "${silabs_common_plat_dir}/heap_4_silabs.c", "${silabs_common_plat_dir}/silabs_utils.cpp", "${silabs_common_plat_dir}/syscalls_stubs.cpp", - "BaseApplication.cpp", - "init_efrPlatform.cpp", - "matter_config.cpp", ] if (chip_enable_pw_rpc || chip_build_libshell || enable_openthread_cli) { @@ -357,10 +338,6 @@ source_set("efr32-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (chip_config_use_icd_subscription_callbacks) { - public_deps += [ ":efr32-ICD-subscription-callback" ] - } - if (silabs_test_event_trigger_enabled) { sources += [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] diff --git a/examples/platform/silabs/efr32/board_config.h b/examples/platform/silabs/efr32/board_config.h deleted file mode 100644 index 8c495b4fa7f513..00000000000000 --- a/examples/platform/silabs/efr32/board_config.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2018, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file - * This file includes dev borad compile-time configuration constants for efr32. - * - */ - -#pragma once - -/// Dev board suppports OQPSK modulation in 2.4GHz band. -#define RADIO_CONFIG_2P4GHZ_OQPSK_SUPPORT 1 -#define RADIO_CONFIG_915MHZ_OQPSK_SUPPORT 0 - -/// The PA(s) is(are) fed from the DCDC -#if (BRD4166A) -#define RADIO_CONFIG_PA_USES_DCDC 1 -#else -#define RADIO_CONFIG_PA_USES_DCDC 0 -#endif - -#ifndef RADIO_CONFIG_DEBUG_COUNTERS_SUPPORT -#define RADIO_CONFIG_DEBUG_COUNTERS_SUPPORT 0 /// Set to 1 to enable debug counters in radio.c -#endif - -#ifndef RADIO_CONFIG_DMP_SUPPORT -#define RADIO_CONFIG_DMP_SUPPORT 0 /// Set to 1 to enable Dynamic Multi-Protocol support in radio.c -#endif diff --git a/examples/platform/silabs/efr32/init_efrPlatform.cpp b/examples/platform/silabs/efr32/init_efrPlatform.cpp deleted file mode 100644 index 5deaf666e4b12e..00000000000000 --- a/examples/platform/silabs/efr32/init_efrPlatform.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * 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. - */ - -#include "AppConfig.h" -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif -#include -#include - -#include - -#if CHIP_ENABLE_OPENTHREAD -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "platform-efr32.h" -#include "sl_openthread.h" - -#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#include "openthread/heap.h" -#endif // OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE -#endif // CHIP_ENABLE_OPENTHREAD - -#include "init_efrPlatform.h" -#include "sl_component_catalog.h" -#include "sl_mbedtls.h" -#include "sl_system_init.h" -#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI -#include "uart.h" -#endif - -#if SL_SYSTEM_VIEW -#include "SEGGER_SYSVIEW.h" -#endif - -void initAntenna(void); - -void init_efrPlatform(void) -{ - sl_system_init(); - sl_mbedtls_init(); -#if CHIP_ENABLE_OPENTHREAD -#ifdef MGM24 - sl_openthread_init(); -#endif - efr32RadioInit(); - efr32AlarmInit(); - efr32MiscInit(); -#endif // CHIP_ENABLE_OPENTHREAD - -#if SL_SYSTEM_VIEW - SEGGER_SYSVIEW_Conf(); - SEGGER_SYSVIEW_Start(); -#endif -#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI - uartConsoleInit(); -#endif -#if SILABS_LOG_ENABLED - silabsInitLog(); -#endif -} - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h index 90ecfcbf712718..339142894f5e61 100644 --- a/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h +++ b/examples/platform/silabs/efr32/project_include/OpenThreadConfig.h @@ -36,8 +36,7 @@ // Enable use of external heap allocator (calloc/free) for OpenThread. #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 -#if CHIP_CONFIG_ENABLE_ICD_SERVER - +#ifdef SL_ICD_ENABLED #define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 0 // In seconds @@ -46,7 +45,7 @@ // Timeout after 2 missed checkin or 4 mins if sleep interval is too short. #define OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT ((SL_MLE_TIMEOUT_s < 120) ? 240 : ((SL_MLE_TIMEOUT_s * 2) + 1)) -#endif // CHIP_CONFIG_ENABLE_ICD_SERVER +#endif // SL_ICD_ENABLED /****Uncomment below section for OpenThread Debug logs*/ // #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG diff --git a/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc b/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc deleted file mode 100644 index 4bc7d98f7477c4..00000000000000 --- a/examples/platform/silabs/efr32/pw_sys_io/sys_io_efr32.cc +++ /dev/null @@ -1,81 +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. - */ - -#include "pw_sys_io/sys_io.h" -#include -#include -#include -#include - -#include "uart.h" - -int16_t console_getchar(char * chr) -{ - int16_t retVal = 0; - - // Busy wait for pw_rcp reads - while (retVal == 0) - { - retVal = uartConsoleRead(chr, 1); - } - return retVal; -} - -int16_t console_putchar(const char * chr) -{ - return uartConsoleWrite(chr, 1); -} - -extern "C" void pw_sys_io_Init() -{ - uartConsoleInit(); -} - -namespace pw::sys_io { - -Status ReadByte(std::byte * dest) -{ - if (!dest) - return Status::InvalidArgument(); - - int16_t ret = console_getchar(reinterpret_cast(dest)); - return ret < 0 ? Status::FailedPrecondition() : OkStatus(); -} - -Status WriteByte(std::byte b) -{ - int16_t ret = console_putchar(reinterpret_cast(&b)); - return ret < 0 ? Status::FailedPrecondition() : OkStatus(); -} - -// Writes a string using pw::sys_io, and add newline characters at the end. -StatusWithSize WriteLine(const std::string_view & s) -{ - size_t chars_written = 0; - StatusWithSize result = WriteBytes(pw::as_bytes(pw::span(s))); - if (!result.ok()) - { - return result; - } - chars_written += result.size(); - result = WriteBytes(pw::as_bytes(pw::span("\r\n", 2))); - chars_written += result.size(); - - return StatusWithSize(result.status(), chars_written); -} - -} // namespace pw::sys_io diff --git a/examples/platform/silabs/SiWx917/ldscripts/SiWx917.ld b/examples/platform/silabs/ldscripts/SiWx917.ld similarity index 100% rename from examples/platform/silabs/SiWx917/ldscripts/SiWx917.ld rename to examples/platform/silabs/ldscripts/SiWx917.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg12.ld b/examples/platform/silabs/ldscripts/efr32mg12.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg12.ld rename to examples/platform/silabs/ldscripts/efr32mg12.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg21.ld b/examples/platform/silabs/ldscripts/efr32mg21.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg21.ld rename to examples/platform/silabs/ldscripts/efr32mg21.ld diff --git a/examples/platform/silabs/efr32/ldscripts/efr32mg24.ld b/examples/platform/silabs/ldscripts/efr32mg24.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/efr32mg24.ld rename to examples/platform/silabs/ldscripts/efr32mg24.ld diff --git a/examples/platform/silabs/efr32/ldscripts/mgm24.ld b/examples/platform/silabs/ldscripts/mgm24.ld similarity index 100% rename from examples/platform/silabs/efr32/ldscripts/mgm24.ld rename to examples/platform/silabs/ldscripts/mgm24.ld diff --git a/examples/platform/silabs/main.cpp b/examples/platform/silabs/main.cpp index a94696ef08374e..03fb25b549db67 100644 --- a/examples/platform/silabs/main.cpp +++ b/examples/platform/silabs/main.cpp @@ -22,9 +22,9 @@ #include "AppConfig.h" #include +#include #include #include -#include #ifdef SILABS_ATTESTATION_CREDENTIALS #include #else diff --git a/examples/platform/silabs/efr32/pw_sys_io/BUILD.gn b/examples/platform/silabs/pw_sys_io/BUILD.gn similarity index 87% rename from examples/platform/silabs/efr32/pw_sys_io/BUILD.gn rename to examples/platform/silabs/pw_sys_io/BUILD.gn index 722d2a7cad24e6..354ed573eb9935 100644 --- a/examples/platform/silabs/efr32/pw_sys_io/BUILD.gn +++ b/examples/platform/silabs/pw_sys_io/BUILD.gn @@ -17,14 +17,14 @@ import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") -examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +examples_plat_dir = "${chip_root}/examples/platform/silabs" config("default_config") { include_dirs = [ "public" ] } -pw_source_set("pw_sys_io_efr32") { - sources = [ "sys_io_efr32.cc" ] +pw_source_set("pw_sys_io_silabs") { + sources = [ "sys_io_silabs.cc" ] deps = [ "$dir_pw_sys_io:default_putget_bytes", diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/public/pw_sys_io_efr32/init.h b/examples/platform/silabs/pw_sys_io/public/pw_sys_io_efr32/init.h similarity index 100% rename from examples/platform/silabs/SiWx917/pw_sys_io/public/pw_sys_io_efr32/init.h rename to examples/platform/silabs/pw_sys_io/public/pw_sys_io_efr32/init.h diff --git a/examples/platform/silabs/SiWx917/pw_sys_io/sys_io_siwx917.cc b/examples/platform/silabs/pw_sys_io/sys_io_silabs.cc similarity index 100% rename from examples/platform/silabs/SiWx917/pw_sys_io/sys_io_siwx917.cc rename to examples/platform/silabs/pw_sys_io/sys_io_silabs.cc diff --git a/examples/platform/silabs/silabs_utils.cpp b/examples/platform/silabs/silabs_utils.cpp index 0e67a9e723a764..7231836c15bf7e 100644 --- a/examples/platform/silabs/silabs_utils.cpp +++ b/examples/platform/silabs/silabs_utils.cpp @@ -19,7 +19,7 @@ #include "silabs_utils.h" #include "SoftwareFaultReports.h" -#include +#include void appError(int err) { diff --git a/examples/platform/silabs/efr32/uart.h b/examples/platform/silabs/uart.h similarity index 100% rename from examples/platform/silabs/efr32/uart.h rename to examples/platform/silabs/uart.h diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 5636ad24e581b8..91fbb9ebdff027 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 2ba4c43e611618..40391d5bb8d29a 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7985,5 +7985,6 @@ "endpointVersion": 1, "deviceIdentifier": 771 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/pump-app/silabs/BUILD.gn b/examples/pump-app/silabs/BUILD.gn index 1dc594d535d327..f255000ea525d5 100644 --- a/examples/pump-app/silabs/BUILD.gn +++ b/examples/pump-app/silabs/BUILD.gn @@ -66,7 +66,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -89,7 +89,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -189,7 +189,7 @@ silabs_executable("pump_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -200,7 +200,7 @@ silabs_executable("pump_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/pump-app/silabs/README.md b/examples/pump-app/silabs/README.md index 51306b7dd24ea4..f2fc51840965a8 100644 --- a/examples/pump-app/silabs/README.md +++ b/examples/pump-app/silabs/README.md @@ -122,9 +122,9 @@ Labs platform. $ cd ~/connectedhomeip/examples/pump-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/pump-app/silabs/efr32/ ./out/pump-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index dae3db394fcbd9..6642cb7c237657 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index dae3db394fcbd9..6642cb7c237657 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1148,6 +1148,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index 2fabb6f0cc219e..3adcc3fa7ff8e9 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 16c72d7d0341bd..1f69469501cb44 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1073,6 +1073,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 83b5113b422d07..6523e9ff34941f 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -6813,5 +6813,6 @@ "endpointVersion": 1, "deviceIdentifier": 772 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index facd6595b3943e..297294cf44bfb7 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -1408,6 +1408,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1960,7 +1964,6 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1970,7 +1973,6 @@ endpoint 1 { ram attribute nameSupport; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -1983,7 +1985,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1998,7 +1999,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2013,7 +2013,6 @@ endpoint 1 { callback attribute replacementProductList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2026,7 +2025,6 @@ endpoint 1 { ram attribute percentCurrent default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index fc6b03ba7dcd40..edf84a1839d9fe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -5581,7 +5581,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5829,7 +5829,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6041,7 +6041,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6295,7 +6295,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6549,7 +6549,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6610,22 +6610,12 @@ ] }, { - "name": "Ceramic Filter Monitoring", - "code": 115, + "name": "Fan Control", + "code": 514, "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "define": "FAN_CONTROL_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], "attributes": [ { "name": "FeatureMap", @@ -6662,51 +6652,51 @@ ] }, { - "name": "Ceramic Filter Monitoring", - "code": 115, + "name": "Fan Control", + "code": 514, "mfgCode": null, - "define": "CERAMIC_FILTER_MONITORING_CLUSTER", + "define": "FAN_CONTROL_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "attributes": [ { - "name": "Condition", + "name": "FanMode", "code": 0, "mfgCode": null, "side": "server", - "type": "percent", + "type": "FanModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DegradationDirection", + "name": "FanModeSequence", "code": 1, "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", + "type": "FanModeSequenceEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChangeIndication", + "name": "PercentSetting", "code": 2, "mfgCode": null, "side": "server", - "type": "ChangeIndicationEnum", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6718,108 +6708,44 @@ "reportableChange": 0 }, { - "name": "InPlaceIndicator", + "name": "PercentCurrent", "code": 3, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "Percent", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastChangedTime", + "name": "SpeedMax", "code": 4, "mfgCode": null, "side": "server", - "type": "epoch_s", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "SpeedSetting", + "code": 5, "mfgCode": null, "side": "server", - "type": "bitmap32", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6830,48 +6756,12 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "SpeedCurrent", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -6882,87 +6772,77 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RockSupport", + "code": 7, "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, + "side": "server", + "type": "RockBitmap", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Electrostatic Filter Monitoring", - "code": 116, - "mfgCode": null, - "define": "ELECTROSTATIC_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ + }, { - "name": "Condition", - "code": 0, + "name": "RockSetting", + "code": 8, "mfgCode": null, "side": "server", - "type": "percent", - "included": 1, + "type": "RockBitmap", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DegradationDirection", - "code": 1, + "name": "WindSupport", + "code": 9, "mfgCode": null, "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, + "type": "WindBitmap", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChangeIndication", - "code": 2, + "name": "WindSetting", + "code": 10, "mfgCode": null, "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, + "type": "WindBitmap", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InPlaceIndicator", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6972,13 +6852,13 @@ "reportableChange": 0 }, { - "name": "LastChangedTime", - "code": 4, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "epoch_s", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6988,2272 +6868,12 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "UV Filter Monitoring", - "code": 117, - "mfgCode": null, - "define": "UV_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ionizing Filter Monitoring", - "code": 118, - "mfgCode": null, - "define": "IONIZING_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Zeolite Filter Monitoring", - "code": 119, - "mfgCode": null, - "define": "ZEOLITE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ozone Filter Monitoring", - "code": 120, - "mfgCode": null, - "define": "OZONE_FILTER_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Water Tank Monitoring", - "code": 121, - "mfgCode": null, - "define": "WATER_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fuel Tank Monitoring", - "code": 122, - "mfgCode": null, - "define": "FUEL_TANK_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Ink Cartridge Monitoring", - "code": 123, - "mfgCode": null, - "define": "INK_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCondition", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Toner Cartridge Monitoring", - "code": 124, - "mfgCode": null, - "define": "TONER_CARTRIDGE_MONITORING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Condition", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DegradationDirection", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "DegradationDirectionEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ChangeIndication", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "ChangeIndicationEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InPlaceIndicator", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastChangedTime", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "epoch_s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fan Control", - "code": 514, - "mfgCode": null, - "define": "FAN_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fan Control", - "code": 514, - "mfgCode": null, - "define": "FAN_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "FanMode", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "FanModeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FanModeSequence", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "FanModeSequenceEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PercentSetting", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "Percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PercentCurrent", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "Percent", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SpeedMax", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SpeedSetting", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int8u", "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SpeedCurrent", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "RockSupport", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "RockBitmap", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "RockSetting", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "RockBitmap", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WindSupport", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "WindBitmap", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WindSetting", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "WindBitmap", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/examples/shell/esp32/main/CMakeLists.txt b/examples/shell/esp32/main/CMakeLists.txt index 8fac15167812f5..5a565edb90a6d5 100644 --- a/examples/shell/esp32/main/CMakeLists.txt +++ b/examples/shell/esp32/main/CMakeLists.txt @@ -23,4 +23,4 @@ idf_component_register(SRCS main.cpp "${CHIP_SHELL_DIR}/shell_common/globals.cpp" PRIV_INCLUDE_DIRS "${CHIP_SHELL_DIR}/shell_common/include" - PRIV_REQUIRES chip nvs_flash bt console) + PRIV_REQUIRES chip nvs_flash bt) diff --git a/examples/shell/esp32/partitions.csv b/examples/shell/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/shell/esp32/partitions.csv +++ b/examples/shell/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/smoke-co-alarm-app/silabs/BUILD.gn b/examples/smoke-co-alarm-app/silabs/BUILD.gn index cafd4b6f7cc1bd..7750dc31f6324b 100644 --- a/examples/smoke-co-alarm-app/silabs/BUILD.gn +++ b/examples/smoke-co-alarm-app/silabs/BUILD.gn @@ -68,7 +68,7 @@ if (slc_generate) { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -91,7 +91,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -188,7 +188,7 @@ silabs_executable("smoke_co_alarm_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -199,7 +199,7 @@ silabs_executable("smoke_co_alarm_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index 2aec36eb0cb6c9..fc858977604897 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -126,10 +126,10 @@ Silicon Labs platform. $ rm -rf out/ ``` -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) ``` - $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app_ICD BRD4187C --icd ``` or use gn as previously mentioned but adding the following arguments: diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index fd4e3ef135a2ca..a16b80d49cd1a9 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1475,6 +1475,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -1965,7 +1969,6 @@ endpoint 0 { callback attribute clientsSupportedPerFabric default = 1; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 8a4bba62e7b8ab..542005ce91a4c8 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -5355,7 +5355,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -5371,7 +5371,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5387,7 +5387,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -5419,7 +5419,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5435,7 +5435,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5482,7 +5482,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6902,7 +6902,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", diff --git a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt index 6136d1583709bb..06b274e8d4bade 100644 --- a/examples/temperature-measurement-app/esp32/main/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/main/CMakeLists.txt @@ -64,8 +64,14 @@ set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" - "${IDF_PATH}/components/freertos/include/freertos" ) + +if (${IDF_VERSION_MAJOR} LESS 5) + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") +else() + list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") +endif() + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" diff --git a/examples/temperature-measurement-app/esp32/partitions.csv b/examples/temperature-measurement-app/esp32/partitions.csv index b338ff11a11589..8b0928187b8708 100644 --- a/examples/temperature-measurement-app/esp32/partitions.csv +++ b/examples/temperature-measurement-app/esp32/partitions.csv @@ -1,6 +1,6 @@ # Name, Type, SubType, Offset, Size, Flags # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap -nvs, data, nvs, , 0x6000, +nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 1920K, diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 70f93bcd68ec64..07b170ea8325d6 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -940,6 +940,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index d0a7ed84d45d63..d854c4a8e0b201 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -4207,5 +4207,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/silabs/BUILD.gn b/examples/thermostat/silabs/BUILD.gn index 684ab738804105..f82bbc40776c40 100644 --- a/examples/thermostat/silabs/BUILD.gn +++ b/examples/thermostat/silabs/BUILD.gn @@ -56,7 +56,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -79,7 +79,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -147,7 +147,7 @@ silabs_executable("thermostat_app") { "${efr32_sdk_root}/platform/common/src/sl_status.c", "${efr32_sdk_root}/platform/driver/i2cspm/src/sl_i2cspm.c", "${efr32_sdk_root}/platform/emlib/src/em_i2c.c", - "${examples_plat_dir}/TemperatureSensor.cpp", + "${examples_common_plat_dir}/TemperatureSensor.cpp", "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_i2cspm_init.c", ] } @@ -198,7 +198,7 @@ silabs_executable("thermostat_app") { if (wifi_soc) { deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] } else { - deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32" ] + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] } deps += pw_build_LINK_DEPS @@ -209,7 +209,7 @@ silabs_executable("thermostat_app") { ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/thermostat/silabs/README.md b/examples/thermostat/silabs/README.md index 6dc53dc6b2ca2d..cc76d71c1fc083 100644 --- a/examples/thermostat/silabs/README.md +++ b/examples/thermostat/silabs/README.md @@ -131,9 +131,9 @@ Silicon Labs platform. ./scripts/examples/gn_silabs_example.sh examples/thermostat/silabs/efr32/ out/thermostat-app BRD4187C chip_build_libshell=true -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/thermostat/silabs/efr32/ ./out/thermostat-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 49776bcef7069d..88d23fdbcc46e4 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1560,6 +1560,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 49567e9fc56f5a..8931cd7a4d07c9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -14782,5 +14782,6 @@ "endpointVersion": 1, "deviceIdentifier": 769 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 38a9224dabe38f..bd3b6687d4b694 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1709,6 +1709,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 4db12ffd11259e..3474a5f8be8f29 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -12460,5 +12460,6 @@ "endpointVersion": 1, "deviceIdentifier": 36 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java index 2dfa712b7753c2..d2a0f7952b6485 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ConnectionFragment.java @@ -8,6 +8,7 @@ import android.widget.TextView; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import com.chip.casting.CommissioningCallbacks; import com.chip.casting.ContentApp; import com.chip.casting.DiscoveredNodeData; import com.chip.casting.FailureCallback; @@ -120,15 +121,59 @@ private void beginCommissioning( FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpoints) { Log.d(TAG, "Running commissioning"); + MatterCallbackHandler commissioningCompleteCallback = + new MatterCallbackHandler() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on CommissioningComplete event with " + error); + } + }; + + SuccessCallback sessionEstablishmentStartedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishmentStartedCallback"); + } + }; + + SuccessCallback sessionEstablishedCallback = + new SuccessCallback() { + @Override + public void handle(Void response) { + Log.d(TAG, "handle() called on SessionEstablishedCallback"); + } + }; + + FailureCallback sessionEstablishmentErrorCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentError event with " + error); + } + }; + + FailureCallback sessionEstablishmentStoppedCallback = + new FailureCallback() { + @Override + public void handle(MatterError error) { + Log.d(TAG, "handle() called on SessionEstablishmentStopped event with " + error); + } + }; + + CommissioningCallbacks commissioningCallbacks = + new CommissioningCallbacks.Builder() + .commissioningComplete(commissioningCompleteCallback) + .sessionEstablishmentStarted(sessionEstablishmentStartedCallback) + .sessionEstablished(sessionEstablishedCallback) + .sessionEstablishmentError(sessionEstablishmentErrorCallback) + .sessionEstablishmentStopped(sessionEstablishmentStoppedCallback) + .build(); + this.openCommissioningWindowSuccess = tvCastingApp.openBasicCommissioningWindow( GlobalCastingConstants.CommissioningWindowDurationSecs, - new MatterCallbackHandler() { - @Override - public void handle(MatterError error) { - Log.d(TAG, "handle() called on CommissioningComplete event with " + error); - } - }, + commissioningCallbacks, onConnectionSuccess, onConnectionFailure, onNewOrUpdatedEndpoints); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java new file mode 100644 index 00000000000000..9a44aba792f18b --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2023 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. + * + */ +package com.chip.casting; + +public class CommissioningCallbacks { + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session + * establishment process + */ + private SuccessCallback sessionEstablishmentStarted; + + /** This is called when the commissioning session has been established */ + private SuccessCallback sessionEstablished; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is + * provided) or PASE was established fine but then the fail-safe expired (including being expired + * by the commissioner). The error param indicates the error that occurred during session + * establishment or the error accompanying the fail-safe timeout. + */ + private FailureCallback sessionEstablishmentError; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the + * fail-safe expired (including being expired by the commissioner) AND the commissioning window is + * closed. The window may be closed because the commissioning attempts limit was reached or + * advertising/listening for PASE failed. + */ + private FailureCallback sessionEstablishmentStopped; + + /** This is called when the commissioning has been completed */ + private Object commissioningComplete; + + private CommissioningCallbacks(Builder builder) { + this.sessionEstablishmentStarted = builder.sessionEstablishmentStarted; + this.sessionEstablished = builder.sessionEstablished; + this.sessionEstablishmentError = builder.sessionEstablishmentError; + this.sessionEstablishmentStopped = builder.sessionEstablishmentStopped; + this.commissioningComplete = builder.commissioningComplete; + } + + public SuccessCallback getSessionEstablishmentStarted() { + return sessionEstablishmentStarted; + } + + public SuccessCallback getSessionEstablished() { + return sessionEstablished; + } + + public FailureCallback getSessionEstablishmentError() { + return sessionEstablishmentError; + } + + public FailureCallback getSessionEstablishmentStopped() { + return sessionEstablishmentStopped; + } + + public Object getCommissioningComplete() { + return commissioningComplete; + } + + public static class Builder { + private SuccessCallback sessionEstablishmentStarted; + private SuccessCallback sessionEstablished; + private FailureCallback sessionEstablishmentError; + private FailureCallback sessionEstablishmentStopped; + private Object commissioningComplete; + + public Builder sessionEstablishmentStarted(SuccessCallback sessionEstablishmentStarted) { + this.sessionEstablishmentStarted = sessionEstablishmentStarted; + return this; + } + + public Builder sessionEstablished(SuccessCallback sessionEstablished) { + this.sessionEstablished = sessionEstablished; + return this; + } + + public Builder sessionEstablishmentError(FailureCallback sessionEstablishmentError) { + this.sessionEstablishmentError = sessionEstablishmentError; + return this; + } + + public Builder sessionEstablishmentStopped(FailureCallback sessionEstablishmentStopped) { + this.sessionEstablishmentStopped = sessionEstablishmentStopped; + return this; + } + + public Builder commissioningComplete(Object commissioningComplete) { + this.commissioningComplete = commissioningComplete; + return this; + } + + public CommissioningCallbacks build() { + return new CommissioningCallbacks(this); + } + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index 7fc9d44da14186..f30132ffc9a6ea 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -180,7 +180,7 @@ public void stopVideoPlayerDiscovery() { public native boolean openBasicCommissioningWindow( int duration, - Object commissioningCompleteHandler, + CommissioningCallbacks commissioningCallbacks, SuccessCallback onConnectionSuccess, FailureCallback onConnectionFailure, SuccessCallback onNewOrUpdatedEndpointCallback); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h index 749f5e873ee074..c05eef016f32b3 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/MatterCallbackHandler-JNI.h @@ -104,6 +104,30 @@ template SuccessHandlerJNI::~SuccessHandlerJNI(){}; // COMMISSIONING AND CONNECTION +class SessionEstablishmentStartedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishmentStartedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + +class SessionEstablishedHandlerJNI : public SuccessHandlerJNI +{ +public: + SessionEstablishedHandlerJNI() : SuccessHandlerJNI("(Ljava/lang/Object;)V") {} + jobject ConvertToJObject(void * responseData) + { + // return nullptr because the Java callback extends SuccessCallback and its handle() expects a Void param. + // It expects a Void becauase no value is passed as part of this callback. + return nullptr; + } +}; + class OnConnectionSuccessHandlerJNI : public SuccessHandlerJNI { public: diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index c4af2c37add85c..5293cc31305fd5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -113,15 +113,82 @@ JNI_METHOD(void, setDACProvider)(JNIEnv *, jobject, jobject provider) } JNI_METHOD(jboolean, openBasicCommissioningWindow) -(JNIEnv * env, jobject, jint duration, jobject jCommissioningCompleteHandler, jobject jOnConnectionSuccessHandler, +(JNIEnv * env, jobject, jint duration, jobject jCommissioningCallbacks, jobject jOnConnectionSuccessHandler, jobject jOnConnectionFailureHandler, jobject jOnNewOrUpdatedEndpointHandler) { chip::DeviceLayer::StackLock lock; ChipLogProgress(AppServer, "JNI_METHOD openBasicCommissioningWindow called with duration %d", duration); - CHIP_ERROR err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningCompleteHandler); - VerifyOrExit(CHIP_NO_ERROR == err, - ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + CHIP_ERROR err = CHIP_NO_ERROR; + + CommissioningCallbacks commissioningCallbacks; + jclass jCommissioningCallbacksClass; + chip::JniReferences::GetInstance().GetClassRef(env, "com/chip/casting/CommissioningCallbacks", jCommissioningCallbacksClass); + + jfieldID jCommissioningCompleteField = + env->GetFieldID(jCommissioningCallbacksClass, "commissioningComplete", "Ljava/lang/Object;"); + jobject jCommissioningComplete = env->GetObjectField(jCommissioningCallbacks, jCommissioningCompleteField); + if (jCommissioningComplete != nullptr) + { + err = TvCastingAppJNIMgr().getCommissioningCompleteHandler().SetUp(env, jCommissioningComplete); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "MatterCallbackHandlerJNI::SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.commissioningComplete = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStartedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStarted", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablishmentStarted = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStartedField); + if (jSessionEstablishmentStarted != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().SetUp(env, jSessionEstablishmentStarted); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStartedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStarted = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStartedHandler().Handle(nullptr); + }; + } + + jfieldID jSessionEstablishedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablished", "Lcom/chip/casting/SuccessCallback;"); + jobject jSessionEstablished = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishedField); + if (jSessionEstablished != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishedHandler().SetUp(env, jSessionEstablished); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablished = []() { TvCastingAppJNIMgr().getSessionEstablishedHandler().Handle(nullptr); }; + } + + jfieldID jSessionEstablishmentErrorField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentError", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentError = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentErrorField); + if (jSessionEstablishmentError != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().SetUp(env, jSessionEstablishmentError); + VerifyOrReturnValue(err == CHIP_NO_ERROR, false); + commissioningCallbacks.sessionEstablishmentError = [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getSessionEstablishmentErrorHandler().Handle(err); + }; + } + + jfieldID jSessionEstablishmentStoppedField = + env->GetFieldID(jCommissioningCallbacksClass, "sessionEstablishmentStopped", "Lcom/chip/casting/FailureCallback;"); + jobject jSessionEstablishmentStopped = env->GetObjectField(jCommissioningCallbacks, jSessionEstablishmentStoppedField); + if (jSessionEstablishmentStopped != nullptr) + { + err = TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().SetUp(env, jSessionEstablishmentStopped); + VerifyOrReturnValue( + err == CHIP_NO_ERROR, false, + ChipLogError(AppServer, "SessionEstablishmentStoppedHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + commissioningCallbacks.sessionEstablishmentStopped = []() { + TvCastingAppJNIMgr().getSessionEstablishmentStoppedHandler().Handle(CHIP_NO_ERROR); + }; + } err = TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).SetUp(env, jOnConnectionSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, @@ -136,7 +203,7 @@ JNI_METHOD(jboolean, openBasicCommissioningWindow) ChipLogError(AppServer, "OnNewOrUpdatedEndpointHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [](CHIP_ERROR err) { TvCastingAppJNIMgr().getCommissioningCompleteHandler().Handle(err); }, + commissioningCallbacks, [](TargetVideoPlayerInfo * videoPlayer) { TvCastingAppJNIMgr().getOnConnectionSuccessHandler(false).Handle(videoPlayer); }, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getOnConnectionFailureHandler(false).Handle(err); }, [](TargetEndpointInfo * endpoint) { TvCastingAppJNIMgr().getOnNewOrUpdatedEndpointHandler(false).Handle(endpoint); }); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h index d77f3a7eac8cce..863e2691c44a52 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.h @@ -27,10 +27,20 @@ class TvCastingAppJNI { public: MatterCallbackHandlerJNI & getCommissioningCompleteHandler() { return mCommissioningCompleteHandler; } + + SessionEstablishmentStartedHandlerJNI & getSessionEstablishmentStartedHandler() { return mSessionEstablishmentStartedHandler; } + + SessionEstablishedHandlerJNI & getSessionEstablishedHandler() { return mSessionEstablishedHandler; } + + FailureHandlerJNI & getSessionEstablishmentErrorHandler() { return mSessionEstablishmentErrorHandler; } + + FailureHandlerJNI & getSessionEstablishmentStoppedHandler() { return mSessionEstablishmentStoppedHandler; } + OnConnectionSuccessHandlerJNI & getOnConnectionSuccessHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionSuccessHandler : mCommissioningOnConnectionSuccessHandler; } + FailureHandlerJNI & getOnConnectionFailureHandler(bool preCommissioned) { return preCommissioned ? mPreCommissionedOnConnectionFailureHandler : mCommissioningOnConnectionFailureHandler; @@ -100,6 +110,10 @@ class TvCastingAppJNI static TvCastingAppJNI sInstance; MatterCallbackHandlerJNI mCommissioningCompleteHandler; + SessionEstablishmentStartedHandlerJNI mSessionEstablishmentStartedHandler; + SessionEstablishedHandlerJNI mSessionEstablishedHandler; + FailureHandlerJNI mSessionEstablishmentErrorHandler; + FailureHandlerJNI mSessionEstablishmentStoppedHandler; OnConnectionSuccessHandlerJNI mCommissioningOnConnectionSuccessHandler; FailureHandlerJNI mCommissioningOnConnectionFailureHandler; OnNewOrUpdatedEndpointHandlerJNI mCommissioningOnNewOrUpdatedEndpointHandler; diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index 7a12b9a9a3efa3..d072dd4c088e95 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -65,6 +65,7 @@ android_library("java") { sources = [ "App/app/src/main/jni/com/chip/casting/AppParameters.java", + "App/app/src/main/jni/com/chip/casting/CommissioningCallbacks.java", "App/app/src/main/jni/com/chip/casting/ContentApp.java", "App/app/src/main/jni/com/chip/casting/ContentLauncherTypes.java", "App/app/src/main/jni/com/chip/casting/DACProvider.java", diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index 1591df3729aa04..cbc52e427053d4 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873D286A593700771BAD /* CastingServerBridge.mm */; }; 3CCB8744286A593700771BAD /* ConversionUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CCB873E286A593700771BAD /* ConversionUtils.mm */; }; 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */; }; + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */; }; + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */; }; 3CE868F42946D76200FCB92B /* CommissionableDataProviderImpl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */; }; 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3CF8532628E37F1000F07B9F /* MatterError.mm */; }; /* End PBXBuildFile section */ @@ -62,6 +64,8 @@ 3CCB873D286A593700771BAD /* CastingServerBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CastingServerBridge.mm; sourceTree = ""; }; 3CCB873E286A593700771BAD /* ConversionUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConversionUtils.mm; sourceTree = ""; }; 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissionerDiscoveryDelegateImpl.h; sourceTree = ""; }; + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommissioningCallbackHandlers.h; sourceTree = ""; }; + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommissioningCallbackHandlers.m; sourceTree = ""; }; 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CommissionableDataProviderImpl.mm; sourceTree = ""; }; 3CF8532528E37ED800F07B9F /* MatterError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatterError.h; sourceTree = ""; }; 3CF8532628E37F1000F07B9F /* MatterError.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MatterError.mm; sourceTree = ""; }; @@ -131,6 +135,8 @@ 3C0D9CDF2920A30C00D3332B /* CommissionableDataProviderImpl.hpp */, 3CE868F32946D76200FCB92B /* CommissionableDataProviderImpl.mm */, 3CD6D019298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h */, + 3CE5ECCD2A673B30007CF331 /* CommissioningCallbackHandlers.h */, + 3CE5ECCF2A673E2C007CF331 /* CommissioningCallbackHandlers.m */, ); path = MatterTvCastingBridge; sourceTree = ""; @@ -145,6 +151,7 @@ 3CD6D01A298CDA2100D7569A /* CommissionerDiscoveryDelegateImpl.h in Headers */, 3C26AC8C2926FE0C00BA6881 /* DeviceAttestationCredentialsProviderImpl.hpp in Headers */, 3CCB8740286A593700771BAD /* CastingServerBridge.h in Headers */, + 3CE5ECCE2A673B30007CF331 /* CommissioningCallbackHandlers.h in Headers */, 3CCB8742286A593700771BAD /* ConversionUtils.hpp in Headers */, 3CCB8741286A593700771BAD /* DiscoveredNodeData.h in Headers */, 3CCB87212869085400771BAD /* MatterTvCastingBridge.h in Headers */, @@ -249,6 +256,7 @@ files = ( 3CCB8743286A593700771BAD /* CastingServerBridge.mm in Sources */, 3C4E53B228E5184C00F293E8 /* TargetNavigatorTypes.mm in Sources */, + 3CE5ECD02A673E2C007CF331 /* CommissioningCallbackHandlers.m in Sources */, 3CF8532728E37F1000F07B9F /* MatterError.mm in Sources */, 3C4E53B628E5595A00F293E8 /* ContentLauncherTypes.mm in Sources */, 3C81C75028F7A7D3001CB9D1 /* VideoPlayer.m in Sources */, @@ -419,9 +427,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; @@ -502,9 +507,6 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", - /* Compile time codegen would need this: - "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", - */ "$(CHIP_ROOT)/zzz_generated/app-common", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index d90e4db486156b..2489f982fb0645 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -16,6 +16,7 @@ */ #import "AppParameters.h" +#import "CommissioningCallbackHandlers.h" #import "ContentApp.h" #import "ContentLauncherTypes.h" #import "DiscoveredNodeData.h" @@ -109,8 +110,7 @@ @param clientQueue Queue to dispatch the call to the commissioningWindowRequestedHandler on - @param commissioningCompleteCallback Callback for when commissioning of this app has been completed via a call to the general - commissioning cluster (by usually an on-network TV/Media device acting as a Matter commissioner) + @param commissioningCallbackHandlers Optional parameter to specific handlers for callbacks during commissioning @param onConnectionSuccessCallback Handles a VideoPlayer * once connection is successfully established @@ -118,15 +118,12 @@ @param onNewOrUpdatedEndpointCallback Handles a ContentApp * for each new ContentApp is found. May be called multiple times based on the number of ContentApp - - @param commissioningWindowRequestedHandler Handler to call on requesting the opening of a commissioning window */ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback; /*! @brief Gets the list of VideoPlayers currently connected diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index 50c2467b85be3f..3f4dbce0700bb7 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -565,24 +565,89 @@ - (OnboardingPayload *)getOnboardingPayload } - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue - commissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler - commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback - onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback - onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback - onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback + commissioningCallbackHandlers:(CommissioningCallbackHandlers * _Nullable)commissioningCallbackHandlers + onConnectionSuccessCallback:(void (^_Nonnull)(VideoPlayer * _Nonnull))onConnectionSuccessCallback + onConnectionFailureCallback:(void (^_Nonnull)(MatterError * _Nonnull))onConnectionFailureCallback + onNewOrUpdatedEndpointCallback:(void (^_Nonnull)(ContentApp * _Nonnull))onNewOrUpdatedEndpointCallback { [self dispatchOnMatterSDKQueue:@"openBasicCommissioningWindow(...)" block:^{ + CommissioningCallbacks commissioningCallbacks; + if (commissioningCallbackHandlers != nil) { + if (commissioningCallbackHandlers.commissioningCompleteCallback != nil) { + commissioningCallbacks.commissioningComplete = [clientQueue, commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description: + @"openBasicCommissioningWindow(...) commissioningCompleteCallback" + block:^{ + commissioningCallbackHandlers.commissioningCompleteCallback( + CHIP_NO_ERROR == err); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStartedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStarted + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStartedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStartedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishedCallback != nil) { + commissioningCallbacks.sessionEstablished = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) sessionEstablishedCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishedCallback(); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentErrorCallback != nil) { + commissioningCallbacks.sessionEstablishmentError = [clientQueue, + commissioningCallbackHandlers]( + CHIP_ERROR err) { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentErrorCallback" + block:^{ + commissioningCallbackHandlers.sessionEstablishmentErrorCallback( + [[MatterError alloc] + initWithCode:err.AsInteger() + message:[NSString + stringWithUTF8String:err.AsString()]]); + }]; + }; + } + + if (commissioningCallbackHandlers.sessionEstablishmentStoppedCallback != nil) { + commissioningCallbacks.sessionEstablishmentStopped + = [clientQueue, commissioningCallbackHandlers]() { + [[CastingServerBridge getSharedInstance] + dispatchOnClientQueue:clientQueue + description:@"openBasicCommissioningWindow(...) " + @"sessionEstablishmentStoppedCallback" + block:^{ + commissioningCallbackHandlers + .sessionEstablishmentStoppedCallback(); + }]; + }; + } + } CHIP_ERROR err = CastingServer::GetInstance()->OpenBasicCommissioningWindow( - [clientQueue, commissioningCompleteCallback](CHIP_ERROR err) { - [[CastingServerBridge getSharedInstance] - dispatchOnClientQueue:clientQueue - description:@"openBasicCommissioningWindow(...) commissioningCompleteCallback" - block:^{ - commissioningCompleteCallback(CHIP_NO_ERROR == err); - }]; - }, + commissioningCallbacks, [clientQueue, onConnectionSuccessCallback](TargetVideoPlayerInfo * cppTargetVideoPlayerInfo) { VideoPlayer * videoPlayer = [ConversionUtils convertToObjCVideoPlayerFrom:cppTargetVideoPlayerInfo]; @@ -614,10 +679,13 @@ - (void)openBasicCommissioningWindow:(dispatch_queue_t _Nonnull)clientQueue }]; }); - dispatch_async(clientQueue, ^{ - ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); - commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); - }); + if (commissioningCallbackHandlers != nil + && commissioningCallbackHandlers.commissioningWindowRequestedHandler != nil) { + dispatch_async(clientQueue, ^{ + ChipLogProgress(AppServer, "[async] Dispatching commissioningWindowRequestedHandler"); + commissioningCallbackHandlers.commissioningWindowRequestedHandler(CHIP_NO_ERROR == err); + }); + } }]; } @@ -750,6 +818,9 @@ - (void)startMatterServer:(dispatch_queue_t _Nonnull)clientQueue return; } + // Initialize AppDelegation + CastingServer::GetInstance()->InitAppDelegation(); + // Initialize binding handlers err = CastingServer::GetInstance()->InitBindingHandlers(); if (err != CHIP_NO_ERROR) { diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h new file mode 100644 index 00000000000000..14288d7ffd6234 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.h @@ -0,0 +1,70 @@ +/** + * + * Copyright (c) 2023 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. + */ + +#import "MatterError.h" +#import + +#ifndef CommissioningCallbacksHandlers_h +#define CommissioningCallbacksHandlers_h + +@interface CommissioningCallbackHandlers : NSObject + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback; + +/** + * This is called when request to open the commissioning window has been made. + */ +@property void (^_Nullable commissioningWindowRequestedHandler)(bool); + +/** + * This is called when the commissioning has been completed + */ +@property void (^_Nullable commissioningCompleteCallback)(bool); + +/** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ +@property void (^_Nullable sessionEstablishmentStartedCallback)(void); + +/** + * This is called when the commissioning session has been established + */ +@property void (^_Nullable sessionEstablishedCallback)(void); + +/** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner). The error param indicates the error that + * occurred during session establishment or the error accompanying the fail-safe timeout. + */ +@property void (^_Nullable sessionEstablishmentErrorCallback)(MatterError * _Nonnull); + +/** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ +@property void (^_Nullable sessionEstablishmentStoppedCallback)(void); + +@end + +#endif /* CommissioningCallbacksHandlers_h */ diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m new file mode 100644 index 00000000000000..be79d40793c4c2 --- /dev/null +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CommissioningCallbackHandlers.m @@ -0,0 +1,42 @@ +/** + * + * Copyright (c) 2023 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. + */ + +#import "CommissioningCallbackHandlers.h" + +@implementation CommissioningCallbackHandlers + +- (CommissioningCallbackHandlers * _Nonnull) + initWithCommissioningWindowRequestedHandler:(void (^_Nonnull)(bool))commissioningWindowRequestedHandler + commissioningCompleteCallback:(void (^_Nonnull)(bool))commissioningCompleteCallback + sessionEstablishmentStartedCallback:(void (^_Nullable)(void))sessionEstablishmentStartedCallback + sessionEstablishedCallback:(void (^_Nullable)(void))sessionEstablishedCallback + sessionEstablishmentErrorCallback:(void (^_Nullable)(MatterError * _Nonnull))sessionEstablishmentErrorCallback + sessionEstablishmentStoppedCallback:(void (^_Nullable)(void))sessionEstablishmentStoppedCallback +{ + self = [super init]; + if (self) { + _commissioningWindowRequestedHandler = commissioningWindowRequestedHandler; + _commissioningCompleteCallback = commissioningCompleteCallback; + _sessionEstablishmentStartedCallback = sessionEstablishmentStartedCallback; + _sessionEstablishedCallback = sessionEstablishedCallback; + _sessionEstablishmentErrorCallback = sessionEstablishmentErrorCallback; + _sessionEstablishmentStoppedCallback = sessionEstablishmentStoppedCallback; + } + return self; +} + +@end diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift index a0d41633a750fa..ec0c542d942e38 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/CommissioningViewModel.swift @@ -58,17 +58,32 @@ class CommissioningViewModel: ObservableObject { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.openBasicCommissioningWindow(DispatchQueue.main, - commissioningWindowRequestedHandler: { (result: Bool) -> () in - DispatchQueue.main.async { - self.commisisoningWindowOpened = result + commissioningCallbackHandlers: CommissioningCallbackHandlers( + commissioningWindowRequestedHandler: { (result: Bool) -> () in + DispatchQueue.main.async { + self.Log.info("Commissioning Window opening status: \(result)") + self.commisisoningWindowOpened = result + } + }, + commissioningCompleteCallback: { (result: Bool) -> () in + self.Log.info("Commissioning status: \(result)") + DispatchQueue.main.async { + self.commisisoningComplete = result + } + }, + sessionEstablishmentStartedCallback: { + self.Log.info("PASE session establishment started") + }, + sessionEstablishedCallback: { + self.Log.info("PASE session established") + }, + sessionEstablishmentErrorCallback: { (err: MatterError) -> () in + self.Log.info("PASE session establishment error : \(err)") + }, + sessionEstablishmentStoppedCallback: { + self.Log.info("PASE session establishment stopped") } - }, - commissioningCompleteCallback: { (result: Bool) -> () in - self.Log.info("Commissioning status: \(result)") - DispatchQueue.main.async { - self.commisisoningComplete = result - } - }, + ), onConnectionSuccessCallback: { (videoPlayer: VideoPlayer) -> () in DispatchQueue.main.async { self.connectionSuccess = true @@ -92,7 +107,7 @@ class CommissioningViewModel: ObservableObject { } - private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { + private func sendUserDirectedCommissioningRequest(selectedCommissioner: DiscoveredNodeData?) { if let castingServerBridge = CastingServerBridge.getSharedInstance() { castingServerBridge.sendUserDirectedCommissioningRequest(selectedCommissioner!, clientQueue: DispatchQueue.main, udcRequestSentHandler: { (result: Bool) -> () in diff --git a/examples/tv-casting-app/linux/CastingUtils.cpp b/examples/tv-casting-app/linux/CastingUtils.cpp index 5e15a2e30e3e17..dca65f54d741b3 100644 --- a/examples/tv-casting-app/linux/CastingUtils.cpp +++ b/examples/tv-casting-app/linux/CastingUtils.cpp @@ -18,6 +18,8 @@ #include "CastingUtils.h" +#include "CommissioningCallbacks.h" + using namespace chip; using namespace chip::System; using namespace chip::DeviceLayer; @@ -62,8 +64,10 @@ void PrepareForCommissioning(const Dnssd::DiscoveredNodeData * selectedCommissio { CastingServer::GetInstance()->Init(); - CastingServer::GetInstance()->OpenBasicCommissioningWindow(HandleCommissioningCompleteCallback, OnConnectionSuccess, - OnConnectionFailure, OnNewOrUpdatedEndpoint); + CommissioningCallbacks commissioningCallbacks; + commissioningCallbacks.commissioningComplete = HandleCommissioningCompleteCallback; + CastingServer::GetInstance()->OpenBasicCommissioningWindow(commissioningCallbacks, OnConnectionSuccess, OnConnectionFailure, + OnNewOrUpdatedEndpoint); // Display onboarding payload chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig(); diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index b24fe0fa0ec1c8..fd427afc712639 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -22,6 +22,7 @@ #include "ApplicationBasic.h" #include "ApplicationLauncher.h" #include "Channel.h" +#include "CommissioningCallbacks.h" #include "ContentLauncher.h" #include "KeypadInput.h" #include "LevelControl.h" @@ -33,6 +34,7 @@ #include "TargetVideoPlayerInfo.h" #include +#include #include #include #include @@ -45,7 +47,7 @@ constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = chip::Sys * and then have it send TV Casting/Media related commands. This is to be instantiated * as a singleton and is to be used across Linux, Android and iOS. */ -class CastingServer +class CastingServer : public AppDelegate { public: CastingServer(CastingServer & other) = delete; @@ -55,11 +57,12 @@ class CastingServer CHIP_ERROR PreInit(AppParams * AppParams = nullptr); CHIP_ERROR Init(AppParams * AppParams = nullptr); CHIP_ERROR InitBindingHandlers(); + void InitAppDelegation(); CHIP_ERROR DiscoverCommissioners(chip::Controller::DeviceDiscoveryDelegate * deviceDiscoveryDelegate = nullptr); const chip::Dnssd::DiscoveredNodeData * GetDiscoveredCommissioner(int index, chip::Optional & outAssociatedConnectableVideoPlayer); - CHIP_ERROR OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, + CHIP_ERROR OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint); @@ -429,6 +432,13 @@ class CastingServer static void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); void ReadServerClusters(chip::EndpointId endpointId); + void OnCommissioningSessionEstablishmentStarted() override; + void OnCommissioningSessionStarted() override; + void OnCommissioningSessionEstablishmentError(CHIP_ERROR err) override; + void OnCommissioningSessionStopped() override; + void OnCommissioningWindowOpened() override {} + void OnCommissioningWindowClosed() override {} + /** * @brief Retrieve the IP Address to use for the UDC request. * This function will look for an IPv4 address in the list of IPAddresses passed in if available and return @@ -456,7 +466,8 @@ class CastingServer chip::Inet::IPAddress mTargetVideoPlayerIpAddress[chip::Dnssd::CommonResolutionData::kMaxIPAddresses]; chip::Controller::CommissionableNodeController mCommissionableNodeController; - std::function mCommissioningCompleteCallback; + + CommissioningCallbacks mCommissioningCallbacks; std::function mOnNewOrUpdatedEndpoint; std::function mOnConnectionSuccessClientCallback; diff --git a/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h new file mode 100644 index 00000000000000..06d31eb2b50253 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/CommissioningCallbacks.h @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#pragma once + +struct CommissioningCallbacks +{ + /** + * This is called when the PBKDFParamRequest is received and indicates the start of the session establishment process + */ + std::function sessionEstablishmentStarted = {}; + + /** + * This is called when the commissioning session has been established + */ + std::function sessionEstablished = {}; + + /** + * This is called when the PASE establishment failed (such as, when an invalid passcode is provided) or PASE was established + * fine but then the fail-safe expired (including being expired by the commissioner) + * + * The CHIP_ERROR param indicates the error that occurred during session establishment or the error accompanying the fail-safe + * timeout. + */ + std::function sessionEstablishmentError = {}; + + /** + * This is called when the PASE establishment failed or PASE was established fine but then the fail-safe expired (including + * being expired by the commissioner) AND the commissioning window is closed. The window may be closed because the commissioning + * attempts limit was reached or advertising/listening for PASE failed. + */ + std::function sessionEstablishmentStopped = {}; + + /** + * This is called when the commissioning has been completed + */ + std::function commissioningComplete = {}; +}; diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 076149f786ed52..bbc086ae64a52d 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -110,7 +110,6 @@ class TargetVideoPlayerInfo static void HandleDeviceConnected(void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { - ChipLogProgress(AppServer, "tmplog: HandleDeviceConnected called"); VideoPlayerConnectionContext * connectionContext = static_cast(context); if (connectionContext == nullptr || connectionContext->mTargetVideoPlayerInfo == nullptr) { diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 313a6dc2e6a6d0..1d40cb500c287e 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -54,6 +54,9 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } + // Set CastingServer as AppDelegate + InitAppDelegation(); + // Initialize binding handlers ReturnErrorOnFailure(InitBindingHandlers()); @@ -67,6 +70,11 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } +void CastingServer::InitAppDelegation() +{ + chip::Server::Server::GetInstance().GetCommissioningWindowManager().SetAppDelegate(this); +} + CHIP_ERROR CastingServer::SetRotatingDeviceIdUniqueId(chip::Optional rotatingDeviceIdUniqueIdOptional) { #if CHIP_ENABLE_ROTATING_DEVICE_ID @@ -130,18 +138,55 @@ CHIP_ERROR CastingServer::DiscoverCommissioners(DeviceDiscoveryDelegate * device Dnssd::DiscoveryFilter(Dnssd::DiscoveryFilterType::kDeviceType, static_cast(35))); } -CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(std::function commissioningCompleteCallback, +CHIP_ERROR CastingServer::OpenBasicCommissioningWindow(CommissioningCallbacks commissioningCallbacks, std::function onConnectionSuccess, std::function onConnectionFailure, std::function onNewOrUpdatedEndpoint) { - mCommissioningCompleteCallback = commissioningCompleteCallback; + mCommissioningCallbacks = commissioningCallbacks; mOnConnectionSuccessClientCallback = onConnectionSuccess; mOnConnectionFailureClientCallback = onConnectionFailure; mOnNewOrUpdatedEndpoint = onNewOrUpdatedEndpoint; return Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(kCommissioningWindowTimeout); } +void CastingServer::OnCommissioningSessionStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStarted"); + if (mCommissioningCallbacks.sessionEstablished) + { + + mCommissioningCallbacks.sessionEstablished(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentError(CHIP_ERROR err) +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentError"); + if (mCommissioningCallbacks.sessionEstablishmentError) + { + mCommissioningCallbacks.sessionEstablishmentError(err); + } +} + +void CastingServer::OnCommissioningSessionStopped() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionStopped"); + if (mCommissioningCallbacks.sessionEstablishmentStopped) + { + mCommissioningCallbacks.sessionEstablishmentStopped(); + } +} + +void CastingServer::OnCommissioningSessionEstablishmentStarted() +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissioningSessionEstablishmentStarted"); + if (mCommissioningCallbacks.sessionEstablishmentStarted) + { + mCommissioningCallbacks.sessionEstablishmentStarted(); + } +} + #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) { @@ -433,7 +478,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve { ChipLogError(AppServer, "CastingServer::DeviceEventCallback accessingFabricIndex: %d did not match bindings", event->BindingsChanged.fabricIndex); - CastingServer::GetInstance()->mCommissioningCompleteCallback(CHIP_ERROR_INCORRECT_STATE); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(CHIP_ERROR_INCORRECT_STATE); + } return; } } @@ -472,7 +520,10 @@ void CastingServer::DeviceEventCallback(const DeviceLayer::ChipDeviceEvent * eve ChipLogError(AppServer, "AddVideoPlayer(ToCache) error: %" CHIP_ERROR_FORMAT, err.Format()); } - CastingServer::GetInstance()->mCommissioningCompleteCallback(err); + if (CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete) + { + CastingServer::GetInstance()->mCommissioningCallbacks.commissioningComplete(err); + } } } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 2fa6d8631192ed..cdbf91567fd29b 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1272,6 +1272,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; @@ -2236,7 +2240,6 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; @@ -2246,7 +2249,6 @@ endpoint 1 { callback attribute binding; callback attribute generatedCommandList; callback attribute acceptedCommandList; - callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index eff8d93dd239ef..8d2b798ea7abbf 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -2453,7 +2453,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3982,7 +3982,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7793,7 +7793,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8231,7 +8231,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8559,7 +8559,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8723,7 +8723,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12953,7 +12953,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13175,7 +13175,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13375,7 +13375,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13735,7 +13735,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13949,7 +13949,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14107,7 +14107,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14275,7 +14275,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14473,7 +14473,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14671,7 +14671,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14887,7 +14887,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15163,7 +15163,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15347,7 +15347,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15429,5 +15429,6 @@ "endpointVersion": 1, "deviceIdentifier": 41 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml index a57ddde21a56eb..b971d9fb375a99 100644 --- a/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml +++ b/examples/virtual-device-app/android/App/app/src/main/AndroidManifest.xml @@ -5,6 +5,7 @@ + + \ 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 1a84f4a6840cd2..78e6649de44b43 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 @@ -18,4 +18,12 @@ object DeepLink { ) .build() } + + fun getDeepLinkRequestForLoadingFragment(setting: String): NavDeepLinkRequest { + return NavDeepLinkRequest.Builder.fromUri( + "android-app://com.matter.virtual.device.app.feature.main/loadingFragment/${setting}" + .toUri() + ) + .build() + } } diff --git a/examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_background.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_background.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_foreground.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_foreground.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/drawable/ic_launcher_foreground.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/drawable/ic_launcher_foreground.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from examples/virtual-device-app/android/App/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to examples/virtual-device-app/android/App/core/common/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt index 19d73cced0f04b..3b38261bf85496 100644 --- a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterApp.kt @@ -45,4 +45,8 @@ class MatterApp @Inject constructor() { fun stop() { chipAppServer?.stopApp() } + + fun reset() { + chipAppServer?.resetApp() + } } diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt new file mode 100644 index 00000000000000..0bcbee73e5fcd2 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppService.kt @@ -0,0 +1,92 @@ +package com.matter.virtual.device.app.core.matter + +import android.app.Notification +import android.app.NotificationChannel +import android.app.NotificationManager +import android.app.Service +import android.content.Intent +import android.os.Build +import android.os.IBinder +import androidx.core.app.NotificationCompat +import dagger.hilt.android.AndroidEntryPoint +import timber.log.Timber + +@AndroidEntryPoint +class MatterAppService : Service() { + + override fun onCreate() { + super.onCreate() + Timber.d("onCreate()") + } + + override fun onDestroy() { + super.onDestroy() + Timber.d("onDestroy()") + } + + override fun onBind(intent: Intent?): IBinder? { + Timber.d("onBind()") + return null + } + + override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { + Timber.d("Hit") + + intent?.let { + when (it.action) { + MatterAppServiceConstants.ACTION_START_MATTER_APP_SERVICE -> { + Timber.i("Start matter app service") + startService() + } + MatterAppServiceConstants.ACTION_STOP_MATTER_APP_SERVICE -> { + Timber.i("Stop matter app service") + stopService() + } + else -> {} + } + } + + return START_REDELIVER_INTENT + } + + private fun createNotificationChannel() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + val notificationChannel = + NotificationChannel( + MatterAppServiceConstants.NOTIFICATION_CHANNEL_ID, + MatterAppServiceConstants.NOTIFICATION_CHANNEL_NAME, + NotificationManager.IMPORTANCE_DEFAULT + ) + + val manager = getSystemService(NotificationManager::class.java) + manager?.createNotificationChannel(notificationChannel) + } + } + + private fun cancelNotificationChannel() { + val manager = getSystemService(NotificationManager::class.java) + manager?.cancel(MatterAppServiceConstants.NOTIFICATION_FOREGROUND_ID) + } + + private fun startService() { + Timber.d("Hit") + + createNotificationChannel() + + val notification: Notification = + NotificationCompat.Builder(this, MatterAppServiceConstants.NOTIFICATION_CHANNEL_ID) + .setContentTitle("MatterApp Service") + .setContentText("MatterApp is running") + .setSmallIcon(R.mipmap.ic_launcher) + .build() + + startForeground(MatterAppServiceConstants.NOTIFICATION_FOREGROUND_ID, notification) + } + + private fun stopService() { + Timber.d("Hit") + cancelNotificationChannel() + stopForeground(true) + stopSelf() + } +} diff --git a/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt new file mode 100644 index 00000000000000..bcee27164c17de --- /dev/null +++ b/examples/virtual-device-app/android/App/core/matter/src/main/java/com/matter/virtual/device/app/core/matter/MatterAppServiceConstants.kt @@ -0,0 +1,10 @@ +package com.matter.virtual.device.app.core.matter + +object MatterAppServiceConstants { + const val ACTION_START_MATTER_APP_SERVICE = "ACTION_START_MATTER_APP_SERVICE" + const val ACTION_STOP_MATTER_APP_SERVICE = "ACTION_STOP_MATTER_APP_SERVICE" + + const val NOTIFICATION_CHANNEL_ID = "VIRTUAL_DEVICE" + const val NOTIFICATION_FOREGROUND_ID = 1 + const val NOTIFICATION_CHANNEL_NAME = "Matter App" +} diff --git a/examples/virtual-device-app/android/App/feature/control/.gitignore b/examples/virtual-device-app/android/App/feature/control/.gitignore new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/examples/virtual-device-app/android/App/feature/control/build.gradle.kts b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts new file mode 100644 index 00000000000000..a9315f089d25ed --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/build.gradle.kts @@ -0,0 +1,63 @@ +import com.matter.buildsrc.Deps +import com.matter.buildsrc.Versions + +plugins { + id("com.android.library") + id("org.jetbrains.kotlin.android") + id("com.google.dagger.hilt.android") + id("androidx.navigation.safeargs.kotlin") + kotlin("kapt") +} + +android { + namespace = "com.matter.virtual.device.app.feature.control" + compileSdk = Versions.compileSdkVersion + + defaultConfig { + minSdk = Versions.minSdkVersion + targetSdk = Versions.targetSdkVersion + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + dataBinding = true + } +} + +dependencies { + + implementation(Deps.AndroidX.core) + implementation(Deps.AndroidX.appcompat) + implementation(Deps.AndroidX.fragment) + + implementation(Deps.Navigation.fragment) + implementation(Deps.Navigation.ui) + + implementation(Deps.Dagger.hiltAndroid) + kapt(Deps.Dagger.hiltAndroidCompiler) + + implementation(Deps.timber) + + testImplementation(Deps.Test.junit) + androidTestImplementation(Deps.Test.junitExt) + androidTestImplementation(Deps.Test.espresso) +} \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro new file mode 100644 index 00000000000000..481bb434814107 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt new file mode 100644 index 00000000000000..026c8837f4b6ec --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/androidTest/java/com/matter/virtual/device/app/feature/control/ExampleInstrumentedTest.kt @@ -0,0 +1,22 @@ +package com.matter.virtual.device.app.feature.control + +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.* +import org.junit.Test +import org.junit.runner.RunWith + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.matter.virtual.device.app.feature.control.test", appContext.packageName) + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml new file mode 100644 index 00000000000000..a5918e68abcdde --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt new file mode 100644 index 00000000000000..5f89d07467ed5f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/java/com/matter/virtual/device/app/feature/control/OnOffSwitchFragment.kt @@ -0,0 +1,44 @@ +package com.matter.virtual.device.app.feature.control + +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import com.matter.virtual.device.app.feature.control.databinding.FragmentOnOffSwitchBinding +import dagger.hilt.android.AndroidEntryPoint +import timber.log.Timber + +@AndroidEntryPoint +class OnOffSwitchFragment : Fragment() { + + private lateinit var binding: FragmentOnOffSwitchBinding + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("onCreateView()") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_on_off_switch, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("onViewCreated()") + super.onViewCreated(view, savedInstanceState) + } + + override fun onResume() { + Timber.d("onResume()") + super.onResume() + } + + override fun onDestroy() { + Timber.d("onDestroy()") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml new file mode 100644 index 00000000000000..35d548cddf3cc8 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/layout/fragment_on_off_switch.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml new file mode 100644 index 00000000000000..def2abe07888fe --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/main/res/navigation/control_nav_graph.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt new file mode 100644 index 00000000000000..0aabc46fdb7aa0 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/control/src/test/java/com/matter/virtual/device/app/feature/control/ExampleUnitTest.kt @@ -0,0 +1,16 @@ +package com.matter.virtual.device.app.feature.control + +import org.junit.Assert.* +import org.junit.Test + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt new file mode 100644 index 00000000000000..8c81bd26429433 --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/LoadingFragment.kt @@ -0,0 +1,95 @@ +package com.matter.virtual.device.app.feature.main + +import android.content.Context +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.activity.OnBackPressedCallback +import androidx.appcompat.app.AppCompatActivity +import androidx.databinding.DataBindingUtil +import androidx.fragment.app.Fragment +import androidx.navigation.fragment.findNavController +import androidx.navigation.fragment.navArgs +import com.matter.virtual.device.app.core.common.MatterSettings +import com.matter.virtual.device.app.feature.main.databinding.FragmentLoadingBinding +import dagger.hilt.android.AndroidEntryPoint +import kotlin.math.abs +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.decodeFromString +import kotlinx.serialization.json.Json +import timber.log.Timber + +@AndroidEntryPoint +class LoadingFragment : Fragment() { + + private lateinit var binding: FragmentLoadingBinding + + private lateinit var matterSettings: MatterSettings + private lateinit var onBackPressedCallback: OnBackPressedCallback + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + Timber.d("Hit") + binding = DataBindingUtil.inflate(inflater, R.layout.fragment_loading, container, false) + binding.lifecycleOwner = viewLifecycleOwner + + return binding.root + } + + @OptIn(ExperimentalSerializationApi::class) + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + Timber.d("Hit") + super.onViewCreated(view, savedInstanceState) + + (activity as AppCompatActivity).setSupportActionBar(binding.toolbar) + (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true) + + binding.appBarLayout.addOnOffsetChangedListener { appBarLayout, verticalOffset -> + var ratio = 0F + if (abs(verticalOffset) != 0) { + ratio = abs(verticalOffset).toFloat() / appBarLayout.totalScrollRange.toFloat() + } + + binding.collapseTitle.alpha = 1f - ratio * 2f + 0.1f + binding.toolbarTitle.alpha = (ratio - 0.5f) * 2f + 0.1f + } + + val args: LoadingFragmentArgs by navArgs() + this.matterSettings = Json.decodeFromString(args.setting) + } + + override fun onResume() { + Timber.d("Hit") + super.onResume() + } + + override fun onAttach(context: Context) { + Timber.d("Hit") + super.onAttach(context) + + onBackPressedCallback = + object : OnBackPressedCallback(true) { + override fun handleOnBackPressed() { + Timber.d("handleOnBackPressed()") + findNavController().popBackStack() + } + } + + requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressedCallback) + } + + override fun onDetach() { + Timber.d("Hit") + super.onDetach() + onBackPressedCallback.remove() + } + + override fun onDestroy() { + Timber.d("Hit") + super.onDestroy() + } +} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml new file mode 100644 index 00000000000000..852207c49e1b6f --- /dev/null +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/fragment_loading.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml index c3f66c3f7c5bbe..81cbc65fbec062 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/navigation/main_nav_graph.xml @@ -10,4 +10,15 @@ android:name="com.matter.virtual.device.app.feature.main.MainFragment" android:label="MainFragment" tools:layout="@layout/fragment_main" /> + + + + + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml index 22caae70477e41..23e5916e74f482 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/values/strings.xml @@ -1,4 +1,6 @@ Matter Virtual Device + Loading + Commissioning in process. \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/settings.gradle.kts b/examples/virtual-device-app/android/App/settings.gradle.kts index 0ae5b79223eba3..78cbf5ec8af59d 100644 --- a/examples/virtual-device-app/android/App/settings.gradle.kts +++ b/examples/virtual-device-app/android/App/settings.gradle.kts @@ -19,6 +19,7 @@ include(":core:data") include(":core:domain") include(":core:matter") include(":core:model") +include(":feature:control") include(":feature:main") include(":feature:qrcode") include(":feature:setup") diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 280eac184ac8c5..ceb3526d73d508 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1498,6 +1498,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 939b94dae34954..8b7302ca6b3172 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -7699,7 +7699,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8627,7 +8627,7 @@ "side": "server", "type": "array", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index b6a03dc6d91d13..7b2840b18cf469 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1692,6 +1692,10 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index ca5e685bad2d7e..8c4fcc8066c736 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { diff --git a/examples/window-app/silabs/BUILD.gn b/examples/window-app/silabs/BUILD.gn index e5c33fdbdeab9e..cc6f916712d233 100644 --- a/examples/window-app/silabs/BUILD.gn +++ b/examples/window-app/silabs/BUILD.gn @@ -53,7 +53,7 @@ declare_args() { if (wifi_soc) { siwx917_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -76,7 +76,7 @@ if (wifi_soc) { } else { efr32_sdk("sdk") { sources = [ - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", "${silabs_project_dir}/include/CHIPProjectConfig.h", ] @@ -134,7 +134,7 @@ silabs_executable("window_app") { } else { deps += [ "${examples_plat_dir}:efr32-common" ] } - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/examples/window-app/silabs/README.md b/examples/window-app/silabs/README.md index 6152acb87a5503..a7555003b8dc93 100644 --- a/examples/window-app/silabs/README.md +++ b/examples/window-app/silabs/README.md @@ -120,9 +120,9 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ rm -rf out/ -* Build the example as Sleepy End Device (SED) +* Build the example as Intermittently Connected Device (ICD) - $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_SED BRD4187C --sed + $ ./scripts/examples/gn_silabs_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_ICD BRD4187C --icd or use gn as previously mentioned but adding the following arguments: diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 82031d7d8ca77c..a1a8a1832d8726 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -85,7 +85,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index d725de837b0fb2..eeb87bd3821b17 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -27,7 +27,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index a745ee172004cc..9d5a85f5f4acab 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -43,7 +43,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -64,7 +64,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -86,7 +86,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -139,7 +139,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:1" + - name: "ghcr.io/project-chip/chip-build-vscode:2" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/integrations/docker/images/base/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile index 60f8cd9a1e015a..a3c4e23fb11210 100644 --- a/integrations/docker/images/base/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -41,7 +41,7 @@ RUN set -x \ clang-tidy \ curl \ flex \ - g++ \ + g++-10 \ git \ git-lfs \ gperf \ @@ -98,6 +98,16 @@ RUN set -x \ && git lfs install \ && : # last line +# Set gcc 10 as a default compiler to work with TSAN +RUN set -x \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 \ + && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \ + && update-alternatives --set cc /usr/bin/gcc \ + && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \ + && update-alternatives --set c++ /usr/bin/g++ \ + && : # last line + # Cmake v3.23.1 ENV CMAKE_PLATFORM_VERSION= RUN case ${TARGETPLATFORM} in \ @@ -206,7 +216,7 @@ RUN case ${TARGETPLATFORM} in \ && export CCACHE_DISABLE=1 PYTHONDONTWRITEBYTECODE=1 \ && GLIB_VERSION=$(pkg-config --modversion glib-2.0) \ && git clone --depth=1 --branch=$GLIB_VERSION https://github.com/GNOME/glib.git \ - && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib \ + && CFLAGS="-O2 -g -fsanitize=thread" meson glib/build glib -Dtests=false \ && DESTDIR=../build-image ninja -C glib/build install \ && mv glib/build-image/usr/local/lib/x86_64-linux-gnu/lib* $LD_LIBRARY_PATH_TSAN \ && rm -rf glib \ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 6b5e738e874668..dfab429dbd9f0a 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -2 : Update esp-idf to v5.1 and remove few pinned package version +5 : Use west to download the K32W0 SDK diff --git a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile index 07f8118b5f004d..af659cb7a08e0c 100644 --- a/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-ameba/Dockerfile @@ -4,7 +4,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2023_06_28 +ARG TAG_NAME=ameba_update_2023_08_01 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile index 42e1dde62a56d9..dd629a9824c6ee 100644 --- a/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-k32w/Dockerfile @@ -11,15 +11,19 @@ RUN set -x \ && : # last line WORKDIR /opt/sdk -# Setup the K32W SDK + RUN set -x \ - && wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_11_K32W061DK6.zip \ - && unzip SDK_2_6_11_K32W061DK6.zip \ - && rm -rf SDK_2_6_11_K32W061DK6.zip \ + && python3 -m pip install -U --no-cache-dir west==1.0.0 \ + && west init -m https://github.com/nxp-mcuxpresso/mcux-sdk --mr "release/2.6.x_k32w0" \ + && west update \ + && chmod +x core/tools/imagetool/sign_images.sh \ + && ln -sf ../rtos core \ + && ln -sf ../middleware core \ + && cp -R examples/* core/boards && rm -rf examples \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} COPY --from=build /opt/sdk/ /opt/sdk/ -ENV NXP_K32W0_SDK_ROOT=/opt/sdk +ENV NXP_K32W0_SDK_ROOT=/opt/sdk/core diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh index f88129a6c94260..9e7b4a0fe8a6d6 100755 --- a/scripts/build_coverage.sh +++ b/scripts/build_coverage.sh @@ -119,7 +119,13 @@ if [ "$skip_gn" == false ]; then source "$CHIP_ROOT/scripts/activate.sh" # Generates ninja files - gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args='use_coverage=true chip_build_all_clusters_app=true' + EXTRA_GN_ARGS="" + if [[ "$TESTS" == "yaml" || "$TESTS" == "all" ]]; then + EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_all_clusters_app=true" + else + EXTRA_GN_ARGS="$EXTRA_GN_ARGS chip_build_tools=false" + fi + gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="use_coverage=true$EXTRA_GN_ARGS" ninja -C "$OUTPUT_ROOT" # Run unit tests diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index f966cebed9dd62..90adc9f9b9ed25 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -114,12 +114,12 @@ if [ "$#" == "0" ]; then siwx917_commissionable_data Build with the commissionable data given in DeviceConfig.h (only for SiWx917) Presets - --sed - enable sleepy end device, set thread mtd + --icd + enable ICD features, set thread mtd For minimum consumption, add --low-power --low-power disables all power consuming features for the most power efficient build - This flag is to be used with --sed + This flag is to be used with --icd --wifi build wifi example variant for given exansion board --additional_data_advertising @@ -181,7 +181,7 @@ else shift shift ;; - --sed) + --icd) optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " shift ;; diff --git a/scripts/py_matter_yamltests/matter_yamltests/hooks.py b/scripts/py_matter_yamltests/matter_yamltests/hooks.py index 6017dd68ad8f2f..b68ae35fd6ce94 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/hooks.py +++ b/scripts/py_matter_yamltests/matter_yamltests/hooks.py @@ -18,6 +18,8 @@ class TestParserHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the parser starts parsing a set of files. @@ -77,6 +79,8 @@ def test_success(self, duration: int): class TestRunnerHooks(): + __test__ = False + def start(self, count: int): """ This method is called when the runner starts running a set of tests. diff --git a/scripts/setup/constraints.txt b/scripts/setup/constraints.txt index 5573d0bc48221f..fa15e9d94ab800 100644 --- a/scripts/setup/constraints.txt +++ b/scripts/setup/constraints.txt @@ -248,7 +248,7 @@ pykwalify==1.8.0 # via west pylink-square==0.5.0 # via bflb-iot-tool -pyparsing==2.3.1 +pyparsing==3.0.9 # via -r requirements.esp32.txt pypng==0.0.21 # via -r requirements.telink.txt diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index f688b17b1a521b..d0d6d924ff8ddb 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -1,18 +1,15 @@ click>=7.0 future>=0.15.2 -pyparsing>=2.0.3,<2.4.0 +# pyparsing: Min version was set based on https://github.com/pyparsing/pyparsing/issues/319 +# pyparsing: Max version was set to avoid breaking changes +pyparsing>=3.0.3,<3.1 idf-component-manager pygdbmi<=0.9.0.2 reedsolo>=1.5.3,<=1.5.4 bitstring>=3.1.6,<4 ecdsa>=0.16.0 -kconfiglib==13.7.1 construct==2.10.54 python-socketio<5 itsdangerous<2.1 ; python_version < "3.11" -# -# gdbgui pulls in gevent which fails to compile due to cython updates. -# Could not find a good way to fix this dependency, so commenting it -# out here. -# -# gdbgui==0.13.2.0 ; python_version < "3.11" and platform_machine != 'aarch64' and sys_platform == 'linux' +esp_idf_monitor==1.1.1 +esp-idf-kconfig==1.2.0 diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 74901d88faf06b..95b8b0a56c4495 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,13 +8,13 @@ "mac-amd64", "windows-amd64" ], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] }, { "_comment": "Always get the amd64 version on mac until usable arm64 zap build is available", "path": "fuchsia/third_party/zap/mac-amd64", "platforms": ["mac-arm64"], - "tags": ["version:2@v2023.07.21-nightly.1"] + "tags": ["version:2@v2023.08.01-nightly.1"] } ] } diff --git a/scripts/setup/zap.version b/scripts/setup/zap.version index 543bb412a09ac6..ea7688be7708a5 100644 --- a/scripts/setup/zap.version +++ b/scripts/setup/zap.version @@ -1 +1 @@ -v2023.07.21-nightly +v2023.08.01-nightly diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 2b761d95684baf..4e5390495bdac5 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -138,6 +138,7 @@ def _GetInDevelopmentTests() -> Set[str]: "TestAttributesById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestCommandsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) "TestEventsById.yaml", # chip-repl does not support AnyCommands (06/06/2023) + "TestReadNoneSubscribeNone.yaml", # chip-repl does not support AnyCommands (07/27/2023) "Test_TC_DRLK_2_8.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27011#issuecomment-1593339855 "Test_TC_ACE_1_6.yaml", # Test fails only in chip-repl: Refer--> https://github.com/project-chip/connectedhomeip/pull/27910#issuecomment-1632485584 "Test_TC_PSCFG_1_1.yaml", # Power source configuration cluster is deprecated and removed from all-clusters diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index df044418b41a33..de1df2565556fc 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2753,7 +2753,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11575,7 +11575,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -22802,7 +22802,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 1793810e60e7aa..8f6ab7a34f2132 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -8309,5 +8309,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 6a07e8eb08a320..9db6537dc32e8d 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.7.20' +MIN_ZAP_VERSION = '2023.8.1' class ZapTool: diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 6c45055c3933b0..5c1bb50c179f47 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -141,6 +141,11 @@ void AttributePathExpandIterator::PrepareAttributeIndexRange(const AttributePath } mGlobalAttributeEndIndex = static_cast(mGlobalAttributeIndex + 1); } + else + { + mGlobalAttributeIndex = UINT8_MAX; + mGlobalAttributeEndIndex = 0; + } } } diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index adfc77cfe27830..b03153d71c2e2f 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -24,7 +24,9 @@ namespace chip { namespace app { +#if CHIP_CONFIG_ENABLE_READ_CLIENT class ReadClient; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT struct AttributePathParams { // diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 83ffe632da7684..f5a167ca7e7aff 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -42,7 +42,7 @@ declare_args() { # By default, the resources used by each fabric is unlimited if they are allocated on heap. This flag is for checking the resource usage even when they are allocated on heap to increase code coverage in integration tests. chip_im_force_fabric_quota_check = false - enable_eventlist_attribute = true + enable_eventlist_attribute = false } buildconfig_header("app_buildconfig") { @@ -58,6 +58,7 @@ buildconfig_header("app_buildconfig") { "CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION=${chip_subscription_timeout_resumption}", "CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE=${enable_eventlist_attribute}", "CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}", + "CHIP_CONFIG_ENABLE_READ_CLIENT=${chip_enable_read_client}", ] } @@ -76,7 +77,6 @@ static_library("app") { "AttributePathExpandIterator.h", "AttributePathParams.h", "AttributePersistenceProvider.h", - "BufferedReadCallback.cpp", "CASEClient.cpp", "CASEClient.h", "CASEClientPool.h", @@ -84,8 +84,6 @@ static_library("app") { "CASESessionManager.h", "ChunkedWriteCallback.cpp", "ChunkedWriteCallback.h", - "ClusterStateCache.cpp", - "ClusterStateCache.h", "CommandHandler.cpp", "CommandResponseHelper.h", "CommandSender.cpp", @@ -179,7 +177,6 @@ static_library("app") { "OperationalSessionSetup.cpp", "OperationalSessionSetup.h", "OperationalSessionSetupPool.h", - "ReadClient.cpp", "ReadHandler.cpp", "RequiredPrivilege.cpp", "RequiredPrivilege.h", @@ -210,10 +207,19 @@ static_library("app") { ] } + if (chip_enable_read_client) { + sources += [ + "BufferedReadCallback.cpp", + "ClusterStateCache.cpp", + "ClusterStateCache.h", + "ReadClient.cpp", + ] + } + public_deps = [ ":app_config", "${chip_root}/src/access", - "${chip_root}/src/app/icd:cluster-srcs", + "${chip_root}/src/app/icd:observer-srcs", "${chip_root}/src/lib/address_resolve", "${chip_root}/src/lib/support", "${chip_root}/src/messaging", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index 7779446f5a78fd..0616bb09958348 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -25,6 +25,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -133,3 +134,4 @@ class BufferedReadCallback : public ReadClient::Callback } // namespace app } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index e0d5d98d72a5ec..9e08abacde7768 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -33,6 +33,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { /* @@ -660,5 +661,6 @@ class ClusterStateCache : protected ReadClient::Callback const bool mCacheData = true; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index 29abc1f321a9bd..14ad098965f5e5 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -470,6 +470,21 @@ CHIP_ERROR CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, c return AddStatusInternal(aCommandPath, StatusIB(aStatus)); } +CHIP_ERROR CommandHandler::AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Status aStatus, + const char * aMessage) +{ + if (aStatus != Status::Success) + { + ChipLogError(DataManagement, + "Failed to handle on Endpoint=%u Cluster=" ChipLogFormatMEI " Command=" ChipLogFormatMEI + " with " ChipLogFormatIMStatus ": %s", + aCommandPath.mEndpointId, ChipLogValueMEI(aCommandPath.mClusterId), ChipLogValueMEI(aCommandPath.mCommandId), + ChipLogValueIMStatus(aStatus), aMessage); + } + + return AddStatus(aCommandPath, aStatus); +} + CHIP_ERROR CommandHandler::AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus) { return AddStatusInternal(aCommandPath, StatusIB(Status::Success, aClusterStatus)); diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index cc175a9a125cd8..e2d2f4a6f75e1e 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -172,6 +172,11 @@ class CommandHandler : public Messaging::ExchangeDelegate System::PacketBufferHandle && payload, bool isTimedInvoke); CHIP_ERROR AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus); + // Same as AddStatus, but logs that the command represented by aCommandPath failed with the given + // error status and error message, if aStatus is an error. + CHIP_ERROR AddStatusAndLogIfFailure(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, + const char * aMessage); + CHIP_ERROR AddClusterSpecificSuccess(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); CHIP_ERROR AddClusterSpecificFailure(const ConcreteCommandPath & aCommandPath, ClusterStatus aClusterStatus); diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 933b5a4c118254..23aaf9d85d03be 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -108,6 +108,7 @@ void InteractionModelEngine::Shutdown() mReadHandlers.ReleaseAll(); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Shut down any subscription clients that are still around. They won't be // able to work after this point anyway, since we're about to drop our refs // to them. @@ -134,6 +135,7 @@ void InteractionModelEngine::Shutdown() // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & writeHandler : mWriteHandlers) { @@ -254,6 +256,7 @@ uint32_t InteractionModelEngine::GetNumActiveWriteHandlers() const return numActive; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::ShutdownSubscription(const ScopedNodeId & aPeerNodeId, SubscriptionId aSubscriptionId) { assertChipStackLockedByCurrentThread(); @@ -311,6 +314,7 @@ void InteractionModelEngine::ShutdownMatchingSubscriptions(const OptionalOnMessageReceived(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload) { @@ -849,6 +854,7 @@ Status InteractionModelEngine::OnUnsolicitedReportData(Messaging::ExchangeContex return Status::InvalidSubscription; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT CHIP_ERROR InteractionModelEngine::OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, ExchangeDelegate *& newDelegate) @@ -892,10 +898,12 @@ CHIP_ERROR InteractionModelEngine::OnMessageReceived(Messaging::ExchangeContext status = OnReadInitialRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), ReadHandler::InteractionType::Subscribe); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(Protocols::InteractionModel::MsgType::ReportData)) { status = OnUnsolicitedReportData(apExchangeContext, aPayloadHeader, std::move(aPayload)); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT else if (aPayloadHeader.HasMessageType(MsgType::TimedRequest)) { OnTimedRequest(apExchangeContext, aPayloadHeader, std::move(aPayload), status); @@ -920,11 +928,13 @@ void InteractionModelEngine::OnResponseTimeout(Messaging::ExchangeContext * ec) ChipLogValueExchange(ec)); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::AddReadClient(ReadClient * apReadClient) { apReadClient->SetNextClient(mpActiveReadClientList); mpActiveReadClientList = apReadClient; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::TrimFabricForSubscriptions(FabricIndex aFabricIndex, bool aForceEvict) { @@ -1322,6 +1332,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea return Status::Success; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT void InteractionModelEngine::RemoveReadClient(ReadClient * apReadClient) { ReadClient * pPrevListItem = nullptr; @@ -1380,6 +1391,7 @@ bool InteractionModelEngine::InActiveReadClientList(ReadClient * apReadClient) return false; } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT bool InteractionModelEngine::HasConflictWriteRequests(const WriteHandler * apWriteHandler, const ConcreteAttributePath & aPath) { @@ -1738,6 +1750,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa return Loop::Continue; }); +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr; readClient = readClient->GetNextClient()) { if (readClient->GetFabricIndex() == fabricIndex) @@ -1746,6 +1759,7 @@ void InteractionModelEngine::OnFabricRemoved(const FabricTable & fabricTable, Fa readClient->Close(CHIP_ERROR_IM_FABRIC_DELETED, false); } } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT for (auto & handler : mWriteHandlers) { diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 6236ff63efc5ec..57e4c66475757f 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -129,6 +129,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, */ CASESessionManager * GetCASESessionManager() const { return mpCASESessionMgr; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Tears down an active subscription. * @@ -151,6 +152,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Tears down all active subscriptions. */ void ShutdownAllSubscriptions(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT uint32_t GetNumActiveReadHandlers() const; uint32_t GetNumActiveReadHandlers(ReadHandler::InteractionType type) const; @@ -234,6 +236,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, void OnTimedWrite(TimedHandler * apTimedHandler, Messaging::ExchangeContext * apExchangeContext, const PayloadHeader & aPayloadHeader, System::PacketBufferHandle && aPayload); +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Add a read client to the internally tracked list of weak references. This list is used to * correctly dispatch unsolicited reports to the right matching handler by subscription ID. @@ -254,6 +257,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, * Return the number of active read clients being tracked by the engine. */ size_t GetNumActiveReadClients(); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT /** * Returns the number of dirty subscriptions. Including the subscriptions that are generating reports. @@ -348,6 +352,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // void ShutdownActiveReads() { +#if CHIP_CONFIG_ENABLE_READ_CLIENT for (auto * readClient = mpActiveReadClientList; readClient != nullptr;) { readClient->mpImEngine = nullptr; @@ -361,6 +366,7 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, // After that, we just null out our tracker. // mpActiveReadClientList = nullptr; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT mReadHandlers.ReleaseAll(); } @@ -599,7 +605,9 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, ObjectPool mReadHandlers; +#if CHIP_CONFIG_ENABLE_READ_CLIENT ReadClient * mpActiveReadClientList = nullptr; +#endif ReadHandler::ApplicationCallback * mpReadHandlerApplicationCallback = nullptr; diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 502e08eaa65a6a..71844713ff1461 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -49,6 +49,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace app { @@ -613,5 +614,6 @@ class ReadClient : public Messaging::ExchangeDelegate kReservedSizeForEndOfContainer + kReservedSizeForIMRevision + kReservedSizeForEndOfContainer; }; -}; // namespace app -}; // namespace chip +}; // namespace app +}; // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 1c3a40cc962273..4e9e8fccdf5646 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -713,6 +713,57 @@ CHIP_ERROR ReadHandler::ProcessSubscribeRequest(System::PacketBufferHandle && aP ReturnErrorOnFailure(subscribeRequestParser.GetMaxIntervalCeilingSeconds(&mMaxInterval)); VerifyOrReturnError(mMinIntervalFloorSeconds <= mMaxInterval, CHIP_ERROR_INVALID_ARGUMENT); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + + // Default behavior for ICDs where the wanted MaxInterval for a subscription is the IdleModeInterval + // defined in the ICD Management Cluster. + // Behavior can be changed with the OnSubscriptionRequested function defined in the application callbacks + + // Default Behavior Steps : + // If MinInterval > IdleModeInterval, try to set the MaxInterval to the first interval of IdleModeIntervals above the + // MinInterval. + // If the next interval is greater than the MaxIntervalCeiling, use the MaxIntervalCeiling. + // Otherwise, use IdleModeInterval as MaxInterval + + // GetPublisherSelectedIntervalLimit() returns the IdleModeInterval if the device is an ICD + uint32_t decidedMaxInterval = GetPublisherSelectedIntervalLimit(); + + // Check if the PublisherSelectedIntervalLimit is 0. If so, set decidedMaxInterval to MaxIntervalCeiling + if (decidedMaxInterval == 0) + { + decidedMaxInterval = mMaxInterval; + } + + // If requestedMinInterval is greater than the IdleTimeInterval, select next active up time as max interval + if (mMinIntervalFloorSeconds > decidedMaxInterval) + { + uint16_t ratio = mMinIntervalFloorSeconds / static_cast(decidedMaxInterval); + if (mMinIntervalFloorSeconds % decidedMaxInterval) + { + ratio++; + } + + decidedMaxInterval *= ratio; + } + + // Verify that decidedMaxInterval is an acceptable value (overflow) + if (decidedMaxInterval > System::Clock::Seconds16::max().count()) + { + decidedMaxInterval = System::Clock::Seconds16::max().count(); + } + + // Verify that the decidedMaxInterval respects MAX(GetPublisherSelectedIntervalLimit(), MaxIntervalCeiling) + uint16_t maximumMaxInterval = std::max(GetPublisherSelectedIntervalLimit(), mMaxInterval); + if (decidedMaxInterval > maximumMaxInterval) + { + decidedMaxInterval = maximumMaxInterval; + } + + // Set max interval of the subscription + mMaxInterval = static_cast(decidedMaxInterval); + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + // // Notify the application (if requested) of the impending subscription and check whether we should still proceed to set it up. // This also provides the application an opportunity to modify the negotiated min/max intervals set above. diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index 5f1d3221886084..a87c121ffaf8b0 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -418,8 +418,8 @@ class ReadHandler : public Messaging::ExchangeDelegate friend class chip::app::reporting::Engine; friend class chip::app::InteractionModelEngine; - // The report scheduler needs to be able to access StateFlag private functions IsReportable(), IsGeneratingReports() and - // IsDirty() to know when to schedule a run so it is declared as a friend class. + // The report scheduler needs to be able to access StateFlag private functions IsReportable(), IsGeneratingReports(), + // ForceDirtyState() and IsDirty() to know when to schedule a run so it is declared as a friend class. friend class chip::app::reporting::ReportScheduler; enum class HandlerState : uint8_t diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 8f0f7f82301cfc..63ebf1b4ef1eee 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -16,13 +16,6 @@ set(CHIP_APP_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) -if (NOT CHIP_ROOT) - # TODO: these are WORKAROUNDS and should be removed - if(DEFINED ameba_matter_root) - SET(CHIP_ROOT "${ameba_matter_root}") - endif() -endif() - include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") # Configure ${APP_TARGET} with source files associated with ${CLUSTER} cluster diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 95f290a0afd732..8d8b318639722e 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -76,7 +76,7 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } - else + else if (IsFlatCompositionForEndpoint(endpoint)) { err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { for (uint16_t index = 0; index < emberAfEndpointCount(); index++) @@ -104,6 +104,24 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu return CHIP_NO_ERROR; }); } + else if (IsTreeCompositionForEndpoint(endpoint)) + { + err = aEncoder.EncodeList([endpoint](const auto & encoder) -> CHIP_ERROR { + for (uint16_t index = 0; index < emberAfEndpointCount(); index++) + { + if (!emberAfEndpointIndexIsEnabled(index)) + continue; + + EndpointId parentEndpointId = emberAfParentEndpointFromIndex(index); + if (parentEndpointId == endpoint) + { + ReturnErrorOnFailure(encoder.Encode(emberAfEndpointFromIndex(index))); + } + } + + return CHIP_NO_ERROR; + }); + } return err; } diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 9f29d0b25a6966..9ff43d9a2ef834 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -111,6 +111,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface // TODO: Once there is MCSP support, this may need to change. static constexpr bool IsMCSPSupported() { return false; } + static constexpr uint16_t kImplementedClusterRevision = 2; CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override { @@ -119,7 +120,7 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface switch (aPath.mAttributeId) { case GroupKeyManagement::Attributes::ClusterRevision::Id: - return ReadClusterRevision(aPath.mEndpointId, aEncoder); + return aEncoder.Encode(kImplementedClusterRevision); case Attributes::FeatureMap::Id: { uint32_t features = 0; if (IsMCSPSupported()) @@ -285,6 +286,121 @@ class GroupKeyManagementAttributeAccess : public AttributeAccessInterface } }; +Status +ValidateKeySetWriteArguments(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) +{ + // SPEC: If the EpochKey0 field is null or its associated EpochStartTime0 field is null, then this command SHALL fail with an + // INVALID_COMMAND status code responded to the client. + if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull()) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochStartTime0 is set to 0, then this command SHALL fail with an INVALID_COMMAND status code responded to the + // client. + if (0 == commandData.groupKeySet.epochStartTime0.Value()) + { + return Status::InvalidCommand; + } + + // By now we at least have epochKey0. + static_assert(GroupDataProvider::EpochKey::kLengthBytes == 16, + "Expect EpochKey internal data structure to have a length of 16 bytes."); + + // SPEC: If the EpochKey0 field's length is not exactly 16 bytes, then this command SHALL fail with a CONSTRAINT_ERROR status + // code responded to the client. + if (commandData.groupKeySet.epochKey0.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // Already known to be false by now + bool epoch_key0_is_null = false; + uint64_t epoch_start_time0 = commandData.groupKeySet.epochStartTime0.Value(); + + bool epoch_key1_is_null = commandData.groupKeySet.epochKey1.IsNull(); + bool epoch_start_time1_is_null = commandData.groupKeySet.epochStartTime1.IsNull(); + + uint64_t epoch_start_time1 = 0; // Will be overridden when known to be present. + + // SPEC: If exactly one of the EpochKey1 or EpochStartTime1 is null, rather than both being null, or neither being null, then + // this command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key1_is_null != epoch_start_time1_is_null) + { + return Status::InvalidCommand; + } + + if (!epoch_key1_is_null) + { + // SPEC: If the EpochKey1 field is not null, then the EpochKey0 field SHALL NOT be null. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + if (epoch_key0_is_null) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochKey1 field is not null, and the field's length is not exactly 16 bytes, then this command SHALL fail + // with a CONSTRAINT_ERROR status code responded to the client. + if (commandData.groupKeySet.epochKey1.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // By now, if EpochKey1 was present, we know EpochStartTime1 was also present. + epoch_start_time1 = commandData.groupKeySet.epochStartTime1.Value(); + + // SPEC: If the EpochKey1 field is not null, its associated EpochStartTime1 field SHALL NOT be null and SHALL contain a + // later epoch start time than the epoch start time found in the EpochStartTime0 field. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + bool epoch1_later_than_epoch0 = epoch_start_time1 > epoch_start_time0; + if (!epoch1_later_than_epoch0) + { + return Status::InvalidCommand; + } + } + + bool epoch_key2_is_null = commandData.groupKeySet.epochKey2.IsNull(); + bool epoch_start_time2_is_null = commandData.groupKeySet.epochStartTime2.IsNull(); + + // SPEC: If exactly one of the EpochKey2 or EpochStartTime2 is null, rather than both being null, or neither being null, then + // this command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key2_is_null != epoch_start_time2_is_null) + { + return Status::InvalidCommand; + } + + if (!epoch_key2_is_null) + { + // SPEC: If the EpochKey2 field is not null, then the EpochKey1 and EpochKey0 fields SHALL NOT be null. Otherwise this + // command SHALL fail with an INVALID_COMMAND status code responded to the client. + if (epoch_key0_is_null || epoch_key1_is_null) + { + return Status::InvalidCommand; + } + + // SPEC: If the EpochKey2 field is not null, and the field's length is not exactly 16 bytes, then this command SHALL fail + // with a CONSTRAINT_ERROR status code responded to the client. + if (commandData.groupKeySet.epochKey2.Value().size() != GroupDataProvider::EpochKey::kLengthBytes) + { + return Status::ConstraintError; + } + + // By now, if EpochKey2 was present, we know EpochStartTime2 was also present. + uint64_t epoch_start_time2 = commandData.groupKeySet.epochStartTime2.Value(); + + // SPEC: If the EpochKey2 field is not null, its associated EpochStartTime2 field SHALL NOT be null and SHALL contain a + // later epoch start time than the epoch start time found in the EpochStartTime1 field. Otherwise this command SHALL fail + // with an INVALID_COMMAND status code responded to the client. + bool epoch2_later_than_epoch1 = epoch_start_time2 > epoch_start_time1; + if (!epoch2_later_than_epoch1) + { + return Status::InvalidCommand; + } + } + + return Status::Success; +} + constexpr uint16_t GroupKeyManagementAttributeAccess::kClusterRevision; GroupKeyManagementAttributeAccess gAttribute; @@ -304,12 +420,20 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::DecodableType & commandData) { - if (commandData.groupKeySet.epochKey0.IsNull() || commandData.groupKeySet.epochStartTime0.IsNull() || - commandData.groupKeySet.epochKey0.Value().empty() || (0 == commandData.groupKeySet.epochStartTime0.Value())) + auto provider = GetGroupDataProvider(); + auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); + + if (nullptr == provider || nullptr == fabric) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::Failure, "Internal consistency error on provider/fabric"); + return true; + } + + // Pre-validate all complex data dependency assumptions about the epoch keys + Status status = ValidateKeySetWriteArguments(commandData); + if (status != Status::Success) { - // If the EpochKey0 field is null or its associated EpochStartTime0 field is null, - // then this command SHALL fail with an INVALID_COMMAND - commandObj->AddStatus(commandPath, Status::InvalidCommand); + commandObj->AddStatusAndLogIfFailure(commandPath, status, "Failure to validate KeySet data dependencies."); return true; } @@ -319,7 +443,8 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // supported by the server, because it is ... a new value unrecognized // by a legacy server, then the server SHALL generate a general // constraint error - commandObj->AddStatus(commandPath, Status::ConstraintError); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ConstraintError, + "Received unknown GroupKeySecurityPolicyEnum value"); return true; } @@ -330,28 +455,25 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // any action attempting to set CacheAndSync in the // GroupKeySecurityPolicy field SHALL fail with an INVALID_COMMAND // error. - commandObj->AddStatus(commandPath, Status::InvalidCommand); + commandObj->AddStatusAndLogIfFailure(commandPath, Status::InvalidCommand, + "Received a CacheAndSync GroupKeySecurityPolicyEnum when MCSP not supported"); return true; } + // All flight checks completed: by now we know that non-null keys are all valid and correct size. + bool epoch_key1_present = !commandData.groupKeySet.epochKey1.IsNull(); + bool epoch_key2_present = !commandData.groupKeySet.epochKey2.IsNull(); + GroupDataProvider::KeySet keyset(commandData.groupKeySet.groupKeySetID, commandData.groupKeySet.groupKeySecurityPolicy, 0); - // Epoch Key 0 + // Epoch Key 0 always present keyset.epoch_keys[0].start_time = commandData.groupKeySet.epochStartTime0.Value(); memcpy(keyset.epoch_keys[0].key, commandData.groupKeySet.epochKey0.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); keyset.num_keys_used++; // Epoch Key 1 - if (!commandData.groupKeySet.epochKey1.IsNull()) + if (epoch_key1_present) { - if (commandData.groupKeySet.epochStartTime1.IsNull() || - commandData.groupKeySet.epochStartTime1.Value() <= commandData.groupKeySet.epochStartTime0.Value()) - { - // If the EpochKey1 field is not null, its associated EpochStartTime1 field SHALL contain - // a later epoch start time than the epoch start time found in the EpochStartTime0 field. - commandObj->AddStatus(commandPath, Status::InvalidCommand); - return true; - } keyset.epoch_keys[1].start_time = commandData.groupKeySet.epochStartTime1.Value(); memcpy(keyset.epoch_keys[1].key, commandData.groupKeySet.epochKey1.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); @@ -359,33 +481,14 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( } // Epoch Key 2 - if (!commandData.groupKeySet.epochKey2.IsNull()) + if (epoch_key2_present) { - if (commandData.groupKeySet.epochKey1.IsNull() || commandData.groupKeySet.epochStartTime2.IsNull() || - commandData.groupKeySet.epochStartTime2.Value() <= commandData.groupKeySet.epochStartTime1.Value()) - { - // If the EpochKey2 field is not null then: - // * The EpochKey1 field SHALL NOT be null - // * Its associated EpochStartTime1 field SHALL contain a later epoch start time - // than the epoch start time found in the EpochStartTime0 field. - commandObj->AddStatus(commandPath, Status::InvalidCommand); - return true; - } keyset.epoch_keys[2].start_time = commandData.groupKeySet.epochStartTime2.Value(); memcpy(keyset.epoch_keys[2].key, commandData.groupKeySet.epochKey2.Value().data(), GroupDataProvider::EpochKey::kLengthBytes); keyset.num_keys_used++; } - auto provider = GetGroupDataProvider(); - auto fabric = Server::GetInstance().GetFabricTable().FindFabricWithIndex(commandObj->GetAccessingFabricIndex()); - - if (nullptr == provider || nullptr == fabric) - { - commandObj->AddStatus(commandPath, Status::Failure); - return true; - } - uint8_t compressed_fabric_id_buffer[sizeof(uint64_t)]; MutableByteSpan compressed_fabric_id(compressed_fabric_id_buffer); CHIP_ERROR err = fabric->GetCompressedFabricIdBytes(compressed_fabric_id); @@ -397,13 +500,19 @@ bool emberAfGroupKeyManagementClusterKeySetWriteCallback( // Set KeySet err = provider->SetKeySet(fabric->GetFabricIndex(), compressed_fabric_id, keyset); + if (CHIP_ERROR_INVALID_LIST_LENGTH == err) + { + commandObj->AddStatusAndLogIfFailure(commandPath, Status::ResourceExhausted, "Not enough space left to add a new KeySet"); + return true; + } + if (CHIP_NO_ERROR == err) { ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite OK"); } else { - ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite: %s", err.AsString()); + ChipLogDetail(Zcl, "GroupKeyManagementCluster: KeySetWrite: %" CHIP_ERROR_FORMAT, err.Format()); } // Send response diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h index 5529413a40cb88..c90923c775e5f3 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h @@ -35,20 +35,19 @@ class Delegate virtual ~Delegate() = default; /** - * Get the list of supported spin_speed list. - * Fills in the provided spin_speed at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin_speed. - * @param index The index of the spin_speed, with 0 representing the first one. - * @param spinSpeed The spin speed is filled. + * Get the spin speed string at the given index in the list. + * @param index The index of the spin speed, with 0 representing the first one. + * @param spinSpeed The MutableCharSpan to copy the string data into. On success, the callee must update + * the length to the length of the copied data. + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of spin speeds. */ virtual CHIP_ERROR GetSpinSpeedAtIndex(size_t index, MutableCharSpan & spinSpeed) = 0; /** - * Get the list of supported rinses list. - * Fills in the provided rinses at index `index` if there is one, - * or returns CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of rinses. + * Get the supported rinses value at the given index in the list. * @param index The index of the supported rinses with 0 representing the first one. - * @param supportedRinse The supported rinse is filled. + * @param supportedRinse The supported rinse at the given index + * @return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED if the index is out of range for the list of supported rinses. */ virtual CHIP_ERROR GetSupportedRinseAtIndex(size_t index, NumberOfRinsesEnum & supportedRinse) = 0; }; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 76832e4c091eb8..f7cb0cd06d42a6 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -83,14 +83,13 @@ LaundryWasherControlsServer & LaundryWasherControlsServer::Instance() return sInstance; } -EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, - DataModel::Nullable newSpinSpeedCurrent) +EmberAfStatus LaundryWasherControlsServer::SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent) { - DataModel::Nullable spinSpeedCurrent; - EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrent); - if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrent != newSpinSpeedCurrent)) + DataModel::Nullable spinSpeedCurrentNow; + EmberAfStatus res = SpinSpeedCurrent::Get(endpointId, spinSpeedCurrentNow); + if ((res == EMBER_ZCL_STATUS_SUCCESS) && (spinSpeedCurrentNow != spinSpeedCurrent)) { - res = SpinSpeedCurrent::Set(endpointId, newSpinSpeedCurrent); + res = SpinSpeedCurrent::Set(endpointId, spinSpeedCurrent); } return res; diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h index ac9b4ca0b7f209..f01069135b3e7c 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.h @@ -42,51 +42,19 @@ class LaundryWasherControlsServer : public AttributeAccessInterface * Set the default delegate of laundry washer server at endpoint x * @param endpoint ID of the endpoint * @param delegate The default delegate at the endpoint - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. */ static void SetDefaultDelegate(EndpointId endpoint, Delegate * delegate); /** - * Init the laundry washer server. - * @param void - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - // CHIP_ERROR Init(); - - /** - * @brief Set the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param newSpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure - */ - EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable newSpinSpeedCurrent); - - /** - * @brief Get the attribute newSpinSpeedCurrent - * - * @param endpointId ID of the endpoint - * @param SpinSpeedCurrent attribute SpinSpeedCurrent - * @return true on success, false on failure + * API to set/get the SpinSpeedCurrent attribute */ + EmberAfStatus SetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable spinSpeedCurrent); EmberAfStatus GetSpinSpeedCurrent(EndpointId endpointId, DataModel::Nullable & spinSpeedCurrent); /** - * @brief Set the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param newNumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure + * API to set/get the NumberOfRinses attribute */ EmberAfStatus SetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum newNumberOfRinses); - - /** - * @brief Get the attribute NumberOfRinses - * - * @param endpointId ID of the endpoint - * @param NumberOfRinses attribute NumberOfRinses - * @return true on success, false on failure - */ EmberAfStatus GetNumberOfRinses(EndpointId endpointId, NumberOfRinsesEnum & numberOfRinses); private: diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index d2e56f172627dc..4495e728fc7ecb 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include using namespace chip; @@ -193,7 +194,7 @@ CHIP_ERROR Instance::Init() } } } - +#ifdef EMBER_AF_PLUGIN_ON_OFF_SERVER // OnMode with Power Up // If the On/Off feature is supported and the On/Off cluster attribute StartUpOnOff is present, with a // value of On (turn on at power up), then the CurrentMode attribute SHALL be set to the OnMode attribute @@ -227,7 +228,7 @@ CHIP_ERROR Instance::Init() } } } - +#endif // EMBER_AF_PLUGIN_ON_OFF_SERVER return CHIP_NO_ERROR; } diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 5a6c645a510670..4340f683b0d666 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -654,9 +654,10 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // Set the Identity Protection Key (IPK) // The IPK SHALL be the operational group key under GroupKeySetID of 0 - keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; - keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; - keyset.num_keys_used = 1; + keyset.keyset_id = Credentials::GroupDataProvider::kIdentityProtectionKeySetId; + keyset.policy = GroupKeyManagement::GroupKeySecurityPolicyEnum::kTrustFirst; + keyset.num_keys_used = 1; + keyset.epoch_keys[0].start_time = 0; memcpy(keyset.epoch_keys[0].key, ipkValue.data(), Crypto::CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES); err = newFabricInfo->GetCompressedFabricIdBytes(compressed_fabric_id); diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a5163df93b2895..b09e25d7ad75b5 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -19,32 +19,82 @@ * @brief Implementation for the Power Source Server Cluster ***************************************************************************/ +#include "power-source-server.h" + #include #include -#include -#include #include #include #include +#include using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::PowerSource::Attributes; +using namespace app; +using namespace app::Clusters; +using namespace app::Clusters::PowerSource::Attributes; namespace { -class PowerSourceAttrAccess : public AttributeAccessInterface +struct PowerSourceClusterInfo { -public: - // Register on all endpoints. - PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + PowerSourceClusterInfo() : mClusterEndpoint(kInvalidEndpointId) {} + explicit PowerSourceClusterInfo(EndpointId powerClusterEndpointId) : mClusterEndpoint(powerClusterEndpointId) {} + void Clear() + { + mBuf.Free(); + mEndpointList = Span(); + } + CHIP_ERROR SetEndpointList(Span endpointList) + { + Clear(); + if (endpointList.size() == 0) + { + mEndpointList = Span(); + return CHIP_NO_ERROR; + } + mBuf.Calloc(endpointList.size()); + if (mBuf.Get() == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + memcpy(mBuf.Get(), endpointList.data(), endpointList.size() * sizeof(EndpointId)); + mEndpointList = Span(mBuf.Get(), endpointList.size()); + return CHIP_NO_ERROR; + } + EndpointId mClusterEndpoint = kInvalidEndpointId; + Platform::ScopedMemoryBuffer mBuf; + Span mEndpointList; }; +PowerSourceServer gPowerSourceServer; + PowerSourceAttrAccess gAttrAccess; +#ifdef ZCL_USING_POWER_SOURCE_CLUSTER_SERVER +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS \ + (EMBER_AF_POWER_SOURCE_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) +#else +#define POWER_SERVER_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT +#endif +static constexpr size_t kNumSupportedEndpoints = POWER_SERVER_NUM_SUPPORTED_ENDPOINTS; + +#if POWER_SERVER_NUM_SUPPORTED_ENDPOINTS > 0 +PowerSourceClusterInfo sPowerSourceClusterInfo[kNumSupportedEndpoints] = {}; +#else +PowerSourceClusterInfo * sPowerSourceClusterInfo = nullptr; +#endif + +} // anonymous namespace + +void MatterPowerSourcePluginServerInitCallback() +{ + registerAttributeAccessOverride(&gAttrAccess); +} + +namespace chip { +namespace app { +namespace Clusters { + CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -55,10 +105,25 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, // TODO: Needs implementation. err = aEncoder.EncodeEmptyList(); break; - case EndpointList::Id: - // TODO: Needs implementation and a way to allow dynamic endpoints to register endpoints - err = aEncoder.EncodeEmptyList(); + case EndpointList::Id: { + PowerSourceServer & server = PowerSourceServer::Instance(); + const Span * span = server.GetEndpointList(aPath.mEndpointId); + if (span == nullptr) + { + err = aEncoder.EncodeEmptyList(); + } + else + { + err = aEncoder.EncodeList([span](const auto & encoder) -> CHIP_ERROR { + for (auto id : *span) + { + ReturnErrorOnFailure(encoder.Encode(id)); + } + return CHIP_NO_ERROR; + }); + } break; + } default: break; } @@ -66,9 +131,91 @@ CHIP_ERROR PowerSourceAttrAccess::Read(const ConcreteReadAttributePath & aPath, return err; } -} // anonymous namespace +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess() +{ + return gAttrAccess; +} -void MatterPowerSourcePluginServerInitCallback() +PowerSourceServer & PowerSourceServer::Instance() { - registerAttributeAccessOverride(&gAttrAccess); + return gPowerSourceServer; +} + +// Caller does not need to retain the span past the call point as these are copied into an internal storage +CHIP_ERROR PowerSourceServer::SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList) +{ + // TODO: should check here that the power source cluster exists on the endpoint, but for now let's take the caller's word + // for it + + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx >= kNumSupportedEndpoints) + { + idx = NextEmptyIndex(); + } + if (idx >= kNumSupportedEndpoints) + { + return CHIP_ERROR_NO_MEMORY; + } + + sPowerSourceClusterInfo[idx].Clear(); + if (endpointList.size() == 0) + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(); + } + else + { + sPowerSourceClusterInfo[idx] = PowerSourceClusterInfo(powerSourceClusterEndpoint); + sPowerSourceClusterInfo[idx].SetEndpointList(endpointList); + } + return CHIP_NO_ERROR; +} +const Span * PowerSourceServer::GetEndpointList(EndpointId powerSourceClusterEndpoint) const +{ + size_t idx = PowerSourceClusterEndpointIndex(powerSourceClusterEndpoint); + if (idx != std::numeric_limits::max()) + { + return &sPowerSourceClusterInfo[idx].mEndpointList; + } + return nullptr; +} + +void PowerSourceServer::Shutdown() +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + sPowerSourceClusterInfo[i].Clear(); + } +} + +size_t PowerSourceServer::GetNumSupportedEndpointLists() const +{ + return kNumSupportedEndpoints; } + +size_t PowerSourceServer::PowerSourceClusterEndpointIndex(EndpointId endpointId) const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == endpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +size_t PowerSourceServer::NextEmptyIndex() const +{ + for (size_t i = 0; i < kNumSupportedEndpoints; ++i) + { + if (sPowerSourceClusterInfo[i].mClusterEndpoint == kInvalidEndpointId) + { + return i; + } + } + return std::numeric_limits::max(); +} + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/power-source-server/power-source-server.h b/src/app/clusters/power-source-server/power-source-server.h new file mode 100644 index 00000000000000..a02f54cd5375c1 --- /dev/null +++ b/src/app/clusters/power-source-server/power-source-server.h @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +class PowerSourceServer +{ +public: + static PowerSourceServer & Instance(); + + // Caller does not need to retain the span past the call point as these are copied into an internal storage + CHIP_ERROR SetEndpointList(EndpointId powerSourceClusterEndpoint, Span endpointList); + CHIP_ERROR ClearEndpointList(EndpointId powerSourceClusterEndpoint) + { + return SetEndpointList(powerSourceClusterEndpoint, Span()); + } + // returns nullptr if there's not endpoint list set for this power source cluster endpoint id. + const Span * GetEndpointList(EndpointId powerSourceClusterEndpoint) const; + void Shutdown(); + size_t GetNumSupportedEndpointLists() const; + +private: + // Both return std::numeric_limits::max() for not found + size_t PowerSourceClusterEndpointIndex(EndpointId endpointId) const; + size_t NextEmptyIndex() const; +}; + +class PowerSourceAttrAccess : public AttributeAccessInterface +{ +public: + // Register on all endpoints. + PowerSourceAttrAccess() : AttributeAccessInterface(Optional::Missing(), PowerSource::Id) {} + + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; +}; + +PowerSourceAttrAccess & TestOnlyGetPowerSourceAttrAccess(); + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index 99d14e97095aab..3ff044e4bd506c 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -23,9 +23,7 @@ namespace chip { namespace scenes { CHIP_ERROR -DefaultSceneHandlerImpl::EncodeAttributeValueList( - const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes) +DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) { TLV::TLVWriter writer; writer.Init(serializedBytes); @@ -35,9 +33,8 @@ DefaultSceneHandlerImpl::EncodeAttributeValueList( return CHIP_NO_ERROR; } -CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist) +CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist) { TLV::TLVReader reader; @@ -49,11 +46,10 @@ CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList( } CHIP_ERROR -DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, +DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) { - app::Clusters::Scenes::Structs::AttributeValuePair::Type aVPairs[kMaxAvPair]; + AttributeValuePairType aVPairs[kMaxAvPair]; size_t pairTotal = 0; // Verify size of list @@ -68,15 +64,15 @@ DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, pairCount++; } ReturnErrorOnFailure(pair_iterator.GetStatus()); - app::DataModel::List attributeValueList(aVPairs, pairCount); + List attributeValueList(aVPairs, pairCount); return EncodeAttributeValueList(attributeValueList, serializedBytes); } CHIP_ERROR DefaultSceneHandlerImpl::Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) + ExtensionFieldSetType & extensionFieldSet) { - app::DataModel::DecodableList attributeValueList; + DecodableList attributeValueList; ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index c7b7e18a2f7782..3be1dc43e48c26 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -39,6 +39,18 @@ using clusterId = chip::ClusterId; /// (Color control cluster), the Extension Field Set's value pair list TLV occupies 99 bytes of memory class DefaultSceneHandlerImpl : public scenes::SceneHandler { + + template + using List = chip::app::DataModel::List; + + template + using DecodableList = chip::app::DataModel::DecodableList; + + using AttributeValuePairType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePairDecodableType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; + using ExtensionFieldSetDecodableType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; + using ExtensionFieldSetType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; + public: static constexpr uint8_t kMaxAvPair = CHIP_CONFIG_SCENES_MAX_AV_PAIRS_EFS; @@ -49,18 +61,15 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param aVlist[in] Attribute value list to encode /// @param serializedBytes[out] Buffer to fill from the Attribute value list in a TLV format /// @return CHIP_ERROR - virtual CHIP_ERROR - EncodeAttributeValueList(const app::DataModel::List & aVlist, - MutableByteSpan & serializedBytes); + virtual CHIP_ERROR EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes); /// @brief Decodes an attribute value list from a TLV structure and ensure it fits the member pair buffer /// @param serializedBytes [in] Buffer to read from /// @param aVlist [out] Attribute value list to fill from the TLV structure. Only valid while the buffer backing /// serializedBytes exists and its contents are not modified. /// @return CHIP_ERROR - virtual CHIP_ERROR DecodeAttributeValueList( - const ByteSpan & serializedBytes, - app::DataModel::DecodableList & aVlist); + virtual CHIP_ERROR DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist); /// @brief From command AddScene, allows handler to filter through clusters in command to serialize only the supported ones. /// @param endpoint[in] Endpoint ID @@ -68,8 +77,7 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @param serializedBytes[out] Buffer to fill from the ExtensionFieldSet in command /// @return CHIP_NO_ERROR if successful, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not supported, CHIP_ERROR value /// otherwise - virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, - const app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & extensionFieldSet, + virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, MutableByteSpan & serializedBytes) override; /// @brief Simulates taking data from nvm and loading it in a command object if the cluster is supported by the endpoint @@ -79,10 +87,10 @@ class DefaultSceneHandlerImpl : public scenes::SceneHandler /// @return CHIP_NO_ERROR if Extension Field Set was successfully populated, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not /// supported, specific CHIP_ERROR otherwise virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & extensionFieldSet) override; + ExtensionFieldSetType & extensionFieldSet) override; private: - app::Clusters::Scenes::Structs::AttributeValuePair::Type mAVPairs[kMaxAvPair]; + AttributeValuePairType mAVPairs[kMaxAvPair]; }; /** diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index 1d4309810d57e8..5e5a82afd7d5e1 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -15,4 +15,5 @@ declare_args() { # Temporary flag for interaction model and echo protocols, set it to true to enable chip_app_use_echo = false + chip_enable_read_client = true } diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index f4d5b9a7375dac..c0034a88e7b9b8 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -17,6 +17,10 @@ import("icd.gni") # ICD Server sources and configurations +source_set("observer-srcs") { + sources = [ "ICDStateObserver.h" ] +} + # ICD Manager source-set is broken out of the main source-set to enable unit tests # All sources and configurations used by the ICDManager need to go in this source-set source_set("manager-srcs") { @@ -25,8 +29,11 @@ source_set("manager-srcs") { "ICDManager.h", ] - deps = [ ":cluster-srcs" ] - public_deps = [ "${chip_root}/src/credentials:credentials" ] + public_deps = [ + ":cluster-srcs", + ":observer-srcs", + "${chip_root}/src/credentials:credentials", + ] } # ICD management cluster source-set is broken out of the main source-set to enable unit tests diff --git a/src/app/icd/ICDEventManager.cpp b/src/app/icd/ICDEventManager.cpp index a8e4e11de5fb1b..cbe3c5521a65d9 100644 --- a/src/app/icd/ICDEventManager.cpp +++ b/src/app/icd/ICDEventManager.cpp @@ -23,6 +23,7 @@ namespace chip { namespace app { uint8_t ICDEventManager::expectedMsgCount = 0; +uint8_t ICDEventManager::awaitingAckCount = 0; static_assert(UINT8_MAX >= CHIP_CONFIG_MAX_EXCHANGE_CONTEXTS, "ICDEventManager::expectedMsgCount cannot hold count for the max exchange count"); @@ -97,7 +98,19 @@ void ICDEventManager::ICDEventHandler(const ChipDeviceEvent * event, intptr_t ar { icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); } + break; + case DeviceEventType::kICDMsgAckSyncEvent: + // When a Reliable Message Context is awaiting an ack, we keep the ICD in its active mode + if (event->AckSync.awaitingAck) + { + awaitingAckCount++; + } + else if (awaitingAckCount > 0) + { + awaitingAckCount--; + } + icdManager->SetKeepActiveModeRequirements(ICDManager::KeepActiveFlags::kAwaitingMsgAck, (awaitingAckCount != 0)); break; case DeviceEventType::kAppWakeUpEvent: icdManager->UpdateOperationState(ICDManager::OperationalState::ActiveMode); diff --git a/src/app/icd/ICDEventManager.h b/src/app/icd/ICDEventManager.h index fffbbb8dc334fb..c86b356e408657 100644 --- a/src/app/icd/ICDEventManager.h +++ b/src/app/icd/ICDEventManager.h @@ -48,6 +48,7 @@ class ICDEventManager */ static void ICDEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); static uint8_t expectedMsgCount; + static uint8_t awaitingAckCount; ICDManager * mICDManager; }; diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index 853fd044d36732..e3787f2ddc747a 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -33,6 +33,11 @@ #define ICD_ENFORCE_SIT_SLOW_POLL_LIMIT 0 #endif +#ifndef ICD_REPORT_ON_ENTER_ACTIVE_MODE +// Enabling this makes the device emit subscription reports when transitioning from idle to active mode. +#define ICD_REPORT_ON_ENTER_ACTIVE_MODE 0 +#endif + namespace chip { namespace app { @@ -40,12 +45,15 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::IcdManagement; -void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable) +void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, ICDStateObserver * stateObserver) { VerifyOrDie(storage != nullptr); VerifyOrDie(fabricTable != nullptr); - mStorage = storage; - mFabricTable = fabricTable; + VerifyOrDie(stateObserver != nullptr); + + mStorage = storage; + mFabricTable = fabricTable; + mStateObserver = stateObserver; uint32_t activeModeInterval = IcdManagementServer::GetInstance().GetActiveModeInterval(); VerifyOrDie(kFastPollingInterval.count() < activeModeInterval); @@ -152,6 +160,8 @@ void ICDManager::UpdateOperationState(OperationalState state) { ChipLogError(AppServer, "Failed to set Polling Interval: err %" CHIP_ERROR_FORMAT, err.Format()); } + + mStateObserver->OnEnterActiveMode(); } else { diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 94127d645e9c18..e5406f14615837 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -16,6 +16,7 @@ */ #pragma once +#include #include #include #include @@ -48,10 +49,11 @@ class ICDManager kCommissioningWindowOpen = 0x01, kFailSafeArmed = 0x02, kExpectingMsgResponse = 0x03, + kAwaitingMsgAck = 0x04, }; ICDManager() {} - void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable); + void Init(PersistentStorageDelegate * storage, FabricTable * fabricTable, ICDStateObserver * stateObserver); void Shutdown(); void UpdateIcdMode(); void UpdateOperationState(OperationalState state); @@ -86,6 +88,7 @@ class ICDManager ICDMode mICDMode = ICDMode::SIT; PersistentStorageDelegate * mStorage = nullptr; FabricTable * mFabricTable = nullptr; + ICDStateObserver * mStateObserver = nullptr; }; } // namespace app diff --git a/examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h b/src/app/icd/ICDStateObserver.h similarity index 72% rename from examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h rename to src/app/icd/ICDStateObserver.h index f11f5e928f3e14..aa088a7b87f81a 100644 --- a/examples/platform/silabs/efr32/pw_sys_io/public/pw_sys_io_efr32/init.h +++ b/src/app/icd/ICDStateObserver.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2023 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. @@ -14,14 +14,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once -#include "pw_preprocessor/util.h" - -PW_EXTERN_C_START +namespace chip { +namespace app { -// The actual implement of PreMainInit() in sys_io_BACKEND. -void pw_sys_io_Init(); +class ICDStateObserver +{ +public: + virtual ~ICDStateObserver() {} + virtual void OnEnterActiveMode() = 0; +}; -PW_EXTERN_C_END +} // namespace app +} // namespace chip diff --git a/src/app/reporting/ReportScheduler.h b/src/app/reporting/ReportScheduler.h index d691e4b36889ed..068237780b86a0 100644 --- a/src/app/reporting/ReportScheduler.h +++ b/src/app/reporting/ReportScheduler.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include @@ -38,7 +39,7 @@ class TimerContext virtual void TimerFired() = 0; }; -class ReportScheduler : public ReadHandler::Observer +class ReportScheduler : public ReadHandler::Observer, public ICDStateObserver { public: /// @brief This class acts as an interface between the report scheduler and the system timer to reduce dependencies on the @@ -62,17 +63,6 @@ class ReportScheduler : public ReadHandler::Observer class ReadHandlerNode : public TimerContext { public: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - /// Test flags to allow TestReadInteraction to simulate expiration of the minimal and maximal intervals without - /// waiting - enum class TestFlags : uint8_t{ - MinIntervalElapsed = (1 << 0), - MaxIntervalElapsed = (1 << 1), - }; - void SetTestFlags(TestFlags aFlag, bool aValue) { mFlags.Set(aFlag, aValue); } - bool GetTestFlags(TestFlags aFlag) const { return mFlags.Has(aFlag); } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, ReportScheduler * aScheduler) : mTimerDelegate(aTimerDelegate), mScheduler(aScheduler) { @@ -92,29 +82,12 @@ class ReportScheduler : public ReadHandler::Observer { Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp || mFlags.Has(TestFlags::MinIntervalElapsed)) && - (mReadHandler->IsDirty() || (now >= mMaxTimestamp || mFlags.Has(TestFlags::MaxIntervalElapsed)) || - now >= mSyncTimestamp)); -#else return (mReadHandler->IsGeneratingReports() && (now >= mMinTimestamp && (mReadHandler->IsDirty() || now >= mMaxTimestamp || now >= mSyncTimestamp))); -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } bool IsEngineRunScheduled() const { return mEngineRunScheduled; } - void SetEngineRunScheduled(bool aEngineRunScheduled) - { - mEngineRunScheduled = aEngineRunScheduled; -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - // If the engine becomes unscheduled, this means a run just took place so we reset the test flags - if (!mEngineRunScheduled) - { - mFlags.Set(TestFlags::MinIntervalElapsed, false); - mFlags.Set(TestFlags::MaxIntervalElapsed, false); - } -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST - } + void SetEngineRunScheduled(bool aEngineRunScheduled) { mEngineRunScheduled = aEngineRunScheduled; } void SetIntervalTimeStamps(ReadHandler * aReadHandler) { @@ -145,9 +118,6 @@ class ReportScheduler : public ReadHandler::Observer System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; } private: -#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - BitFlags mFlags; -#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST TimerDelegate * mTimerDelegate; ReadHandler * mReadHandler; ReportScheduler * mScheduler; @@ -172,27 +142,13 @@ class ReportScheduler : public ReadHandler::Observer bool IsReportableNow(ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler)->IsReportableNow(); } /// @brief Check if a ReadHandler is reportable without considering the timing bool IsReadHandlerReportable(ReadHandler * aReadHandler) const { return aReadHandler->IsReportable(); } + /// @brief Sets the ForceDirty flag of a ReadHandler + void HandlerForceDirtyState(ReadHandler * aReadHandler) { aReadHandler->ForceDirtyState(); } /// @brief Get the number of ReadHandlers registered in the scheduler's node pool size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); } #ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST - void RunNodeCallbackForHandler(const ReadHandler * aReadHandler) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->TimerFired(); - } - void SetFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag, bool aValue) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - node->SetTestFlags(aFlag, aValue); - } - - bool CheckFlagsForHandler(const ReadHandler * aReadHandler, ReadHandlerNode::TestFlags aFlag) - { - ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); - return node->GetTestFlags(aFlag); - } Timestamp GetMinTimestampForHandler(const ReadHandler * aReadHandler) { ReadHandlerNode * node = FindReadHandlerNode(aReadHandler); diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index b6170fba9e0fdf..74f75a663277aa 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -37,6 +37,23 @@ ReportSchedulerImpl::ReportSchedulerImpl(TimerDelegate * aTimerDelegate) : Repor VerifyOrDie(nullptr != mTimerDelegate); } +/// @brief Method that triggers a report emission on each ReadHandler that is not blocked on its min interval. +/// Each read handler that is not blocked is immediately marked dirty so that it will report as soon as possible. +void ReportSchedulerImpl::OnEnterActiveMode() +{ +#if ICD_REPORT_ON_ENTER_ACTIVE_MODE + Timestamp now = mTimerDelegate->GetCurrentMonotonicTimestamp(); + mNodesPool.ForEachActiveObject([now, this](ReadHandlerNode * node) { + if (now >= node->GetMinTimestamp()) + { + this->HandlerForceDirtyState(node->GetReadHandler()); + } + + return Loop::Continue; + }); +#endif +} + /// @brief When a ReadHandler is added, register it, which will schedule an engine run void ReportSchedulerImpl::OnReadHandlerCreated(ReadHandler * aReadHandler) { diff --git a/src/app/reporting/ReportSchedulerImpl.h b/src/app/reporting/ReportSchedulerImpl.h index 3ac47449f834bc..573184ada02d5a 100644 --- a/src/app/reporting/ReportSchedulerImpl.h +++ b/src/app/reporting/ReportSchedulerImpl.h @@ -32,6 +32,9 @@ class ReportSchedulerImpl : public ReportScheduler ReportSchedulerImpl(TimerDelegate * aTimerDelegate); ~ReportSchedulerImpl() override { UnregisterAllHandlers(); } + // ICDStateObserver + void OnEnterActiveMode() override; + // ReadHandlerObserver void OnReadHandlerCreated(ReadHandler * aReadHandler) final; void OnBecameReportable(ReadHandler * aReadHandler) final; diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index a4c8b95d550f79..b416d5086c3096 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -250,7 +250,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif // CHIP_CONFIG_ENABLE_SERVER_IM_EVENT #if CHIP_CONFIG_ENABLE_ICD_SERVER - mICDManager.Init(mDeviceStorage, &GetFabricTable()); + mICDManager.Init(mDeviceStorage, &GetFabricTable(), &mReportScheduler); mICDEventManager.Init(&mICDManager); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER diff --git a/src/app/server/java/AndroidAppServerWrapper.cpp b/src/app/server/java/AndroidAppServerWrapper.cpp index ab88729d6f1d9b..69436b17641d55 100644 --- a/src/app/server/java/AndroidAppServerWrapper.cpp +++ b/src/app/server/java/AndroidAppServerWrapper.cpp @@ -80,3 +80,8 @@ void ChipAndroidAppShutdown(void) chip::Server::GetInstance().Shutdown(); chip::Platform::MemoryShutdown(); } + +void ChipAndroidAppReset(void) +{ + chip::Server::GetInstance().ScheduleFactoryReset(); +} diff --git a/src/app/server/java/AndroidAppServerWrapper.h b/src/app/server/java/AndroidAppServerWrapper.h index 19088b9913ada1..8b09579185a773 100644 --- a/src/app/server/java/AndroidAppServerWrapper.h +++ b/src/app/server/java/AndroidAppServerWrapper.h @@ -25,6 +25,8 @@ CHIP_ERROR ChipAndroidAppInit(AppDelegate * appDelegate = nullptr); void ChipAndroidAppShutdown(void); +void ChipAndroidAppReset(void); + jint AndroidAppServerJNI_OnLoad(JavaVM * jvm, void * reserved); void AndroidAppServerJNI_OnUnload(JavaVM * jvm, void * reserved); diff --git a/src/app/server/java/CHIPAppServer-JNI.cpp b/src/app/server/java/CHIPAppServer-JNI.cpp index 1b486f1bd3ac82..2fd6aa8dbb516c 100644 --- a/src/app/server/java/CHIPAppServer-JNI.cpp +++ b/src/app/server/java/CHIPAppServer-JNI.cpp @@ -165,6 +165,14 @@ JNI_METHOD(jboolean, stopApp)(JNIEnv * env, jobject self) return JNI_TRUE; } +JNI_METHOD(jboolean, resetApp)(JNIEnv * env, jobject self) +{ + chip::DeviceLayer::StackLock lock; + ChipAndroidAppReset(); + + return JNI_TRUE; +} + void * IOThreadAppMain(void * arg) { JNIEnv * env; diff --git a/src/app/server/java/src/chip/appserver/ChipAppServer.java b/src/app/server/java/src/chip/appserver/ChipAppServer.java index e501329085522f..3d947081df4cfb 100644 --- a/src/app/server/java/src/chip/appserver/ChipAppServer.java +++ b/src/app/server/java/src/chip/appserver/ChipAppServer.java @@ -39,4 +39,6 @@ public ChipFabricProvider getFabricProvider() { public native boolean startAppWithDelegate(ChipAppServerDelegate appDelegate); public native boolean stopApp(); + + public native boolean resetApp(); } diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 5378b199aa17f7..9078702fb983e9 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -17,6 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/nlunit_test.gni") import("${chip_root}/build/chip/chip_test_suite.gni") +import("${chip_root}/src/app/icd/icd.gni") import("${chip_root}/src/platform/device.gni") static_library("helpers") { @@ -77,6 +78,18 @@ source_set("time-sync-data-provider-test-srcs") { ] } +source_set("power-cluster-test-srcs") { + sources = [ + "${chip_root}/src/app/clusters/power-source-server/power-source-server.cpp", + ] + + public_deps = [ + "${chip_root}/src/app/common:cluster-objects", + "${chip_root}/src/app/util/mock:mock_ember", + "${chip_root}/src/lib/core", + ] +} + source_set("scenes-table-test-srcs") { sources = [ "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h", @@ -132,6 +145,7 @@ chip_test_suite("tests") { "TestNumericAttributeTraits.cpp", "TestOperationalStateDelegate.cpp", "TestPendingNotificationMap.cpp", + "TestPowerSourceCluster.cpp", "TestReadInteraction.cpp", "TestReportingEngine.cpp", "TestSceneTable.cpp", @@ -182,11 +196,11 @@ chip_test_suite("tests") { ":binding-test-srcs", ":operational-state-test-srcs", ":ota-requestor-test-srcs", + ":power-cluster-test-srcs", ":scenes-table-test-srcs", ":time-sync-data-provider-test-srcs", "${chip_root}/src/app", "${chip_root}/src/app/common:cluster-objects", - "${chip_root}/src/app/icd:cluster-srcs", "${chip_root}/src/app/icd:manager-srcs", "${chip_root}/src/app/tests:helpers", "${chip_root}/src/app/util/mock:mock_ember", @@ -195,7 +209,10 @@ chip_test_suite("tests") { "${nlunit_test_root}:nlunit-test", ] - if (chip_config_network_layer_ble && + # Do not run TestCommissionManager when running ICD specific unit tests. + # ICDManager has a dependency on the Accessors.h file which causes a link error + # when building the TestCommissionManager + if (!chip_enable_icd_server && chip_config_network_layer_ble && (chip_device_platform == "linux" || chip_device_platform == "darwin")) { test_sources += [ "TestCommissionManager.cpp" ] public_deps += [ "${chip_root}/src/app/server" ] diff --git a/src/app/tests/TestPowerSourceCluster.cpp b/src/app/tests/TestPowerSourceCluster.cpp new file mode 100644 index 00000000000000..e224571a45780d --- /dev/null +++ b/src/app/tests/TestPowerSourceCluster.cpp @@ -0,0 +1,339 @@ +/* + * + * Copyright (c) 2021 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. + */ + +#include "lib/support/CHIPMem.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace app { + +class TestPowerSourceCluster +{ +public: + static void TestEndpointList(nlTestSuite * apSuite, void * apContext); +}; + +std::vector ReadEndpointsThroughAttributeReader(nlTestSuite * apSuite, EndpointId endpoint) +{ + Clusters::PowerSourceAttrAccess & attrAccess = Clusters::TestOnlyGetPowerSourceAttrAccess(); + CHIP_ERROR err = CHIP_NO_ERROR; + + // Write TLV through the attribute access interface into the buffer + + // Buffer setup + constexpr size_t buflen = 128; + uint8_t buf[buflen]; + memset(buf, 0, buflen); + + // Create the builders + TLV::TLVWriter tlvWriter; + tlvWriter.Init(buf); + + AttributeReportIBs::Builder builder; + builder.Init(&tlvWriter); + + ConcreteAttributePath path(endpoint, Clusters::PowerSource::Id, Clusters::PowerSource::Attributes::EndpointList::Id); + ConcreteReadAttributePath readPath(path); + chip::DataVersion dataVersion(0); + AttributeValueEncoder aEncoder(builder, 0, path, dataVersion); + + err = attrAccess.Read(readPath, aEncoder); + + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // Read out from the buffer. This comes back as a nested struct + // AttributeReportIBs is a list of + // AttributeReportIB structs containing + // AttributeDataIB struct, which holds DataVersion (tag 0), AttributePathIB (tag 1) and Data (tag 2) + + TLV::TLVReader reader; + reader.Init(buf); + + TLV::TLVReader attrReportsReader; + TLV::TLVReader attrReportReader; + TLV::TLVReader attrDataReader; + + reader.Next(); + reader.OpenContainer(attrReportsReader); + + attrReportsReader.Next(); + attrReportsReader.OpenContainer(attrReportReader); + + attrReportReader.Next(); + attrReportReader.OpenContainer(attrDataReader); + + // We're now in the attribute data IB, skip to the desired tag, we want TagNum = 2 + attrDataReader.Next(); + for (int i = 0; i < 3 && !(IsContextTag(attrDataReader.GetTag()) && TagNumFromTag(attrDataReader.GetTag()) == 2); ++i) + { + attrDataReader.Next(); + } + NL_TEST_ASSERT(apSuite, IsContextTag(attrDataReader.GetTag())); + NL_TEST_ASSERT(apSuite, TagNumFromTag(attrDataReader.GetTag()) == 2); + + // OK, we should be in the right spot now, let's decode the list. + Clusters::PowerSource::Attributes::EndpointList::TypeInfo::DecodableType list; + err = list.Decode(attrDataReader); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + std::vector ret; + auto iter = list.begin(); + while (iter.Next()) + { + ret.push_back(iter.GetValue()); + } + return ret; +} + +void TestPowerSourceCluster::TestEndpointList(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + Clusters::PowerSourceServer & powerSourceServer = Clusters::PowerSourceServer::Instance(); + + // test that when we read everything we get an empty list as nothing has been set up yet + for (EndpointId i = 0; i < 11; ++i) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, i); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + + if (powerSourceServer.GetNumSupportedEndpointLists() < 2 || + powerSourceServer.GetNumSupportedEndpointLists() > std::numeric_limits::max()) + { + // Test assumes at least two endpoints. This runs on linux, not worthwhile to run on platforms with fewer endpoints. + return; + } + + // ***************** + // Test setting, getting and reading through the attribute access interface + // ***************** + EndpointId list0[5] = { 1, 2, 3, 4, 5 }; + EndpointId list1[10] = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + EndpointId listRest[1] = { 2 }; + + // we checked earlier that this fit + // This test just uses endpoints in order, so we want to set endpoints from + // 0 to numEndpoints - 1, and use this for overflow checking + EndpointId numEndpoints = static_cast(powerSourceServer.GetNumSupportedEndpointLists()); + + // Endpoint 0 - list of 5 + err = powerSourceServer.SetEndpointList(0, Span(list0)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + const Span * readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // Endpoint 1 - list of 10 + err = powerSourceServer.SetEndpointList(1, Span(list1)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints - list of 1 + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Check for out of memory error when setting too many endpoints + // ***************** + // pick a random endpoint number for the power cluster - it doesn't matter, we don't have space anyway. + err = powerSourceServer.SetEndpointList(55, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_NO_MEMORY); + + // ***************** + // Recheck getting and reading after OOM + // ***************** + // EP0 + readBack = powerSourceServer.GetEndpointList(0); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 5); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list0[i]); + } + + // EP1 + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 10); + for (size_t i = 0; i < readBack->size(); ++i) + { + NL_TEST_ASSERT(apSuite, readBack->data()[i] == list1[i]); + } + + // Remaining endpoints + for (EndpointId ep = 2; ep < numEndpoints; ++ep) + { + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_EXIT_ON_FAILED_ASSERT(apSuite, readBack != nullptr); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + } + + // ***************** + // Test overwriting + // ***************** + // Overwrite a list + err = powerSourceServer.SetEndpointList(1, Span(listRest)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(1); + NL_TEST_ASSERT(apSuite, readBack->size() == 1); + if (readBack->size() == 1) + { + NL_TEST_ASSERT(apSuite, readBack->data()[0] == listRest[0]); + } + + // Ensure only the overwritten list was changed, using read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + if (ep == 0) + { + NL_TEST_ASSERT(apSuite, vec.size() == 5); + for (size_t j = 0; j < vec.size(); ++j) + { + NL_TEST_ASSERT(apSuite, vec[j] == list0[j]); + } + } + else if (ep == numEndpoints) + { + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } + else + { + NL_TEST_ASSERT(apSuite, vec.size() == 1); + if (vec.size() == 1) + { + NL_TEST_ASSERT(apSuite, vec[0] == listRest[0]); + } + } + } + + // ***************** + // Test removal + // ***************** + for (EndpointId ep = 0; ep < numEndpoints; ++ep) + { + err = powerSourceServer.SetEndpointList(ep, Span()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + readBack = powerSourceServer.GetEndpointList(ep); + NL_TEST_ASSERT(apSuite, readBack == nullptr); + } + + // Check through the read interface + for (EndpointId ep = 0; ep < numEndpoints + 1; ++ep) + { + std::vector vec = ReadEndpointsThroughAttributeReader(apSuite, ep); + NL_TEST_ASSERT(apSuite, vec.size() == 0); + } +} + +} // namespace app +} // namespace chip + +namespace { + +/** + * Test Suite. It lists all the test functions. + */ + +// clang-format off +const nlTest sTests[] = +{ + NL_TEST_DEF("TestEndpointList", chip::app::TestPowerSourceCluster::TestEndpointList), + NL_TEST_SENTINEL() +}; +// clang-format on + +/** + * Set up the test suite. + */ +int TestPowerSourceClusterContext_Setup(void * inContext) +{ + CHIP_ERROR error = chip::Platform::MemoryInit(); + if (error != CHIP_NO_ERROR) + return FAILURE; + return SUCCESS; +} + +/** + * Tear down the test suite. + */ +int TestPowerSourceClusterContext_Teardown(void * inContext) +{ + chip::app::Clusters::PowerSourceServer::Instance().Shutdown(); + chip::Platform::MemoryShutdown(); + return SUCCESS; +} + +// clang-format off +nlTestSuite sSuite = +{ + "TestPowerSourceCluster", + &sTests[0], + TestPowerSourceClusterContext_Setup, + TestPowerSourceClusterContext_Teardown +}; +// clang-format on + +} // namespace + +int TestPowerSource() +{ + nlTestRunner(&sSuite, nullptr); + return nlTestRunnerStats(&sSuite); +} + +CHIP_REGISTER_TEST_SUITE(TestPowerSource) diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index f886d6ead65bd8..0c490f86002f73 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -67,11 +67,17 @@ chip::EndpointId kInvalidTestEndpointId = 3; chip::DataVersion kTestDataVersion1 = 3; chip::DataVersion kTestDataVersion2 = 5; +static chip::System::Clock::Internal::MockClock gMockClock; +static chip::System::Clock::ClockBase * gRealClock; + class TestContext : public chip::Test::AppContext { public: static int Initialize(void * context) { + gRealClock = &chip::System::SystemClock(); + chip::System::Clock::Internal::SetSystemClockForTesting(&gMockClock); + if (AppContext::Initialize(context) != SUCCESS) return FAILURE; @@ -97,6 +103,7 @@ class TestContext : public chip::Test::AppContext static int Finalize(void * context) { chip::app::EventManagement::DestroyEventManagement(); + chip::System::Clock::Internal::SetSystemClockForTesting(gRealClock); if (AppContext::Finalize(context) != SUCCESS) return FAILURE; @@ -322,6 +329,13 @@ class TestReadInteraction static void TestReadClientInvalidReport(nlTestSuite * apSuite, void * apContext); static void TestReadHandlerInvalidAttributePath(nlTestSuite * apSuite, void * apContext); static void TestProcessSubscribeRequest(nlTestSuite * apSuite, void * apContext); +#if CHIP_CONFIG_ENABLE_ICD_SERVER + static void TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext); + static void TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext); +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER static void TestReadRoundtrip(nlTestSuite * apSuite, void * apContext); static void TestPostSubscribeRoundtripChunkReport(nlTestSuite * apSuite, void * apContext); static void TestReadRoundtripWithDataVersionFilter(nlTestSuite * apSuite, void * apContext); @@ -1491,6 +1505,385 @@ void TestReadInteraction::TestProcessSubscribeRequest(nlTestSuite * apSuite, voi NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +#if CHIP_CONFIG_ENABLE_ICD_SERVER +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is superior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MaxIntervalCeiling is inferior. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 0; + uint16_t kMaxIntervalCeiling = 1; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == idleModeInterval); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a multiple of its IdleModeInterval (GetPublisherSelectedIntervalLimit) + * as MaxInterval when the MinInterval > IdleModeInterval. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 5; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t idleModeInterval = readHandler.GetPublisherSelectedIntervalLimit(); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == (2 * idleModeInterval)); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose a maximal value for an uint16 if the multiple of the IdleModeInterval + * is greater than variable size. + */ +void TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = System::Clock::Seconds16::max().count(); + uint16_t kMaxIntervalCeiling = System::Clock::Seconds16::max().count(); + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +/** + * @brief Test validates that an ICD will choose the MaxIntervalCeiling as MaxInterval if the next multiple after the MinInterval + * is greater than the IdleModeInterval and MaxIntervalCeiling + */ +void TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + System::PacketBufferTLVWriter writer; + System::PacketBufferHandle subscribeRequestbuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + SubscribeRequestMessage::Builder subscribeRequestBuilder; + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager(), &ctx.GetFabricTable(), app::reporting::GetDefaultReportScheduler()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t kMinInterval = 3; + uint16_t kMaxIntervalCeiling = 3; + + Messaging::ExchangeContext * exchangeCtx = ctx.NewExchangeToAlice(nullptr, false); + + { + ReadHandler readHandler(*engine, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, + app::reporting::GetDefaultReportScheduler()); + + writer.Init(std::move(subscribeRequestbuf)); + err = subscribeRequestBuilder.Init(&writer); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.KeepSubscriptions(true); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MinIntervalFloorSeconds(kMinInterval); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + subscribeRequestBuilder.MaxIntervalCeilingSeconds(kMaxIntervalCeiling); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIBs::Builder & attributePathListBuilder = subscribeRequestBuilder.CreateAttributeRequests(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + AttributePathIB::Builder & attributePathBuilder = attributePathListBuilder.CreatePath(); + NL_TEST_ASSERT(apSuite, attributePathListBuilder.GetError() == CHIP_NO_ERROR); + + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).ListIndex(5).EndOfAttributePathIB(); + err = attributePathBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + attributePathListBuilder.EndOfAttributePathIBs(); + err = attributePathListBuilder.GetError(); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + subscribeRequestBuilder.IsFabricFiltered(false).EndOfSubscribeRequestMessage(); + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + + NL_TEST_ASSERT(apSuite, subscribeRequestBuilder.GetError() == CHIP_NO_ERROR); + err = writer.Finalize(&subscribeRequestbuf); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + err = readHandler.ProcessSubscribeRequest(std::move(subscribeRequestbuf)); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + uint16_t minInterval; + uint16_t maxInterval; + readHandler.GetReportingIntervals(minInterval, maxInterval); + + NL_TEST_ASSERT(apSuite, minInterval == kMinInterval); + NL_TEST_ASSERT(apSuite, maxInterval == kMaxIntervalCeiling); + } + engine->Shutdown(); + + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER + void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -1532,8 +1925,8 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 1; + readPrepareParams.mMaxIntervalCeilingSeconds = 2; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); { @@ -1597,7 +1990,11 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a dirtyPath5.mAttributeId = 4; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mGotEventResponse = false; delegate.mNumAttributeResponse = 0; @@ -1609,15 +2006,15 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse == true); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 2 different path, and 1 same path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1629,14 +2026,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, and one path is overlapped with another - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1648,14 +2045,14 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test report with 3 different path, all are not overlapped, one path is not interested for current subscription - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMinIntervalFloorSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; err = engine->GetReportingEngine().SetDirty(dirtyPath1); @@ -1667,18 +2064,13 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); // Test empty report - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); delegate.mGotReport = false; @@ -1731,7 +2123,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite readPrepareParams.mpAttributePathParamsList = nullptr; readPrepareParams.mAttributePathParamsListSize = 0; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 3600; printf("\nSend first subscribe request message with wildcard urgent event to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); @@ -1752,8 +2144,7 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); - - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers() == 2); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); @@ -1777,40 +2168,39 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite nonUrgentDelegate.mGotEventResponse = false; nonUrgentDelegate.mGotReport = false; - // wait for min interval 2 seconds (in test, we use 1.6 seconds considering the time variation), expect no event is + // wait for min interval 1 seconds (in test, we use 0.6 seconds considering the time variation), expect no event is // received, then wait for 0.8 seconds, then the urgent event would be sent out // currently DriveIOUntil will call `DriveIO` at least once, which means that if there is any CPU scheduling issues, // there's a chance 1.9s will already have elapsed by the time we get there, which will result in DriveIO being called when // it shouldn't. Better fix could happen inside DriveIOUntil, not sure the sideeffect there. - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1600)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + + // Advance monotonic looping to allow events to trigger + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(600)); + ctx.GetIOContext().DriveIO(); NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(800)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + startTime = gMockClock.GetMonotonicTimestamp(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(800)); + + // Service Timer expired event + ctx.GetIOContext().DriveIO(); + + // Service Engine Run + ctx.GetIOContext().DriveIO(); + + // Service EventManagement event + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mGotEventResponse); // Since we just sent a report for our urgent subscription, the min interval of the urgent subcription should have been // updated NL_TEST_ASSERT(apSuite, - reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > - System::SystemClock().GetMonotonicTimestamp()); + reportScheduler->GetMinTimestampForHandler(delegate.mpReadHandler) > gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !delegate.mpReadHandler->IsDirty()); delegate.mGotEventResponse = false; @@ -1818,19 +2208,12 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite // should be in the past NL_TEST_ASSERT(apSuite, reportScheduler->GetMinTimestampForHandler(nonUrgentDelegate.mpReadHandler) < - System::SystemClock().GetMonotonicTimestamp()); + gMockClock.GetMonotonicTimestamp()); NL_TEST_ASSERT(apSuite, !nonUrgentDelegate.mpReadHandler->IsDirty()); - // Wait for the min interval timer to fire. - startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(2100)) - { - break; - } - ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed - } + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(2100)); + ctx.GetIOContext().DriveIO(); // No reporting should have happened. NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); @@ -1938,15 +2321,52 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap NL_TEST_ASSERT(apSuite, delegate.mGotReport); - // We have 29 attributes in our mock attribute storage. And we subscribed twice. - // And attribute 3/2/4 is a list with 6 elements and list chunking is - // applied to it, but the way the packet boundaries fall we get two of - // its items as a single list, followed by 4 more single items for one - // of our subscriptions, and 3 as a single list followed by 3 single - // items for the other. +#if CHIP_CONFIG_ENABLE_EVENTLIST_ATTRIBUTE + // Mock attribute storage in src/app/util/mock/attribute-storage.cpp + // has the following items + // - Endpoint 0xFFFE + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (3 attributes) + // - Endpoint 0xFFFD + // - cluster 0xFFF1'FC01 (2 attributes) + // - cluster 0xFFF1'FC02 (4 attributes) + // - cluster 0xFFF1'FC03 (5 attributes) + // - Endpoint 0xFFFC + // - cluster 0xFFF1'FC01 (3 attributes) + // - cluster 0xFFF1'FC02 (6 attributes) + // - cluster 0xFFF1'FC03 (2 attributes) + // - cluster 0xFFF1'FC04 (2 attributes) + // + // For at total of 29 attributes. There are two wildcard subscription + // paths, for a total of 58 attributes. + // + // Attribute 0xFFFC::0xFFF1'FC02::0xFFF1'0004 (kMockEndpoint3::MockClusterId(2)::MockAttributeId(4)) + // is a list of 6 elements of size 256 bytes each, which cannot fit in a single + // packet, so gets list chunking applied to it. + // + // Because delegate.mNumAttributeResponse counts AttributeDataIB instances, not attributes, + // the count will depend on exactly how the list for attribute + // 0xFFFC::0xFFF1'FC02::0xFFF1'0004 is chunked. For each of the two instances of that attribute + // in the response, there will be one AttributeDataIB for the start of the list (which will include + // some number of 256-byte elements), then one AttributeDataIB for each of the remaining elements. + // + // When EventList is enabled, for the first report for the list attribute we receive two + // of its items in the initial list, then 4 additional items. For the second report we + // receive 3 items in the initial list followed by 3 additional items. // // Thus we should receive 29*2 + 4 + 3 = 65 attribute data in total. - NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 65); + constexpr size_t kExpectedAttributeResponse = 65; +#else + // When EventList is not enabled, the packet boundaries shift and for the first + // report for the list attribute we receive two of its items in the initial list, + // then 4 additional items. For the second report we receive 0 items in + // the initial list followed by 6 additional items. + // + // Thus we should receive 29*2 + 4 + 6 = 68 attribute data when the eventlist + // attribute is not available. + constexpr size_t kExpectedAttributeResponse = 68; +#endif + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == kExpectedAttributeResponse); NL_TEST_ASSERT(apSuite, delegate.mNumArrayItems == 12); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); @@ -1954,7 +2374,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a concrete path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -1968,9 +2387,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); // We subscribed wildcard path twice, so we will receive two reports here. NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); @@ -1978,7 +2394,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap // Set a endpoint dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; @@ -2000,10 +2415,6 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap ctx.DrainAndServiceIO(); } while (last != delegate.mNumAttributeResponse); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); - NL_TEST_ASSERT(apSuite, delegate.mGotReport); // Mock endpoint3 has 13 attributes in total, and we subscribed twice. // And attribute 3/2/4 is a list with 6 elements and list chunking // is applied to it, but the way the packet boundaries fall we get two of @@ -2074,7 +2485,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi // Set a partial overlapped path dirty { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2087,9 +2497,6 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2155,7 +2562,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit // Set a full overlapped path dirty and expect to receive one E2C3A1 { - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2165,9 +2571,6 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, delegate.mReceivedAttributePaths[0].mEndpointId == Test::kMockEndpoint2); @@ -2282,11 +2685,11 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); delegate.mpReadHandler = engine->ActiveHandlerAt(0); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); - // Manually trigger the callback that would schedule the next report as it would normally have been called if the time had - // elapsed as simulated above - reportScheduler->RunNodeCallbackForHandler(delegate.mpReadHandler); + // Advance monotonic timestamp for min interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + + NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); NL_TEST_ASSERT(apSuite, engine->GetReportingEngine().IsRunScheduled()); ctx.DrainAndServiceIO(); @@ -2425,8 +2828,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu readPrepareParams.mAttributePathParamsListSize = 2; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2462,7 +2865,6 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu dirtyPath2.mAttributeId = 2; // Test report with 2 different path - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; @@ -2473,14 +2875,13 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu ctx.DrainAndServiceIO(); - NL_TEST_ASSERT( - apSuite, - !reportScheduler->CheckFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + // Wait for max interval to elapse + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; ctx.ExpireSessionBobToAlice(); @@ -2798,8 +3199,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2828,8 +3229,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -2901,8 +3303,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; - readPrepareParams.mMaxIntervalCeilingSeconds = 5; + readPrepareParams.mMinIntervalFloorSeconds = 0; + readPrepareParams.mMaxIntervalCeilingSeconds = 1; delegate.mNumAttributeResponse = 0; readPrepareParams.mKeepSubscriptions = false; @@ -2931,8 +3333,9 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui dirtyPath1.mEndpointId = Test::kMockEndpoint3; dirtyPath1.mAttributeId = Test::MockAttributeId(4); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); - reportScheduler->SetFlagsForHandler(delegate.mpReadHandler, ReadHandlerNode::TestFlags::MaxIntervalElapsed, true); + gMockClock.AdvanceMonotonic(System::Clock::Seconds16(readPrepareParams.mMaxIntervalCeilingSeconds)); + ctx.GetIOContext().DriveIO(); + err = engine->GetReportingEngine().SetDirty(dirtyPath1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); delegate.mGotReport = false; @@ -3002,7 +3405,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap readPrepareParams.mpAttributePathParamsList = attributePathParams; readPrepareParams.mAttributePathParamsListSize = 1; - readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 5; delegate.mNumAttributeResponse = 0; @@ -3037,28 +3440,25 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap delegate.mNumAttributeResponse = 0; delegate.mNumArrayItems = 0; - // wait for min interval 2 seconds(in test, we use 1.9second considering the time variation), expect no event is received, + // wait for min interval 1 seconds(in test, we use 0.9second considering the time variation), expect no event is received, // then wait for 0.5 seconds, then all chunked dirty reports are sent out, which would not honor minInterval - System::Clock::Timestamp startTime = System::SystemClock().GetMonotonicTimestamp(); - while (true) - { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(1900)) - { - break; - } - ctx.GetIOContext().DriveIO(); - } + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(900)); + ctx.GetIOContext().DriveIO(); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 0); - startTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = gMockClock.GetMonotonicTimestamp(); + + // Increment in time is done by steps here to allow for multiple IO processing at the right time and allow the timer to be + // rescheduled accordingly while (true) { - if ((System::SystemClock().GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) + ctx.GetIOContext().DriveIO(); + if ((gMockClock.GetMonotonicTimestamp() - startTime) >= System::Clock::Milliseconds32(500)) { break; } - ctx.GetIOContext().DriveIO(); + gMockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); } - ctx.DrainAndServiceIO(); } // Two chunked reports carry 4 attributeDataIB: 1 with a list of 3 items, // and then one per remaining item. @@ -4313,14 +4713,11 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * NL_TEST_ASSERT(apSuite, SessionHandle(*readHandler->GetSession()) == ctx.GetSessionAliceToBob()); // Test that we send reports as needed. - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); - ctx.DrainAndServiceIO(); - NL_TEST_ASSERT(apSuite, - !reportScheduler->CheckFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed)); + NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 1); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); @@ -4330,7 +4727,6 @@ void TestReadInteraction::TestSubscriptionReportWithDefunctSession(nlTestSuite * // Test that if the session is defunct we don't send reports and clean // up properly. readHandler->GetSession()->MarkAsDefunct(); - reportScheduler->SetFlagsForHandler(readHandler, ReadHandlerNode::TestFlags::MinIntervalElapsed, true); delegate.mGotReport = false; delegate.mNumAttributeResponse = 0; engine->GetReportingEngine().SetDirty(subscribePath); @@ -4382,6 +4778,18 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadClientInvalidReport", chip::app::TestReadInteraction::TestReadClientInvalidReport), NL_TEST_DEF("TestReadHandlerInvalidAttributePath", chip::app::TestReadInteraction::TestReadHandlerInvalidAttributePath), NL_TEST_DEF("TestProcessSubscribeRequest", chip::app::TestReadInteraction::TestProcessSubscribeRequest), + /* + We need to figure out a way to run unit tests with an ICD build without affecting + all the standard unit tests + https://github.com/project-chip/connectedhomeip/issues/28446 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestInfMaxIntervalCeiling", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInfMaxIntervalCeiling), + NL_TEST_DEF("TestICDProcessSubscribeRequestSupMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestSupMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestMaxMinInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestMaxMinInterval), + NL_TEST_DEF("TestICDProcessSubscribeRequestInvalidIdleModeInterval", chip::app::TestReadInteraction::TestICDProcessSubscribeRequestInvalidIdleModeInterval), +#endif // #if CHIP_CONFIG_ENABLE_ICD_SERVER NL_TEST_DEF("TestSubscribeRoundtrip", chip::app::TestReadInteraction::TestSubscribeRoundtrip), NL_TEST_DEF("TestPostSubscribeRoundtripChunkReport", chip::app::TestReadInteraction::TestPostSubscribeRoundtripChunkReport), NL_TEST_DEF("TestReadClientReceiveInvalidMessage", chip::app::TestReadInteraction::TestReadClientReceiveInvalidMessage), @@ -4400,7 +4808,15 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandlerInvalidSubscribeRequest", chip::app::TestReadInteraction::TestReadHandlerInvalidSubscribeRequest), NL_TEST_DEF("TestSubscribeInvalidateFabric", chip::app::TestReadInteraction::TestSubscribeInvalidateFabric), NL_TEST_DEF("TestShutdownSubscription", chip::app::TestReadInteraction::TestShutdownSubscription), + /* + Disable test when running the ICD specific unit tests. + Test tests reporting feature with hard coded time jumps which don't take into account that an ICD + can change the requested MaxInterval during the subscription response / request process + https://github.com/project-chip/connectedhomeip/issues/28419 + */ +#if CHIP_CONFIG_ENABLE_ICD_SERVER != 1 NL_TEST_DEF("TestSubscribeUrgentWildcardEvent", chip::app::TestReadInteraction::TestSubscribeUrgentWildcardEvent), +#endif NL_TEST_DEF("TestSubscribeWildcard", chip::app::TestReadInteraction::TestSubscribeWildcard), NL_TEST_DEF("TestSubscribePartialOverlap", chip::app::TestReadInteraction::TestSubscribePartialOverlap), NL_TEST_DEF("TestSubscribeSetDirtyFullyOverlap", chip::app::TestReadInteraction::TestSubscribeSetDirtyFullyOverlap), diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index bc1091050d828a..cc69380fa16796 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -74,6 +74,345 @@ tests: constraints: minValue: 3 + # TODO(#28396): Re-enabled when CI wouldn't break on this syntax + # + # command: "readAttribute" + # attribute: "ClusterRevision" + # response: + # saveAs: ClusterRevisionValue + # constraints: + # minValue: 1 + # maxValue: 2 + # type: int16u + + # - label: "Creates a new variable to hold if the cluster revision is == 2" + # cluster: EqualityCommands + # command: UnsignedNumberEquals + # arguments: + # values: + # - name: Value1 + # value: ClusterRevisionValue + # - name: Value2 + # value: 2 + # response: + # - values: + # - name: Equals + # saveAs: ClusterIsRevision2 + + ########### KeySetWrite Epoch0 field validations + - label: "KeySetWrite with EpochKey0 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 1110000, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: null, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 0, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey0 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey0 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "", + EpochStartTime0: 1, + EpochKey1: null, + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + ########### KeySetWrite Epoch1 field validations + - label: "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: null, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochKey1 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: null, + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey1 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey1 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochStartTime1 not later than EpochStart0 fails + with INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1, + EpochKey2: null, + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + ########### KeySetWrite Epoch2 field validations + - label: "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND" + command: "KeySetWrite" + # runIf: ClusterIsRevision2 + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: null, + } + response: + error: INVALID_COMMAND + + - label: "KeySetWrite with EpochKey2 null fails INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: null, + EpochStartTime2: 1110002, + } + response: + error: INVALID_COMMAND + + - label: + "KeySetWrite with EpochKey2 with length 1 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xc0", + EpochStartTime2: 1110002, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochKey2 with length 0 != 16 fails with + CONSTRAINT_ERROR" + # runIf: ClusterIsRevision2 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "", + EpochStartTime2: 1110002, + } + response: + error: CONSTRAINT_ERROR + + - label: + "KeySetWrite with EpochStartTime2 not later than EpochStart1 fails + with INVALID_COMMAND" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 100, + } + response: + error: INVALID_COMMAND + + ################ Rest of normal checks for KeySetWrite - label: "KeySet Write 1" command: "KeySetWrite" arguments: @@ -199,6 +538,25 @@ tests: # Note: There's always an IPK keyset with index 0 contains: [0x01a1, 0x01a2, 0] + - label: "Write one keyset too many when already full" + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x0222, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xd1\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", + EpochStartTime0: 3110000, + EpochKey1: "\xe1\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef", + EpochStartTime1: 3110001, + EpochKey2: "\xf1\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", + EpochStartTime2: 3110002, + } + response: + error: RESOURCE_EXHAUSTED + - label: "Write Group Keys (invalid)" command: "writeAttribute" attribute: "GroupKeyMap" diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index 6b3d29c1fc5f6b..fb52bd71a48a0b 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -32,7 +32,7 @@ tests: command: "readAttribute" attribute: "IdleModeInterval" response: - value: 500 + value: 2000 - label: "Read ActiveModeInterval" command: "readAttribute" diff --git a/src/app/tests/suites/TestReadNoneSubscribeNone.yaml b/src/app/tests/suites/TestReadNoneSubscribeNone.yaml new file mode 100644 index 00000000000000..928dde69aecb8d --- /dev/null +++ b/src/app/tests/suites/TestReadNoneSubscribeNone.yaml @@ -0,0 +1,40 @@ +# Copyright (c) 2023 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: ReadNone/SuscribeNone Tests + +config: + nodeId: 0x12344321 + cluster: "Unit Testing" + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Read Request Message with no paths." + cluster: "AnyCommands" + command: "ReadNone" + + - label: "Subscribe Request Message with no paths." + cluster: "AnyCommands" + command: "SubscribeNone" + minInterval: 1 + maxInterval: 2 + response: + error: INVALID_ACTION diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 426f1a65956d06..4267b90a2388dc 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -58,7 +58,7 @@ DGSW.C.C00.Tx=1 PICS_USER_PROMPT=0 PICS_SKIP_SAMPLE_APP=0 PICS_SDK_CI_ONLY=1 -PICS_EVENT_LIST_ENABLED=1 +PICS_EVENT_LIST_ENABLED=0 # WindowCovering aka WNCV WNCV.S=1 diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp index c6c68441a127d4..a2c418435990e4 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.cpp @@ -503,6 +503,40 @@ void InteractionModelReports::CleanupReadClient(ReadClient * aReadClient) mReadClients.end()); } +CHIP_ERROR InteractionModelReports::ReportNone(chip::DeviceProxy * device, chip::app::ReadClient::InteractionType interactionType) +{ + AttributePathParams attributePathParams[kMaxAllowedPaths]; + EventPathParams eventPathParams[kMaxAllowedPaths]; + + ReadPrepareParams params(device->GetSecureSession().Value()); + params.mpEventPathParamsList = eventPathParams; + params.mEventPathParamsListSize = 0; + params.mEventNumber = mEventNumber; + params.mpAttributePathParamsList = attributePathParams; + params.mAttributePathParamsListSize = 0; + + if (mFabricFiltered.HasValue()) + { + params.mIsFabricFiltered = mFabricFiltered.Value(); + } + + if (interactionType == ReadClient::InteractionType::Subscribe) + { + params.mMinIntervalFloorSeconds = mMinInterval; + params.mMaxIntervalCeilingSeconds = mMaxInterval; + if (mKeepSubscriptions.HasValue()) + { + params.mKeepSubscriptions = mKeepSubscriptions.Value(); + } + } + + auto client = std::make_unique(InteractionModelEngine::GetInstance(), device->GetExchangeManager(), + mBufferedReadAdapter, interactionType); + ReturnErrorOnFailure(client->SendRequest(params)); + mReadClients.push_back(std::move(client)); + return CHIP_NO_ERROR; +} + CHIP_ERROR InteractionModelReports::ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds, diff --git a/src/app/tests/suites/commands/interaction_model/InteractionModel.h b/src/app/tests/suites/commands/interaction_model/InteractionModel.h index f033349fb26249..c52ff744fac791 100644 --- a/src/app/tests/suites/commands/interaction_model/InteractionModel.h +++ b/src/app/tests/suites/commands/interaction_model/InteractionModel.h @@ -90,6 +90,8 @@ class InteractionModelReports std::vector clusterIds, std::vector eventIds, chip::app::ReadClient::InteractionType interactionType); + CHIP_ERROR ReadNone(chip::DeviceProxy * device) { return ReportNone(device, chip::app::ReadClient::InteractionType::Read); } + CHIP_ERROR ReadAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds) @@ -97,6 +99,11 @@ class InteractionModelReports return ReportAll(device, endpointIds, clusterIds, attributeIds, eventIds, chip::app::ReadClient::InteractionType::Read); } + CHIP_ERROR SubscribeNone(chip::DeviceProxy * device) + { + return ReportNone(device, chip::app::ReadClient::InteractionType::Subscribe); + } + CHIP_ERROR SubscribeAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds) @@ -105,6 +112,8 @@ class InteractionModelReports chip::app::ReadClient::InteractionType::Subscribe); } + CHIP_ERROR ReportNone(chip::DeviceProxy * device, chip::app::ReadClient::InteractionType interactionType); + CHIP_ERROR ReportAll(chip::DeviceProxy * device, std::vector endpointIds, std::vector clusterIds, std::vector attributeIds, std::vector eventIds, chip::app::ReadClient::InteractionType interactionType); diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 9c4a7ca6a5f069..20ab5fcfc0b508 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -181,14 +181,11 @@ typedef struct uint16_t endpointSize; } EmberAfEndpointType; -#ifdef DOXYGEN_SHOULD_SKIP_THIS -enum EmberAfEndpointBitmask; -#else -typedef uint8_t EmberAfEndpointBitmask; -enum -#endif -{ EMBER_AF_ENDPOINT_DISABLED = 0x00, - EMBER_AF_ENDPOINT_ENABLED = 0x01, +enum class EmberAfEndpointOptions : uint8_t +{ + isEnabled = 0x1, + isFlatComposition = 0x2, + isTreeComposition = 0x3, }; /** @@ -209,7 +206,7 @@ struct EmberAfDefinedEndpoint /** * Meta-data about the endpoint */ - EmberAfEndpointBitmask bitmask = EMBER_AF_ENDPOINT_DISABLED; + chip::BitMask bitmask; /** * Endpoint type for this endpoint. */ diff --git a/src/app/util/af.h b/src/app/util/af.h index 1ea0fa64872698..0875c09478c8d8 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -130,7 +130,7 @@ extern EmberAfDefinedEndpoint emAfEndpoints[]; #endif /** - * @brief Returns root endpoint of a composed bridged device + * @brief Returns parent endpoint for a given endpoint index */ chip::EndpointId emberAfParentEndpointFromIndex(uint16_t index); @@ -303,5 +303,30 @@ class EnabledEndpointsWithServerCluster ClusterId mClusterId; }; +/** + * @brief Sets the parent endpoint for a given endpoint + */ +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint); + +/** + * @brief Sets an Endpoint to use Flat Composition + */ +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Sets an Endpoint to use Tree Composition + */ +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has flat composition + */ +bool IsFlatCompositionForEndpoint(EndpointId endpoint); + +/** + * @brief Returns true is an Endpoint has tree composition + */ +bool IsTreeCompositionForEndpoint(EndpointId endpoint); + } // namespace app } // namespace chip diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 788723a2162bf5..118e38f78961f2 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -192,7 +192,9 @@ void emberAfEndpointConfigure() emAfEndpoints[ep].deviceTypeList = endpointDeviceTypeList(ep); emAfEndpoints[ep].endpointType = endpointTypeMacro(ep); emAfEndpoints[ep].dataVersions = currentDataVersions; - emAfEndpoints[ep].bitmask = EMBER_AF_ENDPOINT_ENABLED; + + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isEnabled); + emAfEndpoints[ep].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); // Increment currentDataVersions by 1 (slot) for every server cluster // this endpoint has. @@ -271,7 +273,7 @@ EmberAfStatus emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const Emb emAfEndpoints[index].endpointType = ep; emAfEndpoints[index].dataVersions = dataVersionStorage.data(); // Start the endpoint off as disabled. - emAfEndpoints[index].bitmask = EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); emAfEndpoints[index].parentEndpointId = parentEndpointId; emberAfSetDynamicEndpointCount(MAX_ENDPOINT_COUNT - FIXED_ENDPOINT_COUNT); @@ -322,7 +324,7 @@ uint16_t emberAfEndpointCount() bool emberAfEndpointIndexIsEnabled(uint16_t index) { - return (emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED); + return (emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled)); } bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType) @@ -838,7 +840,7 @@ static uint16_t findIndexFromEndpoint(EndpointId endpoint, bool ignoreDisabledEn for (epi = 0; epi < emberAfEndpointCount(); epi++) { if (emAfEndpoints[epi].endpoint == endpoint && - (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask & EMBER_AF_ENDPOINT_ENABLED)) + (!ignoreDisabledEndpoints || emAfEndpoints[epi].bitmask.Has(EmberAfEndpointOptions::isEnabled))) { return epi; } @@ -919,11 +921,11 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) return false; } - currentlyEnabled = emAfEndpoints[index].bitmask & EMBER_AF_ENDPOINT_ENABLED; + currentlyEnabled = emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled); if (enable) { - emAfEndpoints[index].bitmask |= EMBER_AF_ENDPOINT_ENABLED; + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isEnabled); } #if defined(EZSP_HOST) @@ -962,7 +964,7 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) if (!enable) { - emAfEndpoints[index].bitmask &= EMBER_AF_ENDPOINT_DISABLED; + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isEnabled); } return true; @@ -1421,6 +1423,64 @@ app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId return nullptr; } + +CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint) +{ + uint16_t childIndex = emberAfIndexFromEndpoint(childEndpoint); + uint16_t parentIndex = emberAfIndexFromEndpoint(parentEndpoint); + + if (childIndex == kEmberInvalidEndpointIndex || parentIndex == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[childIndex].parentEndpointId = parentEndpoint; + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isTreeComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isFlatComposition); + return CHIP_NO_ERROR; +} + +CHIP_ERROR SetTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + emAfEndpoints[index].bitmask.Clear(EmberAfEndpointOptions::isFlatComposition); + emAfEndpoints[index].bitmask.Set(EmberAfEndpointOptions::isTreeComposition); + return CHIP_NO_ERROR; +} + +bool IsFlatCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isFlatComposition); +} + +bool IsTreeCompositionForEndpoint(EndpointId endpoint) +{ + uint16_t index = emberAfIndexFromEndpoint(endpoint); + if (index == kEmberInvalidEndpointIndex) + { + return false; + } + return emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isTreeComposition); +} + } // namespace app } // namespace chip diff --git a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml index 9c4fe41cd058d9..6dcf1b0eaa33a0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/group-key-mgmt-cluster.xml @@ -30,6 +30,17 @@ limitations under the License. + + + + + + + + + + + @@ -42,12 +53,6 @@ limitations under the License. - - - - - - General Group Key Management diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index be7b55cb5ed43e..350a52ca1c0277 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -1906,6 +1906,7 @@ limitations under the License. 0x0103 0x002D + IDENTIFY_TIME IDENTIFY_TYPE @@ -1924,6 +1925,7 @@ limitations under the License. 0x0103 0x002C + IDENTIFY_TIME IDENTIFY_TYPE diff --git a/src/controller/BUILD.gn b/src/controller/BUILD.gn index 3172c1815a1271..9fcbca7ea451e2 100644 --- a/src/controller/BUILD.gn +++ b/src/controller/BUILD.gn @@ -13,6 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/src/app/common_flags.gni") +import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/platform/device.gni") import("${chip_root}/src/platform/python.gni") @@ -21,15 +23,13 @@ static_library("controller") { sources = [ "CHIPCluster.h" ] - if (chip_controller) { + if (chip_controller && chip_build_controller) { sources += [ "AbstractDnssdDiscoveryController.cpp", "AutoCommissioner.cpp", "AutoCommissioner.h", "CHIPCommissionableNodeController.cpp", "CHIPCommissionableNodeController.h", - "CHIPDeviceController.cpp", - "CHIPDeviceController.h", "CHIPDeviceControllerFactory.cpp", "CHIPDeviceControllerFactory.h", "CommissioneeDeviceProxy.cpp", @@ -37,10 +37,6 @@ static_library("controller") { "CommissionerDiscoveryController.cpp", "CommissionerDiscoveryController.h", "CommissioningDelegate.cpp", - "CommissioningWindowOpener.cpp", - "CommissioningWindowOpener.h", - "CurrentFabricRemover.cpp", - "CurrentFabricRemover.h", "DeviceDiscoveryDelegate.h", "DevicePairingDelegate.h", "EmptyDataModelHandler.cpp", @@ -49,6 +45,16 @@ static_library("controller") { "SetUpCodePairer.cpp", "SetUpCodePairer.h", ] + if (chip_enable_read_client) { + sources += [ + "CHIPDeviceController.cpp", + "CHIPDeviceController.h", + "CommissioningWindowOpener.cpp", + "CommissioningWindowOpener.h", + "CurrentFabricRemover.cpp", + "CurrentFabricRemover.h", + ] + } } cflags = [ "-Wconversion" ] diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index ab37a52ece8e24..4324092871424b 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -221,6 +221,7 @@ class DLL_EXPORT ClusterBase return WriteAttribute(requestData, context, successCb, failureCb, NullOptional, doneCb, aDataVersion); } +#if CHIP_CONFIG_ENABLE_READ_CLIENT /** * Read an attribute and get a type-safe callback with the attribute value. */ @@ -399,6 +400,7 @@ class DLL_EXPORT ClusterBase onSubscriptionEstablishedCb, onResubscriptionAttemptCb, aKeepPreviousSubscriptions, aIsUrgentEvent); } +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT protected: Messaging::ExchangeManager & mExchangeManager; diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9fd8d1cfe7ee03..2d85fdce3068e4 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -384,8 +384,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY // make this commissioner discoverable public Protocols::UserDirectedCommissioning::InstanceNameResolver, #endif - public SessionEstablishmentDelegate, - public app::ClusterStateCache::Callback +#if CHIP_CONFIG_ENABLE_READ_CLIENT + public app::ClusterStateCache::Callback, +#endif + public SessionEstablishmentDelegate { public: DeviceCommissioner(); @@ -683,8 +685,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void RegisterPairingDelegate(DevicePairingDelegate * pairingDelegate) { mPairingDelegate = pairingDelegate; } DevicePairingDelegate * GetPairingDelegate() const { return mPairingDelegate; } +#if CHIP_CONFIG_ENABLE_READ_CLIENT // ClusterStateCache::Callback impl void OnDone(app::ReadClient *) override; +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT // Issue an NOC chain using the associated OperationalCredentialsDelegate. The NOC chain will // be provided in X509 DER format. @@ -915,11 +919,13 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, void SendCommissioningReadRequest(DeviceProxy * proxy, Optional timeout, app::AttributePathParams * readPaths, size_t readPathsSize); +#if CHIP_CONFIG_ENABLE_READ_CLIENT // Parsers for the two different read clients void ParseCommissioningInfo(); void ParseFabrics(); // Called by ParseCommissioningInfo void ParseTimeSyncInfo(ReadCommissioningInfo & info); +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT static CHIP_ERROR ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum err); @@ -959,8 +965,10 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, nullptr; // Commissioning delegate that issued the PerformCommissioningStep command CompletionStatus commissioningCompletionStatus; +#if CHIP_CONFIG_ENABLE_READ_CLIENT Platform::UniquePtr mAttributeCache; Platform::UniquePtr mReadClient; +#endif Credentials::AttestationVerificationResult mAttestationResult; Platform::UniquePtr mAttestationDeviceInfo; Credentials::DeviceAttestationVerifier * mDeviceAttestationVerifier = nullptr; diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index f39a3c7a65ed0e..c57cb9a57dd28c 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -65,6 +65,7 @@ CHIP_ERROR DeviceControllerFactory::Init(FactoryInitParams params) mOperationalKeystore = params.operationalKeystore; mOpCertStore = params.opCertStore; mCertificateValidityPolicy = params.certificateValidityPolicy; + mSessionResumptionStorage = params.sessionResumptionStorage; mEnableServerInteractions = params.enableServerInteractions; CHIP_ERROR err = InitSystemState(params); @@ -94,6 +95,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState() params.operationalKeystore = mOperationalKeystore; params.opCertStore = mOpCertStore; params.certificateValidityPolicy = mCertificateValidityPolicy; + params.sessionResumptionStorage = mSessionResumptionStorage; } return InitSystemState(params); @@ -195,12 +197,24 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) tempFabricTable = stateParams.fabricTable; } - auto sessionResumptionStorage = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(sessionResumptionStorage->Init(params.fabricIndependentStorage)); - stateParams.sessionResumptionStorage = std::move(sessionResumptionStorage); + SessionResumptionStorage * sessionResumptionStorage; + if (params.sessionResumptionStorage == nullptr) + { + auto ownedSessionResumptionStorage = chip::Platform::MakeUnique(); + ReturnErrorOnFailure(ownedSessionResumptionStorage->Init(params.fabricIndependentStorage)); + stateParams.ownedSessionResumptionStorage = std::move(ownedSessionResumptionStorage); + stateParams.externalSessionResumptionStorage = nullptr; + sessionResumptionStorage = stateParams.ownedSessionResumptionStorage.get(); + } + else + { + stateParams.ownedSessionResumptionStorage = nullptr; + stateParams.externalSessionResumptionStorage = params.sessionResumptionStorage; + sessionResumptionStorage = stateParams.externalSessionResumptionStorage; + } auto delegate = chip::Platform::MakeUnique(); - ReturnErrorOnFailure(delegate->Init(stateParams.sessionResumptionStorage.get(), stateParams.groupDataProvider)); + ReturnErrorOnFailure(delegate->Init(sessionResumptionStorage, stateParams.groupDataProvider)); stateParams.fabricTableDelegate = delegate.get(); ReturnErrorOnFailure(stateParams.fabricTable->AddFabricDelegate(stateParams.fabricTableDelegate)); delegate.release(); @@ -222,7 +236,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // Enable listening for session establishment messages. ReturnErrorOnFailure(stateParams.caseServer->ListenForSessionEstablishment( - stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, stateParams.sessionResumptionStorage.get(), + stateParams.exchangeMgr, stateParams.sessionMgr, stateParams.fabricTable, sessionResumptionStorage, stateParams.certificateValidityPolicy, stateParams.groupDataProvider)); // @@ -256,7 +270,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) CASEClientInitParams sessionInitParams = { .sessionManager = stateParams.sessionMgr, - .sessionResumptionStorage = stateParams.sessionResumptionStorage.get(), + .sessionResumptionStorage = sessionResumptionStorage, .certificateValidityPolicy = stateParams.certificateValidityPolicy, .exchangeMgr = stateParams.exchangeMgr, .fabricTable = stateParams.fabricTable, @@ -373,6 +387,7 @@ void DeviceControllerFactory::Shutdown() mOperationalKeystore = nullptr; mOpCertStore = nullptr; mCertificateValidityPolicy = nullptr; + mSessionResumptionStorage = nullptr; } void DeviceControllerSystemState::Shutdown() diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index f807f39e1fd570..04855d62cfc3d2 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -34,6 +34,7 @@ #include #include #include +#include namespace chip { @@ -106,8 +107,8 @@ struct SetupParams }; // TODO everything other than the fabric storage, group data provider, OperationalKeystore, -// OperationalCertificateStore and SessionKeystore here should be removed. We're blocked -// because of the need to support !CHIP_DEVICE_LAYER +// OperationalCertificateStore, SessionKeystore, and SessionResumptionStorage here should +// be removed. We're blocked because of the need to support !CHIP_DEVICE_LAYER struct FactoryInitParams { System::Layer * systemLayer = nullptr; @@ -121,6 +122,7 @@ struct FactoryInitParams FabricTable * fabricTable = nullptr; OperationalKeystore * operationalKeystore = nullptr; Credentials::OperationalCertificateStore * opCertStore = nullptr; + SessionResumptionStorage * sessionResumptionStorage = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif @@ -257,6 +259,7 @@ class DeviceControllerFactory Crypto::OperationalKeystore * mOperationalKeystore = nullptr; Credentials::OperationalCertificateStore * mOpCertStore = nullptr; Credentials::CertificateValidityPolicy * mCertificateValidityPolicy = nullptr; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; bool mEnableServerInteractions = false; }; diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index 37f85b1cd90784..6692fc6ecbc308 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -85,10 +85,18 @@ struct DeviceControllerSystemStateParams Credentials::GroupDataProvider * groupDataProvider = nullptr; Crypto::SessionKeystore * sessionKeystore = nullptr; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + SessionResumptionStorage * externalSessionResumptionStorage = nullptr; + // Params that will be deallocated via Platform::Delete in // DeviceControllerSystemState::Shutdown. DeviceTransportMgr * transportMgr = nullptr; - Platform::UniquePtr sessionResumptionStorage; + // NOTE: Exactly one of externalSessionResumptionStorage (externally provided, + // externally owned) or ownedSessionResumptionStorage (managed by the system + // state) must be non-null. + Platform::UniquePtr ownedSessionResumptionStorage; Credentials::CertificateValidityPolicy * certificateValidityPolicy = nullptr; SessionManager * sessionMgr = nullptr; Protocols::SecureChannel::UnsolicitedStatusHandler * unsolicitedStatusHandler = nullptr; @@ -132,8 +140,18 @@ class DeviceControllerSystemState mCASESessionManager(params.caseSessionManager), mSessionSetupPool(params.sessionSetupPool), mCASEClientPool(params.caseClientPool), mGroupDataProvider(params.groupDataProvider), mTimerDelegate(params.timerDelegate), mReportScheduler(params.reportScheduler), mSessionKeystore(params.sessionKeystore), - mFabricTableDelegate(params.fabricTableDelegate), mSessionResumptionStorage(std::move(params.sessionResumptionStorage)) + mFabricTableDelegate(params.fabricTableDelegate), + mOwnedSessionResumptionStorage(std::move(params.ownedSessionResumptionStorage)) { + if (mOwnedSessionResumptionStorage) + { + mSessionResumptionStorage = mOwnedSessionResumptionStorage.get(); + } + else + { + mSessionResumptionStorage = params.externalSessionResumptionStorage; + } + #if CONFIG_NETWORK_LAYER_BLE mBleLayer = params.bleLayer; #endif @@ -172,7 +190,7 @@ class DeviceControllerSystemState mUnsolicitedStatusHandler != nullptr && mExchangeMgr != nullptr && mMessageCounterManager != nullptr && mFabrics != nullptr && mCASESessionManager != nullptr && mSessionSetupPool != nullptr && mCASEClientPool != nullptr && mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr && - mSessionKeystore != nullptr; + mSessionKeystore != nullptr && mSessionResumptionStorage != nullptr; }; System::Layer * SystemLayer() const { return mSystemLayer; }; @@ -221,7 +239,8 @@ class DeviceControllerSystemState app::reporting::ReportScheduler * mReportScheduler = nullptr; Crypto::SessionKeystore * mSessionKeystore = nullptr; FabricTable::Delegate * mFabricTableDelegate = nullptr; - Platform::UniquePtr mSessionResumptionStorage; + SessionResumptionStorage * mSessionResumptionStorage = nullptr; + Platform::UniquePtr mOwnedSessionResumptionStorage; // If mTempFabricTable is not null, it was created during // DeviceControllerFactory::InitSystemState and needs to be diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index 88c1f902121de6..34491dd9edfebf 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -23,6 +23,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { namespace detail { @@ -328,3 +329,4 @@ CHIP_ERROR SubscribeEvent( } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index aa0e4394ad4e5e..f35a39670ee8e7 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -24,6 +24,7 @@ #include #include +#if CHIP_CONFIG_ENABLE_READ_CLIENT namespace chip { namespace Controller { @@ -290,3 +291,4 @@ class TypedReadEventCallback final : public app::ReadClient::Callback } // namespace Controller } // namespace chip +#endif // CHIP_CONFIG_ENABLE_READ_CLIENT diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f5434d4cd08ced..f024e626d4ed2a 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2577,6 +2577,10 @@ client cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } + bitmap Feature : BITMAP32 { + kCacheAndSync = 0x1; + } + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 637f8d4e6bd5d6..bc52b5ffeb934d 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1,5 +1,5 @@ { - "featureLevel": 96, + "featureLevel": 97, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -160,7 +160,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -392,7 +392,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -744,7 +744,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1006,7 +1006,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1170,7 +1170,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1608,7 +1608,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1884,7 +1884,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2080,7 +2080,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2228,7 +2228,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2440,7 +2440,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -2718,7 +2718,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3186,7 +3186,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3378,7 +3378,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3600,7 +3600,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3746,7 +3746,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3908,7 +3908,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4038,7 +4038,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4186,7 +4186,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -4814,7 +4814,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5094,7 +5094,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5446,7 +5446,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5580,7 +5580,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -5866,7 +5866,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -6088,7 +6088,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7254,7 +7254,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7620,7 +7620,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -7922,7 +7922,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8330,7 +8330,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8739,7 +8739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -8919,7 +8919,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9125,7 +9125,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9453,7 +9453,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9701,7 +9701,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9849,7 +9849,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -9979,7 +9979,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10127,7 +10127,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10280,7 +10280,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "500", @@ -10296,7 +10296,7 @@ "side": "server", "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10312,7 +10312,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "300", @@ -10344,7 +10344,7 @@ "side": "server", "type": "int32u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10360,7 +10360,7 @@ "side": "server", "type": "int16u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -10407,7 +10407,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10661,7 +10661,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -10814,7 +10814,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10830,7 +10830,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10846,7 +10846,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10893,7 +10893,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11046,7 +11046,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11062,7 +11062,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11078,7 +11078,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11125,7 +11125,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11337,7 +11337,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11490,7 +11490,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11506,7 +11506,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11522,7 +11522,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11569,7 +11569,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -11722,7 +11722,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11738,7 +11738,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11754,7 +11754,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11801,7 +11801,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12055,7 +12055,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12235,7 +12235,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12388,7 +12388,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12404,7 +12404,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12420,7 +12420,7 @@ "side": "server", "type": "int8u", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12467,7 +12467,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12631,7 +12631,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -12928,7 +12928,7 @@ "reportableChange": 0 }, { - "name": "SensitivityLevel", + "name": "SmokeSensitivityLevel", "code": 11, "mfgCode": null, "side": "server", @@ -12981,7 +12981,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13187,7 +13187,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13431,7 +13431,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13719,7 +13719,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -13852,7 +13852,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13868,7 +13868,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13884,7 +13884,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -13900,7 +13900,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13947,7 +13947,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -14064,7 +14064,7 @@ "side": "server", "type": "percent", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14080,7 +14080,7 @@ "side": "server", "type": "DegradationDirectionEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14096,7 +14096,7 @@ "side": "server", "type": "ChangeIndicationEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14112,7 +14112,7 @@ "side": "server", "type": "boolean", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -14159,7 +14159,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15079,7 +15079,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15621,7 +15621,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -15931,7 +15931,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -16447,7 +16447,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17407,7 +17407,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17697,7 +17697,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -17877,7 +17877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -18995,7 +18995,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19367,7 +19367,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19579,7 +19579,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -19775,7 +19775,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20051,7 +20051,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20247,7 +20247,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20443,7 +20443,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -20767,7 +20767,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21091,7 +21091,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21415,7 +21415,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -21739,7 +21739,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22063,7 +22063,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22387,7 +22387,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -22711,7 +22711,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23035,7 +23035,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23359,7 +23359,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -23683,7 +23683,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24007,7 +24007,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24171,7 +24171,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24387,7 +24387,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24587,7 +24587,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -24947,7 +24947,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25161,7 +25161,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25319,7 +25319,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25487,7 +25487,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25695,7 +25695,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -25893,7 +25893,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26109,7 +26109,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26385,7 +26385,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26569,7 +26569,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26877,7 +26877,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -26937,238 +26937,6 @@ } ] }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ChangeToMode", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Mode Base", - "code": 61731, - "mfgCode": null, - "define": "MODE_BASE_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "ChangeToModeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "SupportedModes", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMode", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, @@ -28765,7 +28533,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -28923,7 +28691,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index e236aef95fc41a..d55dfdf953c91c 100644 --- a/src/controller/java/AndroidCallbacks.cpp +++ b/src/controller/java/AndroidCallbacks.cpp @@ -17,8 +17,10 @@ #include "AndroidCallbacks.h" #include #include +#if USE_JAVA_TLV_ENCODE_DECODE #include #include +#endif #include #include #include @@ -243,14 +245,17 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); - jobject value = DecodeAttributeValue(aPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + + value = DecodeAttributeValue(aPath, readerForJavaObject, &err); // If we don't know this attribute, suppress it. if (err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB) { @@ -260,7 +265,7 @@ void ReportCallback::OnAttributeData(const app::ConcreteDataAttributePath & aPat VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(attributePathObj, nullptr, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(attributePathObj, nullptr, CHIP_JNI_ERROR_EXCEPTION_THROWN)); - +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); std::unique_ptr buffer = std::unique_ptr(new uint8_t[bufferLen]); @@ -354,10 +359,8 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -365,7 +368,11 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. if (err == CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB) { @@ -374,6 +381,7 @@ void ReportCallback::OnEventData(const app::EventHeader & aEventHeader, TLV::TLV VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(nullptr, eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(nullptr, eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); @@ -699,10 +707,8 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV return; } - TLV::TLVReader readerForJavaObject; TLV::TLVReader readerForJavaTLV; TLV::TLVReader readerForJson; - readerForJavaObject.Init(*apData); readerForJavaTLV.Init(*apData); readerForJson.Init(*apData); @@ -710,11 +716,16 @@ void ReportEventCallback::OnEventData(const app::EventHeader & aEventHeader, TLV jlong priorityLevel = static_cast(aEventHeader.mPriorityLevel); jlong timestamp = static_cast(aEventHeader.mTimestamp.mValue); - jobject value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); + jobject value = nullptr; +#if USE_JAVA_TLV_ENCODE_DECODE + TLV::TLVReader readerForJavaObject; + readerForJavaObject.Init(*apData); + value = DecodeEventValue(aEventHeader.mPath, readerForJavaObject, &err); // If we don't know this event, just skip it. VerifyOrReturn(err != CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB); VerifyOrReturn(err == CHIP_NO_ERROR, ReportError(eventPathObj, err)); VerifyOrReturn(!env->ExceptionCheck(), env->ExceptionDescribe(), ReportError(eventPathObj, CHIP_JNI_ERROR_EXCEPTION_THROWN)); +#endif // Create TLV byte array to pass to Java layer size_t bufferLen = readerForJavaTLV.GetRemainingLength() + readerForJavaTLV.GetLengthRead(); diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index 974cb882cd2a9e..110121d6e2e41c 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -653,12 +653,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.rssi, newElement_rssi); jclass wiFiInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct", - wiFiInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/WiFiScanResult", + wiFiInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class WiFiScanResult"); return; } jmethodID wiFiInterfaceScanResultStructCtor = @@ -666,8 +665,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "(Ljava/lang/Integer;[B[BLjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); if (wiFiInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterWiFiInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find WiFiScanResult constructor"); return; } @@ -717,12 +715,11 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( chip::JniReferences::GetInstance().CreateBoxedObject("java/lang/Integer", "(I)V", entry.lqi, newElement_lqi); jclass threadInterfaceScanResultStructClass; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct", - threadInterfaceScanResultStructClass); + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ThreadScanResult", + threadInterfaceScanResultStructClass); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct"); + ChipLogError(Zcl, "Could not find class ThreadScanResult"); return; } jmethodID threadInterfaceScanResultStructCtor = @@ -731,8 +728,7 @@ void AndroidDeviceControllerWrapper::OnScanNetworksSuccess( "Integer;[BLjava/lang/Integer;Ljava/lang/Integer;)V"); if (threadInterfaceScanResultStructCtor == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$NetworkCommissioningClusterThreadInterfaceScanResultStruct constructor"); + ChipLogError(Zcl, "Could not find ThreadScanResult constructor"); return; } diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index d6c78191e37fe0..39a8ab889d48ba 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -29,6 +29,8 @@ shared_library("jni") { output_extension = "dylib" } + defines = [] + # Temporary while we have circular dependencies between codegen.py and zap # generated files check_includes = false @@ -53,23 +55,13 @@ shared_library("jni") { "AttestationTrustStoreBridge.h", "BaseCHIPCluster-JNI.cpp", "CHIPAttributeTLVValueDecoder.h", - "CHIPDefaultCallbacks.cpp", - "CHIPDefaultCallbacks.h", "CHIPDeviceController-JNI.cpp", - "CHIPTLVValueDecoder-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPClustersWrite-JNI.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - "zap-generated/CHIPInvokeCallbacks.cpp", - "zap-generated/CHIPInvokeCallbacks.h", - "zap-generated/CHIPReadCallbacks.cpp", ] deps = [ "${chip_root}/src/controller/data_model", - "${chip_root}/src/controller/data_model:java-jni-sources", "${chip_root}/src/credentials:default_attestation_verifier", "${chip_root}/src/inet", "${chip_root}/src/lib", @@ -77,8 +69,26 @@ shared_library("jni") { "${chip_root}/src/platform", ] + if (matter_enable_java_generated_api) { + defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] + + sources += [ + "CHIPDefaultCallbacks.cpp", + "CHIPDefaultCallbacks.h", + "CHIPTLVValueDecoder-JNI.cpp", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPClustersWrite-JNI.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + "zap-generated/CHIPInvokeCallbacks.cpp", + "zap-generated/CHIPInvokeCallbacks.h", + "zap-generated/CHIPReadCallbacks.cpp", + ] + + deps += [ "${chip_root}/src/controller/data_model:java-jni-sources" ] + } + if (matter_enable_java_compilation) { - defines = [ "JAVA_MATTER_CONTROLLER_TEST" ] + defines += [ "JAVA_MATTER_CONTROLLER_TEST" ] sources += [ "${chip_root}/src/controller/ExamplePersistentStorage.cpp", @@ -313,14 +323,6 @@ android_library("java") { sources = [ "generated/java/chip/devicecontroller/ClusterIDMapping.java", - "generated/java/chip/devicecontroller/ClusterReadMapping.java", - "generated/java/chip/devicecontroller/ClusterWriteMapping.java", - "src/chip/clusterinfo/ClusterCommandCallback.java", - "src/chip/clusterinfo/ClusterInfo.java", - "src/chip/clusterinfo/CommandParameterInfo.java", - "src/chip/clusterinfo/CommandResponseInfo.java", - "src/chip/clusterinfo/DelegatedClusterCallback.java", - "src/chip/clusterinfo/InteractionInfo.java", "src/chip/devicecontroller/AttestationInfo.java", "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", "src/chip/devicecontroller/CSRInfo.java", @@ -329,7 +331,6 @@ android_library("java") { "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", "src/chip/devicecontroller/ChipIdLookup.java", - "src/chip/devicecontroller/ChipTLVValueDecoder.java", "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DeviceAttestationDelegate.java", "src/chip/devicecontroller/DiscoveredDevice.java", @@ -348,7 +349,9 @@ android_library("java") { "src/chip/devicecontroller/ReportEventCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", + "src/chip/devicecontroller/ThreadScanResult.java", "src/chip/devicecontroller/UnpairDeviceCallback.java", + "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -361,12 +364,26 @@ android_library("java") { "src/chip/devicecontroller/model/EventState.java", "src/chip/devicecontroller/model/InvokeElement.java", "src/chip/devicecontroller/model/NodeState.java", - "zap-generated/chip/devicecontroller/ChipClusters.java", - "zap-generated/chip/devicecontroller/ChipEventStructs.java", - "zap-generated/chip/devicecontroller/ChipStructs.java", - "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", ] + if (matter_enable_java_generated_api) { + sources += [ + "generated/java/chip/devicecontroller/ClusterReadMapping.java", + "generated/java/chip/devicecontroller/ClusterWriteMapping.java", + "src/chip/clusterinfo/ClusterCommandCallback.java", + "src/chip/clusterinfo/ClusterInfo.java", + "src/chip/clusterinfo/CommandParameterInfo.java", + "src/chip/clusterinfo/CommandResponseInfo.java", + "src/chip/clusterinfo/DelegatedClusterCallback.java", + "src/chip/clusterinfo/InteractionInfo.java", + "src/chip/devicecontroller/ChipTLVValueDecoder.java", + "zap-generated/chip/devicecontroller/ChipClusters.java", + "zap-generated/chip/devicecontroller/ChipEventStructs.java", + "zap-generated/chip/devicecontroller/ChipStructs.java", + "zap-generated/chip/devicecontroller/ClusterInfoMapping.java", + ] + } + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 916f65fb270819..33cb7a9ff3ae6e 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -389,10 +389,8 @@ public void onScanNetworksFailure(int errorCode) { public void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults) { + Optional> wiFiScanResults, + Optional> threadScanResults) { if (scanNetworksListener != null) { scanNetworksListener.onScanNetworksSuccess( networkingStatus, debugText, wiFiScanResults, threadScanResults); @@ -1268,10 +1266,8 @@ public interface ScanNetworksListener { void onScanNetworksSuccess( Integer networkingStatus, Optional debugText, - Optional> - wiFiScanResults, - Optional> - threadScanResults); + Optional> wiFiScanResults, + Optional> threadScanResults); } /** Interface to listen for callbacks from CHIPDeviceController. */ diff --git a/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java new file mode 100644 index 00000000000000..64c837bdca411d --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ThreadScanResult.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020-2022 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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class ThreadScanResult { + public Integer panId; + public Long extendedPanId; + public String networkName; + public Integer channel; + public Integer version; + public byte[] extendedAddress; + public Integer rssi; + public Integer lqi; + + public ThreadScanResult( + Integer panId, + Long extendedPanId, + String networkName, + Integer channel, + Integer version, + byte[] extendedAddress, + Integer rssi, + Integer lqi) { + this.panId = panId; + this.extendedPanId = extendedPanId; + this.networkName = networkName; + this.channel = channel; + this.version = version; + this.extendedAddress = extendedAddress; + this.rssi = rssi; + this.lqi = lqi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThreadScanResult {\n"); + output.append("\tpanId: "); + output.append(panId); + output.append("\n"); + output.append("\textendedPanId: "); + output.append(extendedPanId); + output.append("\n"); + output.append("\tnetworkName: "); + output.append(networkName); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\tversion: "); + output.append(version); + output.append("\n"); + output.append("\textendedAddress: "); + output.append(Arrays.toString(extendedAddress)); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("\tlqi: "); + output.append(lqi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java new file mode 100644 index 00000000000000..bcc01e0af26874 --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/WiFiScanResult.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020-2022 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. + * + */ +package chip.devicecontroller; + +import java.util.Arrays; + +public class WiFiScanResult { + public Integer security; + public byte[] ssid; + public byte[] bssid; + public Integer channel; + public Integer wiFiBand; + public Integer rssi; + + public WiFiScanResult( + Integer security, + byte[] ssid, + byte[] bssid, + Integer channel, + Integer wiFiBand, + Integer rssi) { + this.security = security; + this.ssid = ssid; + this.bssid = bssid; + this.channel = channel; + this.wiFiBand = wiFiBand; + this.rssi = rssi; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("WiFiScanResult {\n"); + output.append("\tsecurity: "); + output.append(security); + output.append("\n"); + output.append("\tssid: "); + output.append(Arrays.toString(ssid)); + output.append("\n"); + output.append("\tbssid: "); + output.append(Arrays.toString(bssid)); + output.append("\n"); + output.append("\tchannel: "); + output.append(channel); + output.append("\n"); + output.append("\twiFiBand: "); + output.append(wiFiBand); + output.append("\n"); + output.append("\trssi: "); + output.append(rssi); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 375a65cf7becbc..4b84c63d5ff30d 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -20,6 +20,7 @@ import("$dir_pw_build/python.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/src/platform/python.gni") +import("${chip_root}/src/system/system.gni") import("${dir_pw_unit_test}/test.gni") if (current_os == "mac") { @@ -33,6 +34,7 @@ config("controller_wno_deprecate") { declare_args() { chip_python_version = "0.0" chip_python_package_prefix = "chip" + chip_python_supports_stack_locking = chip_system_config_locking != "none" } shared_library("ChipDeviceCtrl") { @@ -77,12 +79,19 @@ shared_library("ChipDeviceCtrl") { "chip/internal/ChipThreadWork.h", "chip/internal/CommissionerImpl.cpp", "chip/logging/LoggingRedirect.cpp", + "chip/native/ChipMainLoopWork.h", "chip/native/PyChipError.cpp", "chip/tracing/TracingSetup.cpp", "chip/utils/DeviceProxyUtils.cpp", ] defines += [ "CHIP_CONFIG_MAX_GROUPS_PER_FABRIC=50" ] defines += [ "CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC=50" ] + + if (chip_python_supports_stack_locking) { + sources += [ "chip/native/ChipMainLoopWork_StackLock.cpp" ] + } else { + sources += [ "chip/native/ChipMainLoopWork_WorkSchedule.cpp" ] + } } else { sources += [ "chip/server/Options.cpp", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9d5670c8e8d930..d63180139714cf 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -13451,6 +13451,10 @@ class GroupKeySecurityPolicyEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, + class Bitmaps: + class Feature(IntFlag): + kCacheAndSync = 0x1 + class Structs: @dataclass class GroupInfoMapStruct(ClusterObject): diff --git a/src/controller/python/chip/native/ChipMainLoopWork.h b/src/controller/python/chip/native/ChipMainLoopWork.h new file mode 100644 index 00000000000000..831badefd8855b --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2023 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. + */ +#pragma once + +#include + +namespace chip { +namespace MainLoopWork { + +/** + * Executes the given function in the CHIP main loop if one exists. + * + * Several implementations exist, however generally: + * + * - if already in the chip main loop (or main loop is not running), + * `f` gets executed right away + * - otherwise: + * - if chip stack locking is available, `f` is executed within the lock + * - if chip stack locking not available, this will schedule and WAIT + * for `f` to execute + */ +void ExecuteInMainLoop(std::function f); + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp new file mode 100644 index 00000000000000..f848a3bc2c32dc --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_StackLock.cpp @@ -0,0 +1,44 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include "ChipMainLoopWork.h" + +#include + +namespace chip { +namespace MainLoopWork { + +void ExecuteInMainLoop(std::function f) +{ + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + chip::DeviceLayer::StackLock lock; + f(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp new file mode 100644 index 00000000000000..fec65a150c9396 --- /dev/null +++ b/src/controller/python/chip/native/ChipMainLoopWork_WorkSchedule.cpp @@ -0,0 +1,75 @@ +/* + * + * Copyright (c) 2023 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. + */ +#include "ChipMainLoopWork.h" + +#include +#include + +namespace chip { +namespace MainLoopWork { +namespace { + +struct WorkData +{ + std::function callback; + sem_t done; + + WorkData() { sem_init(&done, 0 /* shared */, 0); } + ~WorkData() { sem_destroy(&done); } + void Post() { sem_post(&done); } + void Wait() { sem_wait(&done); } +}; + +void PerformWork(intptr_t arg) +{ + WorkData * work = reinterpret_cast(arg); + + work->callback(); + work->Post(); +} + +} // namespace + +void ExecuteInMainLoop(std::function f) +{ + + // NOTE: requires CHIP_STACK_LOCK_TRACKING_ENABLED to be available (which python builds + // generally have) to ensure chip stack locks are not deadlocking, since these + // functions do not know the actual state of the chip main loop. + // + // TODO: it may be a good assumption that python code asking for this will NOT run in + // chip main loop, however we try to be generic + if (chip::DeviceLayer::PlatformMgr().IsChipStackLockedByCurrentThread()) + { + f(); + return; + } + + // NOTE: the code below assumes that chip main loop is running. + // if it does not, this will deadlock. + // + // IsChipStackLockedByCurrentThread is expected to be aware of main loop + // not running. + WorkData workdata; + workdata.callback = f; + chip::DeviceLayer::PlatformMgr().ScheduleWork(PerformWork, reinterpret_cast(&workdata)); + workdata.Wait(); +} + +} // namespace MainLoopWork +} // namespace chip diff --git a/src/controller/python/chip/tracing/TracingSetup.cpp b/src/controller/python/chip/tracing/TracingSetup.cpp index d09a655b74c633..73e0633b3bf373 100644 --- a/src/controller/python/chip/tracing/TracingSetup.cpp +++ b/src/controller/python/chip/tracing/TracingSetup.cpp @@ -16,8 +16,8 @@ * limitations under the License. */ +#include #include -#include #include #include @@ -27,17 +27,6 @@ #include namespace { - -using chip::DeviceLayer::PlatformMgr; - -class ScopedStackLock -{ -public: - ScopedStackLock() { PlatformMgr().LockChipStack(); } - - ~ScopedStackLock() { PlatformMgr().UnlockChipStack(); } -}; - chip::Tracing::Json::JsonBackend gJsonBackend; chip::Tracing::Perfetto::FileTraceOutput gPerfettoFileOutput; @@ -47,58 +36,61 @@ chip::Tracing::Perfetto::PerfettoBackend gPerfettoBackend; extern "C" void pychip_tracing_start_json_log(const char * file_name) { - - ScopedStackLock lock; - - gJsonBackend.CloseFile(); // just in case, ensure no file output - chip::Tracing::Register(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + gJsonBackend.CloseFile(); // just in case, ensure no file output + chip::Tracing::Register(gJsonBackend); + }); } extern "C" PyChipError pychip_tracing_start_json_file(const char * file_name) { - ScopedStackLock lock; - - CHIP_ERROR err = gJsonBackend.OpenFile(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gJsonBackend); - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + err = gJsonBackend.OpenFile(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gJsonBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_start_perfetto_system() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - chip::Tracing::Register(gPerfettoBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::Initialize(perfetto::kSystemBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + chip::Tracing::Register(gPerfettoBackend); + }); } extern "C" PyChipError pychip_tracing_start_perfetto_file(const char * file_name) { - ScopedStackLock lock; - - chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); - chip::Tracing::Perfetto::RegisterEventTrackingStorage(); - - CHIP_ERROR err = gPerfettoFileOutput.Open(file_name); - if (err != CHIP_NO_ERROR) - { - return ToPyChipError(err); - } - chip::Tracing::Register(gPerfettoBackend); - - return ToPyChipError(CHIP_NO_ERROR); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::MainLoopWork::ExecuteInMainLoop([&err, file_name] { + chip::Tracing::Perfetto::Initialize(perfetto::kInProcessBackend); + chip::Tracing::Perfetto::RegisterEventTrackingStorage(); + + err = gPerfettoFileOutput.Open(file_name); + if (err != CHIP_NO_ERROR) + { + return; + } + chip::Tracing::Register(gPerfettoBackend); + }); + + return ToPyChipError(err); } extern "C" void pychip_tracing_stop() { - ScopedStackLock lock; - - chip::Tracing::Perfetto::FlushEventTrackingStorage(); - gPerfettoFileOutput.Close(); - chip::Tracing::Unregister(gPerfettoBackend); - chip::Tracing::Unregister(gJsonBackend); + chip::MainLoopWork::ExecuteInMainLoop([] { + chip::Tracing::Perfetto::FlushEventTrackingStorage(); + gPerfettoFileOutput.Close(); + chip::Tracing::Unregister(gPerfettoBackend); + chip::Tracing::Unregister(gJsonBackend); + }); } diff --git a/src/controller/tests/data_model/TestCommands.cpp b/src/controller/tests/data_model/TestCommands.cpp index 5714cc0f9877a7..f9d1e35a900b73 100644 --- a/src/controller/tests/data_model/TestCommands.cpp +++ b/src/controller/tests/data_model/TestCommands.cpp @@ -85,8 +85,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip if (DataModel::Decode(aReader, dataRequest) != CHIP_NO_ERROR) { - ChipLogError(Controller, "Unable to decode the request"); - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); + apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Failure, + "Unable to decode the request"); return; } @@ -120,7 +120,8 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip // test is not really testing what it should. for (size_t i = 0; i < 4; ++i) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Success); + apCommandObj->AddStatusAndLogIfFailure(aCommandPath, Protocols::InteractionModel::Status::Success, + "No error but testing AddStatusAndLogIfFailure in success case"); } // And one failure on the end. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::Failure); diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 6d9f4781fff576..eeb5932f01a48a 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -2080,4 +2080,19 @@ CHIP_ERROR FabricTable::GetFabricLabel(FabricIndex fabricIndex, CharSpan & outFa return CHIP_NO_ERROR; } +CHIP_ERROR FabricTable::PeekFabricIndexForNextAddition(FabricIndex & outIndex) +{ + EnsureNextAvailableFabricIndexUpdated(); + if (!mNextAvailableFabricIndex.HasValue()) + { + return CHIP_ERROR_NO_MEMORY; + } + + FabricIndex index = mNextAvailableFabricIndex.Value(); + VerifyOrReturnError(IsValidFabricIndex(index), CHIP_ERROR_INVALID_FABRIC_INDEX); + + outIndex = index; + return CHIP_NO_ERROR; +} + } // namespace chip diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 82a82521d58be2..60cd54df220041 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -971,6 +971,14 @@ class DLL_EXPORT FabricTable #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } + /** + * Get the fabric index that will be used for the next fabric that will be + * added. Returns error if no more fabrics can be added, otherwise writes + * the fabric index that will be used for the next addition into the + * outparam. + */ + CHIP_ERROR PeekFabricIndexForNextAddition(FabricIndex & outIndex); + private: enum class StateFlags : uint16_t { diff --git a/src/credentials/tests/CHIPAttCert_test_vectors.cpp b/src/credentials/tests/CHIPAttCert_test_vectors.cpp index 7318d5b925a4e5..8185e95e0c8608 100644 --- a/src/credentials/tests/CHIPAttCert_test_vectors.cpp +++ b/src/credentials/tests/CHIPAttCert_test_vectors.cpp @@ -25,8 +25,8 @@ namespace TestCerts { // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x50, 0x30, 0x82, 0x01, 0xf6, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x49, 0x6d, 0xfb, 0xdb, 0x3b, 0x5e, - 0xb2, 0x43, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x54, 0x30, 0x82, 0x01, 0xfa, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x52, 0xd0, 0xac, 0x67, 0xb2, 0x0c, + 0xde, 0x95, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, @@ -37,29 +37,29 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert_Array[] = { 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, - 0x00, 0x04, 0x4a, 0xad, 0x5e, 0xf4, 0x21, 0xfa, 0x87, 0xa2, 0x09, 0x6a, 0xf4, 0x80, 0x5c, 0xc7, 0xb6, 0xca, 0xdf, 0x0f, 0xf7, - 0xd0, 0xb0, 0x35, 0x34, 0xd3, 0x11, 0x27, 0x92, 0xd8, 0x9c, 0x01, 0xdf, 0x13, 0xb7, 0x15, 0x01, 0xf2, 0xc4, 0x05, 0x68, 0x92, - 0x9b, 0xf8, 0x9b, 0xbb, 0x28, 0x0f, 0xb0, 0x67, 0x93, 0x0d, 0x4c, 0x28, 0x42, 0xf9, 0x73, 0x52, 0x12, 0x57, 0x39, 0x8f, 0xb6, - 0x32, 0x92, 0xdc, 0xa3, 0x81, 0xbd, 0x30, 0x81, 0xba, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, + 0x00, 0x04, 0xac, 0x80, 0x21, 0xa1, 0xb1, 0x13, 0x75, 0x88, 0x52, 0xb1, 0x2c, 0xd4, 0x97, 0x1e, 0xda, 0x15, 0x70, 0xde, 0x9e, + 0x6d, 0x53, 0xb7, 0x4b, 0x1a, 0x25, 0x7c, 0xa1, 0x1c, 0x56, 0x97, 0x6f, 0x48, 0xb0, 0xf4, 0x71, 0x15, 0xba, 0xda, 0x22, 0x75, + 0x2e, 0x66, 0x18, 0xc3, 0xf0, 0xde, 0x18, 0x08, 0xf0, 0x2a, 0x5e, 0x2e, 0xa5, 0xe5, 0xce, 0xad, 0x10, 0xdd, 0xdb, 0x41, 0xa3, + 0x81, 0xd7, 0xf3, 0xa3, 0x81, 0xc1, 0x30, 0x81, 0xbe, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, - 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x45, 0xdc, 0xfc, 0x35, 0xca, 0x19, 0x28, 0x71, 0xa3, 0xee, 0x16, 0xb2, 0x15, - 0x8b, 0x68, 0x1b, 0xe3, 0xe9, 0x8a, 0x8c, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, + 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xda, 0x62, 0x76, 0x0d, 0xd9, 0xca, 0xd8, 0xd1, 0x28, 0x33, 0x59, 0x94, 0x9b, + 0x42, 0x9a, 0xa1, 0xd4, 0xd4, 0xa2, 0x19, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x2c, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x25, 0x30, 0x23, 0x30, 0x21, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, - 0x65, 0x6d, 0x30, 0x2c, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x25, 0x30, 0x23, 0x30, 0x21, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, - 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, - 0x6c, 0x32, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, - 0x30, 0x45, 0x02, 0x20, 0x2a, 0x38, 0x00, 0xbd, 0x3b, 0x00, 0x1d, 0x49, 0xc0, 0xa9, 0x71, 0x18, 0xb8, 0x70, 0xfd, 0x4b, 0x09, - 0x54, 0x6b, 0x06, 0x61, 0x07, 0xaf, 0xed, 0x95, 0x9a, 0xef, 0x0c, 0x5b, 0x01, 0x2b, 0x8f, 0x02, 0x21, 0x00, 0xe1, 0x89, 0x51, - 0xe8, 0xe3, 0xee, 0x6c, 0xa3, 0x3d, 0x67, 0xb2, 0x60, 0x8c, 0x1a, 0xbd, 0xf6, 0x5f, 0x94, 0xbc, 0x79, 0xde, 0x35, 0x1b, 0x26, - 0x21, 0x6a, 0x41, 0xdc, 0x92, 0xb3, 0x11, 0x22, + 0x65, 0x6d, 0x30, 0x30, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x29, 0x30, 0x27, 0x30, 0x25, 0xa0, 0x23, 0xa0, 0x21, 0x86, 0x1f, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, + 0x73, 0x74, 0x5f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, + 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x07, 0x61, 0xeb, 0x67, 0xe2, 0x4b, 0x59, 0x36, 0xb2, 0x04, 0x41, 0x14, 0x56, + 0x8d, 0xa6, 0x97, 0x08, 0xc7, 0xa2, 0x95, 0xf3, 0x89, 0xbf, 0x67, 0xcf, 0xe2, 0x50, 0x44, 0x6b, 0x60, 0xbc, 0x97, 0x02, 0x21, + 0x00, 0xe5, 0xd6, 0x00, 0x9c, 0x08, 0x14, 0xc9, 0xc2, 0xec, 0xac, 0x6e, 0x05, 0xe0, 0x6f, 0x69, 0x55, 0x01, 0xce, 0x3a, 0x49, + 0xbf, 0xce, 0x1f, 0x55, 0x81, 0xd0, 0x41, 0x4d, 0xf1, 0xe2, 0x4b, 0xf3, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_SKID_Array[] = { - 0x45, 0xDC, 0xFC, 0x35, 0xCA, 0x19, 0x28, 0x71, 0xA3, 0xEE, 0x16, 0xB2, 0x15, 0x8B, 0x68, 0x1B, 0xE3, 0xE9, 0x8A, 0x8C, + 0xDA, 0x62, 0x76, 0x0D, 0xD9, 0xCA, 0xD8, 0xD1, 0x28, 0x33, 0x59, 0x94, 0x9B, 0x42, 0x9A, 0xA1, 0xD4, 0xD4, 0xA2, 0x19, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_SKID_Array); @@ -67,26 +67,293 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_SKID = ByteSpan(sTestCe // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_PublicKey_Array[] = { - 0x04, 0x4a, 0xad, 0x5e, 0xf4, 0x21, 0xfa, 0x87, 0xa2, 0x09, 0x6a, 0xf4, 0x80, 0x5c, 0xc7, 0xb6, 0xca, - 0xdf, 0x0f, 0xf7, 0xd0, 0xb0, 0x35, 0x34, 0xd3, 0x11, 0x27, 0x92, 0xd8, 0x9c, 0x01, 0xdf, 0x13, 0xb7, - 0x15, 0x01, 0xf2, 0xc4, 0x05, 0x68, 0x92, 0x9b, 0xf8, 0x9b, 0xbb, 0x28, 0x0f, 0xb0, 0x67, 0x93, 0x0d, - 0x4c, 0x28, 0x42, 0xf9, 0x73, 0x52, 0x12, 0x57, 0x39, 0x8f, 0xb6, 0x32, 0x92, 0xdc, + 0x04, 0xac, 0x80, 0x21, 0xa1, 0xb1, 0x13, 0x75, 0x88, 0x52, 0xb1, 0x2c, 0xd4, 0x97, 0x1e, 0xda, 0x15, + 0x70, 0xde, 0x9e, 0x6d, 0x53, 0xb7, 0x4b, 0x1a, 0x25, 0x7c, 0xa1, 0x1c, 0x56, 0x97, 0x6f, 0x48, 0xb0, + 0xf4, 0x71, 0x15, 0xba, 0xda, 0x22, 0x75, 0x2e, 0x66, 0x18, 0xc3, 0xf0, 0xde, 0x18, 0x08, 0xf0, 0x2a, + 0x5e, 0x2e, 0xa5, 0xe5, 0xce, 0xad, 0x10, 0xdd, 0xdb, 0x41, 0xa3, 0x81, 0xd7, 0xf3, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_PrivateKey_Array[] = { - 0x98, 0xfa, 0x42, 0xd8, 0x0f, 0x46, 0x9c, 0x45, 0xc6, 0x70, 0x6a, 0xa7, 0x49, 0xbe, 0x21, 0x80, - 0x01, 0xb6, 0xd8, 0xc8, 0xda, 0x28, 0xc4, 0x6e, 0x45, 0xd8, 0x4a, 0x5c, 0x68, 0xa8, 0xdf, 0x7e, + 0x39, 0x56, 0x75, 0x16, 0x2e, 0x60, 0x42, 0x38, 0x53, 0x56, 0x31, 0x47, 0x41, 0xe9, 0x6c, 0xc8, + 0x71, 0xa0, 0x0d, 0xb1, 0x5e, 0x25, 0x76, 0xa1, 0x58, 0xa5, 0xd8, 0xc2, 0x0b, 0x37, 0x32, 0xe2, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_PrivateKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_PrivateKey_Array); +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x97, 0x30, 0x82, 0x02, 0x3d, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x5c, 0x22, 0x3a, 0x87, 0xf6, 0x75, + 0xf8, 0x21, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x61, 0x31, 0x33, 0x30, 0x31, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x2a, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x32, 0x43, 0x44, 0x50, 0x73, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, + 0x41, 0x41, 0x20, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, + 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, + 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, + 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x89, 0x33, 0xf1, 0xcf, 0xd6, 0x7b, + 0xbb, 0xeb, 0xa9, 0x8a, 0xc9, 0x9f, 0x98, 0x19, 0x19, 0x5b, 0x11, 0x71, 0xa8, 0x3f, 0x49, 0x23, 0xf6, 0x94, 0x0a, 0xf0, 0xf2, + 0x20, 0x7b, 0xa6, 0x58, 0xdf, 0x5a, 0x66, 0x6f, 0x93, 0xb5, 0xf8, 0xec, 0x5e, 0xba, 0xed, 0x8c, 0xcc, 0x22, 0xf4, 0x6b, 0x11, + 0x50, 0x45, 0x27, 0x24, 0x8a, 0x5f, 0x29, 0x36, 0x5d, 0x43, 0x28, 0x9d, 0x47, 0xc3, 0x67, 0x78, 0xa3, 0x81, 0xf7, 0x30, 0x81, + 0xf4, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, + 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, + 0x10, 0xaf, 0x8c, 0x65, 0x60, 0x83, 0xee, 0x8d, 0xa6, 0xa1, 0x06, 0x7b, 0xfb, 0x79, 0xfb, 0x32, 0x9a, 0xae, 0x69, 0x62, 0x30, + 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, + 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x62, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x5b, 0x30, + 0x59, 0x30, 0x57, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x34, 0xa4, 0x32, 0x30, 0x30, + 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, + 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, + 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x30, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x29, 0x30, 0x27, 0x30, 0x25, 0xa0, 0x23, + 0xa0, 0x21, 0x86, 0x1f, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xb3, 0x00, 0x1b, 0xf2, 0xfb, 0x22, 0xf3, 0x4c, + 0x14, 0x23, 0x04, 0xe1, 0x58, 0x50, 0x98, 0xf1, 0x34, 0xe8, 0x27, 0xde, 0x74, 0xc7, 0x90, 0xfa, 0x93, 0x10, 0x3e, 0x4d, 0xa3, + 0xef, 0x8e, 0x97, 0x02, 0x20, 0x74, 0x8d, 0x81, 0x4a, 0x83, 0x4f, 0x04, 0x00, 0xb0, 0x0d, 0xe1, 0x75, 0xff, 0xba, 0xae, 0x62, + 0x6a, 0x5d, 0x96, 0x10, 0xe1, 0x14, 0xca, 0xde, 0xfb, 0x21, 0xdb, 0x2d, 0x9d, 0x19, 0x80, 0x47, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_SKID_Array[] = { + 0x10, 0xAF, 0x8C, 0x65, 0x60, 0x83, 0xEE, 0x8D, 0xA6, 0xA1, 0x06, 0x7B, 0xFB, 0x79, 0xFB, 0x32, 0x9A, 0xAE, 0x69, 0x62, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAA-FFF1-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PublicKey_Array[] = { + 0x04, 0x89, 0x33, 0xf1, 0xcf, 0xd6, 0x7b, 0xbb, 0xeb, 0xa9, 0x8a, 0xc9, 0x9f, 0x98, 0x19, 0x19, 0x5b, + 0x11, 0x71, 0xa8, 0x3f, 0x49, 0x23, 0xf6, 0x94, 0x0a, 0xf0, 0xf2, 0x20, 0x7b, 0xa6, 0x58, 0xdf, 0x5a, + 0x66, 0x6f, 0x93, 0xb5, 0xf8, 0xec, 0x5e, 0xba, 0xed, 0x8c, 0xcc, 0x22, 0xf4, 0x6b, 0x11, 0x50, 0x45, + 0x27, 0x24, 0x8a, 0x5f, 0x29, 0x36, 0x5d, 0x43, 0x28, 0x9d, 0x47, 0xc3, 0x67, 0x78, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PrivateKey_Array[] = { + 0x76, 0x21, 0x57, 0x07, 0x20, 0x09, 0x0c, 0x48, 0x13, 0x29, 0x5e, 0xfc, 0x53, 0x6a, 0xb4, 0x51, + 0xee, 0x65, 0xf2, 0xc3, 0xe7, 0x22, 0xfb, 0x44, 0xc3, 0xbd, 0x78, 0xa0, 0x58, 0x79, 0x55, 0xdb, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert_Array[] = { + 0x30, 0x82, 0x02, 0xcb, 0x30, 0x82, 0x02, 0x71, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x6c, 0x01, 0x4a, 0xb9, 0xe4, 0xcf, + 0xda, 0x4c, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x6d, 0x31, 0x3f, 0x30, 0x3d, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x36, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, 0x41, 0x49, + 0x20, 0x46, 0x46, 0x46, 0x32, 0x20, 0x38, 0x30, 0x30, 0x34, 0x20, 0x54, 0x77, 0x6f, 0x20, 0x43, 0x44, 0x50, 0x73, 0x31, 0x14, + 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, + 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, + 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, + 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xa0, 0xab, 0x25, 0xaf, 0x17, 0x68, 0x01, 0x2c, 0xa9, 0x0d, 0xe9, 0x49, 0x5f, 0x85, 0xa5, + 0x4e, 0x4c, 0xe7, 0x3f, 0x19, 0xf9, 0x6b, 0x70, 0x1e, 0x7f, 0xb0, 0x7f, 0x6f, 0xa2, 0x62, 0xc5, 0xbd, 0xae, 0xc8, 0x08, 0x9b, + 0x27, 0xae, 0x42, 0x09, 0x4f, 0xb8, 0x6f, 0x61, 0x17, 0xff, 0xcf, 0xf2, 0xda, 0xa5, 0xfd, 0xa5, 0x5d, 0xe0, 0x12, 0xe2, 0xa3, + 0x4a, 0xe7, 0x15, 0xcd, 0x71, 0x86, 0x2b, 0xa3, 0x82, 0x01, 0x1e, 0x30, 0x82, 0x01, 0x1a, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, + 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, + 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x2d, 0x72, 0x52, 0xec, 0xf4, 0xc3, 0xc0, + 0x97, 0xb1, 0xe9, 0x18, 0xc4, 0xd5, 0x2f, 0xeb, 0x94, 0x19, 0x51, 0xde, 0x70, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, + 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, + 0x5f, 0x32, 0x52, 0x88, 0x30, 0x81, 0xb9, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x81, 0xb1, 0x30, 0x81, 0xae, 0x30, 0x55, 0xa0, + 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x32, 0xa4, 0x30, 0x30, 0x2e, 0x31, 0x2c, 0x30, 0x2a, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x23, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, + 0x49, 0x20, 0x4d, 0x76, 0x69, 0x64, 0x3a, 0x46, 0x46, 0x46, 0x32, 0x20, 0x4d, 0x70, 0x69, 0x64, 0x3a, 0x38, 0x30, 0x30, 0x34, + 0x30, 0x55, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x32, 0xa4, 0x30, 0x30, 0x2e, 0x31, + 0x2c, 0x30, 0x2a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x23, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, + 0x20, 0x50, 0x41, 0x49, 0x20, 0x4d, 0x76, 0x69, 0x64, 0x3a, 0x46, 0x46, 0x46, 0x32, 0x20, 0x4d, 0x70, 0x69, 0x64, 0x3a, 0x38, + 0x30, 0x30, 0x34, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, + 0x20, 0x7a, 0xcd, 0xbb, 0x4d, 0x37, 0xb8, 0xd1, 0x10, 0x6f, 0x36, 0x32, 0xe4, 0x16, 0x84, 0x8e, 0x64, 0xca, 0xba, 0xcb, 0x70, + 0x14, 0xc3, 0x31, 0x18, 0xb1, 0x21, 0xb6, 0x49, 0xc4, 0x1a, 0x4e, 0x5f, 0x02, 0x21, 0x00, 0x90, 0x83, 0x94, 0xb9, 0xcc, 0xc7, + 0x26, 0x95, 0x7b, 0x21, 0x0e, 0xf5, 0xbb, 0x19, 0x10, 0xfd, 0xf4, 0xd4, 0x96, 0xca, 0x96, 0xd2, 0x6e, 0xa2, 0x1e, 0xbe, 0x91, + 0xee, 0x2c, 0xcb, 0x9b, 0x72, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_SKID_Array[] = { + 0x2D, 0x72, 0x52, 0xEC, 0xF4, 0xC3, 0xC0, 0x97, 0xB1, 0xE9, 0x18, 0xC4, 0xD5, 0x2F, 0xEB, 0x94, 0x19, 0x51, 0xDE, 0x70, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-2CDPs-Issuer-PAI-FFF2-8004-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PublicKey_Array[] = { + 0x04, 0xa0, 0xab, 0x25, 0xaf, 0x17, 0x68, 0x01, 0x2c, 0xa9, 0x0d, 0xe9, 0x49, 0x5f, 0x85, 0xa5, 0x4e, + 0x4c, 0xe7, 0x3f, 0x19, 0xf9, 0x6b, 0x70, 0x1e, 0x7f, 0xb0, 0x7f, 0x6f, 0xa2, 0x62, 0xc5, 0xbd, 0xae, + 0xc8, 0x08, 0x9b, 0x27, 0xae, 0x42, 0x09, 0x4f, 0xb8, 0x6f, 0x61, 0x17, 0xff, 0xcf, 0xf2, 0xda, 0xa5, + 0xfd, 0xa5, 0x5d, 0xe0, 0x12, 0xe2, 0xa3, 0x4a, 0xe7, 0x15, 0xcd, 0x71, 0x86, 0x2b, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PrivateKey_Array[] = { + 0x14, 0x45, 0x87, 0x96, 0x42, 0x6e, 0x13, 0x08, 0xa2, 0x33, 0x67, 0xbc, 0xc7, 0x87, 0x90, 0xa5, + 0x0c, 0x28, 0xf6, 0x32, 0x1f, 0x9a, 0x2e, 0x6a, 0x9a, 0xbe, 0xa3, 0x1b, 0x6b, 0xbf, 0xce, 0x8a, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x9e, 0x30, 0x82, 0x02, 0x44, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x0c, 0x3e, 0xb9, 0xc8, 0xc6, 0xe3, + 0x8e, 0x5a, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x62, 0x31, 0x34, 0x30, 0x32, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x2b, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x32, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x20, + 0x50, 0x41, 0x41, 0x20, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, + 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, + 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, + 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x77, 0x44, 0x36, 0x9a, 0xb7, + 0xf3, 0x62, 0x7c, 0x33, 0xb2, 0x9b, 0xa5, 0x40, 0x8e, 0xe8, 0x06, 0xc3, 0x76, 0x31, 0x83, 0x0b, 0xe8, 0xf6, 0xbc, 0xef, 0xa4, + 0xf5, 0x59, 0xbf, 0x66, 0x1b, 0xe0, 0xb1, 0x5e, 0x59, 0x2b, 0xc9, 0xb2, 0xc6, 0x71, 0x9a, 0x84, 0x9e, 0xea, 0x14, 0x51, 0x12, + 0x6f, 0x29, 0x7b, 0xa6, 0x2f, 0x40, 0x6f, 0x03, 0x45, 0x32, 0xc6, 0x27, 0x82, 0x8a, 0xfe, 0x66, 0xb5, 0xa3, 0x81, 0xfd, 0x30, + 0x81, 0xfa, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, + 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, + 0x14, 0x60, 0xea, 0x47, 0xc9, 0x3d, 0xf9, 0x08, 0xf8, 0x5c, 0xa3, 0xcd, 0x53, 0x20, 0x12, 0x6b, 0x61, 0xf5, 0x0a, 0x05, 0xbd, + 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, + 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x81, 0x99, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, + 0x81, 0x91, 0x30, 0x81, 0x8e, 0x30, 0x81, 0x8b, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, + 0x68, 0xa4, 0x32, 0x30, 0x30, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, + 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0xa4, 0x32, 0x30, 0x30, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, + 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, + 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x5c, 0x80, + 0x30, 0xef, 0x15, 0xba, 0xee, 0xfc, 0x38, 0x83, 0x4a, 0xe2, 0x09, 0xa1, 0xed, 0x94, 0x51, 0x64, 0xdf, 0x97, 0xde, 0x2d, 0x96, + 0x1f, 0x10, 0xd6, 0xf9, 0xf5, 0xe5, 0xb2, 0x9b, 0x98, 0x02, 0x21, 0x00, 0x94, 0x5f, 0x9a, 0x3a, 0x8e, 0xcb, 0x89, 0xca, 0x4c, + 0x76, 0xa6, 0x03, 0x01, 0x78, 0x0f, 0x06, 0xb9, 0xbd, 0x8e, 0x20, 0x9e, 0x07, 0x43, 0x3a, 0xf6, 0x5a, 0x21, 0x05, 0x61, 0xfe, + 0xa7, 0x09, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_SKID_Array[] = { + 0x60, 0xEA, 0x47, 0xC9, 0x3D, 0xF9, 0x08, 0xF8, 0x5C, 0xA3, 0xCD, 0x53, 0x20, 0x12, 0x6B, 0x61, 0xF5, 0x0A, 0x05, 0xBD, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2CRLIssuers-PAA-FFF1-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PublicKey_Array[] = { + 0x04, 0x77, 0x44, 0x36, 0x9a, 0xb7, 0xf3, 0x62, 0x7c, 0x33, 0xb2, 0x9b, 0xa5, 0x40, 0x8e, 0xe8, 0x06, + 0xc3, 0x76, 0x31, 0x83, 0x0b, 0xe8, 0xf6, 0xbc, 0xef, 0xa4, 0xf5, 0x59, 0xbf, 0x66, 0x1b, 0xe0, 0xb1, + 0x5e, 0x59, 0x2b, 0xc9, 0xb2, 0xc6, 0x71, 0x9a, 0x84, 0x9e, 0xea, 0x14, 0x51, 0x12, 0x6f, 0x29, 0x7b, + 0xa6, 0x2f, 0x40, 0x6f, 0x03, 0x45, 0x32, 0xc6, 0x27, 0x82, 0x8a, 0xfe, 0x66, 0xb5, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PrivateKey_Array[] = { + 0x76, 0x3a, 0x6e, 0x2d, 0x10, 0x8a, 0x73, 0x36, 0x4f, 0xd0, 0x5b, 0xd0, 0x81, 0x9b, 0xe5, 0x3d, + 0xcc, 0x90, 0x64, 0x61, 0x75, 0x32, 0x97, 0xbf, 0xdb, 0x8a, 0x65, 0x70, 0x3c, 0xbb, 0xd3, 0xcb, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x4e, 0x30, 0x82, 0x01, 0xf4, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x1c, 0x5e, 0x9a, 0x1c, 0x51, 0x62, + 0xe0, 0xef, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x5d, 0x31, 0x2f, 0x30, 0x2d, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x26, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x54, 0x77, 0x6f, 0x20, 0x43, 0x44, 0x50, 0x20, 0x28, 0x54, 0x77, 0x6f, 0x20, 0x44, + 0x50, 0x73, 0x29, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, + 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, + 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x9b, 0xf7, 0x29, 0x12, 0xc8, 0x94, 0x56, 0x06, 0x39, 0xa5, + 0x3b, 0x42, 0xf3, 0x47, 0x40, 0xa6, 0xb5, 0x48, 0xec, 0x2e, 0xca, 0xdd, 0x58, 0x03, 0xae, 0xb8, 0x73, 0x6f, 0x32, 0xc0, 0x9b, + 0x36, 0xf9, 0xac, 0x16, 0x24, 0xe9, 0x94, 0xf2, 0xf9, 0x24, 0x43, 0x12, 0x03, 0x6b, 0x2f, 0x43, 0x2c, 0x25, 0xa4, 0xb9, 0xd3, + 0x0a, 0xb5, 0x49, 0x75, 0x9b, 0x89, 0x39, 0x18, 0xdf, 0xdb, 0x3c, 0xa0, 0xa3, 0x81, 0xb2, 0x30, 0x81, 0xaf, 0x30, 0x0c, 0x06, + 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, + 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x8c, 0x2a, 0x72, 0x18, + 0x7f, 0x79, 0x0e, 0xd6, 0xcb, 0x61, 0xe2, 0xd2, 0x4f, 0x19, 0xfa, 0x57, 0xcf, 0x30, 0x97, 0x60, 0x30, 0x1f, 0x06, 0x03, 0x55, + 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, + 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x4f, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x48, 0x30, 0x46, 0x30, 0x21, 0xa0, + 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x21, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, + 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, + 0x02, 0x21, 0x00, 0xe6, 0xd5, 0x9f, 0xdc, 0x94, 0x5b, 0xa9, 0xa0, 0x5a, 0xd0, 0x8b, 0xb7, 0x53, 0x5d, 0xe3, 0x14, 0xed, 0x5a, + 0x95, 0xf8, 0x5f, 0xa9, 0x0a, 0x54, 0xee, 0xe4, 0xdf, 0x6b, 0x48, 0x19, 0x9e, 0xcd, 0x02, 0x20, 0x35, 0x1d, 0x01, 0x95, 0x07, + 0x29, 0xd3, 0x6d, 0x40, 0x6d, 0xed, 0x7f, 0xf7, 0x16, 0x54, 0xd2, 0x79, 0xaf, 0x93, 0xcd, 0x48, 0x83, 0x03, 0xb3, 0xcf, 0x8e, + 0x43, 0xb1, 0x45, 0xf8, 0x95, 0xc8, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_SKID_Array[] = { + 0x8C, 0x2A, 0x72, 0x18, 0x7F, 0x79, 0x0E, 0xD6, 0xCB, 0x61, 0xE2, 0xD2, 0x4F, 0x19, 0xFA, 0x57, 0xCF, 0x30, 0x97, 0x60, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2DPs-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PublicKey_Array[] = { + 0x04, 0x9b, 0xf7, 0x29, 0x12, 0xc8, 0x94, 0x56, 0x06, 0x39, 0xa5, 0x3b, 0x42, 0xf3, 0x47, 0x40, 0xa6, + 0xb5, 0x48, 0xec, 0x2e, 0xca, 0xdd, 0x58, 0x03, 0xae, 0xb8, 0x73, 0x6f, 0x32, 0xc0, 0x9b, 0x36, 0xf9, + 0xac, 0x16, 0x24, 0xe9, 0x94, 0xf2, 0xf9, 0x24, 0x43, 0x12, 0x03, 0x6b, 0x2f, 0x43, 0x2c, 0x25, 0xa4, + 0xb9, 0xd3, 0x0a, 0xb5, 0x49, 0x75, 0x9b, 0x89, 0x39, 0x18, 0xdf, 0xdb, 0x3c, 0xa0, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PrivateKey_Array[] = { + 0x3b, 0x30, 0xab, 0x4d, 0x74, 0x97, 0x71, 0x6a, 0x41, 0xb1, 0xf1, 0xe6, 0x03, 0x07, 0x35, 0x56, + 0x7c, 0x68, 0x43, 0x3a, 0x9f, 0x6a, 0xca, 0x2d, 0x5c, 0x6d, 0xbe, 0x4e, 0xc8, 0x7c, 0x4c, 0x37, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PrivateKey_Array); + // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x4a, 0x30, 0x82, 0x01, 0xf0, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x5f, 0x3c, 0x14, 0xa5, 0x76, 0x9a, - 0x55, 0x2d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x45, 0x30, 0x82, 0x01, 0xeb, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x79, 0xdc, 0xe9, 0x4d, 0xf9, 0x23, + 0x1f, 0xc6, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, @@ -97,29 +364,28 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert_Array[] = { 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, - 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xda, 0x46, 0x42, 0x76, 0xca, 0x8a, 0x5b, 0x0f, 0x9f, 0x48, 0xcb, 0xa6, 0x07, - 0xff, 0xed, 0x92, 0xf6, 0xa8, 0x13, 0x14, 0x67, 0x61, 0xf8, 0x7b, 0xb9, 0x00, 0xef, 0x6c, 0x43, 0x6b, 0xe8, 0x01, 0xe6, 0xa7, - 0xc5, 0xc8, 0xe9, 0x62, 0x09, 0xcb, 0x11, 0x04, 0x6a, 0xef, 0xaf, 0x8e, 0x2b, 0x03, 0x99, 0xb6, 0x29, 0xf5, 0x20, 0x03, 0x42, - 0xb4, 0x8c, 0x34, 0x7a, 0x91, 0x99, 0x87, 0xe3, 0x57, 0xa3, 0x81, 0xb1, 0x30, 0x81, 0xae, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, + 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xc5, 0x97, 0x95, 0x2e, 0xb3, 0x2c, 0x60, 0x8b, 0x0e, 0xf1, 0x63, 0x53, 0x71, + 0x9d, 0xba, 0xac, 0x52, 0x83, 0xec, 0x1a, 0x8e, 0x8a, 0xca, 0x40, 0x8c, 0x92, 0xf0, 0xa2, 0x56, 0x46, 0x5f, 0xe0, 0xb7, 0x36, + 0xc7, 0xe2, 0x6b, 0xc0, 0x40, 0xf0, 0x58, 0xc2, 0xa0, 0x14, 0x37, 0x78, 0x5b, 0xdf, 0xf9, 0x52, 0xdb, 0x6d, 0xf7, 0x7d, 0xd5, + 0x87, 0x97, 0x97, 0x58, 0x85, 0x28, 0xf1, 0xb7, 0x25, 0xa3, 0x81, 0xac, 0x30, 0x81, 0xa9, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, - 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xcc, 0xac, 0x78, 0x09, 0x9a, 0xc4, 0x7f, - 0xad, 0x7a, 0x0e, 0xb9, 0x01, 0x2c, 0xc8, 0xf4, 0x22, 0x88, 0x09, 0xab, 0x61, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, + 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x3e, 0x18, 0x83, 0x15, 0x9c, 0x2a, 0x73, + 0xcc, 0x28, 0x24, 0x16, 0xed, 0x83, 0x90, 0x12, 0xf1, 0x87, 0x5e, 0x66, 0x07, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, - 0x5f, 0x32, 0x52, 0x88, 0x30, 0x4e, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x47, 0x30, 0x45, 0x30, 0x20, 0xa0, 0x1e, 0xa0, 0x1c, - 0x86, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x21, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, - 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x32, 0x2e, 0x70, 0x65, 0x6d, - 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x6a, 0x14, - 0x34, 0xc3, 0x4c, 0xd3, 0xb5, 0x4c, 0x1c, 0xa7, 0x9b, 0xc5, 0x08, 0x42, 0xe7, 0xdd, 0xd5, 0xed, 0xb7, 0x78, 0xc5, 0xa2, 0x85, - 0xe9, 0xae, 0x54, 0x61, 0xff, 0x1d, 0x76, 0x39, 0x7f, 0x02, 0x21, 0x00, 0xed, 0x4d, 0xe2, 0x03, 0xd2, 0x5a, 0xd5, 0xd3, 0x71, - 0xfb, 0xb3, 0x4d, 0x5c, 0x9c, 0xf7, 0xbe, 0xa9, 0x12, 0xd6, 0x88, 0x45, 0x5e, 0x4a, 0xdf, 0xe0, 0x2f, 0x7f, 0x09, 0x64, 0x3f, - 0x88, 0xbc, + 0x5f, 0x32, 0x52, 0x88, 0x30, 0x49, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x42, 0x30, 0x40, 0x30, 0x3e, 0xa0, 0x3c, 0xa0, 0x3a, + 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, + 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xad, 0x31, 0x8a, 0x74, 0x8f, 0x45, + 0x04, 0x9e, 0xbe, 0x2b, 0xe6, 0xc5, 0xa5, 0x90, 0xb8, 0x49, 0xab, 0x00, 0xba, 0x69, 0xbc, 0x5f, 0xc8, 0x40, 0xf5, 0x5e, 0x4b, + 0xa8, 0xf5, 0x81, 0x44, 0xf8, 0x02, 0x20, 0x0f, 0x59, 0xe1, 0xfd, 0x5f, 0x70, 0xcd, 0x73, 0x82, 0x1d, 0x90, 0x6d, 0x4e, 0xf4, + 0xc7, 0x61, 0xdb, 0x3c, 0xda, 0x3f, 0xa8, 0xe8, 0x58, 0xd1, 0xe1, 0xe8, 0x05, 0xeb, 0xcf, 0x15, 0xe9, 0xb8, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_SKID_Array[] = { - 0xCC, 0xAC, 0x78, 0x09, 0x9A, 0xC4, 0x7F, 0xAD, 0x7A, 0x0E, 0xB9, 0x01, 0x2C, 0xC8, 0xF4, 0x22, 0x88, 0x09, 0xAB, 0x61, + 0x3E, 0x18, 0x83, 0x15, 0x9C, 0x2A, 0x73, 0xCC, 0x28, 0x24, 0x16, 0xED, 0x83, 0x90, 0x12, 0xF1, 0x87, 0x5E, 0x66, 0x07, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_SKID_Array); @@ -127,18 +393,18 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_SKID = ByteSpan(sTe // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-2URIs-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PublicKey_Array[] = { - 0x04, 0xda, 0x46, 0x42, 0x76, 0xca, 0x8a, 0x5b, 0x0f, 0x9f, 0x48, 0xcb, 0xa6, 0x07, 0xff, 0xed, 0x92, - 0xf6, 0xa8, 0x13, 0x14, 0x67, 0x61, 0xf8, 0x7b, 0xb9, 0x00, 0xef, 0x6c, 0x43, 0x6b, 0xe8, 0x01, 0xe6, - 0xa7, 0xc5, 0xc8, 0xe9, 0x62, 0x09, 0xcb, 0x11, 0x04, 0x6a, 0xef, 0xaf, 0x8e, 0x2b, 0x03, 0x99, 0xb6, - 0x29, 0xf5, 0x20, 0x03, 0x42, 0xb4, 0x8c, 0x34, 0x7a, 0x91, 0x99, 0x87, 0xe3, 0x57, + 0x04, 0xc5, 0x97, 0x95, 0x2e, 0xb3, 0x2c, 0x60, 0x8b, 0x0e, 0xf1, 0x63, 0x53, 0x71, 0x9d, 0xba, 0xac, + 0x52, 0x83, 0xec, 0x1a, 0x8e, 0x8a, 0xca, 0x40, 0x8c, 0x92, 0xf0, 0xa2, 0x56, 0x46, 0x5f, 0xe0, 0xb7, + 0x36, 0xc7, 0xe2, 0x6b, 0xc0, 0x40, 0xf0, 0x58, 0xc2, 0xa0, 0x14, 0x37, 0x78, 0x5b, 0xdf, 0xf9, 0x52, + 0xdb, 0x6d, 0xf7, 0x7d, 0xd5, 0x87, 0x97, 0x97, 0x58, 0x85, 0x28, 0xf1, 0xb7, 0x25, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PrivateKey_Array[] = { - 0xbd, 0xc5, 0xcc, 0x3d, 0x9b, 0x85, 0x0d, 0x14, 0x0b, 0x6e, 0x1d, 0xea, 0xf5, 0xd2, 0xb7, 0xcb, - 0x63, 0xfc, 0x71, 0xf6, 0x4e, 0x6c, 0xa8, 0x9a, 0xf3, 0x34, 0xb9, 0x98, 0x43, 0x7e, 0x6d, 0xc7, + 0x7b, 0x48, 0x60, 0x42, 0xa0, 0xc4, 0xa4, 0x45, 0x07, 0x02, 0x30, 0xf5, 0xcb, 0xd9, 0xe7, 0x3e, + 0x9d, 0xb9, 0x2e, 0x03, 0xc6, 0x38, 0x0b, 0xc3, 0x6e, 0xcb, 0x4c, 0xd6, 0x32, 0x12, 0x24, 0xfd, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PrivateKey = @@ -147,8 +413,8 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PrivateKey = // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x23, 0x30, 0x82, 0x01, 0xc9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x71, 0x65, 0x6d, 0x1b, 0x7a, 0x2e, - 0x16, 0xa4, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x24, 0x30, 0x82, 0x01, 0xc9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x48, 0xff, 0xdf, 0xfd, 0xee, 0x63, + 0x1a, 0x43, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, @@ -159,27 +425,27 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Cert_Array[] = { 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, - 0x03, 0x42, 0x00, 0x04, 0xe3, 0x01, 0x1e, 0xde, 0x9f, 0x51, 0x5a, 0xb3, 0xe9, 0xba, 0x93, 0x25, 0xfe, 0xf2, 0x3b, 0x96, 0xcd, - 0x71, 0x5c, 0x3a, 0xea, 0x38, 0xce, 0x81, 0x1e, 0x88, 0xfc, 0x6d, 0xe7, 0xac, 0x30, 0x26, 0x23, 0xfb, 0xa7, 0x06, 0x8b, 0x3e, - 0x09, 0xd3, 0xfe, 0x54, 0x9b, 0x11, 0xcc, 0x5f, 0x0e, 0x59, 0x6c, 0x4e, 0xdb, 0xce, 0x3e, 0x7b, 0xa2, 0x27, 0x1f, 0xb8, 0xd0, - 0x9a, 0xf4, 0x21, 0x9e, 0x3d, 0xa3, 0x81, 0x8e, 0x30, 0x81, 0x8b, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, + 0x03, 0x42, 0x00, 0x04, 0x41, 0xae, 0x76, 0xb7, 0x7c, 0xde, 0xab, 0x80, 0x5c, 0x45, 0x77, 0xd2, 0x57, 0xb6, 0x9e, 0xa9, 0xe6, + 0x24, 0x4f, 0x28, 0xb1, 0xc1, 0x79, 0x8f, 0xd0, 0x3d, 0xec, 0x54, 0xdc, 0x0e, 0x84, 0xa5, 0x0b, 0x92, 0x9e, 0xdd, 0x29, 0xbe, + 0x31, 0xd3, 0x86, 0x71, 0x25, 0xef, 0x15, 0x66, 0x9e, 0xbd, 0x93, 0x11, 0xef, 0x66, 0x5c, 0x74, 0x21, 0x38, 0x68, 0xc4, 0xad, + 0x9c, 0xae, 0x04, 0x54, 0xc9, 0xa3, 0x81, 0x8e, 0x30, 0x81, 0x8b, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, - 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x68, 0x43, 0xc8, 0x33, 0xa3, 0x39, 0x9f, 0x98, 0x42, 0x15, 0x3e, - 0xb1, 0xac, 0xcf, 0x2f, 0x95, 0x58, 0x5f, 0x1a, 0x50, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, + 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xef, 0x78, 0x85, 0xe0, 0x97, 0xd3, 0x15, 0xfd, 0x09, 0x3b, 0x10, + 0xae, 0x55, 0xc9, 0xf4, 0x70, 0x11, 0x13, 0xe7, 0x8d, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x2b, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x24, 0x30, 0x22, 0x30, 0x20, 0xa0, 0x1e, 0xa0, 0x1c, 0x86, 0x1a, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, - 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, - 0x20, 0x65, 0x4a, 0x4c, 0x13, 0x3b, 0xc9, 0xda, 0x4d, 0x14, 0x78, 0x35, 0xab, 0xfc, 0x24, 0xd5, 0x2c, 0xec, 0xa3, 0xa0, 0x8f, - 0xa2, 0xf4, 0xe6, 0xea, 0xc2, 0xae, 0x60, 0x41, 0x1f, 0x36, 0xf5, 0xa4, 0x02, 0x21, 0x00, 0xaa, 0x1c, 0xa1, 0x93, 0x1f, 0xbc, - 0x9a, 0xff, 0xd6, 0x47, 0x32, 0xab, 0xf3, 0x1e, 0xa8, 0xf6, 0x13, 0xc1, 0x67, 0x1f, 0x0f, 0x22, 0xa4, 0x31, 0x67, 0xe2, 0x8e, - 0x9d, 0xac, 0x93, 0x1e, 0x18, + 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, + 0x21, 0x00, 0x83, 0xa2, 0xfa, 0x88, 0xb0, 0x21, 0xaa, 0xbd, 0xfe, 0xc2, 0x08, 0xaf, 0xe6, 0x8d, 0xfd, 0xe7, 0x2b, 0x3a, 0x0b, + 0x38, 0xe3, 0xa7, 0x30, 0x2a, 0xfb, 0x71, 0x9a, 0x18, 0x11, 0x01, 0x56, 0x69, 0x02, 0x21, 0x00, 0xfd, 0xda, 0x03, 0xae, 0xf3, + 0x66, 0x70, 0x34, 0xf7, 0xab, 0x9a, 0xd8, 0x65, 0x41, 0x3a, 0x53, 0x45, 0xa1, 0x10, 0x1a, 0xa7, 0xc7, 0xbe, 0x28, 0x33, 0xc4, + 0xce, 0xd1, 0xdc, 0x33, 0x0d, 0x0d, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_SKID_Array[] = { - 0x68, 0x43, 0xC8, 0x33, 0xA3, 0x39, 0x9F, 0x98, 0x42, 0x15, 0x3E, 0xB1, 0xAC, 0xCF, 0x2F, 0x95, 0x58, 0x5F, 0x1A, 0x50, + 0xEF, 0x78, 0x85, 0xE0, 0x97, 0xD3, 0x15, 0xFD, 0x09, 0x3B, 0x10, 0xAE, 0x55, 0xC9, 0xF4, 0x70, 0x11, 0x13, 0xE7, 0x8D, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_SKID_Array); @@ -187,26 +453,96 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_SKID = ByteSpan(sTestCert // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_PublicKey_Array[] = { - 0x04, 0xe3, 0x01, 0x1e, 0xde, 0x9f, 0x51, 0x5a, 0xb3, 0xe9, 0xba, 0x93, 0x25, 0xfe, 0xf2, 0x3b, 0x96, - 0xcd, 0x71, 0x5c, 0x3a, 0xea, 0x38, 0xce, 0x81, 0x1e, 0x88, 0xfc, 0x6d, 0xe7, 0xac, 0x30, 0x26, 0x23, - 0xfb, 0xa7, 0x06, 0x8b, 0x3e, 0x09, 0xd3, 0xfe, 0x54, 0x9b, 0x11, 0xcc, 0x5f, 0x0e, 0x59, 0x6c, 0x4e, - 0xdb, 0xce, 0x3e, 0x7b, 0xa2, 0x27, 0x1f, 0xb8, 0xd0, 0x9a, 0xf4, 0x21, 0x9e, 0x3d, + 0x04, 0x41, 0xae, 0x76, 0xb7, 0x7c, 0xde, 0xab, 0x80, 0x5c, 0x45, 0x77, 0xd2, 0x57, 0xb6, 0x9e, 0xa9, + 0xe6, 0x24, 0x4f, 0x28, 0xb1, 0xc1, 0x79, 0x8f, 0xd0, 0x3d, 0xec, 0x54, 0xdc, 0x0e, 0x84, 0xa5, 0x0b, + 0x92, 0x9e, 0xdd, 0x29, 0xbe, 0x31, 0xd3, 0x86, 0x71, 0x25, 0xef, 0x15, 0x66, 0x9e, 0xbd, 0x93, 0x11, + 0xef, 0x66, 0x5c, 0x74, 0x21, 0x38, 0x68, 0xc4, 0xad, 0x9c, 0xae, 0x04, 0x54, 0xc9, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_PrivateKey_Array[] = { - 0x06, 0x59, 0xf2, 0x16, 0x77, 0x18, 0xe9, 0x0f, 0x12, 0x23, 0xba, 0xef, 0x44, 0x28, 0xf1, 0xb0, - 0xce, 0xc4, 0x72, 0xb5, 0x5f, 0xbb, 0x07, 0xea, 0x87, 0xd7, 0x39, 0x89, 0x9c, 0xf7, 0x31, 0x6a, + 0x25, 0xf8, 0xc0, 0x52, 0xd4, 0x8e, 0x6a, 0x87, 0xee, 0x4d, 0xce, 0x75, 0xda, 0xf3, 0x63, 0xd6, + 0x60, 0xf9, 0x01, 0x36, 0x58, 0xcd, 0x30, 0x55, 0x3e, 0x21, 0xb8, 0x5b, 0xa2, 0xba, 0xbe, 0x03, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_PrivateKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_PrivateKey_Array); +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert_Array[] = { + 0x30, 0x82, 0x02, 0xca, 0x30, 0x82, 0x02, 0x71, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x43, 0x18, 0x55, 0x58, 0xe5, 0x90, + 0x57, 0x75, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x69, 0x31, 0x3b, 0x30, 0x39, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x32, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, 0x41, 0x41, + 0x20, 0x46, 0x46, 0x46, 0x31, 0x20, 0x28, 0x54, 0x77, 0x6f, 0x20, 0x44, 0x50, 0x73, 0x29, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, + 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, + 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, + 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, + 0x00, 0x04, 0x7d, 0xf8, 0x83, 0xcd, 0x5e, 0xdc, 0x72, 0x78, 0x14, 0x9e, 0x80, 0x0b, 0x3c, 0x30, 0x24, 0xe4, 0x45, 0xc5, 0x94, + 0xb9, 0x11, 0x85, 0xcd, 0xe3, 0x08, 0x58, 0x7f, 0x4e, 0xae, 0xb6, 0x85, 0x59, 0x99, 0x6a, 0x0f, 0xae, 0x19, 0x50, 0x1d, 0x9f, + 0xb3, 0xbf, 0x11, 0x12, 0x51, 0xc5, 0x79, 0x96, 0x5d, 0xd6, 0x59, 0x4f, 0x9a, 0x88, 0x4e, 0x5c, 0x6f, 0x39, 0x11, 0x78, 0xf8, + 0x2b, 0xe9, 0x57, 0xa3, 0x82, 0x01, 0x22, 0x30, 0x82, 0x01, 0x1e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, + 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, + 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x3c, 0x83, 0xb5, 0x8a, 0x32, 0xbc, 0x20, 0x02, 0xad, 0x83, 0x6b, + 0x97, 0xdf, 0x10, 0xe1, 0x1c, 0x81, 0x96, 0x99, 0x8f, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, + 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, + 0x30, 0x81, 0xbd, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x81, 0xb5, 0x30, 0x81, 0xb2, 0x30, 0x57, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, + 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x34, 0xa4, 0x32, 0x30, 0x30, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, + 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, + 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x57, + 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x34, 0xa4, 0x32, 0x30, 0x30, 0x31, 0x18, 0x30, + 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, + 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, + 0x46, 0x46, 0x31, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44, 0x02, + 0x20, 0x67, 0xb1, 0xbc, 0x0e, 0xe3, 0xfb, 0x52, 0xc1, 0x5a, 0xbf, 0x39, 0x1e, 0xf6, 0xd8, 0x3c, 0xe4, 0xa8, 0x30, 0x73, 0x01, + 0xaa, 0x78, 0x1f, 0x17, 0xf5, 0xf7, 0xe9, 0xab, 0x3c, 0x06, 0xb2, 0x89, 0x02, 0x20, 0x57, 0xe0, 0x86, 0x4e, 0xf8, 0x16, 0x8d, + 0xc9, 0xb1, 0x50, 0xf5, 0x5b, 0xd0, 0xed, 0xb1, 0x0a, 0xa2, 0x17, 0x96, 0x56, 0x6e, 0x4f, 0x60, 0x79, 0xb5, 0xb9, 0x1d, 0x08, + 0x99, 0x8b, 0x92, 0xab, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_SKID_Array[] = { + 0x3C, 0x83, 0xB5, 0x8A, 0x32, 0xBC, 0x20, 0x02, 0xAD, 0x83, 0x6B, 0x97, 0xDF, 0x10, 0xE1, 0x1C, 0x81, 0x96, 0x99, 0x8F, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-CRL-Issuer-PAA-FFF1-2DPs-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PublicKey_Array[] = { + 0x04, 0x7d, 0xf8, 0x83, 0xcd, 0x5e, 0xdc, 0x72, 0x78, 0x14, 0x9e, 0x80, 0x0b, 0x3c, 0x30, 0x24, 0xe4, + 0x45, 0xc5, 0x94, 0xb9, 0x11, 0x85, 0xcd, 0xe3, 0x08, 0x58, 0x7f, 0x4e, 0xae, 0xb6, 0x85, 0x59, 0x99, + 0x6a, 0x0f, 0xae, 0x19, 0x50, 0x1d, 0x9f, 0xb3, 0xbf, 0x11, 0x12, 0x51, 0xc5, 0x79, 0x96, 0x5d, 0xd6, + 0x59, 0x4f, 0x9a, 0x88, 0x4e, 0x5c, 0x6f, 0x39, 0x11, 0x78, 0xf8, 0x2b, 0xe9, 0x57, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PrivateKey_Array[] = { + 0x55, 0x95, 0xd2, 0x25, 0x87, 0x8c, 0x8a, 0xf7, 0xa4, 0x83, 0xd9, 0x0f, 0x11, 0x7b, 0x3b, 0x72, + 0x87, 0x24, 0x42, 0x38, 0x00, 0x16, 0xf0, 0x4c, 0x6d, 0x10, 0x47, 0xcc, 0x05, 0xb0, 0xe6, 0x2f, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PrivateKey_Array); + // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x25, 0x30, 0x82, 0x01, 0xcb, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x34, 0xa8, 0x41, 0x5b, 0x7d, 0x3f, - 0x2b, 0x1e, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x24, 0x30, 0x82, 0x01, 0xcb, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x17, 0xfe, 0x6d, 0x6b, 0xe9, 0xbe, + 0xd2, 0x13, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, @@ -217,27 +553,27 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert_Array[] = { 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, - 0x07, 0x03, 0x42, 0x00, 0x04, 0xd9, 0x2b, 0x24, 0xde, 0x51, 0x6b, 0x8e, 0xcd, 0x3e, 0x68, 0x62, 0xde, 0x87, 0xfc, 0x3b, 0xf7, - 0x7e, 0x70, 0x11, 0x71, 0xc7, 0x0b, 0x59, 0x8c, 0xff, 0x5f, 0x02, 0x7f, 0x02, 0xb8, 0x20, 0xe7, 0xfa, 0x07, 0xba, 0xd4, 0xe4, - 0xd8, 0xbe, 0x26, 0x1c, 0x08, 0xfb, 0x31, 0x95, 0xd5, 0xa8, 0x34, 0x82, 0x3a, 0x28, 0xcc, 0x47, 0x03, 0xb7, 0xc5, 0x15, 0x7e, - 0x14, 0x9e, 0x5e, 0xaa, 0x78, 0x05, 0xa3, 0x81, 0x8f, 0x30, 0x81, 0x8c, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, + 0x07, 0x03, 0x42, 0x00, 0x04, 0xea, 0xb8, 0x46, 0xdd, 0x7d, 0x1f, 0x88, 0x4f, 0xe7, 0x17, 0x8a, 0x22, 0x41, 0xa7, 0xdf, 0x5d, + 0x31, 0xf4, 0xb9, 0x1b, 0xc6, 0xbb, 0x7a, 0x08, 0x74, 0x09, 0xb9, 0x99, 0x35, 0x2a, 0xcf, 0x03, 0xae, 0xc8, 0x4c, 0x92, 0x5b, + 0xf6, 0xc2, 0x01, 0x22, 0xee, 0xe8, 0x4d, 0x7e, 0x81, 0x12, 0xbb, 0xce, 0xc2, 0x31, 0xe3, 0xb4, 0x22, 0x1a, 0x9d, 0x61, 0x18, + 0xdc, 0x79, 0x4b, 0x6e, 0xbd, 0x87, 0xa3, 0x81, 0x8f, 0x30, 0x81, 0x8c, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, - 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xa3, 0x02, 0x33, 0xf8, 0x6f, 0x40, 0xd1, 0x1a, 0xc5, 0x5f, - 0x80, 0xa5, 0xc0, 0xa9, 0x2a, 0x50, 0x6f, 0xea, 0x9f, 0x31, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, + 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xe3, 0xbe, 0xa7, 0x29, 0x96, 0xdc, 0xf7, 0x6b, 0xb9, 0xb0, + 0xf1, 0x1d, 0x19, 0x2b, 0xba, 0x17, 0xe9, 0x5c, 0x32, 0xf8, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x2c, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x25, 0x30, 0x23, 0x30, 0x21, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, - 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, - 0x45, 0x02, 0x20, 0x53, 0xec, 0xea, 0xda, 0x3c, 0x5d, 0x4b, 0xb7, 0x50, 0xcb, 0xe7, 0xf8, 0xd1, 0x09, 0x59, 0x12, 0xd4, 0xc8, - 0xe5, 0xfb, 0x1f, 0xef, 0x30, 0x24, 0x1f, 0xcf, 0x95, 0x83, 0x29, 0x40, 0xd0, 0x9a, 0x02, 0x21, 0x00, 0xb5, 0x57, 0x5e, 0xbc, - 0xa7, 0x1b, 0x84, 0x7e, 0x77, 0xd5, 0xd5, 0xd1, 0x41, 0x06, 0xbb, 0x87, 0xbf, 0x37, 0x9d, 0x92, 0xa4, 0x9d, 0xea, 0x8d, 0x10, - 0xa0, 0xe1, 0x8b, 0x48, 0x10, 0x2e, 0x1f, + 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, + 0x44, 0x02, 0x20, 0x2a, 0xc7, 0x6a, 0x56, 0xd7, 0xa4, 0xb9, 0x7e, 0x76, 0x2c, 0x95, 0x50, 0x88, 0x41, 0xe2, 0xd5, 0x54, 0x55, + 0x1a, 0x06, 0x8f, 0xc8, 0x32, 0x06, 0xd8, 0xb2, 0x7f, 0xe5, 0xae, 0x55, 0x76, 0x5e, 0x02, 0x20, 0x20, 0xbb, 0xa5, 0x49, 0xc7, + 0xcd, 0x9d, 0xbe, 0x64, 0x0b, 0xe8, 0x2c, 0x68, 0xa3, 0xfc, 0x36, 0xb0, 0xb0, 0xed, 0xf5, 0x5f, 0x70, 0xfd, 0xb1, 0x7c, 0xb2, + 0x45, 0x81, 0x00, 0x83, 0xd6, 0x75, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_SKID_Array[] = { - 0xA3, 0x02, 0x33, 0xF8, 0x6F, 0x40, 0xD1, 0x1A, 0xC5, 0x5F, 0x80, 0xA5, 0xC0, 0xA9, 0x2A, 0x50, 0x6F, 0xEA, 0x9F, 0x31, + 0xE3, 0xBE, 0xA7, 0x29, 0x96, 0xDC, 0xF7, 0x6B, 0xB9, 0xB0, 0xF1, 0x1D, 0x19, 0x2B, 0xBA, 0x17, 0xE9, 0x5C, 0x32, 0xF8, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_SKID_Array); @@ -245,28 +581,289 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_SKID = ByteSpan(sTe // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-HTTPS-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PublicKey_Array[] = { - 0x04, 0xd9, 0x2b, 0x24, 0xde, 0x51, 0x6b, 0x8e, 0xcd, 0x3e, 0x68, 0x62, 0xde, 0x87, 0xfc, 0x3b, 0xf7, - 0x7e, 0x70, 0x11, 0x71, 0xc7, 0x0b, 0x59, 0x8c, 0xff, 0x5f, 0x02, 0x7f, 0x02, 0xb8, 0x20, 0xe7, 0xfa, - 0x07, 0xba, 0xd4, 0xe4, 0xd8, 0xbe, 0x26, 0x1c, 0x08, 0xfb, 0x31, 0x95, 0xd5, 0xa8, 0x34, 0x82, 0x3a, - 0x28, 0xcc, 0x47, 0x03, 0xb7, 0xc5, 0x15, 0x7e, 0x14, 0x9e, 0x5e, 0xaa, 0x78, 0x05, + 0x04, 0xea, 0xb8, 0x46, 0xdd, 0x7d, 0x1f, 0x88, 0x4f, 0xe7, 0x17, 0x8a, 0x22, 0x41, 0xa7, 0xdf, 0x5d, + 0x31, 0xf4, 0xb9, 0x1b, 0xc6, 0xbb, 0x7a, 0x08, 0x74, 0x09, 0xb9, 0x99, 0x35, 0x2a, 0xcf, 0x03, 0xae, + 0xc8, 0x4c, 0x92, 0x5b, 0xf6, 0xc2, 0x01, 0x22, 0xee, 0xe8, 0x4d, 0x7e, 0x81, 0x12, 0xbb, 0xce, 0xc2, + 0x31, 0xe3, 0xb4, 0x22, 0x1a, 0x9d, 0x61, 0x18, 0xdc, 0x79, 0x4b, 0x6e, 0xbd, 0x87, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PrivateKey_Array[] = { - 0x04, 0xa4, 0x15, 0x03, 0x86, 0x39, 0xd1, 0x4e, 0x62, 0x92, 0x6f, 0x46, 0x1a, 0x62, 0x55, 0xd7, - 0xa3, 0x0b, 0x0b, 0xdc, 0xac, 0x6a, 0x98, 0xcd, 0xf8, 0x8b, 0x16, 0x70, 0x2a, 0x72, 0x9f, 0x3b, + 0x77, 0x46, 0x27, 0xd2, 0x38, 0xd1, 0xda, 0x3a, 0xf8, 0xd4, 0xe5, 0x8d, 0xa6, 0x35, 0x69, 0x79, + 0x6d, 0xbd, 0xf9, 0x89, 0xfc, 0xea, 0xd6, 0x81, 0x06, 0xe2, 0xed, 0x1e, 0xca, 0x3c, 0x28, 0xf7, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PrivateKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PrivateKey_Array); +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x64, 0x30, 0x82, 0x02, 0x09, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x17, 0x02, 0xc4, 0x10, 0x4d, 0xb5, + 0x94, 0xcf, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x5f, 0x31, 0x31, 0x30, 0x2f, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x28, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, 0x41, 0x41, + 0x20, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, + 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, + 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x36, 0xd3, 0x26, 0xdd, 0xb5, 0xf0, 0xe3, 0xe6, + 0xba, 0xcd, 0x3b, 0x33, 0xfb, 0x55, 0x05, 0xef, 0xb9, 0xca, 0xa3, 0xc0, 0xef, 0x9d, 0x51, 0x1d, 0x8e, 0x79, 0x21, 0x2e, 0x69, + 0xc4, 0xa7, 0x63, 0xb8, 0x30, 0xd6, 0x71, 0x50, 0x39, 0x7a, 0xcd, 0xa2, 0x4e, 0xc6, 0xfe, 0x52, 0xce, 0x8d, 0x75, 0x78, 0xb6, + 0x8f, 0x75, 0x8b, 0xd9, 0x26, 0x2b, 0xa2, 0x44, 0x0b, 0xe3, 0xf8, 0x5e, 0x47, 0xa8, 0xa3, 0x81, 0xc5, 0x30, 0x81, 0xc2, 0x30, + 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, + 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xd2, 0x08, + 0xfc, 0xad, 0xb7, 0x8f, 0x13, 0x5e, 0xf4, 0x19, 0x0a, 0xf2, 0xf6, 0x48, 0x31, 0x82, 0x79, 0x08, 0x7a, 0xee, 0x30, 0x1f, 0x06, + 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, + 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x62, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x5b, 0x30, 0x59, 0x30, + 0x57, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x34, 0xa4, 0x32, 0x30, 0x30, 0x31, 0x18, + 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, + 0x50, 0x41, 0x41, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, + 0x46, 0x46, 0x46, 0x31, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, + 0x02, 0x21, 0x00, 0xea, 0xd0, 0x82, 0x83, 0x40, 0x27, 0xe4, 0x17, 0x93, 0x2e, 0x0d, 0xdc, 0x26, 0xe5, 0x0c, 0x16, 0xf9, 0xfd, + 0x26, 0x80, 0x96, 0x9c, 0x33, 0xfa, 0x40, 0xcc, 0xf8, 0xc4, 0x22, 0xf1, 0xc7, 0xf7, 0x02, 0x21, 0x00, 0xa7, 0x08, 0xb0, 0x5e, + 0xe6, 0x8b, 0x26, 0xda, 0x6d, 0x64, 0x44, 0x61, 0xbc, 0x42, 0x9f, 0xa2, 0x5f, 0x56, 0x2d, 0xd2, 0x2b, 0xa3, 0x55, 0xa7, 0x99, + 0x37, 0x26, 0xb9, 0x39, 0xfb, 0x2e, 0xd0, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_SKID_Array[] = { + 0xD2, 0x08, 0xFC, 0xAD, 0xB7, 0x8F, 0x13, 0x5E, 0xF4, 0x19, 0x0A, 0xF2, 0xF6, 0x48, 0x31, 0x82, 0x79, 0x08, 0x7A, 0xEE, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-FFF1-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PublicKey_Array[] = { + 0x04, 0x36, 0xd3, 0x26, 0xdd, 0xb5, 0xf0, 0xe3, 0xe6, 0xba, 0xcd, 0x3b, 0x33, 0xfb, 0x55, 0x05, 0xef, + 0xb9, 0xca, 0xa3, 0xc0, 0xef, 0x9d, 0x51, 0x1d, 0x8e, 0x79, 0x21, 0x2e, 0x69, 0xc4, 0xa7, 0x63, 0xb8, + 0x30, 0xd6, 0x71, 0x50, 0x39, 0x7a, 0xcd, 0xa2, 0x4e, 0xc6, 0xfe, 0x52, 0xce, 0x8d, 0x75, 0x78, 0xb6, + 0x8f, 0x75, 0x8b, 0xd9, 0x26, 0x2b, 0xa2, 0x44, 0x0b, 0xe3, 0xf8, 0x5e, 0x47, 0xa8, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PrivateKey_Array[] = { + 0x10, 0xed, 0x00, 0xde, 0xf0, 0x7b, 0x5e, 0x1d, 0x2b, 0xb3, 0x24, 0x47, 0x80, 0x70, 0x6c, 0xfe, + 0xb6, 0xfb, 0xe7, 0x2a, 0x55, 0x59, 0xc0, 0x3a, 0x73, 0xd3, 0xa9, 0x9f, 0x38, 0x7f, 0xce, 0x9f, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x4e, 0x30, 0x82, 0x01, 0xf4, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x4a, 0x98, 0x15, 0xd4, 0xb9, 0xdd, + 0xcf, 0x73, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x60, 0x31, 0x32, 0x30, 0x30, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x29, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, 0x41, 0x41, + 0x20, 0x4e, 0x6f, 0x56, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, + 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, + 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, + 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x6a, 0x2b, 0xed, 0xc7, 0x16, 0xb5, 0x63, + 0x64, 0x7e, 0x66, 0xdb, 0x9a, 0x3e, 0x2d, 0xcd, 0x45, 0xf0, 0xbf, 0x58, 0x4d, 0x85, 0xa7, 0xd2, 0xdf, 0xf8, 0xff, 0xb1, 0x74, + 0xb5, 0xd5, 0x5e, 0x7f, 0x1c, 0x54, 0x94, 0xbe, 0x7d, 0x7b, 0xc4, 0xe2, 0x9c, 0x11, 0x80, 0x9a, 0x20, 0x37, 0x61, 0x55, 0x6e, + 0x39, 0x15, 0x75, 0x1e, 0x1d, 0x20, 0x1a, 0xab, 0x96, 0x7e, 0x3c, 0xec, 0xbc, 0xfb, 0x21, 0xa3, 0x81, 0xaf, 0x30, 0x81, 0xac, + 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, + 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x20, + 0xa8, 0x51, 0xb5, 0x59, 0x5a, 0x8b, 0x31, 0x28, 0x69, 0x03, 0xa6, 0x3f, 0xc9, 0x36, 0x00, 0x17, 0x39, 0xc0, 0x3e, 0x30, 0x1f, + 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, + 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x4c, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x45, 0x30, 0x43, + 0x30, 0x41, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x1e, 0xa4, 0x1c, 0x30, 0x1a, 0x31, + 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, + 0x20, 0x50, 0x41, 0x41, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, + 0x02, 0x21, 0x00, 0x83, 0xd3, 0xd4, 0xe5, 0xf5, 0x24, 0xea, 0x16, 0x6c, 0x14, 0x45, 0xed, 0x42, 0x08, 0xa5, 0xe3, 0x26, 0xf8, + 0xff, 0xdd, 0xb7, 0xf1, 0xa1, 0xb8, 0xcf, 0xb9, 0xf2, 0x38, 0x06, 0xc2, 0xe5, 0x1f, 0x02, 0x20, 0x7f, 0x58, 0x66, 0x8c, 0x92, + 0xb9, 0xd9, 0xaa, 0xfa, 0xb1, 0x93, 0xb7, 0x30, 0x82, 0xe2, 0x39, 0x85, 0x99, 0x9f, 0x22, 0xd8, 0xc0, 0xe0, 0x0e, 0x66, 0x19, + 0x9d, 0x08, 0x06, 0x20, 0x52, 0x40, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_SKID_Array[] = { + 0x20, 0xA8, 0x51, 0xB5, 0x59, 0x5A, 0x8B, 0x31, 0x28, 0x69, 0x03, 0xA6, 0x3F, 0xC9, 0x36, 0x00, 0x17, 0x39, 0xC0, 0x3E, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAA-NoVID-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PublicKey_Array[] = { + 0x04, 0x6a, 0x2b, 0xed, 0xc7, 0x16, 0xb5, 0x63, 0x64, 0x7e, 0x66, 0xdb, 0x9a, 0x3e, 0x2d, 0xcd, 0x45, + 0xf0, 0xbf, 0x58, 0x4d, 0x85, 0xa7, 0xd2, 0xdf, 0xf8, 0xff, 0xb1, 0x74, 0xb5, 0xd5, 0x5e, 0x7f, 0x1c, + 0x54, 0x94, 0xbe, 0x7d, 0x7b, 0xc4, 0xe2, 0x9c, 0x11, 0x80, 0x9a, 0x20, 0x37, 0x61, 0x55, 0x6e, 0x39, + 0x15, 0x75, 0x1e, 0x1d, 0x20, 0x1a, 0xab, 0x96, 0x7e, 0x3c, 0xec, 0xbc, 0xfb, 0x21, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PrivateKey_Array[] = { + 0x46, 0xd9, 0x9f, 0x1d, 0x8d, 0x65, 0xa0, 0x4d, 0x6f, 0xaf, 0x9b, 0xe7, 0x7b, 0x32, 0x6c, 0x7b, + 0x4e, 0x65, 0x1f, 0x85, 0xd0, 0x9b, 0x00, 0xbf, 0x02, 0x03, 0x8b, 0x12, 0xe5, 0xf6, 0xf8, 0x89, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x66, 0x30, 0x82, 0x02, 0x0c, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x5f, 0xf5, 0xc6, 0x04, 0xbc, 0xa0, + 0x73, 0x61, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x64, 0x31, 0x36, 0x30, 0x34, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x2d, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x50, 0x41, 0x49, + 0x20, 0x46, 0x46, 0x46, 0x32, 0x20, 0x38, 0x30, 0x30, 0x34, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, + 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, + 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x66, 0x8b, 0xf8, + 0x10, 0x24, 0x2d, 0xcd, 0x4a, 0x8f, 0x0c, 0xc3, 0x8d, 0x71, 0x40, 0x82, 0xb5, 0x9f, 0x44, 0xfb, 0xe9, 0x27, 0x1c, 0xe6, 0x6a, + 0x5d, 0x1b, 0xf4, 0xe3, 0x78, 0xf6, 0x81, 0xbc, 0x19, 0xf4, 0xab, 0x7a, 0xcb, 0x8a, 0x33, 0xb8, 0x4e, 0x3b, 0x4a, 0xe0, 0x44, + 0xa9, 0xe3, 0x5e, 0xaa, 0x04, 0x53, 0xa4, 0x96, 0xa9, 0x05, 0x05, 0xf1, 0x57, 0xc2, 0x52, 0x69, 0xfe, 0x4f, 0xb7, 0xa3, 0x81, + 0xc3, 0x30, 0x81, 0xc0, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, + 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, + 0x16, 0x04, 0x14, 0xce, 0x80, 0xc0, 0x02, 0x33, 0x9b, 0xc6, 0x00, 0xd4, 0xf9, 0x4a, 0xf0, 0x95, 0xee, 0x64, 0xf0, 0x29, 0x42, + 0x32, 0xe2, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, + 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x60, 0x06, 0x03, 0x55, 0x1d, 0x1f, + 0x04, 0x59, 0x30, 0x57, 0x30, 0x55, 0xa0, 0x1f, 0xa0, 0x1d, 0x86, 0x1b, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x32, 0xa4, + 0x30, 0x30, 0x2e, 0x31, 0x2c, 0x30, 0x2a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x23, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, + 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x20, 0x4d, 0x76, 0x69, 0x64, 0x3a, 0x46, 0x46, 0x46, 0x32, 0x20, 0x4d, 0x70, + 0x69, 0x64, 0x3a, 0x38, 0x30, 0x30, 0x34, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, + 0x00, 0x30, 0x45, 0x02, 0x20, 0x08, 0x8c, 0xd3, 0x9b, 0x0b, 0xef, 0x30, 0x30, 0x07, 0x5e, 0xee, 0xcf, 0xb0, 0x3c, 0xad, 0xa6, + 0xec, 0xc7, 0x46, 0x8b, 0xe7, 0x57, 0x9b, 0x75, 0x6b, 0xad, 0xe2, 0x7f, 0x2c, 0xc0, 0x3d, 0x21, 0x02, 0x21, 0x00, 0x84, 0xe6, + 0x3d, 0xcc, 0xc3, 0x2b, 0xbe, 0x4d, 0x70, 0x77, 0x2b, 0x6a, 0xff, 0xec, 0xc1, 0x2a, 0x1d, 0x34, 0xd2, 0xc3, 0xe1, 0x49, 0xce, + 0xb1, 0xb9, 0x88, 0x25, 0x16, 0xbc, 0x34, 0x1b, 0xcf, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_SKID_Array[] = { + 0xCE, 0x80, 0xC0, 0x02, 0x33, 0x9B, 0xC6, 0x00, 0xD4, 0xF9, 0x4A, 0xF0, 0x95, 0xEE, 0x64, 0xF0, 0x29, 0x42, 0x32, 0xE2, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PublicKey_Array[] = { + 0x04, 0x66, 0x8b, 0xf8, 0x10, 0x24, 0x2d, 0xcd, 0x4a, 0x8f, 0x0c, 0xc3, 0x8d, 0x71, 0x40, 0x82, 0xb5, + 0x9f, 0x44, 0xfb, 0xe9, 0x27, 0x1c, 0xe6, 0x6a, 0x5d, 0x1b, 0xf4, 0xe3, 0x78, 0xf6, 0x81, 0xbc, 0x19, + 0xf4, 0xab, 0x7a, 0xcb, 0x8a, 0x33, 0xb8, 0x4e, 0x3b, 0x4a, 0xe0, 0x44, 0xa9, 0xe3, 0x5e, 0xaa, 0x04, + 0x53, 0xa4, 0x96, 0xa9, 0x05, 0x05, 0xf1, 0x57, 0xc2, 0x52, 0x69, 0xfe, 0x4f, 0xb7, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PrivateKey_Array[] = { + 0xfe, 0x74, 0xd0, 0x22, 0xb9, 0x05, 0xd8, 0x38, 0x7e, 0x6f, 0xbf, 0x22, 0x12, 0x9a, 0xde, 0xda, + 0xda, 0xe7, 0xc9, 0x78, 0x0c, 0xbb, 0x51, 0x14, 0x16, 0xdd, 0x5a, 0xe9, 0x86, 0x36, 0xa1, 0xcc, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PrivateKey_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Cert.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert_Array[] = { + 0x30, 0x82, 0x02, 0x8c, 0x30, 0x82, 0x02, 0x33, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x7a, 0xb3, 0x30, 0xa7, 0xca, 0x1f, + 0x91, 0x95, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, + 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, + 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x3b, 0x31, 0x0d, 0x30, 0x0b, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, + 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, + 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, + 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x7d, 0xd0, + 0x08, 0x30, 0x43, 0x7f, 0xfb, 0xd7, 0x07, 0x09, 0x38, 0x49, 0x31, 0x84, 0xb4, 0xbc, 0x56, 0x46, 0x4f, 0x7d, 0x81, 0x00, 0xcd, + 0xef, 0x33, 0xf8, 0x92, 0x99, 0x39, 0xbe, 0xbc, 0x8d, 0x53, 0x36, 0x95, 0xd7, 0x1f, 0x4c, 0x0d, 0xa9, 0xbf, 0x1c, 0x8e, 0x84, + 0x7f, 0xdd, 0x70, 0x8b, 0x5c, 0xd3, 0xab, 0xd6, 0x2e, 0xe3, 0x35, 0x81, 0x69, 0xbd, 0x32, 0x08, 0x5a, 0x35, 0x28, 0xdd, 0xa3, + 0x82, 0x01, 0x12, 0x30, 0x82, 0x01, 0x0e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, + 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, + 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x1d, 0xf3, 0x52, 0x59, 0x9d, 0x41, 0xe0, 0xb0, 0x6c, 0x13, 0x02, 0x06, 0xff, 0xc1, 0x57, + 0xa7, 0x32, 0xcc, 0xf7, 0xa4, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, + 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x81, 0xad, 0x06, + 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x81, 0xa5, 0x30, 0x81, 0xa2, 0x30, 0x81, 0x9f, 0xa0, 0x69, 0xa0, 0x67, 0x86, 0x65, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x69, + 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, 0x6e, 0x2d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2d, 0x6f, 0x66, 0x2d, 0x63, 0x72, + 0x6c, 0x2d, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x77, 0x68, 0x69, 0x63, 0x68, 0x2d, 0x69, 0x73, 0x2d, 0x31, 0x30, + 0x31, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0xa2, 0x32, 0xa4, 0x30, 0x30, 0x2e, + 0x31, 0x2c, 0x30, 0x2a, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x23, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, + 0x74, 0x20, 0x50, 0x41, 0x49, 0x20, 0x4d, 0x76, 0x69, 0x64, 0x3a, 0x46, 0x46, 0x46, 0x32, 0x20, 0x4d, 0x70, 0x69, 0x64, 0x3a, + 0x38, 0x30, 0x30, 0x34, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x47, 0x00, 0x30, 0x44, + 0x02, 0x20, 0x13, 0x28, 0xf3, 0xfa, 0x3a, 0xa3, 0x68, 0xeb, 0x4f, 0x8d, 0x73, 0x2f, 0xbb, 0x0f, 0x28, 0xcf, 0x0d, 0xab, 0xc4, + 0xe9, 0x44, 0x4e, 0x00, 0x3c, 0x84, 0x84, 0x85, 0xb9, 0x70, 0x7b, 0xbd, 0xff, 0x02, 0x20, 0x5d, 0x0c, 0x98, 0xd5, 0x01, 0x14, + 0x5d, 0xa2, 0x3a, 0xea, 0x6f, 0xec, 0xda, 0xb3, 0xf4, 0xd2, 0x9c, 0xbf, 0x3e, 0x70, 0xb4, 0x53, 0x83, 0x46, 0xbc, 0xce, 0x81, + 0x1b, 0x24, 0x74, 0xe4, 0x38, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_SKID_Array[] = { + 0x1D, 0xF3, 0x52, 0x59, 0x9D, 0x41, 0xE0, 0xB0, 0x6C, 0x13, 0x02, 0x06, 0xFF, 0xC1, 0x57, 0xA7, 0x32, 0xCC, 0xF7, 0xA4, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_SKID = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_SKID_Array); + +// ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Issuer-PAI-FFF2-8004-Long-Key.pem + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PublicKey_Array[] = { + 0x04, 0x7d, 0xd0, 0x08, 0x30, 0x43, 0x7f, 0xfb, 0xd7, 0x07, 0x09, 0x38, 0x49, 0x31, 0x84, 0xb4, 0xbc, + 0x56, 0x46, 0x4f, 0x7d, 0x81, 0x00, 0xcd, 0xef, 0x33, 0xf8, 0x92, 0x99, 0x39, 0xbe, 0xbc, 0x8d, 0x53, + 0x36, 0x95, 0xd7, 0x1f, 0x4c, 0x0d, 0xa9, 0xbf, 0x1c, 0x8e, 0x84, 0x7f, 0xdd, 0x70, 0x8b, 0x5c, 0xd3, + 0xab, 0xd6, 0x2e, 0xe3, 0x35, 0x81, 0x69, 0xbd, 0x32, 0x08, 0x5a, 0x35, 0x28, 0xdd, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PublicKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PublicKey_Array); + +constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PrivateKey_Array[] = { + 0x84, 0x61, 0x19, 0xc4, 0xb8, 0xfc, 0x59, 0x04, 0x59, 0x98, 0x5c, 0x19, 0x46, 0x6a, 0xb0, 0x4b, + 0x0e, 0x9b, 0xff, 0xb2, 0x92, 0x7d, 0xf9, 0xce, 0x6f, 0xeb, 0x47, 0x82, 0x6b, 0x1d, 0xce, 0x38, +}; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PrivateKey = + ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PrivateKey_Array); + // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x53, 0x30, 0x82, 0x01, 0xf9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x1d, 0x6e, 0x6d, 0x50, 0x41, 0x86, - 0x00, 0x07, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x53, 0x30, 0x82, 0x01, 0xf9, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x2d, 0x8d, 0x2c, 0x45, 0xae, 0x68, + 0x53, 0x45, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, @@ -275,14 +872,14 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert_Array[] = { 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, - 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x43, 0x28, - 0xfb, 0xb8, 0x71, 0x42, 0x8c, 0x35, 0xe2, 0x24, 0xb3, 0x7f, 0x9e, 0x80, 0x64, 0x03, 0x5f, 0xb2, 0xcc, 0x72, 0xf8, 0xf1, 0x71, - 0x18, 0x53, 0x46, 0xc3, 0x20, 0xe1, 0xa8, 0x85, 0xb5, 0xe4, 0x09, 0x09, 0x5e, 0xec, 0x85, 0x5f, 0x7d, 0x52, 0xaf, 0x97, 0xa1, - 0xd0, 0x6f, 0x76, 0x71, 0x6c, 0x87, 0x36, 0x7e, 0x19, 0x88, 0xce, 0xa1, 0x19, 0xd6, 0xd7, 0xf4, 0x25, 0x2b, 0xc7, 0x2f, 0xa3, + 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x6f, 0xbd, + 0x31, 0x13, 0xf1, 0x4e, 0x00, 0xb5, 0x54, 0x1a, 0xe5, 0x26, 0x3a, 0x47, 0xe1, 0x6b, 0x19, 0x77, 0x75, 0xe9, 0x12, 0x14, 0xa4, + 0x20, 0xf4, 0xd9, 0x7a, 0xed, 0x6b, 0xa4, 0x93, 0x55, 0x1c, 0xa5, 0xc0, 0xd6, 0x95, 0xfa, 0x3e, 0xb9, 0x08, 0xf1, 0x32, 0x9a, + 0x54, 0xbb, 0x9d, 0x5d, 0xe5, 0x97, 0x4c, 0xfa, 0xa8, 0xc5, 0xf0, 0xc5, 0xc4, 0x30, 0x8c, 0xae, 0x1a, 0xc6, 0xe1, 0x77, 0xa3, 0x81, 0xd9, 0x30, 0x81, 0xd6, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, - 0x04, 0x16, 0x04, 0x14, 0xf6, 0x4c, 0x7b, 0xf1, 0xa8, 0xb6, 0xe0, 0xba, 0x10, 0x8e, 0xbd, 0xeb, 0x4f, 0xe1, 0xf6, 0x77, 0x7c, - 0xc9, 0x2c, 0x29, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, + 0x04, 0x16, 0x04, 0x14, 0xa8, 0x34, 0xcb, 0xec, 0xfd, 0x6f, 0x47, 0x43, 0x06, 0xe5, 0x7d, 0x90, 0x7e, 0x4c, 0xf4, 0xad, 0x3f, + 0x7d, 0xfc, 0x4f, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x76, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x6f, 0x30, 0x6d, 0x30, 0x6b, 0xa0, 0x69, 0xa0, 0x67, 0x86, 0x65, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x68, 0x69, 0x73, 0x2d, 0x69, 0x73, 0x2d, 0x61, @@ -290,16 +887,16 @@ constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert_Array[] = { 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x77, 0x68, 0x69, 0x63, 0x68, 0x2d, 0x69, 0x73, 0x2d, 0x31, 0x30, 0x31, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, - 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x20, 0x43, 0x43, 0x62, 0x74, 0x55, 0x45, 0xb8, 0x10, 0xeb, 0x33, 0x3d, 0x59, 0x2d, 0x3f, - 0x46, 0x82, 0x3c, 0x53, 0xf5, 0x61, 0x19, 0xf0, 0x86, 0x44, 0xe2, 0x79, 0x4c, 0xba, 0x4a, 0xda, 0xb7, 0xb1, 0x02, 0x21, 0x00, - 0xaf, 0x51, 0x97, 0x6a, 0x44, 0x4d, 0x43, 0x9e, 0xba, 0x17, 0xb8, 0xa1, 0x63, 0x75, 0x81, 0x53, 0x09, 0x93, 0xf6, 0x18, 0xc2, - 0x74, 0x18, 0x87, 0xd3, 0xe6, 0xde, 0x47, 0x91, 0xa4, 0xc9, 0xa4, + 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xf0, 0x55, 0x61, 0x3a, 0xcb, 0x11, 0xcb, 0x76, 0xdf, 0x74, 0xc3, 0xe1, 0x72, + 0xae, 0x63, 0xcb, 0xa0, 0x2f, 0xb3, 0x6c, 0x1e, 0x05, 0x2b, 0x18, 0x24, 0xea, 0x83, 0x66, 0xc6, 0x14, 0x15, 0xda, 0x02, 0x20, + 0x01, 0x25, 0xaf, 0x3f, 0x74, 0x6f, 0x62, 0x8f, 0x26, 0xeb, 0x6d, 0xfe, 0xc9, 0x48, 0xfe, 0xfa, 0x35, 0xd5, 0xd2, 0xe9, 0x04, + 0x63, 0xf1, 0xf3, 0x8a, 0xd6, 0xef, 0x90, 0xdb, 0xb6, 0xe6, 0x83, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_SKID_Array[] = { - 0xF6, 0x4C, 0x7B, 0xF1, 0xA8, 0xB6, 0xE0, 0xBA, 0x10, 0x8E, 0xBD, 0xEB, 0x4F, 0xE1, 0xF6, 0x77, 0x7C, 0xC9, 0x2C, 0x29, + 0xA8, 0x34, 0xCB, 0xEC, 0xFD, 0x6F, 0x47, 0x43, 0x06, 0xE5, 0x7D, 0x90, 0x7E, 0x4C, 0xF4, 0xAD, 0x3F, 0x7D, 0xFC, 0x4F, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_SKID = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Long_SKID_Array); @@ -307,18 +904,18 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_SKID = ByteSpan(sTes // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Long-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_PublicKey_Array[] = { - 0x04, 0x43, 0x28, 0xfb, 0xb8, 0x71, 0x42, 0x8c, 0x35, 0xe2, 0x24, 0xb3, 0x7f, 0x9e, 0x80, 0x64, 0x03, - 0x5f, 0xb2, 0xcc, 0x72, 0xf8, 0xf1, 0x71, 0x18, 0x53, 0x46, 0xc3, 0x20, 0xe1, 0xa8, 0x85, 0xb5, 0xe4, - 0x09, 0x09, 0x5e, 0xec, 0x85, 0x5f, 0x7d, 0x52, 0xaf, 0x97, 0xa1, 0xd0, 0x6f, 0x76, 0x71, 0x6c, 0x87, - 0x36, 0x7e, 0x19, 0x88, 0xce, 0xa1, 0x19, 0xd6, 0xd7, 0xf4, 0x25, 0x2b, 0xc7, 0x2f, + 0x04, 0x6f, 0xbd, 0x31, 0x13, 0xf1, 0x4e, 0x00, 0xb5, 0x54, 0x1a, 0xe5, 0x26, 0x3a, 0x47, 0xe1, 0x6b, + 0x19, 0x77, 0x75, 0xe9, 0x12, 0x14, 0xa4, 0x20, 0xf4, 0xd9, 0x7a, 0xed, 0x6b, 0xa4, 0x93, 0x55, 0x1c, + 0xa5, 0xc0, 0xd6, 0x95, 0xfa, 0x3e, 0xb9, 0x08, 0xf1, 0x32, 0x9a, 0x54, 0xbb, 0x9d, 0x5d, 0xe5, 0x97, + 0x4c, 0xfa, 0xa8, 0xc5, 0xf0, 0xc5, 0xc4, 0x30, 0x8c, 0xae, 0x1a, 0xc6, 0xe1, 0x77, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Long_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Long_PrivateKey_Array[] = { - 0xd1, 0x54, 0x99, 0xa7, 0xd6, 0xde, 0x38, 0x53, 0x86, 0x9d, 0xe6, 0xa4, 0x6c, 0x4b, 0x52, 0xd1, - 0x3b, 0x73, 0x59, 0x16, 0xd4, 0xaa, 0xbd, 0x50, 0x26, 0xaa, 0xad, 0x1e, 0x72, 0x79, 0x66, 0xeb, + 0xa1, 0x04, 0xed, 0x38, 0xd7, 0xa7, 0x7d, 0xfb, 0x87, 0x24, 0x89, 0xb5, 0xf3, 0x35, 0x51, 0xe6, + 0x5e, 0x7e, 0x68, 0x36, 0x04, 0x33, 0x4e, 0x7b, 0x6e, 0x9a, 0xa7, 0xe4, 0x8b, 0x94, 0xbf, 0xf7, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_PrivateKey = @@ -327,38 +924,40 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_PrivateKey = // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Cert.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert_Array[] = { - 0x30, 0x82, 0x02, 0x05, 0x30, 0x82, 0x01, 0xab, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x70, 0x06, 0x08, 0xaa, 0xa1, 0xd7, - 0xad, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, + 0x30, 0x82, 0x02, 0x27, 0x30, 0x82, 0x01, 0xcc, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x6f, 0xd7, 0xff, 0x0b, 0xd5, 0xa4, + 0x98, 0x3f, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x46, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x0f, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x41, 0x49, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x31, 0x30, 0x36, 0x32, 0x38, 0x31, 0x34, 0x32, 0x33, 0x34, 0x33, 0x5a, 0x18, 0x0f, - 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x3b, 0x31, 0x0d, 0x30, 0x0b, - 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x04, 0x4c, 0x6f, 0x6e, 0x67, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, - 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, - 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, - 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xfc, 0xcd, - 0xc8, 0x29, 0xba, 0x62, 0x37, 0x7c, 0xc6, 0xc7, 0xb3, 0x6e, 0xa7, 0xc1, 0xaf, 0x76, 0xcd, 0x15, 0xc3, 0x28, 0xbc, 0x4b, 0x6e, - 0x8d, 0x07, 0x78, 0xba, 0x59, 0x7f, 0xbb, 0xf3, 0x0a, 0xe7, 0x12, 0xb6, 0x57, 0xd2, 0xf9, 0xf2, 0xb9, 0x15, 0xf8, 0x23, 0x4c, - 0x87, 0xe2, 0xa3, 0x3b, 0xf5, 0xe7, 0x59, 0x76, 0xe0, 0x4e, 0x6a, 0xd0, 0x3d, 0x85, 0x0b, 0xd1, 0x64, 0x39, 0xf3, 0xcf, 0xa3, - 0x81, 0x8b, 0x30, 0x81, 0x88, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, - 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, - 0x04, 0x16, 0x04, 0x14, 0x07, 0x30, 0x1c, 0xef, 0x8b, 0x9e, 0x44, 0x26, 0xd2, 0xe4, 0x6e, 0xc6, 0xfa, 0x3a, 0xd3, 0xb7, 0x44, - 0x1d, 0xef, 0xbd, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, - 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x28, 0x06, 0x03, 0x55, 0x1d, - 0x1f, 0x04, 0x21, 0x30, 0x1f, 0x30, 0x1d, 0xa0, 0x1b, 0xa0, 0x19, 0x86, 0x17, 0x77, 0x77, 0x77, 0x2e, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, - 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, 0x00, 0x30, 0x45, 0x02, 0x21, 0x00, 0xe6, 0xb8, 0x88, 0x1e, 0xed, 0x0e, 0xa6, - 0x70, 0x82, 0xc0, 0x60, 0x7e, 0x46, 0xf6, 0xca, 0x84, 0x04, 0x31, 0xab, 0xe0, 0x91, 0xd6, 0x17, 0x5d, 0x81, 0x0c, 0x38, 0xa1, - 0xe4, 0xf0, 0x45, 0x77, 0x02, 0x20, 0x39, 0x06, 0x5f, 0xbe, 0xf9, 0xfd, 0xa4, 0x1b, 0x37, 0xaf, 0xcb, 0xb1, 0xf6, 0xdf, 0x09, - 0x0e, 0x1a, 0x44, 0x3b, 0xac, 0x6e, 0x65, 0x2c, 0x3b, 0xda, 0xc1, 0x03, 0xf4, 0xd3, 0xac, 0x4e, 0x76, + 0x39, 0x39, 0x39, 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x5c, 0x31, 0x2e, 0x30, 0x2c, + 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x25, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x44, 0x41, + 0x43, 0x20, 0x30, 0x30, 0x30, 0x30, 0x20, 0x43, 0x44, 0x50, 0x20, 0x57, 0x72, 0x6f, 0x6e, 0x67, 0x20, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, + 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, + 0x38, 0x30, 0x30, 0x30, 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, + 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0xde, 0xcc, 0x12, 0xe0, 0xdc, 0x3d, 0x1b, 0x39, 0xa0, 0xff, 0xc6, + 0x66, 0x85, 0xfd, 0x1a, 0x3d, 0xda, 0xf4, 0xd0, 0x74, 0xe0, 0xb3, 0x6a, 0x53, 0xa8, 0xbd, 0x2c, 0x1c, 0xb3, 0xed, 0xfd, 0xf8, + 0x7b, 0x71, 0x3c, 0xc4, 0x8e, 0x72, 0x19, 0x75, 0x89, 0xb9, 0x71, 0xdf, 0x5f, 0x59, 0x1e, 0xc8, 0xcd, 0x4e, 0xbe, 0x73, 0xfa, + 0x4f, 0xdf, 0x70, 0xa2, 0x07, 0x49, 0xc2, 0x84, 0x92, 0xd9, 0x3f, 0xa3, 0x81, 0x8b, 0x30, 0x81, 0x88, 0x30, 0x0c, 0x06, 0x03, + 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, + 0x04, 0x03, 0x02, 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x58, 0x41, 0x3e, 0xe4, 0xed, + 0xad, 0x2f, 0x44, 0xa6, 0xcd, 0x06, 0xab, 0xc0, 0x6c, 0xa3, 0x48, 0x5e, 0xe6, 0xc1, 0xf1, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, + 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xaf, 0x42, 0xb7, 0x09, 0x4d, 0xeb, 0xd5, 0x15, 0xec, 0x6e, 0xcf, 0x33, 0xb8, 0x11, + 0x15, 0x22, 0x5f, 0x32, 0x52, 0x88, 0x30, 0x28, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x21, 0x30, 0x1f, 0x30, 0x1d, 0xa0, 0x1b, + 0xa0, 0x19, 0x86, 0x17, 0x77, 0x77, 0x77, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x72, 0x6c, 0x2e, 0x70, 0x65, 0x6d, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, + 0x30, 0x46, 0x02, 0x21, 0x00, 0xb5, 0x2f, 0x95, 0x53, 0x46, 0x9d, 0x01, 0x38, 0x9b, 0xae, 0xba, 0x0f, 0x85, 0xad, 0x29, 0xac, + 0x89, 0x9e, 0x8f, 0x14, 0x1a, 0x1d, 0x2d, 0x6c, 0xf7, 0xd3, 0xff, 0x57, 0x5c, 0x05, 0xb9, 0x2b, 0x02, 0x21, 0x00, 0xd7, 0xd5, + 0xda, 0x5e, 0x8b, 0xeb, 0x36, 0x04, 0x5b, 0x35, 0x12, 0xf8, 0x36, 0x3d, 0xb3, 0xa0, 0xac, 0x8c, 0x1d, 0x14, 0x7c, 0x2d, 0xbb, + 0x3f, 0x95, 0x58, 0xc9, 0xf5, 0x8b, 0xe5, 0x80, 0x81, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_SKID_Array[] = { - 0x07, 0x30, 0x1C, 0xEF, 0x8B, 0x9E, 0x44, 0x26, 0xD2, 0xE4, 0x6E, 0xC6, 0xFA, 0x3A, 0xD3, 0xB7, 0x44, 0x1D, 0xEF, 0xBD, + 0x58, 0x41, 0x3E, 0xE4, 0xED, 0xAD, 0x2F, 0x44, 0xA6, 0xCD, 0x06, 0xAB, 0xC0, 0x6C, 0xA3, 0x48, 0x5E, 0xE6, 0xC1, 0xF1, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_SKID = @@ -367,18 +966,18 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_SKID = // ${chip_root}/credentials/test/attestation/Chip-Test-DAC-FFF1-8000-0000-CDP-Wrong-Prefix-Key.pem constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_PublicKey_Array[] = { - 0x04, 0xfc, 0xcd, 0xc8, 0x29, 0xba, 0x62, 0x37, 0x7c, 0xc6, 0xc7, 0xb3, 0x6e, 0xa7, 0xc1, 0xaf, 0x76, - 0xcd, 0x15, 0xc3, 0x28, 0xbc, 0x4b, 0x6e, 0x8d, 0x07, 0x78, 0xba, 0x59, 0x7f, 0xbb, 0xf3, 0x0a, 0xe7, - 0x12, 0xb6, 0x57, 0xd2, 0xf9, 0xf2, 0xb9, 0x15, 0xf8, 0x23, 0x4c, 0x87, 0xe2, 0xa3, 0x3b, 0xf5, 0xe7, - 0x59, 0x76, 0xe0, 0x4e, 0x6a, 0xd0, 0x3d, 0x85, 0x0b, 0xd1, 0x64, 0x39, 0xf3, 0xcf, + 0x04, 0xde, 0xcc, 0x12, 0xe0, 0xdc, 0x3d, 0x1b, 0x39, 0xa0, 0xff, 0xc6, 0x66, 0x85, 0xfd, 0x1a, 0x3d, + 0xda, 0xf4, 0xd0, 0x74, 0xe0, 0xb3, 0x6a, 0x53, 0xa8, 0xbd, 0x2c, 0x1c, 0xb3, 0xed, 0xfd, 0xf8, 0x7b, + 0x71, 0x3c, 0xc4, 0x8e, 0x72, 0x19, 0x75, 0x89, 0xb9, 0x71, 0xdf, 0x5f, 0x59, 0x1e, 0xc8, 0xcd, 0x4e, + 0xbe, 0x73, 0xfa, 0x4f, 0xdf, 0x70, 0xa2, 0x07, 0x49, 0xc2, 0x84, 0x92, 0xd9, 0x3f, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_PublicKey = ByteSpan(sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_PublicKey_Array); constexpr uint8_t sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_PrivateKey_Array[] = { - 0xa5, 0x1d, 0xcd, 0xfc, 0xd9, 0x55, 0xdb, 0x87, 0x24, 0x35, 0x6c, 0x87, 0x12, 0x1a, 0x90, 0xbd, - 0x13, 0x18, 0x53, 0x78, 0xa7, 0xa9, 0x8c, 0x71, 0xf4, 0x70, 0x44, 0xa2, 0xa6, 0xdb, 0xeb, 0xdb, + 0xcb, 0xcb, 0x67, 0xd2, 0x7b, 0xbb, 0xce, 0xbe, 0x74, 0x17, 0xc3, 0xe5, 0xae, 0xbe, 0x10, 0xb3, + 0xc6, 0x12, 0x00, 0x4e, 0x08, 0x85, 0xee, 0x3e, 0x60, 0x3d, 0xe2, 0xdc, 0xb7, 0x9e, 0xce, 0xca, }; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_PrivateKey = diff --git a/src/credentials/tests/CHIPAttCert_test_vectors.h b/src/credentials/tests/CHIPAttCert_test_vectors.h index 1e59b5321cf19d..936cf00bddcd3d 100644 --- a/src/credentials/tests/CHIPAttCert_test_vectors.h +++ b/src/credentials/tests/CHIPAttCert_test_vectors.h @@ -28,6 +28,26 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_SKID; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_PublicKey; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_PrivateKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_PrivateKey; + extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_SKID; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_PublicKey; @@ -38,11 +58,36 @@ extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_SKID; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_PublicKey; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_PrivateKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_PrivateKey; + extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_SKID; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PublicKey; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_PrivateKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_PrivateKey; + +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_SKID; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PublicKey; +extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_PrivateKey; + extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_SKID; extern const ByteSpan sTestCert_DAC_FFF1_8000_0000_CDP_Long_PublicKey; diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index c6e7998f0c1788..83866b3c8bf78b 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -523,6 +523,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + size_t numFabricsIterated = 0; size_t numStorageKeysAtStart = storage.GetNumKeys(); @@ -588,6 +594,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageKeysAtStart); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + // Validate iterator sees pending { numFabricsIterated = 0; @@ -612,6 +625,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == (numStorageKeysAtStart + 4)); // 2 opcerts + fabric metadata + index + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -679,6 +699,14 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) ByteSpan noc = fabric44CertAuthority.GetNoc(); NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 1); + + // Next fabric index should still be the same as before. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } + NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; @@ -689,6 +717,12 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, newFabricIndex == 2); // No storage yet NL_TEST_ASSERT(inSuite, storage.GetNumKeys() == numStorageAfterFirstAdd); + // Next fabric index has not been updated yet. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 2); + } // Commit, now storage should have keys NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.CommitPendingFabricData()); @@ -697,6 +731,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterFirstAdd + 5)); // 3 opcerts + fabric metadata + 1 operational key + // Next fabric index has been updated. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -879,6 +920,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } size_t numStorageAfterUpdate = storage.GetNumKeys(); @@ -904,6 +952,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, fabricInfo->GetFabricLabel().data_equal(CharSpan{ "roboto", strlen("roboto") })); } } + + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Sequence 5: Remove FabricIndex 1 (FabricId 11, NodeId 55), make sure FabricIndex 2 (FabricId 44, NodeId 1000) still exists @@ -917,6 +972,13 @@ void TestBasicAddNocUpdateNocFlow(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_EQUALS(inSuite, storage.GetNumKeys(), (numStorageAfterUpdate - 3)); // Deleted NOC, RCAC, Metadata } + // Next fabric index has stayed the same. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } + // Validate contents of Fabric Index 2 is still OK const auto * fabricInfo = fabricTable.FindFabricWithIndex(2); NL_TEST_ASSERT(inSuite, fabricInfo != nullptr); @@ -1374,6 +1436,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, saw1 == true); NL_TEST_ASSERT(inSuite, saw2 == true); } + + // Next fabric index should now be 3, since we added 1 and 2 above. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } // Global: Last known good time + fabric index = 2 @@ -1501,6 +1570,13 @@ void TestPersistence(nlTestSuite * inSuite, void * inContext) CHIP_ERROR_INVALID_SIGNATURE); } } + + // Validate that next fabric index is still 3; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 3); + } } } @@ -1544,6 +1620,12 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingTrustedRootCert(rcac)); FabricIndex newFabricIndex = kUndefinedFabricIndex; + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } + NL_TEST_ASSERT_EQUALS(inSuite, fabricTable.FabricCount(), 0); NL_TEST_ASSERT_SUCCESS(inSuite, fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, ByteSpan{}, kVendorId, &newFabricIndex)); @@ -1596,6 +1678,13 @@ void TestAddNocFailSafe(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, numFabricsIterated == 0); NL_TEST_ASSERT(inSuite, saw1 == false); } + + // Validate next fabric index has not changed. + { + FabricIndex nextFabricIndex = kUndefinedFabricIndex; + NL_TEST_ASSERT(inSuite, fabricTable.PeekFabricIndexForNextAddition(nextFabricIndex) == CHIP_NO_ERROR); + NL_TEST_ASSERT_EQUALS(inSuite, nextFabricIndex, 1); + } } size_t numStorageAfterRevert = storage.GetNumKeys(); diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index 1ad60b4c68d61a..65511668b1d5fd 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -803,7 +803,7 @@ CHIP_ERROR Hash_SHA1(const uint8_t * data, size_t data_length, uint8_t * out_buf * All implementations must check for std::is_trivially_copyable. **/ -struct alignas(size_t) HashSHA256OpaqueContext +struct alignas(CHIP_CONFIG_SHA256_CONTEXT_ALIGN) HashSHA256OpaqueContext { uint8_t mOpaque[kMAX_Hash_SHA256_Context_Size]; }; @@ -1582,6 +1582,16 @@ CHIP_ERROR ExtractAKIDFromX509Cert(const ByteSpan & certificate, MutableByteSpan **/ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certificate, MutableCharSpan & cdpurl); +/** + * @brief Extracts the CRL Distribution Point (CDP) extension's cRLIssuer Name from an X509 ASN.1 Encoded Certificate. + * The value is copied into buffer in a raw ASN.1 X.509 format. This format should be directly comparable + * with the result of ExtractSubjectFromX509Cert(). + * + * @returns CHIP_ERROR_NOT_FOUND if not found or wrong format. + * CHIP_NO_ERROR otherwise. + **/ +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer); + /** * @brief Extracts Serial Number from X509 Certificate. **/ diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index 741603e0829d5f..317c2c9eeefda4 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -1990,7 +1990,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica x509certificate = d2i_X509(nullptr, ppCertificate, static_cast(certificate.size())); VerifyOrExit(x509certificate != nullptr, err = CHIP_ERROR_NO_MEMORY); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1) @@ -2052,6 +2052,79 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return err; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + int result = 1; + X509 * x509certificate = nullptr; + const unsigned char * pCertificate = certificate.data(); + const unsigned char ** ppCertificate = &pCertificate; + STACK_OF(DIST_POINT) * crldp = nullptr; + DIST_POINT * dp = nullptr; + GENERAL_NAMES * gens = nullptr; + GENERAL_NAME * gen = nullptr; + X509_NAME * dirName = nullptr; + const uint8_t * pDirName = nullptr; + size_t dirNameLen = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + x509certificate = d2i_X509(nullptr, ppCertificate, static_cast(certificate.size())); + VerifyOrExit(x509certificate != nullptr, err = CHIP_ERROR_NO_MEMORY); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1) + crldp = + reinterpret_cast(X509_get_ext_d2i(x509certificate, NID_crl_distribution_points, nullptr, nullptr)); + VerifyOrExit(crldp != nullptr, err = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(sk_DIST_POINT_num(crldp) == 1, err = CHIP_ERROR_NOT_FOUND); + + dp = sk_DIST_POINT_value(crldp, 0); + VerifyOrExit(dp != nullptr, err = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + // + // the cRLIssuer is encoded as a GeneralNames, where: + // GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName + // This implementation only supports a single GeneralName element in the cRLIssuer sequence: + gens = dp->CRLissuer; + VerifyOrExit(sk_GENERAL_NAME_num(gens) == 1, err = CHIP_ERROR_NOT_FOUND); + + // In this implementation the cRLIssuer is expected to be encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + gen = sk_GENERAL_NAME_value(gens, 0); + VerifyOrExit(gen->type == GEN_DIRNAME, err = CHIP_ERROR_NOT_FOUND); + + dirName = reinterpret_cast(GENERAL_NAME_get0_value(gen, nullptr)); + VerifyOrExit(dirName != nullptr, err = CHIP_ERROR_NOT_FOUND); + + // Extract directoryName as a raw DER Encoded data + result = X509_NAME_get0_der(dirName, &pDirName, &dirNameLen); + VerifyOrExit(result == 1, err = CHIP_ERROR_INTERNAL); + err = CopySpanToMutableSpan(ByteSpan(pDirName, dirNameLen), crlIssuer); + +exit: + sk_DIST_POINT_pop_free(crldp, DIST_POINT_free); + X509_free(x509certificate); + + return err; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -2112,10 +2185,7 @@ CHIP_ERROR ExtractRawDNFromX509Cert(bool extractSubject, const ByteSpan & certif result = X509_NAME_get0_der(distinguishedName, &pDistinguishedName, &distinguishedNameLen); VerifyOrExit(result == 1, err = CHIP_ERROR_INTERNAL); - VerifyOrExit(distinguishedNameLen <= dn.size(), err = CHIP_ERROR_BUFFER_TOO_SMALL); - - memcpy(dn.data(), pDistinguishedName, distinguishedNameLen); - dn.reduce_size(distinguishedNameLen); + err = CopySpanToMutableSpan(ByteSpan(pDistinguishedName, distinguishedNameLen), dn); exit: X509_free(x509certificate); diff --git a/src/crypto/CHIPCryptoPALPSA.cpp b/src/crypto/CHIPCryptoPALPSA.cpp index d1afbf1dbb05e3..5f21030eb69a72 100644 --- a/src/crypto/CHIPCryptoPALPSA.cpp +++ b/src/crypto/CHIPCryptoPALPSA.cpp @@ -1734,7 +1734,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1765,6 +1765,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1780,6 +1782,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1807,6 +1812,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + logMbedTLSError(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/crypto/CHIPCryptoPALmbedTLS.cpp b/src/crypto/CHIPCryptoPALmbedTLS.cpp index 195bd56cf745a2..c903d984f57e08 100644 --- a/src/crypto/CHIPCryptoPALmbedTLS.cpp +++ b/src/crypto/CHIPCryptoPALmbedTLS.cpp @@ -1826,7 +1826,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1857,6 +1857,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1872,6 +1874,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1899,6 +1904,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index 9eb01b6723dabb..bcf858d8b53e10 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -2122,21 +2122,32 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont constexpr const char * exampleHttpURI = "http://example.com/crl.pem"; constexpr const char * exampleHttpsURI = "https://example.com/crl.pem"; + CharSpan httpSpan = CharSpan::fromCharString(exampleHttpURI); + CharSpan httpsSpan = CharSpan::fromCharString(exampleHttpsURI); // clang-format off static CDPTestCase sCDPTestCases[] = { - // Cert Expected Error Expected Output - // =============================================================================================== - { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, CharSpan() }, - { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_NO_ERROR, CharSpan::fromCharString(exampleHttpURI) }, - { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_NO_ERROR, CharSpan::fromCharString(exampleHttpsURI) }, - { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, - { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, + // Cert Expected Error Expected Output + // ============================================================================================================== + { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, CharSpan() }, + { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_NO_ERROR, httpSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert, CHIP_ERROR_NOT_FOUND, CharSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert, CHIP_NO_ERROR, httpsSpan }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert, CHIP_ERROR_BUFFER_TOO_SMALL, CharSpan() }, }; // clang-format on @@ -2146,7 +2157,7 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont MutableCharSpan cdp(cdpBuf); err = ExtractCRLDistributionPointURIFromX509Cert(testCase.Cert, cdp); NL_TEST_ASSERT(inSuite, err == testCase.mExpectedError); - if (err == CHIP_NO_ERROR) + if (testCase.mExpectedError == CHIP_NO_ERROR) { NL_TEST_ASSERT(inSuite, cdp.size() == testCase.mExpectedResult.size()); NL_TEST_ASSERT(inSuite, cdp.data_equal(testCase.mExpectedResult)); @@ -2154,6 +2165,65 @@ static void TestCDPExtension_x509Extraction(nlTestSuite * inSuite, void * inCont } } +static void TestCDPCRLIssuerExtension_x509Extraction(nlTestSuite * inSuite, void * inContext) +{ + using namespace TestCerts; + + HeapChecker heapChecker(inSuite); + CHIP_ERROR err = CHIP_NO_ERROR; + + struct CDPTestCase + { + ByteSpan Cert; + CHIP_ERROR mExpectedError; + ByteSpan mCRLIssuerCert; + }; + + // clang-format off + static CDPTestCase sCDPTestCases[] = { + // Cert Expected Error Expected CRL Issuer Cert + // ======================================================================================================================= + { ByteSpan(), CHIP_ERROR_INVALID_ARGUMENT, ByteSpan() }, + { sTestCert_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_PAI_FFF2_8001_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF2_8003_0019_FB_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_HTTPS_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2URIs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2DPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Wrong_Prefix_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Long_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_2CDPs_Issuer_PAI_FFF2_8004_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_CRL_Issuer_PAA_FFF1_2DPs_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_2CRLIssuers_PAA_FFF1_Cert, CHIP_ERROR_NOT_FOUND, ByteSpan() }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_FFF1_Cert, CHIP_NO_ERROR, sTestCert_PAA_FFF1_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAA_NoVID_Cert, CHIP_NO_ERROR, sTestCert_PAA_NoVID_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Cert, CHIP_NO_ERROR, sTestCert_PAI_FFF2_8004_FB_Cert }, + { sTestCert_DAC_FFF1_8000_0000_CDP_Issuer_PAI_FFF2_8004_Long_Cert, CHIP_NO_ERROR, sTestCert_PAI_FFF2_8004_FB_Cert }, + }; + // clang-format on + + for (auto & testCase : sCDPTestCases) + { + uint8_t crlIssuerBuf[kMaxCertificateDistinguishedNameLength] = { 0 }; + MutableByteSpan crlIssuer(crlIssuerBuf); + err = ExtractCDPExtensionCRLIssuerFromX509Cert(testCase.Cert, crlIssuer); + NL_TEST_ASSERT(inSuite, err == testCase.mExpectedError); + if (testCase.mExpectedError == CHIP_NO_ERROR) + { + uint8_t crlIssuerSubjectBuf[kMaxCertificateDistinguishedNameLength] = { 0 }; + MutableByteSpan crlIssuerSubject(crlIssuerSubjectBuf); + + err = ExtractSubjectFromX509Cert(testCase.mCRLIssuerCert, crlIssuerSubject); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + NL_TEST_ASSERT(inSuite, crlIssuer.data_equal(crlIssuerSubject)); + } + } +} + static void TestSerialNumber_x509Extraction(nlTestSuite * inSuite, void * inContext) { using namespace TestCerts; @@ -2752,6 +2822,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test Subject Key Id Extraction from x509 Certificate", TestSKID_x509Extraction), NL_TEST_DEF("Test Authority Key Id Extraction from x509 Certificate", TestAKID_x509Extraction), NL_TEST_DEF("Test CRL Distribution Point Extension Extraction from x509 Certificate", TestCDPExtension_x509Extraction), + NL_TEST_DEF("Test CDP Extension CRL Issuer Extraction from x509 Certificate", TestCDPCRLIssuerExtension_x509Extraction), NL_TEST_DEF("Test Serial Number Extraction from x509 Certificate", TestSerialNumber_x509Extraction), NL_TEST_DEF("Test Subject Extraction from x509 Certificate", TestSubject_x509Extraction), NL_TEST_DEF("Test Issuer Extraction from x509 Certificate", TestIssuer_x509Extraction), diff --git a/src/darwin/Framework/CHIP/MTRConversion.h b/src/darwin/Framework/CHIP/MTRConversion.h index 53225a690e2070..5932ff88bf597b 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.h +++ b/src/darwin/Framework/CHIP/MTRConversion.h @@ -19,6 +19,8 @@ #import +#include +#include #include #include #include @@ -38,4 +40,10 @@ inline NSDate * ChipEpochSecondsAsDate(uint32_t chipEpochSeconds) return [NSDate dateWithTimeIntervalSince1970:(chip::kChipEpochSecondsSinceUnixEpoch + (NSTimeInterval) chipEpochSeconds)]; } +/** + * Utilities for converting between NSSet and chip::CATValues. + */ +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values); +NSSet * CATValuesToSet(const chip::CATValues & values); + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRConversion.mm b/src/darwin/Framework/CHIP/MTRConversion.mm new file mode 100644 index 00000000000000..77882742dea3e7 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRConversion.mm @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2023 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. + */ + +#import "MTRConversion.h" +#import "MTRLogging_Internal.h" + +#include + +CHIP_ERROR SetToCATValues(NSSet * catSet, chip::CATValues & values) +{ + values = chip::kUndefinedCATs; + + unsigned long long tagCount = catSet.count; + if (tagCount > chip::kMaxSubjectCATAttributeCount) { + MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + size_t tagIndex = 0; + for (NSNumber * boxedTag in [catSet.allObjects sortedArrayUsingSelector:@selector(compare:)]) { + auto unboxedTag = boxedTag.unsignedLongLongValue; + if (!chip::CanCastTo(unboxedTag)) { + MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", unboxedTag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + auto tag = static_cast(unboxedTag); + if (!chip::IsValidCASEAuthTag(tag)) { + MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + values.values[tagIndex++] = tag; + } + + return CHIP_NO_ERROR; +} + +NSSet * CATValuesToSet(const chip::CATValues & values) +{ + auto * catSet = [[NSMutableSet alloc] initWithCapacity:values.GetNumTagsPresent()]; + for (auto & value : values.values) { + if (value != chip::kUndefinedCAT) { + [catSet addObject:@(value)]; + } + } + return [NSSet setWithSet:catSet]; +} diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 323066b4b47fe1..dab6250019e325 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -53,7 +53,7 @@ #define MTR_NEWLY_AVAILABLE #endif -#if MTR_ENABLE_PROVISIONAL +#if defined(MTR_ENABLE_PROVISIONAL) && MTR_ENABLE_PROVISIONAL #define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE #else #define MTR_PROVISIONALLY_AVAILABLE NS_UNAVAILABLE MTR_HIDDEN diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 59a4c338fc4af6..cf4ab4c068d465 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -22,6 +22,7 @@ #import "MTRCommissionableBrowser.h" #import "MTRCommissionableBrowserResult_Internal.h" #import "MTRCommissioningParameters.h" +#import "MTRConversion.h" #import "MTRDeviceControllerDelegateBridge.h" #import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceControllerStartupParams.h" @@ -268,8 +269,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } signingKeypair = &_signingKeypairBridge; } - errorCode = _operationalCredentialsDelegate->Init(_factory.storageDelegateBridge, signingKeypair, startupParams.ipk, - startupParams.rootCertificate, startupParams.intermediateCertificate); + errorCode = _operationalCredentialsDelegate->Init( + signingKeypair, startupParams.ipk, startupParams.rootCertificate, startupParams.intermediateCertificate); if ([self checkForStartError:errorCode logMsg:kErrorOperationalCredentialsInit]) { return; } @@ -312,27 +313,11 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams chip::CATValues cats = chip::kUndefinedCATs; if (startupParams.caseAuthenticatedTags != nil) { - unsigned long long tagCount = startupParams.caseAuthenticatedTags.count; - if (tagCount > chip::kMaxSubjectCATAttributeCount) { - MTR_LOG_ERROR("%llu CASE Authenticated Tags cannot be represented in a certificate.", tagCount); + errorCode = SetToCATValues(startupParams.caseAuthenticatedTags, cats); + if (errorCode != CHIP_NO_ERROR) { + // SetToCATValues already handles logging. return; } - - size_t tagIndex = 0; - for (NSNumber * boxedTag in startupParams.caseAuthenticatedTags) { - if (!chip::CanCastTo(boxedTag.unsignedLongLongValue)) { - MTR_LOG_ERROR("0x%llx is not a valid CASE Authenticated Tag value.", boxedTag.unsignedLongLongValue); - return; - } - - auto tag = static_cast(boxedTag.unsignedLongLongValue); - if (!chip::IsValidCASEAuthTag(tag)) { - MTR_LOG_ERROR("0x%" PRIx32 " is not a valid CASE Authenticated Tag value.", tag); - return; - } - - cats.values[tagIndex++] = tag; - } } if (commissionerParams.operationalKeypair != nullptr) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 053a3a5c6a5094..64e4af1ba29fc9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -74,7 +74,7 @@ @interface MTRDeviceControllerFactory () @property (atomic, readonly) dispatch_queue_t chipWorkQueue; @property (readonly) DeviceControllerFactory * controllerFactory; -@property (readonly) MTRPersistentStorageDelegateBridge * persistentStorageDelegateBridge; +@property (readonly) PersistentStorageDelegate * persistentStorageDelegate; @property (readonly) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; @property (readonly) MTROTAProviderDelegateBridge * otaProviderDelegateBridge; @property (readonly) Crypto::RawKeySessionKeystore * sessionKeystore; @@ -96,7 +96,7 @@ @interface MTRDeviceControllerFactory () // // 1) The only mutating accesses to the controllers array happen when the // current queue is not the Matter queue. This is a good assumption, because -// the implementation of the fucntions that mutate the array do sync dispatch +// the implementation of the functions that mutate the array do sync dispatch // to the Matter queue, which would deadlock if they were called when that // queue was the current queue. // 2) It's our API consumer's responsibility to serialize access to us from @@ -273,9 +273,9 @@ - (void)cleanupStartupObjects _opCertStore = nullptr; } - if (_persistentStorageDelegateBridge) { - delete _persistentStorageDelegateBridge; - _persistentStorageDelegateBridge = nullptr; + if (_persistentStorageDelegate) { + delete _persistentStorageDelegate; + _persistentStorageDelegate = nullptr; } } @@ -291,7 +291,7 @@ - (void)cleanupStartupObjects __block BOOL listFilled = NO; auto fillListBlock = ^{ FabricTable fabricTable; - CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegateBridge, + CHIP_ERROR err = fabricTable.Init({ .storage = self->_persistentStorageDelegate, .operationalKeystore = self->_keystore, .opCertStore = self->_opCertStore }); if (err != CHIP_NO_ERROR) { @@ -348,8 +348,8 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams [MTRControllerAccessControl init]; - _persistentStorageDelegateBridge = new MTRPersistentStorageDelegateBridge(startupParams.storage); - if (_persistentStorageDelegateBridge == nil) { + _persistentStorageDelegate = new MTRPersistentStorageDelegateBridge(startupParams.storage); + if (_persistentStorageDelegate == nil) { MTR_LOG_ERROR("Error: %@", kErrorPersistentStorageInit); errorCode = CHIP_ERROR_NO_MEMORY; return; @@ -415,7 +415,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - errorCode = _keystore->Init(_persistentStorageDelegateBridge); + errorCode = _keystore->Init(_persistentStorageDelegate); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorKeystoreInit); return; @@ -429,7 +429,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams return; } - errorCode = _opCertStore->Init(_persistentStorageDelegateBridge); + errorCode = _opCertStore->Init(_persistentStorageDelegate); if (errorCode != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error: %@", kErrorCertStoreInit); return; @@ -482,7 +482,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams params.groupDataProvider = _groupDataProvider; params.sessionKeystore = _sessionKeystore; - params.fabricIndependentStorage = _persistentStorageDelegateBridge; + params.fabricIndependentStorage = _persistentStorageDelegate; params.operationalKeystore = _keystore; params.opCertStore = _opCertStore; params.certificateValidityPolicy = _certificateValidityPolicy; @@ -553,16 +553,22 @@ - (void)stopControllerFactory _running = NO; } -- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams - error:(NSError * __autoreleasing *)error +/** + * Helper function to start a device controller with the given startup params. + * The fabricChecker block will run on the Matter queue, and is expected to + * return nil if pre-startup fabric table checks fail, and set fabricError to + * the right error value in that situation. + */ +- (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceControllerStartupParams *)startupParams + fabricChecker:(MTRDeviceControllerStartupParamsInternal * (^)(FabricTable * fabricTable, + MTRDeviceController * controller, + CHIP_ERROR & fabricError))fabricChecker + error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; if (![self checkIsRunning:error]) { MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } return nil; } @@ -578,49 +584,14 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo __block MTRDeviceControllerStartupParamsInternal * params = nil; __block CHIP_ERROR fabricError = CHIP_NO_ERROR; + // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - - if (fabric == nullptr) { - MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); - fabricError = CHIP_ERROR_NOT_FOUND; - return; - } - for (MTRDeviceController * existing in _controllers) { - BOOL isRunning = YES; // assume the worst - if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] - != CHIP_NO_ERROR) { - MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - - if (isRunning) { - MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return; - } - } - - params = [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable - fabricIndex:fabric->GetFabricIndex() - keystore:_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } + dispatch_sync(_chipWorkQueue, ^{ + params = fabricChecker(fabricTable, controller, fabricError); }); if (params == nil) { @@ -649,19 +620,68 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo return controller; } +- (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceControllerStartupParams *)startupParams + error:(NSError * __autoreleasing *)error +{ + [self _assertCurrentQueueIsNotMatterQueue]; + + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric == nullptr) { + MTR_LOG_ERROR("Can't start on existing fabric: fabric not found"); + fabricError = CHIP_ERROR_NOT_FOUND; + return nil; + } + + auto * controllersCopy = [self getRunningControllers]; + + for (MTRDeviceController * existing in controllersCopy) { + BOOL isRunning = YES; // assume the worst + if ([existing isRunningOnFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + isRunning:&isRunning] + != CHIP_NO_ERROR) { + MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (isRunning) { + MTR_LOG_ERROR("Can't start on existing fabric: another controller is running on it"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable + fabricIndex:fabric->GetFabricIndex() + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + + return params; + } + error:error]; +} + - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControllerStartupParams *)startupParams error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; - if (![self isRunning]) { - MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - return nil; - } - if (startupParams.vendorID == nil) { MTR_LOG_ERROR("Must provide vendor id when starting controller on new fabric"); if (error != nil) { @@ -678,71 +698,34 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - // Create the controller, so we start the event loop, since we plan to do - // our fabric table operations there. - auto * controller = [self createController]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NO_MEMORY]; - } - return nil; - } - - __block MTRDeviceControllerStartupParamsInternal * params = nil; - __block CHIP_ERROR fabricError = CHIP_NO_ERROR; - // We want the block to end up with just a pointer to the fabric table, - // since we know our on-stack instance will outlive the block. - FabricTable fabricTableInstance; - FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ - const FabricInfo * fabric = nullptr; - BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; - if (!ok) { - MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); - fabricError = CHIP_ERROR_INTERNAL; - return; - } - - if (fabric != nullptr) { - MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); - fabricError = CHIP_ERROR_INCORRECT_STATE; - return; - } - - params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable - keystore:_keystore - advertiseOperational:self.advertiseOperational - params:startupParams]; - if (params == nil) { - fabricError = CHIP_ERROR_NO_MEMORY; - } - }); - - if (params == nil) { - [self controllerShuttingDown:controller]; - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:fabricError]; - } - return nil; - } - - BOOL ok = [controller startup:params]; - if (ok == NO) { - // TODO: get error from controller's startup. - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - return nil; - } - - // TODO: Need better error propagation. - controller = [self maybeInitializeOTAProvider:controller]; - if (controller == nil) { - if (error != nil) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INTERNAL]; - } - } - return controller; + return [self _startDeviceController:startupParams + fabricChecker:^MTRDeviceControllerStartupParamsInternal *( + FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { + const FabricInfo * fabric = nullptr; + BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; + if (!ok) { + MTR_LOG_ERROR("Can't start on new fabric: fabric matching failed"); + fabricError = CHIP_ERROR_INTERNAL; + return nil; + } + + if (fabric != nullptr) { + MTR_LOG_ERROR("Can't start on new fabric that matches existing fabric"); + fabricError = CHIP_ERROR_INCORRECT_STATE; + return nil; + } + + auto * params = + [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable + keystore:self->_keystore + advertiseOperational:self.advertiseOperational + params:startupParams]; + if (params == nil) { + fabricError = CHIP_ERROR_NO_MEMORY; + } + return params; + } + error:error]; } - (MTRDeviceController * _Nullable)createController @@ -788,7 +771,7 @@ - (BOOL)findMatchingFabric:(FabricTable &)fabricTable assertChipStackLockedByCurrentThread(); CHIP_ERROR err = fabricTable.Init( - { .storage = _persistentStorageDelegateBridge, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); + { .storage = _persistentStorageDelegate, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't initialize fabric table: %s", ErrorStr(err)); return NO; @@ -899,13 +882,19 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [controller deinitFromFactory]; } -- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +- (NSArray *)getRunningControllers { - assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); NSArray * controllersCopy = [_controllers copy]; os_unfair_lock_unlock(&_controllersLock); + return controllersCopy; +} + +- (nullable MTRDeviceController *)runningControllerForFabricIndex:(chip::FabricIndex)fabricIndex +{ + assertChipStackLockedByCurrentThread(); + + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * existing in controllersCopy) { if ([existing fabricIndex] == fabricIndex) { @@ -920,9 +909,7 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID { assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&_controllersLock); - NSArray * controllersCopy = [_controllers copy]; - os_unfair_lock_unlock(&_controllersLock); + auto * controllersCopy = [self getRunningControllers]; for (MTRDeviceController * controller in controllersCopy) { auto * compressedFabricId = controller.compressedFabricID; @@ -937,9 +924,9 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID } } -- (MTRPersistentStorageDelegateBridge *)storageDelegateBridge +- (PersistentStorageDelegate *)storageDelegate { - return _persistentStorageDelegateBridge; + return _persistentStorageDelegate; } - (Credentials::GroupDataProvider *)groupData diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 91b5813c896fb8..dc0b968b427782 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -23,11 +23,10 @@ #import "MTRDeviceControllerFactory.h" +#include #include #include -class MTRPersistentStorageDelegateBridge; - namespace chip { namespace Credentials { class GroupDataProvider; @@ -43,6 +42,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)controllerShuttingDown:(MTRDeviceController *)controller; +/** + * Get the list of running controllers. This will include controllers that are + * in the middle of starting up or shutting down. + */ +- (NSArray *)getRunningControllers; + /** * Find a running controller, if any, for the given fabric index. */ @@ -54,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID; -@property (readonly) MTRPersistentStorageDelegateBridge * storageDelegateBridge; +@property (readonly) chip::PersistentStorageDelegate * storageDelegate; @property (readonly) chip::Credentials::GroupDataProvider * groupData; @property (readonly) chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm index 844c7d26e7c63a..674618a5eb9987 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC.mm @@ -179,7 +179,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC dispatch_async(_workQueue, ^{ dispatch_group_t group = dispatch_group_create(); - if (!self.controllerID) { + if (!self.controllerXPCID) { dispatch_group_enter(group); [self.xpcConnection getProxyHandleWithCompletion:^( dispatch_queue_t _Nonnull proxyQueue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { @@ -188,7 +188,7 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC if (error) { MTR_LOG_ERROR("Failed to fetch any shared remote controller"); } else { - self.controllerID = controller; + self.controllerXPCID = controller; handleRetainer = handle; } dispatch_group_leave(group); @@ -200,8 +200,8 @@ - (void)fetchControllerIdWithQueue:(dispatch_queue_t)queue completion:(MTRFetchC }]; } dispatch_group_notify(group, queue, ^{ - if (self.controllerID) { - completion(self.controllerID, handleRetainer, nil); + if (self.controllerXPCID) { + completion(self.controllerXPCID, handleRetainer, nil); } else { completion(nil, nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); } @@ -234,7 +234,7 @@ - (instancetype)initWithControllerID:(id)controllerID workQueue:(dispatch_queue_t)queue xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerID; + _controllerXPCID = controllerID; _workQueue = queue; _xpcConnection = xpcConnection; return self; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h index ccbc2f29168450..b4d498b29295c0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerOverXPC_Internal.h @@ -25,7 +25,7 @@ typedef void (^MTRFetchControllerIDCompletion)( @interface MTRDeviceControllerOverXPC () -@property (nonatomic, readwrite, strong) id _Nullable controllerID; +@property (nonatomic, readwrite, strong) id _Nullable controllerXPCID; @property (nonatomic, readonly, strong) dispatch_queue_t workQueue; @property (nonatomic, readonly, strong) MTRDeviceControllerXPCConnection * xpcConnection; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 771995bf01bc66..ca92c63bf2171b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -16,6 +16,7 @@ #import "MTRDeviceControllerStartupParams.h" #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceControllerStartupParams_Internal.h" #import "MTRLogging_Internal.h" #import "MTRP256KeypairBridge.h" @@ -302,13 +303,7 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable auto tagCount = cats.GetNumTagsPresent(); if (tagCount > 0) { - auto * catSet = [[NSMutableSet alloc] initWithCapacity:tagCount]; - for (auto & value : cats.values) { - if (value != kUndefinedCAT) { - [catSet addObject:@(value)]; - } - } - self.caseAuthenticatedTags = [NSSet setWithSet:catSet]; + self.caseAuthenticatedTags = CATValuesToSet(cats); } else { self.caseAuthenticatedTags = nil; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm index cdc2dacb20c37c..98a217eb77e2d8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceOverXPC.mm @@ -46,7 +46,7 @@ - (instancetype)initWithControllerOverXPC:(MTRDeviceControllerOverXPC *)controll deviceID:(NSNumber *)deviceID xpcConnection:(MTRDeviceControllerXPCConnection *)xpcConnection { - _controllerID = controllerOverXPC.controllerID; + _controllerID = controllerOverXPC.controllerXPCID; _controller = controllerOverXPC; _nodeID = deviceID; _xpcConnection = xpcConnection; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h index b3dfd2419186f4..63499f024bb277 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.h @@ -41,8 +41,7 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr MTROperationalCredentialsDelegate(MTRDeviceController * deviceController); ~MTROperationalCredentialsDelegate() {} - CHIP_ERROR Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, - NSData * _Nullable icaCert); + CHIP_ERROR Init(ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert); CHIP_ERROR GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, @@ -137,8 +136,6 @@ class MTROperationalCredentialsDelegate : public chip::Controller::OperationalCr chip::Crypto::IdentityProtectionKey mIPK; - MTRPersistentStorageDelegateBridge * mStorage; - chip::NodeId mDeviceBeingPaired = chip::kUndefinedNodeId; chip::NodeId mNextRequestedNodeId = 1; diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 887fd20dba9e1f..159e772838258c 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -22,6 +22,7 @@ #import #import "MTRCertificates.h" +#import "MTRConversion.h" #import "MTRDeviceController_Internal.h" #import "MTRLogging_Internal.h" #import "NSDataSpanConversion.h" @@ -48,15 +49,13 @@ { } -CHIP_ERROR MTROperationalCredentialsDelegate::Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, - NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) +CHIP_ERROR MTROperationalCredentialsDelegate::Init( + ChipP256KeypairPtr nocSigner, NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) { - if (storage == nil || ipk == nil || rootCert == nil) { + if (ipk == nil || rootCert == nil) { return CHIP_ERROR_INVALID_ARGUMENT; } - mStorage = storage; - mIssuerKey = nocSigner; if ([ipk length] != mIPK.Length()) { @@ -471,10 +470,7 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) CATValues cats; if (caseAuthenticatedTags != nil) { - size_t idx = 0; - for (NSNumber * cat in [caseAuthenticatedTags.allObjects sortedArrayUsingSelector:@selector(compare:)]) { - cats.values[idx++] = [cat unsignedIntValue]; - } + ReturnErrorOnFailure(SetToCATValues(caseAuthenticatedTags, cats)); } uint8_t nocBuffer[Controller::kMaxCHIPDERCertLength]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index ded2a0be84a606..573551ffbe636f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -26432,6 +26432,10 @@ typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { MTRGroupKeyManagementGroupKeySecurityPolicyCacheAndSync API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { + MTRGroupKeyManagementFeatureCacheAndSync MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index b2648b2956b3ee..c984ac670a8500 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -29,10 +29,11 @@ static const uint16_t kTestProductId2 = 0x8001u; static const uint16_t kTestDiscriminator1 = 1111u; static const uint16_t kTestDiscriminator2 = 1112u; -static const uint16_t kTestDiscriminator3 = 3840u; -static const uint16_t kTestDiscriminator4 = 3839u; +static const uint16_t kTestDiscriminator3 = 1113u; +static const uint16_t kTestDiscriminator4 = 3840u; +static const uint16_t kTestDiscriminator5 = 3839u; static const uint16_t kDiscoverDeviceTimeoutInSeconds = 10; -static const uint16_t kExpectedDiscoveredDevicesCount = 4; +static const uint16_t kExpectedDiscoveredDevicesCount = 5; // Singleton controller we use. static MTRDeviceController * sController = nil; @@ -77,7 +78,8 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice XCTAssertEqualObjects(vendorId, @(kTestVendorId)); XCTAssertTrue([productId isEqual:@(kTestProductId1)] || [productId isEqual:@(kTestProductId2)]); XCTAssertTrue([discriminator isEqual:@(kTestDiscriminator1)] || [discriminator isEqual:@(kTestDiscriminator2)] || - [discriminator isEqual:@(kTestDiscriminator3)] || [discriminator isEqual:@(kTestDiscriminator4)]); + [discriminator isEqual:@(kTestDiscriminator3)] || [discriminator isEqual:@(kTestDiscriminator4)] || + [discriminator isEqual:@(kTestDiscriminator5)]); XCTAssertEqual(commissioningMode, YES); NSLog(@"Found Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); diff --git a/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m b/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m index 23deb27d90422c..a98067098688b5 100644 --- a/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m +++ b/src/darwin/Framework/CHIPTests/MTRFabricInfoTests.m @@ -19,53 +19,13 @@ // system dependencies #import +#import "MTRFabricInfoChecker.h" #import "MTRTestKeys.h" #import "MTRTestStorage.h" static uint16_t kTestVendorId1 = 0xFFF1u; static uint16_t kTestVendorId2 = 0xFFF2u; -void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet) -{ - XCTAssertEqual([fabricInfoList count], [expectedSet count]); - for (size_t i = 0; i < [fabricInfoList count]; ++i) { - __auto_type * info = fabricInfoList[i]; - NSSet * expectedInfoForIndex = [expectedSet objectsPassingTest:^(NSDictionary * obj, BOOL * stop) { - return [info.fabricIndex isEqual:obj[@"fabricIndex"]]; - }]; - XCTAssertEqual([expectedInfoForIndex count], 1); - __auto_type * expected = [expectedInfoForIndex anyObject]; - XCTAssertEqualObjects(info.rootPublicKey, expected[@"rootPublicKey"]); - XCTAssertEqualObjects(info.vendorID, expected[@"vendorID"]); - XCTAssertEqualObjects(info.fabricID, expected[@"fabricID"]); - XCTAssertEqualObjects(info.nodeID, expected[@"nodeID"]); - XCTAssertEqualObjects(info.label, expected[@"label"]); - XCTAssertNotNil(info.rootCertificate); - XCTAssertNotNil(info.rootCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.rootCertificate], info.rootCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertMatterCertificate:info.rootCertificateTLV], info.rootCertificate); - XCTAssertEqual((info.intermediateCertificate == nil), (info.intermediateCertificateTLV == nil)); - XCTAssertEqualObjects(@(info.intermediateCertificate != nil), expected[@"hasIntermediateCertificate"]); - if (info.intermediateCertificate != nil) { - XCTAssertEqualObjects( - [MTRCertificates convertX509Certificate:info.intermediateCertificate], info.intermediateCertificateTLV); - XCTAssertEqualObjects( - [MTRCertificates convertMatterCertificate:info.intermediateCertificateTLV], info.intermediateCertificate); - } - XCTAssertNotNil(info.operationalCertificate); - XCTAssertNotNil(info.operationalCertificateTLV); - XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.operationalCertificate], info.operationalCertificateTLV); - XCTAssertEqualObjects( - [MTRCertificates convertMatterCertificate:info.operationalCertificateTLV], info.operationalCertificate); - __auto_type * certInfo = [[MTRCertificateInfo alloc] initWithTLVBytes:info.operationalCertificateTLV]; - XCTAssertNotNil(certInfo); - XCTAssertEqualObjects(certInfo.subject.nodeID, info.nodeID); - XCTAssertEqualObjects(certInfo.subject.fabricID, info.fabricID); - XCTAssertEqualObjects(info.fabricIndex, expected[@"fabricIndex"]); - [expectedSet removeObject:expected]; - } -} - @interface MTRFabricInfoTests : XCTestCase @end diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 22f7ff6d5571fe..472bd22d9919c7 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -32,11 +32,13 @@ #define ENABLE_OTA_TESTS 1 #endif -// TODO: Disable test005_DoBDXTransferAllowUpdateRequest until PR #26040 is merged. +// TODO: Disable test005_DoBDXTransferAllowUpdateRequest, +// test006_DoBDXTransferWithTwoOTARequesters and +// test007_DoBDXTransferIncrementalOtaUpdate until PR #26040 is merged. // Currently the poll interval causes delays in the BDX transfer and // results in the test taking a long time. -#ifdef ENABLE_TEST_005 -#undef ENABLE_TEST_005 +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS +#undef ENABLE_REAL_OTA_UPDATE_TESTS #endif static const uint16_t kPairingTimeoutInSeconds = 10; @@ -44,9 +46,11 @@ static const uint16_t kTimeoutWithUpdateInSeconds = 60; static const uint64_t kDeviceId1 = 0x12341234; static const uint64_t kDeviceId2 = 0x12341235; +static const uint64_t kDeviceId3 = 0x12341236; // NOTE: These onboarding payloads are for the chip-ota-requestor-app, not chip-all-clusters-app static NSString * kOnboardingPayload1 = @"MT:-24J0SO527K10648G00"; // Discriminator: 1111 static NSString * kOnboardingPayload2 = @"MT:-24J0AFN00L10648G00"; // Discriminator: 1112 +static NSString * kOnboardingPayload3 = @"MT:-24J0IRV01L10648G00"; // Discriminator: 1113 static const uint16_t kLocalPort = 5541; static const uint16_t kTestVendorId = 0xFFF1u; @@ -54,6 +58,7 @@ static MTRDevice * sConnectedDevice1; static MTRDevice * sConnectedDevice2; +static MTRDevice * sConnectedDevice3; // Singleton controller we use. static MTRDeviceController * sController = nil; @@ -63,9 +68,17 @@ static NSString * kOtaDownloadedFilePath1 = @"/tmp/chip-ota-requestor-downloaded-image1"; -static NSNumber * kUpdatedSoftwareVersion = @5; +static NSString * kOtaDownloadedFilePath2 = @"/tmp/chip-ota-requestor-downloaded-image2"; -static NSString * kUpdatedSoftwareVersionString = @"5.0"; +static NSString * kOtaDownloadedFilePath3 = @"/tmp/chip-ota-requestor-downloaded-image3"; + +static NSNumber * kUpdatedSoftwareVersion_5 = @5; + +static NSString * kUpdatedSoftwareVersionString_5 = @"5.0"; + +static NSNumber * kUpdatedSoftwareVersion_10 = @10; + +static NSString * kUpdatedSoftwareVersionString_10 = @"10.0"; @interface MTROTAProviderTestControllerDelegate : NSObject @property (nonatomic, readonly) XCTestExpectation * expectation; @@ -240,6 +253,8 @@ - (void)respondBusyWithDelay:(NSNumber *)delay completion:(QueryImageCompletion) - (void)respondAvailableWithDelay:(NSNumber *)delay uri:(NSString *)uri updateToken:(NSData *)updateToken + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString completion:(QueryImageCompletion)completion { __auto_type * responseParams = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; @@ -248,8 +263,8 @@ - (void)respondAvailableWithDelay:(NSNumber *)delay responseParams.imageURI = uri; // TODO: Figure out whether we need better // SoftwareVersion/SoftwareVersionString/UpdateToken bits. - responseParams.softwareVersion = kUpdatedSoftwareVersion; - responseParams.softwareVersionString = kUpdatedSoftwareVersionString; + responseParams.softwareVersion = softwareVersion; + responseParams.softwareVersionString = softwareVersionString; responseParams.updateToken = updateToken; completion(responseParams, nil); } @@ -314,7 +329,10 @@ - (NSData *)generateUpdateToken @interface MTROTAProviderTransferChecker : NSObject - (instancetype)initWithRawImagePath:(NSString *)rawImagePath + otaImageDownloadFilePath:(NSString *)otaImageDownloadFilePath nodeID:(NSNumber *)nodeID + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString applyUpdateAction:(MTROTASoftwareUpdateProviderOTAApplyUpdateAction)applyUpdateAction testcase:(XCTestCase *)testcase; @@ -329,7 +347,10 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath @implementation MTROTAProviderTransferChecker - (instancetype)initWithRawImagePath:(NSString *)rawImagePath + otaImageDownloadFilePath:(NSString *)otaImageDownloadFilePath nodeID:(NSNumber *)nodeID + softwareVersion:(NSNumber *)softwareVersion + softwareVersionString:(NSString *)softwareVersionString applyUpdateAction:(MTROTASoftwareUpdateProviderOTAApplyUpdateAction)applyUpdateAction testcase:(XCTestCase *)testcase { @@ -357,8 +378,8 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath NSTask * task = [[NSTask alloc] init]; [task setLaunchPath:imageToolPath]; [task setArguments:@[ - @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion stringValue], @"-vs", - kUpdatedSoftwareVersionString, @"-da", @"sha256", rawImagePath, imagePath + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [softwareVersion stringValue], @"-vs", softwareVersionString, @"-da", + @"sha256", rawImagePath, imagePath ]]; NSError * launchError = nil; [task launchAndReturnError:&launchError]; @@ -379,7 +400,12 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqual(controller, sController); sOTAProviderDelegate.queryImageHandler = nil; - [sOTAProviderDelegate respondAvailableWithDelay:@(0) uri:imagePath updateToken:updateToken completion:completion]; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath + updateToken:updateToken + softwareVersion:softwareVersion + softwareVersionString:softwareVersionString + completion:completion]; [self.queryExpectation fulfill]; }; sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSString * fileDesignator, @@ -448,9 +474,9 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqualObjects(nodeID, nodeID); XCTAssertEqual(controller, sController); XCTAssertEqualObjects(params.updateToken, updateToken); - XCTAssertEqualObjects(params.newVersion, kUpdatedSoftwareVersion); // TODO: Factor this out better! + XCTAssertEqualObjects(params.newVersion, softwareVersion); - XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:rawImagePath andPath:kOtaDownloadedFilePath1]); + XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:rawImagePath andPath:otaImageDownloadFilePath]); sOTAProviderDelegate.applyUpdateRequestHandler = nil; [sOTAProviderDelegate respondToApplyUpdateRequestWithAction:applyUpdateAction completion:completion]; @@ -463,7 +489,7 @@ - (instancetype)initWithRawImagePath:(NSString *)rawImagePath XCTAssertEqualObjects(nodeID, nodeID); XCTAssertEqual(controller, sController); XCTAssertEqualObjects(params.updateToken, updateToken); - XCTAssertEqualObjects(params.softwareVersion, kUpdatedSoftwareVersion); + XCTAssertEqualObjects(params.softwareVersion, softwareVersion); sOTAProviderDelegate.notifyUpdateAppliedHandler = nil; [sOTAProviderDelegate respondSuccess:completion]; @@ -585,6 +611,7 @@ - (void)initStack sConnectedDevice1 = [self commissionDeviceWithPayload:kOnboardingPayload1 nodeID:@(kDeviceId1)]; sConnectedDevice2 = [self commissionDeviceWithPayload:kOnboardingPayload2 nodeID:@(kDeviceId2)]; + sConnectedDevice3 = [self commissionDeviceWithPayload:kOnboardingPayload3 nodeID:@(kDeviceId3)]; } + (void)shutdownStack @@ -634,7 +661,7 @@ - (XCTestExpectation *)announceProviderToDevice:(MTRDevice *)device return responseExpectation; } -- (void)test001_ReceiveOTAQuery +- (void)test001_ReceiveQueryImageRequest_RespondUpdateNotAvailable { // Test that if we advertise ourselves as a provider we end up getting a // QueryImage callbacks that we can respond to. @@ -657,7 +684,7 @@ - (void)test001_ReceiveOTAQuery sOTAProviderDelegate.queryImageHandler = nil; } -- (void)test002_ReceiveTwoQueriesExplicitBusy +- (void)test002_ReceiveTwoQueryImageRequests_RespondExplicitBusy { // Test that if we advertise ourselves as a provider and respond BUSY to // QueryImage callback, then we get a second QueryImage callback later on @@ -696,7 +723,7 @@ - (void)test002_ReceiveTwoQueriesExplicitBusy [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; } -- (void)test003_ReceiveSecondQueryWhileHandlingBDX +- (void)test003_ReceiveQueryImageRequestWhileHandlingBDX_RespondImplicitBusy { // In this test we do the following: // @@ -726,6 +753,8 @@ - (void)test003_ReceiveSecondQueryWhileHandlingBDX [sOTAProviderDelegate respondAvailableWithDelay:@(0) uri:fakeImageURI updateToken:[sOTAProviderDelegate generateUpdateToken] + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 completion:completion]; [queryExpectation1 fulfill]; }; @@ -751,6 +780,8 @@ - (void)test003_ReceiveSecondQueryWhileHandlingBDX [sOTAProviderDelegate respondAvailableWithDelay:@(busyDelay) uri:fakeImageURI updateToken:[sOTAProviderDelegate generateUpdateToken] + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 completion:innerCompletion]; [sOTAProviderDelegate respondErrorWithCompletion:outerCompletion]; [queryExpectation2 fulfill]; @@ -809,7 +840,10 @@ - (void)test004_DoBDXTransferDenyUpdateRequest __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:rawImagePath + otaImageDownloadFilePath:kOtaDownloadedFilePath1 nodeID:@(kDeviceId1) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue testcase:self]; // We do not expect the update to actually be applied here. @@ -837,10 +871,10 @@ - (void)test004_DoBDXTransferDenyUpdateRequest [self waitForExpectations:@[ checker.notifyUpdateAppliedExpectation ] timeout:kTimeoutInSeconds]; } -// TODO: Enable this test when PR #26040 is merged. Currently the poll interval causes delays in the BDX transfer and -// results in the test taking a long time. With PR #26040 we eliminate the poll interval completely and hence the test -// can run in a short time. -#ifdef ENABLE_TEST_005 +// TODO: Enable tests 005, 006 and 007 when PR #26040 is merged. Currently the poll interval causes delays in the BDX transfer +// and results in the tests taking a long time. With PR #26040 we eliminate the poll interval completely and hence the tests can run +// in a short time. +#ifdef ENABLE_REAL_OTA_UPDATE_TESTS - (void)test005_DoBDXTransferAllowUpdateRequest { // In this test we do the following: @@ -855,16 +889,476 @@ - (void)test005_DoBDXTransferAllowUpdateRequest // 8) Wait for the app to restart and wait for the NotifyUpdateApplied message to confirm the app has updated to the new version // This test expects a pre-generated raw image at otaRawImagePath. - NSString * otaRawImagePath = @"/tmp/ota-test005-raw-image"; + NSString * otaRawImagePath = @"/tmp/ota-raw-image-v5"; - // Check if the ota raw image exists at kOtaRawImagePath + // Check whether the ota raw image exists at otaRawImagePath XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath]); __auto_type * device = sConnectedDevice1; __auto_type * checker = [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath + otaImageDownloadFilePath:kOtaDownloadedFilePath1 nodeID:@(kDeviceId1) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + testcase:self]; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation = [self announceProviderToDevice:device]; + + // Make sure we get our callbacks in order. Give it a bit more time, because + // we want to allow time for the BDX download. + [self waitForExpectations:@[ + checker.queryExpectation, checker.bdxBeginExpectation, checker.bdxQueryExpectation, checker.bdxEndExpectation + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ checker.applyUpdateRequestExpectation, checker.notifyUpdateAppliedExpectation ] + timeout:kTimeoutInSeconds + enforceOrder:YES]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; +} + +- (void)test006_DoBDXTransferWithTwoOTARequesters +{ + // Note: This test has a dependency on test005_DoBDXTransferAllowUpdateRequest since we update device1 to version + // number 5 in the above test. We reuse device1 for this test and we need to use an OTA image with a higher version number (10) + // for device1 to update itself again. We need to fix this when we want to run tests out of order. + + // In this test, we test BDX transfers between one provider and two OTA requestors device1 and device2. + // + // 1) We announce ourselves to device1 first. + // 2) When device1 queries, we return image available at imagePath1. + // 3) We set the BDX begin and end handlers for device1 and device1 starts the BDX transfer. + // 4) At this time, we announce ourselves to device2. + // 5) When device2 queries, we return image available with a busy delay of 30 secs. + // 6) When device1 completes the BDX transfer, we wait for device2 to query. + // 7) When device 2 queries again, we return image available at imagePath2. + // 8) We set the BDX begin and end handlers for device2 and device2 starts the BDX transfer. + // 9) Device1 applies the update independently and reboots with the new image. + // 10) At this point, we set the apply update handlers for device2. + // 11) Device2 applies the update and reboots with its new image. + + // This test expects a pre-generated raw image at otaRawImagePath1 for device1 and at otaRawImagePath2 for device2. + NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v10"; + NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v5"; + + // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath2]); + + XCTestExpectation * queryExpectation1 = [self expectationWithDescription:@"handleQueryImageForNodeID called for device1"]; + XCTestExpectation * queryExpectation2 = + [self expectationWithDescription:@"handleQueryImageForNodeID called for device2 - busy"]; + XCTestExpectation * queryExpectation3 = + [self expectationWithDescription:@"handleQueryImageForNodeID called for device2 - available"]; + + XCTestExpectation * bdxBeginExpectation1 = + [self expectationWithDescription:@"handleBDXTransferSessionBeginForNodeID called for device1"]; + XCTestExpectation * bdxBeginExpectation2 = + [self expectationWithDescription:@"handleBDXTransferSessionBeginForNodeID called for device2"]; + + XCTestExpectation * bdxQueryExpectation1 = [self expectationWithDescription:@"handleBDXQueryForNodeID called for device1"]; + XCTestExpectation * bdxQueryExpectation2 = [self expectationWithDescription:@"handleBDXQueryForNodeID called for device2"]; + + XCTestExpectation * bdxEndExpectation1 = + [self expectationWithDescription:@"handleBDXTransferSessionEndForNodeID called for device1"]; + XCTestExpectation * bdxEndExpectation2 = + [self expectationWithDescription:@"handleBDXTransferSessionEndForNodeID called for device2"]; + + XCTestExpectation * applyUpdateRequestExpectation1 = + [self expectationWithDescription:@"handleApplyUpdateRequestForNodeID called for device1"]; + XCTestExpectation * applyUpdateRequestExpectation2 = + [self expectationWithDescription:@"handleApplyUpdateRequestForNodeID called for device2"]; + + XCTestExpectation * notifyUpdateAppliedExpectation1 = + [self expectationWithDescription:@"handleNotifyUpdateAppliedForNodeID called for device1"]; + XCTestExpectation * notifyUpdateAppliedExpectation2 = + [self expectationWithDescription:@"handleNotifyUpdateAppliedForNodeID called for device2"]; + + __block XCTestExpectation * announceResponseExpectation2; + + NSString * imagePath1 = [otaRawImagePath1 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; + + NSString * imagePath2 = [otaRawImagePath2 stringByReplacingOccurrencesOfString:@"raw-image" withString:@"image"]; + + // Find the right absolute path to our ota_image_tool.py script. PWD should + // point to our src/darwin/Framework, while the script is in + // src/app/ota_image_tool.py. + NSString * pwd = [[NSProcessInfo processInfo] environment][@"PWD"]; + NSString * imageToolPath = [NSString + pathWithComponents:@[ [pwd substringToIndex:(pwd.length - @"darwin/Framework".length)], @"app", @"ota_image_tool.py" ]]; + + NSTask * task1 = [[NSTask alloc] init]; + [task1 setLaunchPath:imageToolPath]; + [task1 setArguments:@[ + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_10 stringValue], @"-vs", + kUpdatedSoftwareVersionString_10, @"-da", @"sha256", otaRawImagePath1, imagePath1 + ]]; + NSError * launchError = nil; + [task1 launchAndReturnError:&launchError]; + XCTAssertNil(launchError); + [task1 waitUntilExit]; + XCTAssertEqual([task1 terminationStatus], 0); + + NSTask * task2 = [[NSTask alloc] init]; + [task2 setLaunchPath:imageToolPath]; + [task2 setArguments:@[ + @"create", @"-v", @"0xFFF1", @"-p", @"0x8001", @"-vn", [kUpdatedSoftwareVersion_5 stringValue], @"-vs", + kUpdatedSoftwareVersionString_5, @"-da", @"sha256", otaRawImagePath2, imagePath2 + ]]; + launchError = nil; + [task2 launchAndReturnError:&launchError]; + XCTAssertNil(launchError); + [task2 waitUntilExit]; + XCTAssertEqual([task2 terminationStatus], 0); + + NSData * updateToken1 = [sOTAProviderDelegate generateUpdateToken]; + NSData * updateToken2 = [sOTAProviderDelegate generateUpdateToken]; + + __block NSFileHandle * readHandle; + __block uint64_t imageSize; + __block uint32_t lastBlockIndex = UINT32_MAX; + const uint16_t busyDelay = 30; // 30 second + __auto_type * device1 = sConnectedDevice1; + __auto_type * device2 = sConnectedDevice2; + + // This to keep track of whether queryImageHandler for device 2 was called or not. The first time it's called we will + // fulfill queryExpectation2 and proceed with BDX for device 1. + __block bool firstQueryImageForDevice2Received = false; + + // Set up the query handler for device 1 to return image available at imagePath1 + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + + sOTAProviderDelegate.queryImageHandler = nil; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath1 + updateToken:updateToken1 + softwareVersion:kUpdatedSoftwareVersion_10 + softwareVersionString:kUpdatedSoftwareVersionString_10 + completion:completion]; + [queryExpectation1 fulfill]; + }; + + // Set up the BDX transfer begin, block query and transfer end handlers for device1 so it can go ahead with the BDX transfer + sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSString * fileDesignator, + NSNumber * offset, MTRStatusCompletion outerCompletion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(fileDesignator, imagePath1); + XCTAssertEqualObjects(offset, @(0)); + + readHandle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + XCTAssertNotNil(readHandle); + + NSError * endSeekError; + XCTAssertTrue([readHandle seekToEndReturningOffset:&imageSize error:&endSeekError]); + XCTAssertNil(endSeekError); + sOTAProviderDelegate.transferBeginHandler = nil; + + // Don't actually respond until the second requestor has queried us for + // an image to ensure BDX for device1 starts only after device2 has queried us once. + + // Set up the query handler for device2 to return image available at imagePath2 but a busy delay of 30 secs + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion innerCompletion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + + [sOTAProviderDelegate respondAvailableWithDelay:@(busyDelay) + uri:imagePath2 + updateToken:updateToken2 + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + completion:innerCompletion]; + if (!firstQueryImageForDevice2Received) { + [queryExpectation2 fulfill]; + + // Respond with success for the tranfer begin completion for device1 + [sOTAProviderDelegate respondSuccess:outerCompletion]; + [bdxBeginExpectation1 fulfill]; + } + firstQueryImageForDevice2Received = true; + }; + + // Announce ourselves to device2 + announceResponseExpectation2 = [self announceProviderToDevice:device2]; + }; + sOTAProviderDelegate.blockQueryHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSNumber * blockSize, + NSNumber * blockIndex, NSNumber * bytesToSkip, BlockQueryCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(blockSize, @(1024)); // Seems to always be 1024. + XCTAssertEqualObjects(blockIndex, @(lastBlockIndex + 1)); + XCTAssertEqualObjects(bytesToSkip, @(0)); // Don't expect to see skips here. + // Make sure we actually end up with multiple blocks. + XCTAssertTrue(blockSize.unsignedLongLongValue < imageSize); + + XCTAssertNotNil(readHandle); + uint64_t offset = blockSize.unsignedLongLongValue * blockIndex.unsignedLongLongValue; + NSError * seekError = nil; + [readHandle seekToOffset:offset error:&seekError]; + XCTAssertNil(seekError); + + NSError * readError = nil; + NSData * data = [readHandle readDataUpToLength:blockSize.unsignedLongValue error:&readError]; + XCTAssertNil(readError); + XCTAssertNotNil(data); + + BOOL isEOF = offset + blockSize.unsignedLongValue >= imageSize; + + ++lastBlockIndex; + + if (isEOF) { + sOTAProviderDelegate.blockQueryHandler = nil; + } + + completion(data, isEOF); + + if (isEOF) { + [bdxQueryExpectation1 fulfill]; + } + }; + sOTAProviderDelegate.transferEndHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSError * _Nullable error) { + XCTAssertEqualObjects(nodeID, @(kDeviceId1)); + XCTAssertEqual(controller, sController); + XCTAssertNil(error); + sOTAProviderDelegate.transferEndHandler = nil; + [bdxEndExpectation1 fulfill]; + + // BDX transfer with device1 has completed + // Set up the query handler for device2 to return image available at imagePath2 + sOTAProviderDelegate.queryImageHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterQueryImageParams * params, QueryImageCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + + sOTAProviderDelegate.queryImageHandler = nil; + [sOTAProviderDelegate respondAvailableWithDelay:@(0) + uri:imagePath2 + updateToken:updateToken2 + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 + completion:completion]; + NSLog(@"OTA queryExpectation3"); + [queryExpectation3 fulfill]; + }; + + // Set up the BDX transfer begin, block query and transfer end handlers for device2 so it can go ahead with the BDX transfer + sOTAProviderDelegate.transferBeginHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + NSString * fileDesignator, NSNumber * offset, MTRStatusCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(fileDesignator, imagePath2); + XCTAssertEqualObjects(offset, @(0)); + + readHandle = [NSFileHandle fileHandleForReadingAtPath:fileDesignator]; + XCTAssertNotNil(readHandle); + + NSError * endSeekError; + XCTAssertTrue([readHandle seekToEndReturningOffset:&imageSize error:&endSeekError]); + XCTAssertNil(endSeekError); + sOTAProviderDelegate.transferBeginHandler = nil; + [sOTAProviderDelegate respondSuccess:completion]; + lastBlockIndex = UINT32_MAX; + [bdxBeginExpectation2 fulfill]; + }; + sOTAProviderDelegate.blockQueryHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, NSNumber * blockSize, + NSNumber * blockIndex, NSNumber * bytesToSkip, BlockQueryCompletion completion) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(blockSize, @(1024)); // Seems to always be 1024. + XCTAssertEqualObjects(blockIndex, @(lastBlockIndex + 1)); + XCTAssertEqualObjects(bytesToSkip, @(0)); // Don't expect to see skips here. + // Make sure we actually end up with multiple blocks. + XCTAssertTrue(blockSize.unsignedLongLongValue < imageSize); + + XCTAssertNotNil(readHandle); + uint64_t offset = blockSize.unsignedLongLongValue * blockIndex.unsignedLongLongValue; + NSError * seekError = nil; + [readHandle seekToOffset:offset error:&seekError]; + XCTAssertNil(seekError); + + NSError * readError = nil; + NSData * data = [readHandle readDataUpToLength:blockSize.unsignedLongValue error:&readError]; + XCTAssertNil(readError); + XCTAssertNotNil(data); + + BOOL isEOF = offset + blockSize.unsignedLongValue >= imageSize; + + ++lastBlockIndex; + + if (isEOF) { + sOTAProviderDelegate.blockQueryHandler = nil; + } + + completion(data, isEOF); + + if (isEOF) { + [bdxQueryExpectation2 fulfill]; + } + }; + sOTAProviderDelegate.transferEndHandler + = ^(NSNumber * nodeID, MTRDeviceController * controller, NSError * _Nullable error) { + XCTAssertEqualObjects(nodeID, @(kDeviceId2)); + XCTAssertEqual(controller, sController); + XCTAssertNil(error); + sOTAProviderDelegate.transferEndHandler = nil; + [bdxEndExpectation2 fulfill]; + }; + }; + + // Flags to track if the applyUpdateRequest from both device1 and device2 has been handled. + __block bool device1HasHandledApplyUpdateRequest = false; + __block bool device2HasHandledApplyUpdateRequest = false; + + // Flags to track if device1 and device have notified that the update has been applied. + __block bool device1HasNotifiedUpdateApplied = false; + __block bool device2HasNotifiedUpdateApplied = false; + + // Set up the apply update request and update applied handlers for device1 and device2. Use the nodeID to verify which + // device sent the applyUpdateRequest and subsequent notifyUpdateApplied commands. + sOTAProviderDelegate.applyUpdateRequestHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams * params, ApplyUpdateRequestCompletion completion) { + XCTAssertTrue([nodeID isEqualToNumber:@(kDeviceId1)] || [nodeID isEqualToNumber:@(kDeviceId2)]); + + bool isDeviceID1 = [nodeID isEqualToNumber:@(kDeviceId1)]; + NSData * updateToken = (isDeviceID1) ? updateToken1 : updateToken2; + + // Device1 is updated to version 10 and device2 to version 5. + NSNumber * kSoftwareVersion = (isDeviceID1) ? kUpdatedSoftwareVersion_10 : kUpdatedSoftwareVersion_5; + NSString * otaImageFilePath = (isDeviceID1) ? otaRawImagePath1 : otaRawImagePath2; + NSString * otaDownloadedFilePath = (isDeviceID1) ? kOtaDownloadedFilePath1 : kOtaDownloadedFilePath2; + + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(params.updateToken, updateToken); + XCTAssertEqualObjects(params.newVersion, kSoftwareVersion); + + XCTAssertTrue([[NSFileManager defaultManager] contentsEqualAtPath:otaImageFilePath andPath:otaDownloadedFilePath]); + + [sOTAProviderDelegate respondToApplyUpdateRequestWithAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + completion:completion]; + + if (isDeviceID1) { + device1HasHandledApplyUpdateRequest = true; + [applyUpdateRequestExpectation1 fulfill]; + } else { + device2HasHandledApplyUpdateRequest = true; + [applyUpdateRequestExpectation2 fulfill]; + } + + // If the applyUpdateRequest from both device1 and device2 has been handled, reset the + // applyUpdateRequestHandler to nil + if (device1HasHandledApplyUpdateRequest && device2HasHandledApplyUpdateRequest) { + sOTAProviderDelegate.applyUpdateRequestHandler = nil; + } + }; + + sOTAProviderDelegate.notifyUpdateAppliedHandler = ^(NSNumber * nodeID, MTRDeviceController * controller, + MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams * params, MTRStatusCompletion completion) { + XCTAssertTrue([nodeID isEqualToNumber:@(kDeviceId1)] || [nodeID isEqualToNumber:@(kDeviceId2)]); + + bool isDeviceID1 = [nodeID isEqualToNumber:@(kDeviceId1)]; + NSData * updateToken = (isDeviceID1) ? updateToken1 : updateToken2; + + // Device1 is updated to version 10 and device2 to version 5. + NSNumber * kSoftwareVersion = (isDeviceID1) ? kUpdatedSoftwareVersion_10 : kUpdatedSoftwareVersion_5; + + XCTAssertEqual(controller, sController); + XCTAssertEqualObjects(params.updateToken, updateToken); + XCTAssertEqualObjects(params.softwareVersion, kSoftwareVersion); + + [sOTAProviderDelegate respondSuccess:completion]; + + if (isDeviceID1) { + device1HasNotifiedUpdateApplied = true; + [notifyUpdateAppliedExpectation1 fulfill]; + } else { + device2HasNotifiedUpdateApplied = true; + [notifyUpdateAppliedExpectation2 fulfill]; + } + + // If both device1 and device2 have notified that the update has been applied, reset the + // notifyUpdateAppliedHandler to nil + if (device1HasNotifiedUpdateApplied && device2HasNotifiedUpdateApplied) { + sOTAProviderDelegate.notifyUpdateAppliedHandler = nil; + } + }; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation1 = [self announceProviderToDevice:device1]; + + // Make sure we get our callbacks in order for both device1 and device2. Since we do not + // send image available to device2 until BDX for device1 has ended, queryExpectation3 must follow + // bdxEndExpectation1. + // + // Give it a bit more time, because we want to allow time for the BDX downloads. + [self waitForExpectations:@[ + queryExpectation1, bdxBeginExpectation1, bdxQueryExpectation1, bdxEndExpectation1, queryExpectation3, bdxBeginExpectation2, + bdxQueryExpectation2, bdxEndExpectation2 + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Make sure we get our query expectation for device2 fulfilled when we send busy for device2. + [self waitForExpectations:@[ queryExpectation2 ] timeout:(kTimeoutInSeconds)]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ + applyUpdateRequestExpectation1, notifyUpdateAppliedExpectation1, applyUpdateRequestExpectation2, + notifyUpdateAppliedExpectation2 + ] + timeout:kTimeoutInSeconds + enforceOrder:NO]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation1, announceResponseExpectation2 ] timeout:kTimeoutInSeconds]; +} + +- (void)test007_DoBDXTransferIncrementalOtaUpdate +{ + // In this test, we test incremental OTA update with device3. First we update device3 + // to version 5 using image at imagePath1. Once device3 updates and reboots, we update + // it to version 10 using image at imagePath2. + // + // 1) We announce ourselves to device3. + // 2) When device3 queries, we return image available at imagePath1 with version number 5. + // 3) We set the BDX begin and end handlers for device3 and device3 starts the BDX transfer. + // 4) Device3 completes the BDX transfer + // 5) Device3 applies the update and reboots with the new image with version number 5 + // 6) We announce ourselves to device 3 again. + // 7) When device3 queries again, we return image available at imagePath2 with version number 10. + // 8) We set the BDX begin and end handlers for device3 and device3 starts the BDX transfer. + // 4) Device3 completes the BDX transfer + // 5) Device3 applies the update and reboots with the new image with version number 10 + + // This test expects a pre-generated raw image at otaRawImagePath1 and a raw image at otaRawImagePath2 + NSString * otaRawImagePath1 = @"/tmp/ota-raw-image-v5"; + NSString * otaRawImagePath2 = @"/tmp/ota-raw-image-v10"; + + // Check whether the ota raw image exists at otaRawImagePath1 and otaRawImagePath2 + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath1]); + XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:otaRawImagePath2]); + + __auto_type * device = sConnectedDevice3; + + __auto_type * checker = + [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath1 + otaImageDownloadFilePath:kOtaDownloadedFilePath3 + nodeID:@(kDeviceId3) + softwareVersion:kUpdatedSoftwareVersion_5 + softwareVersionString:kUpdatedSoftwareVersionString_5 applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed testcase:self]; @@ -887,8 +1381,39 @@ - (void)test005_DoBDXTransferAllowUpdateRequest // Nothing defines the ordering of announceResponseExpectation with respect // to _any_ of the above expectations. [self waitForExpectations:@[ announceResponseExpectation ] timeout:kTimeoutInSeconds]; + + // Provide an incremental update and makes sure the app is updated to the new version + + __auto_type * checker1 = + [[MTROTAProviderTransferChecker alloc] initWithRawImagePath:otaRawImagePath2 + otaImageDownloadFilePath:kOtaDownloadedFilePath3 + nodeID:@(kDeviceId3) + softwareVersion:kUpdatedSoftwareVersion_10 + softwareVersionString:kUpdatedSoftwareVersionString_10 + applyUpdateAction:MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed + testcase:self]; + + // Advertise ourselves as an OTA provider. + XCTestExpectation * announceResponseExpectation1 = [self announceProviderToDevice:device]; + + // Make sure we get our callbacks in order. Give it a bit more time, because + // we want to allow time for the BDX download. + [self waitForExpectations:@[ + checker1.queryExpectation, checker1.bdxBeginExpectation, checker1.bdxQueryExpectation, checker1.bdxEndExpectation + ] + timeout:(kTimeoutWithUpdateInSeconds) enforceOrder:YES]; + + // Nothing really defines the ordering of bdxEndExpectation and + // applyUpdateRequestExpectation with respect to each other. + [self waitForExpectations:@[ checker1.applyUpdateRequestExpectation, checker1.notifyUpdateAppliedExpectation ] + timeout:kTimeoutInSeconds + enforceOrder:YES]; + + // Nothing defines the ordering of announceResponseExpectation with respect + // to _any_ of the above expectations. + [self waitForExpectations:@[ announceResponseExpectation1 ] timeout:kTimeoutInSeconds]; } -#endif // ENABLE_TEST_005 +#endif // ENABLE_REAL_OTA_UPDATE_TESTS - (void)test999_TearDown { @@ -897,6 +1422,10 @@ - (void)test999_TearDown device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId2) controller:sController]; ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + + device = [MTRBaseDevice deviceWithNodeID:@(kDeviceId3) controller:sController]; + ResetCommissionee(device, dispatch_get_main_queue(), self, kTimeoutInSeconds); + [[self class] shutdownStack]; } diff --git a/examples/platform/silabs/efr32/init_efrPlatform.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h similarity index 68% rename from examples/platform/silabs/efr32/init_efrPlatform.h rename to src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h index aeb47b8aaed3d1..53dc3d2ef363b0 100644 --- a/examples/platform/silabs/efr32/init_efrPlatform.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.h @@ -1,7 +1,5 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. +/** + * Copyright (c) 2023 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. @@ -15,15 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/*******************************************************************************/ -#pragma once -#ifdef __cplusplus -extern "C" { -#endif +#import +#import + +NS_ASSUME_NONNULL_BEGIN -void init_efrPlatform(void); +void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet); -#ifdef __cplusplus -} -#endif +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m new file mode 100644 index 00000000000000..c4a1a66f044fee --- /dev/null +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRFabricInfoChecker.m @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2023 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. + */ + +#import "MTRFabricInfoChecker.h" +#import + +void CheckFabricInfo(NSArray * fabricInfoList, NSMutableSet * expectedSet) +{ + XCTAssertEqual([fabricInfoList count], [expectedSet count]); + for (size_t i = 0; i < [fabricInfoList count]; ++i) { + __auto_type * info = fabricInfoList[i]; + NSSet * expectedInfoForIndex = [expectedSet objectsPassingTest:^(NSDictionary * obj, BOOL * stop) { + return [info.fabricIndex isEqual:obj[@"fabricIndex"]]; + }]; + XCTAssertEqual([expectedInfoForIndex count], 1); + __auto_type * expected = [expectedInfoForIndex anyObject]; + XCTAssertEqualObjects(info.rootPublicKey, expected[@"rootPublicKey"]); + XCTAssertEqualObjects(info.vendorID, expected[@"vendorID"]); + XCTAssertEqualObjects(info.fabricID, expected[@"fabricID"]); + XCTAssertEqualObjects(info.nodeID, expected[@"nodeID"]); + XCTAssertEqualObjects(info.label, expected[@"label"]); + XCTAssertNotNil(info.rootCertificate); + XCTAssertNotNil(info.rootCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.rootCertificate], info.rootCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertMatterCertificate:info.rootCertificateTLV], info.rootCertificate); + XCTAssertEqual((info.intermediateCertificate == nil), (info.intermediateCertificateTLV == nil)); + XCTAssertEqualObjects(@(info.intermediateCertificate != nil), expected[@"hasIntermediateCertificate"]); + if (info.intermediateCertificate != nil) { + XCTAssertEqualObjects( + [MTRCertificates convertX509Certificate:info.intermediateCertificate], info.intermediateCertificateTLV); + XCTAssertEqualObjects( + [MTRCertificates convertMatterCertificate:info.intermediateCertificateTLV], info.intermediateCertificate); + } + XCTAssertNotNil(info.operationalCertificate); + XCTAssertNotNil(info.operationalCertificateTLV); + XCTAssertEqualObjects([MTRCertificates convertX509Certificate:info.operationalCertificate], info.operationalCertificateTLV); + XCTAssertEqualObjects( + [MTRCertificates convertMatterCertificate:info.operationalCertificateTLV], info.operationalCertificate); + __auto_type * certInfo = [[MTRCertificateInfo alloc] initWithTLVBytes:info.operationalCertificateTLV]; + XCTAssertNotNil(certInfo); + XCTAssertEqualObjects(certInfo.subject.nodeID, info.nodeID); + XCTAssertEqualObjects(certInfo.subject.fabricID, info.fabricID); + XCTAssertEqualObjects(info.fabricIndex, expected[@"fabricIndex"]); + [expectedSet removeObject:expected]; + } +} diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h index 8741eb584e3572..9afe75266d1eed 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.h @@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN @property (readonly, nonatomic) NSData * publicKeyData; +// Count of how many times this keypair has been used to signMessageECDSA_DER. +@property (readonly, nonatomic, assign) unsigned signatureCount; + - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m index 2d073f64d11fb4..23b602e2e7208c 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestKeys.m @@ -69,11 +69,15 @@ - (instancetype)init } _publicKey = SecKeyCopyPublicKey(_privateKey); + _signatureCount = 0; + return self; } - (NSData *)signMessageECDSA_DER:(NSData *)message { + ++_signatureCount; + CFErrorRef error = NULL; CFDataRef outData = SecKeyCreateSignature(_privateKey, kSecKeyAlgorithmECDSASignatureMessageX962SHA256, (__bridge CFDataRef) message, &error); diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 8dc126d5e24f2a..93d491bf23ac1f 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -154,6 +154,7 @@ 51431AF927D2973E008A7943 /* MTRIMDispatch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51431AF827D2973E008A7943 /* MTRIMDispatch.mm */; }; 51431AFB27D29CA4008A7943 /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51431AFA27D29CA4008A7943 /* ota-provider.cpp */; }; 5143851E2A65885500EDC8E6 /* MTRSwiftPairingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */; }; + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51565CAD2A79D42100469F18 /* MTRConversion.mm */; }; 515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */; }; 515C1C70284F9FFB00A48F0C /* MTRFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */; }; 51669AF02913204400F4AA36 /* MTRBackwardsCompatTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */; }; @@ -173,6 +174,7 @@ 51B22C262740CB32008D5055 /* MTRStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C252740CB32008D5055 /* MTRStructsObjc.mm */; }; 51B22C2A2740CB47008D5055 /* MTRCommandPayloadsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C292740CB47008D5055 /* MTRCommandPayloadsObjc.mm */; }; 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */; }; + 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */; }; 51D10D2E2808E2CA00E8CA3D /* MTRTestStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */; }; 51E0310027EA20D20083DC9C /* MTRControllerAccessControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */; }; 51E0310127EA20D20083DC9C /* MTRControllerAccessControl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */; }; @@ -457,6 +459,7 @@ 51431AFA27D29CA4008A7943 /* ota-provider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ota-provider.cpp"; path = "clusters/ota-provider/ota-provider.cpp"; sourceTree = ""; }; 5143851C2A65885400EDC8E6 /* MatterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MatterTests-Bridging-Header.h"; sourceTree = ""; }; 5143851D2A65885500EDC8E6 /* MTRSwiftPairingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MTRSwiftPairingTests.swift; sourceTree = ""; }; + 51565CAD2A79D42100469F18 /* MTRConversion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRConversion.mm; sourceTree = ""; }; 515C1C6D284F9FFB00A48F0C /* MTRFramework.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRFramework.mm; sourceTree = ""; }; 515C1C6E284F9FFB00A48F0C /* MTRFramework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFramework.h; sourceTree = ""; }; 51669AEF2913204400F4AA36 /* MTRBackwardsCompatTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRBackwardsCompatTests.m; sourceTree = ""; }; @@ -477,6 +480,8 @@ 51B22C252740CB32008D5055 /* MTRStructsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRStructsObjc.mm; sourceTree = ""; }; 51B22C292740CB47008D5055 /* MTRCommandPayloadsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCommandPayloadsObjc.mm; sourceTree = ""; }; 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestKeys.m; sourceTree = ""; }; + 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRFabricInfoChecker.m; sourceTree = ""; }; + 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRFabricInfoChecker.h; sourceTree = ""; }; 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestStorage.m; sourceTree = ""; }; 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRControllerAccessControl.h; sourceTree = ""; }; 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRControllerAccessControl.mm; sourceTree = ""; }; @@ -947,6 +952,8 @@ 1E748B3828941A44008A1BE8 /* MTRTestOTAProvider.m */, 51742B4829CB5F45009974FE /* MTRTestResetCommissioneeHelper.h */, 51742B4929CB5FC0009974FE /* MTRTestResetCommissioneeHelper.m */, + 51C984612A61CE2A00B0AD9A /* MTRFabricInfoChecker.h */, + 51C984602A61CE2A00B0AD9A /* MTRFabricInfoChecker.m */, ); path = TestHelpers; sourceTree = ""; @@ -1020,6 +1027,7 @@ 51E030FE27EA20D20083DC9C /* MTRControllerAccessControl.h */, 51E030FF27EA20D20083DC9C /* MTRControllerAccessControl.mm */, 3DFCB32B29678C9500332B35 /* MTRConversion.h */, + 51565CAD2A79D42100469F18 /* MTRConversion.mm */, 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */, 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */, 3DECCB732934C21B00585AEC /* MTRDefines.h */, @@ -1495,6 +1503,7 @@ 1ED276E226C5812A00547A89 /* MTRCluster.mm in Sources */, B2E0D7B3245B0B5C003C5B48 /* MTRError.mm in Sources */, 51E51FC1282AD37A00FC978D /* MTRDeviceControllerStartupParams.mm in Sources */, + 51565CAE2A79D42100469F18 /* MTRConversion.mm in Sources */, 1ED276E026C57CF000547A89 /* MTRCallbackBridge.mm in Sources */, 517BF3F1282B62B800A8B7DB /* MTRCertificates.mm in Sources */, 5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm in Sources */, @@ -1536,6 +1545,7 @@ 7596A8512878709F004DAE0E /* MTRAsyncCallbackQueueTests.m in Sources */, 997DED1A26955D0200975E97 /* MTRThreadOperationalDatasetTests.mm in Sources */, 51C8E3F82825CDB600D47D00 /* MTRTestKeys.m in Sources */, + 51C984622A61CE2A00B0AD9A /* MTRFabricInfoChecker.m in Sources */, 99C65E10267282F1003402F6 /* MTRControllerTests.m in Sources */, 1E5801C328941C050033A199 /* MTRTestOTAProvider.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* MTRXPCProtocolTests.m in Sources */, diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index 888ae55c786e59..2127313659614c 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -96,6 +96,7 @@ declare -a args=( 'chip_build_tools=false' 'chip_build_tests=false' 'chip_enable_wifi=false' + 'chip_enable_python_modules=false' 'chip_log_message_max_size=4096' # might as well allow nice long log messages 'chip_disable_platform_kvs=true' 'enable_fuzz_test_targets=false' diff --git a/src/include/platform/CHIPDeviceEvent.h b/src/include/platform/CHIPDeviceEvent.h index 47f32fc1346d39..47573ba348fd78 100644 --- a/src/include/platform/CHIPDeviceEvent.h +++ b/src/include/platform/CHIPDeviceEvent.h @@ -274,6 +274,16 @@ enum PublicEventTypes */ kChipMsgRxEventHandled, + /** + * This event is used to sync the ICD with any Reliable Message exchange + * expecting an ack. The ICD shall stay in active Mode + * until the Reliable Message exchange post this event again + * informing the ICD that it is no longer awaiting the ack. + * + * This event contains an AckSync structure. + */ + kICDMsgAckSyncEvent, + /** * An application event occured that should wake up the system/device */ @@ -580,6 +590,15 @@ struct ChipDeviceEvent final bool wasReceived; bool clearsExpectedResponse; } RxEventContext; + + struct + { + /* + * Set to true when a Reliable Message Context is awaiting for a ack to a message sent + * Set to false when the Reliable Message Context is no longer awaiting for a ack + */ + bool awaitingAck; + } AckSync; }; void Clear() { memset(this, 0, sizeof(*this)); } diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index d1e6dc45cd8c7b..2aba0915a2d52d 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -185,6 +185,15 @@ #define CHIP_CONFIG_SHA256_CONTEXT_SIZE ((sizeof(unsigned int) * (8 + 2 + 16 + 2)) + sizeof(uint64_t)) #endif // CHIP_CONFIG_SHA256_CONTEXT_SIZE +/** + * @def CHIP_CONFIG_SHA256_CONTEXT_ALIGN + * + * @brief The alignment of SHA256 context buffer. + */ +#ifndef CHIP_CONFIG_SHA256_CONTEXT_ALIGN +#define CHIP_CONFIG_SHA256_CONTEXT_ALIGN size_t +#endif // CHIP_CONFIG_SHA256_CONTEXT_ALIGN + /** * @def CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS * @@ -1470,7 +1479,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * @brief Default value for the ICD Management cluster IdleModeInterval attribute, in milliseconds */ #ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL -#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 500 +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL 2000 #endif /** diff --git a/src/lib/format/protocol_messages.matter b/src/lib/format/protocol_messages.matter index 0346b138fd45b0..786c50d85dffb0 100644 --- a/src/lib/format/protocol_messages.matter +++ b/src/lib/format/protocol_messages.matter @@ -262,7 +262,7 @@ client cluster IMProtocol = 0xFFFF0001 { int64u delta_system_timestamp = 6; // } - cluster_event_payload data = 2; + cluster_event_payload data = 7; } struct EventReportIB { diff --git a/src/lib/format/tests/TestDecoding.cpp b/src/lib/format/tests/TestDecoding.cpp index 7dfc005e8e5988..9ad6f97b6849d5 100644 --- a/src/lib/format/tests/TestDecoding.cpp +++ b/src/lib/format/tests/TestDecoding.cpp @@ -355,6 +355,43 @@ void TestFullDataDecoding(nlTestSuite * inSuite, void * inContext) " Channel::ChangeChannel\n" " match: \"channel name\"\n" " interaction_model_revison: 1\n"); + + TestSampleData(inSuite, params, im_protocol_event_software_fault, + "report_data\n" + " event_reports\n" + " Anonymous<>\n" + " event_data\n" + " path\n" + " endpoint_id: 0\n" + " cluster_id: 52 == 'SoftwareDiagnostics'\n" + " event_id: 0 == 'SoftwareFault'\n" + " event_number: 196610\n" + " priority: 1\n" + " epoch_timestamp: 1690566548210\n" + " SoftwareDiagnostics::SoftwareFault\n" + " id: 2454952\n" + " name: \"2454952\"\n" + " faultRecording: hex:467269204A756C2032382031333A34393A30382032303233\n" + " suppress_response: true\n" + " interaction_model_revison: 1\n"); + + TestSampleData(inSuite, params, im_protocol_event_multipress, + "report_data\n" + " event_reports\n" + " Anonymous<>\n" + " event_data\n" + " path\n" + " endpoint_id: 0\n" + " cluster_id: 59 == 'Switch'\n" + " event_id: 6 == 'MultiPressComplete'\n" + " event_number: 196611\n" + " priority: 1\n" + " epoch_timestamp: 1690566820898\n" + " Switch::MultiPressComplete\n" + " previousPosition: 1\n" + " totalNumberOfPressesCounted: 23\n" + " suppress_response: true\n" + " interaction_model_revison: 1\n"); } void TestMetaDataOnlyDecoding(nlTestSuite * inSuite, void * inContext) diff --git a/src/lib/format/tests/sample_data.cpp b/src/lib/format/tests/sample_data.cpp index b5304198bdda1a..52bfb64a54c085 100644 --- a/src/lib/format/tests/sample_data.cpp +++ b/src/lib/format/tests/sample_data.cpp @@ -104,6 +104,23 @@ const uint8_t payload_1_8_change_channel[] = { 0x15, 0x28, 0x00, 0x28, 0x01, 0x3 0x00, 0x0C, 0x63, 0x68, 0x61, 0x6E, 0x6E, 0x65, 0x6C, 0x20, 0x6E, 0x61, 0x6D, 0x65, 0x18, 0x18, 0x18, 0x24, 0xFF, 0x01, 0x18 }; +// Software fault event: +// id: 2454952, name: "2454952", faultRecording: "467269204A756C2032382031333A34393A30382032303233" +const uint8_t payload_1_5_software_fault_event[] = { + 0x15, 0x36, 0x02, 0x15, 0x35, 0x01, 0x37, 0x00, 0x24, 0x01, 0x00, 0x24, 0x02, 0x34, 0x24, 0x03, 0x00, 0x18, 0x26, + 0x01, 0x02, 0x00, 0x03, 0x00, 0x24, 0x02, 0x01, 0x27, 0x03, 0xF2, 0x5A, 0x9E, 0x9D, 0x89, 0x01, 0x00, 0x00, 0x35, + 0x07, 0x26, 0x00, 0xA8, 0x75, 0x25, 0x00, 0x2C, 0x01, 0x07, 0x32, 0x34, 0x35, 0x34, 0x39, 0x35, 0x32, 0x30, 0x02, + 0x18, 0x46, 0x72, 0x69, 0x20, 0x4A, 0x75, 0x6C, 0x20, 0x32, 0x38, 0x20, 0x31, 0x33, 0x3A, 0x34, 0x39, 0x3A, 0x30, + 0x38, 0x20, 0x32, 0x30, 0x32, 0x33, 0x18, 0x18, 0x18, 0x18, 0x29, 0x04, 0x24, 0xFF, 0x01, 0x18 +}; + +// A multipress complete event +// previousPosition: 1, totalNumberOfPressesCounted: 23 +const uint8_t payload_1_5_multipress_event[] = { 0x15, 0x36, 0x02, 0x15, 0x35, 0x01, 0x37, 0x00, 0x24, 0x01, 0x00, 0x24, 0x02, 0x3B, + 0x24, 0x03, 0x06, 0x18, 0x26, 0x01, 0x03, 0x00, 0x03, 0x00, 0x24, 0x02, 0x01, 0x27, + 0x03, 0x22, 0x84, 0xA2, 0x9D, 0x89, 0x01, 0x00, 0x00, 0x35, 0x07, 0x24, 0x00, 0x01, + 0x24, 0x01, 0x17, 0x18, 0x18, 0x18, 0x18, 0x29, 0x04, 0x24, 0xFF, 0x01, 0x18 }; + } // namespace const SamplePayload secure_channel_mrp_ack = { chip::Protocols::Id(VendorId::Common, 0), 16, @@ -127,5 +144,11 @@ const SamplePayload im_protocol_report_data_acl = { chip::Protocols::Id(VendorId const SamplePayload im_protocol_report_data_window_covering = { chip::Protocols::Id(VendorId::Common, 1), 5, ByteSpan(payload_1_5_window_covering) }; +const SamplePayload im_protocol_event_software_fault = { chip::Protocols::Id(VendorId::Common, 1), 5, + ByteSpan(payload_1_5_software_fault_event) }; + +const SamplePayload im_protocol_event_multipress = { chip::Protocols::Id(VendorId::Common, 1), 5, + ByteSpan(payload_1_5_multipress_event) }; + } // namespace TestData } // namespace chip diff --git a/src/lib/format/tests/sample_data.h b/src/lib/format/tests/sample_data.h index d8bf5864593978..cc74ae09e296fc 100644 --- a/src/lib/format/tests/sample_data.h +++ b/src/lib/format/tests/sample_data.h @@ -46,5 +46,9 @@ extern const SamplePayload im_protocol_report_data_acl; extern const SamplePayload im_protocol_report_data_window_covering; extern const SamplePayload im_protocol_invoke_request_change_channel; +// different event reports +extern const SamplePayload im_protocol_event_software_fault; +extern const SamplePayload im_protocol_event_multipress; + } // namespace TestData } // namespace chip diff --git a/src/lib/shell/MainLoopSilabs.cpp b/src/lib/shell/MainLoopSilabs.cpp index 2b755119fd8cd5..9cb5dfed0bd586 100644 --- a/src/lib/shell/MainLoopSilabs.cpp +++ b/src/lib/shell/MainLoopSilabs.cpp @@ -32,15 +32,19 @@ using chip::Shell::streamer_get; namespace { -constexpr const char kShellPrompt[] = "matterCli > "; +constexpr const char kShellPrompt[] = "matterCli> "; + +// To track carriage returns of Windows return cases of '\r\n' +bool haveCR = false; -// max > 1 void ReadLine(char * buffer, size_t max) { size_t line_sz = 0; + size_t read = 0; + bool done = false; // Read in characters until we get a line ending or EOT. - for (bool done = false; !done;) + while ((line_sz < max) && !done) { // Stop reading if we've run out of space in the buffer (still need to null-terminate). if (line_sz >= max - 1u) @@ -52,45 +56,72 @@ void ReadLine(char * buffer, size_t max) #ifdef BRD4325A // for 917 SoC board, we need to create a rx event before we wait for the shell activity // NotifyShellProcessFromISR() is called once the buffer is filled - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif chip::WaitForShellActivity(); #ifndef BRD4325A // for EFR32 boards - if (streamer_read(streamer_get(), buffer + line_sz, 1) != 1) + while (streamer_read(streamer_get(), buffer + read, 1) == 1) { - continue; + // Count how many characters were read; usually one but could be copy/paste + read++; } #endif - - // Process character we just read. - switch (buffer[line_sz]) + // Process all characters that were read until we run out or exceed max char limit + while (line_sz < read && line_sz < max) { - case '\r': - case '\n': - streamer_printf(streamer_get(), "\r\n"); - buffer[line_sz] = '\0'; - line_sz++; - done = true; - break; - case 0x7F: - // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. - if (line_sz >= 1u) + switch (buffer[line_sz]) { - streamer_printf(streamer_get(), "\b \b"); - line_sz--; - } - break; - default: - if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') - { - streamer_printf(streamer_get(), "%c", buffer[line_sz]); + case '\r': + // Mac OS return case of '\r' or beginning of Windows return case '\r\n' + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + haveCR = true; + done = true; line_sz++; + break; + case '\n': + // True if Windows return case of '\r\n' + if (haveCR) + { + // Do nothing - already taken care of with CR, return to loop and don't increment buffer + haveCR = false; + read--; + } + // Linux return case of just '\n' + else + { + buffer[line_sz] = '\0'; + streamer_printf(streamer_get(), "\r\n"); + done = true; + line_sz++; + } + break; + case 0x7F: + // Do not accept backspace character (i.e. don't increment line_sz) and remove 1 additional character if it exists. + if (line_sz >= 1u) + { + // Delete backspace character + whatever came before it + streamer_printf(streamer_get(), "\b \b"); + line_sz--; + read--; + } + // Remove backspace character regardless + read--; + + break; + default: + if (isprint(static_cast(buffer[line_sz])) || buffer[line_sz] == '\t') + { + streamer_printf(streamer_get(), "%c", buffer[line_sz]); + line_sz++; + } + break; } - break; } } } diff --git a/src/messaging/ReliableMessageContext.cpp b/src/messaging/ReliableMessageContext.cpp index 06decfc320c41f..fcba107a734c5f 100644 --- a/src/messaging/ReliableMessageContext.cpp +++ b/src/messaging/ReliableMessageContext.cpp @@ -33,9 +33,12 @@ #include #include #include +#include #include #include +using namespace chip::DeviceLayer; + namespace chip { namespace Messaging { @@ -51,6 +54,22 @@ ReliableMessageMgr * ReliableMessageContext::GetReliableMessageMgr() return static_cast(this)->GetExchangeMgr()->GetReliableMessageMgr(); } +void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) +{ + mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); + +#if CONFIG_DEVICE_LAYER + DeviceLayer::ChipDeviceEvent event; + event.Type = DeviceLayer::DeviceEventType::kICDMsgAckSyncEvent; + event.AckSync.awaitingAck = messageNotAcked; + CHIP_ERROR status = DeviceLayer::PlatformMgr().PostEvent(&event); + if (status != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to post AckSync event %" CHIP_ERROR_FORMAT, status.Format()); + } +#endif +} + CHIP_ERROR ReliableMessageContext::FlushAcks() { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/messaging/ReliableMessageContext.h b/src/messaging/ReliableMessageContext.h index 57ec4561740376..2ee9fe50a2f763 100644 --- a/src/messaging/ReliableMessageContext.h +++ b/src/messaging/ReliableMessageContext.h @@ -241,11 +241,6 @@ inline void ReliableMessageContext::SetAckPending(bool inAckPending) mFlags.Set(Flags::kFlagAckPending, inAckPending); } -inline void ReliableMessageContext::SetMessageNotAcked(bool messageNotAcked) -{ - mFlags.Set(Flags::kFlagMessageNotAcked, messageNotAcked); -} - inline void ReliableMessageContext::SetRequestingActiveMode(bool activeMode) { mFlags.Set(Flags::kFlagActiveMode, activeMode); diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 8baed2da9be929..1d4e76618ac321 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -181,8 +181,10 @@ - (void)removePeripheralsFromCache; [ble stop]; ble = [[BleConnection alloc] initWithDelegate:delegate queue:bleWorkQueue]; - ble.onConnectionComplete = OnConnectionComplete; - ble.onConnectionError = OnConnectionError; + // Do _not_ set onConnectionComplete and onConnectionError + // here. The connection callbacks we have expect an appState + // that we do not have here, and in any case connection + // complete/error make no sense for a scan. ble.centralManager = [ble.centralManager initWithDelegate:ble queue:bleWorkQueue]; }); } diff --git a/src/platform/android/SystemPlatformConfig.h b/src/platform/android/SystemPlatformConfig.h index 1c601906812edc..085d1e58f96e0b 100644 --- a/src/platform/android/SystemPlatformConfig.h +++ b/src/platform/android/SystemPlatformConfig.h @@ -41,4 +41,5 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 // ========== Platform-specific Configuration Overrides ========= diff --git a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp index 96973dcf12046d..e53d793f2ee770 100644 --- a/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/nxp/common/crypto/CHIPCryptoPALTinyCrypt.cpp @@ -1662,7 +1662,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1693,6 +1693,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1708,6 +1710,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1735,6 +1740,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp b/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp index b7d49c4fdb2e66..378cbb7e408914 100644 --- a/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp +++ b/src/platform/nxp/k32w/k32w0/crypto/CHIPCryptoPALNXPUltrafastP256.cpp @@ -1631,7 +1631,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1662,6 +1662,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1677,6 +1679,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1704,6 +1709,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index 7ea977bf54aa88..c51a923367ffaf 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -138,18 +138,6 @@ #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024) #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE -#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL -#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) -#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL - -#ifndef CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD -#define CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD chip::System::Clock::Milliseconds32(SL_ACTIVE_MODE_THRESHOLD) -#endif // CHIP_DEVICE_CONFIG_SED_ACTIVE_THRESHOLD - #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE #if defined(EFR32MG21) #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE (2 * 1024) @@ -167,3 +155,15 @@ #endif // CHIP_DEVICE_CONFIG_BLE_APP_TASK_NAME #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 + +/* + ICD Configuration Defines +*/ + +#ifndef CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_IDLE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL + +#ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL +#define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(SL_OT_ACTIVE_INTERVAL) +#endif // CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL diff --git a/src/platform/silabs/CHIPPlatformConfig.h b/src/platform/silabs/CHIPPlatformConfig.h index ec36bc8f46eae2..a9105527fb7b15 100644 --- a/src/platform/silabs/CHIPPlatformConfig.h +++ b/src/platform/silabs/CHIPPlatformConfig.h @@ -84,6 +84,26 @@ #define CHIP_CONFIG_MAX_FABRICS 5 // 4 fabrics + 1 for rotation slack #endif +#ifdef SL_ICD_ENABLED + +#ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL SL_IDLE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL +#define CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL SL_ACTIVE_MODE_INTERVAL +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL + +#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD +#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD SL_ACTIVE_MODE_THRESHOLD +#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD + +#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC +#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC + +#endif // SL_ICD_ENABLED + // ==================== FreeRTOS Configuration Overrides ==================== #ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK #define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 diff --git a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp index 1bcfbdc59edaa5..15e8abf27ea76d 100644 --- a/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp +++ b/src/platform/silabs/SiWx917/CHIPCryptoPALTinyCrypt.cpp @@ -1662,7 +1662,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -1693,6 +1693,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -1708,6 +1710,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -1735,6 +1740,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp index e0b5906c1a816b..9948017c4d3f94 100644 --- a/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp +++ b/src/platform/silabs/efr32/CHIPCryptoPALPsaEfr32.cpp @@ -2023,7 +2023,7 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica cdpExtCount++; VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); - // CRL Distribution Point Extension is encoded as a secuense of DistributionPoint: + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint // // This implementation only supports a single DistributionPoint (sequence of size 1), @@ -2054,6 +2054,8 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + unsigned char * end_of_general_names = p + len; + // The CDP URI is encoded as a uniformResourceIdentifier field of the GeneralName: // GeneralName ::= CHOICE { // otherName [0] OtherName, @@ -2069,6 +2071,9 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_X509_SAN_UNIFORM_RESOURCE_IDENTIFIER); VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + // Only single URI instance in the GeneralNames is supported + VerifyOrExit(p + len == end_of_general_names, error = CHIP_ERROR_NOT_FOUND); + const char * urlptr = reinterpret_cast(p); VerifyOrExit((len > strlen(kValidCDPURIHttpPrefix) && strncmp(urlptr, kValidCDPURIHttpPrefix, strlen(kValidCDPURIHttpPrefix)) == 0) || @@ -2096,6 +2101,122 @@ CHIP_ERROR ExtractCRLDistributionPointURIFromX509Cert(const ByteSpan & certifica return error; } +CHIP_ERROR ExtractCDPExtensionCRLIssuerFromX509Cert(const ByteSpan & certificate, MutableByteSpan & crlIssuer) +{ +#if defined(MBEDTLS_X509_CRT_PARSE_C) + CHIP_ERROR error = CHIP_ERROR_NOT_FOUND; + mbedtls_x509_crt mbed_cert; + unsigned char * p = nullptr; + const unsigned char * end = nullptr; + size_t len = 0; + size_t cdpExtCount = 0; + + VerifyOrReturnError(!certificate.empty() && CanCastTo(certificate.size()), CHIP_ERROR_INVALID_ARGUMENT); + + mbedtls_x509_crt_init(&mbed_cert); + + int result = mbedtls_x509_crt_parse(&mbed_cert, Uint8::to_const_uchar(certificate.data()), certificate.size()); + VerifyOrExit(result == 0, error = CHIP_ERROR_INTERNAL); + + p = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p); + end = mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(p) + + mbed_cert.CHIP_CRYPTO_PAL_PRIVATE_X509(v3_ext).CHIP_CRYPTO_PAL_PRIVATE_X509(len); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + while (p < end) + { + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OID); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + mbedtls_x509_buf extOID = { MBEDTLS_ASN1_OID, len, p }; + bool isCurrentExtCDP = OID_CMP(sOID_Extension_CRLDistributionPoint, extOID); + p += len; + + int is_critical = 0; + result = mbedtls_asn1_get_bool(&p, end, &is_critical); + VerifyOrExit(result == 0 || result == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG, error = CHIP_ERROR_WRONG_CERT_TYPE); + + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_OCTET_STRING); + VerifyOrExit(result == 0, error = CHIP_ERROR_WRONG_CERT_TYPE); + + unsigned char * end_of_ext = p + len; + + if (isCurrentExtCDP) + { + // Only one CRL Distribution Point Extension is allowed. + cdpExtCount++; + VerifyOrExit(cdpExtCount <= 1, error = CHIP_ERROR_NOT_FOUND); + + // CRL Distribution Point Extension is encoded as a sequence of DistributionPoint: + // CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint + // + // This implementation only supports a single DistributionPoint (sequence of size 1), + // which is verified by comparing (p + len == end_of_ext) + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // The DistributionPoint is a sequence of three optional elements: + // DistributionPoint ::= SEQUENCE { + // distributionPoint [0] DistributionPointName OPTIONAL, + // reasons [1] ReasonFlags OPTIONAL, + // cRLIssuer [2] GeneralNames OPTIONAL } + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + // If distributionPoint element presents, ignore it + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0); + if (result == 0) + { + p += len; + VerifyOrExit(p < end_of_ext, error = CHIP_ERROR_NOT_FOUND); + } + + // Check if cRLIssuer element present + result = mbedtls_asn1_get_tag(&p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 2); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + + // The CRL Issuer is encoded as a directoryName field of the GeneralName: + // GeneralName ::= CHOICE { + // otherName [0] OtherName, + // rfc822Name [1] IA5String, + // dNSName [2] IA5String, + // x400Address [3] ORAddress, + // directoryName [4] Name, + // ediPartyName [5] EDIPartyName, + // uniformResourceIdentifier [6] IA5String, + // iPAddress [7] OCTET STRING, + // registeredID [8] OBJECT IDENTIFIER } + result = mbedtls_asn1_get_tag( + &p, end, &len, MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_X509_SAN_DIRECTORY_NAME); + VerifyOrExit(result == 0, error = CHIP_ERROR_NOT_FOUND); + VerifyOrExit(p + len == end_of_ext, error = CHIP_ERROR_NOT_FOUND); + + error = CopySpanToMutableSpan(ByteSpan(p, len), crlIssuer); + SuccessOrExit(error); + } + p = end_of_ext; + } + + VerifyOrExit(cdpExtCount == 1, error = CHIP_ERROR_NOT_FOUND); + +exit: + _log_mbedTLS_error(result); + mbedtls_x509_crt_free(&mbed_cert); + +#else + (void) certificate; + (void) crlIssuer; + CHIP_ERROR error = CHIP_ERROR_NOT_IMPLEMENTED; +#endif // defined(MBEDTLS_X509_CRT_PARSE_C) + + return error; +} + CHIP_ERROR ExtractSerialNumberFromX509Cert(const ByteSpan & certificate, MutableByteSpan & serialNumber) { #if defined(MBEDTLS_X509_CRT_PARSE_C) diff --git a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp index 3deb5fd2359087..98eaa6f7114724 100644 --- a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp +++ b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#include "init_efrPlatform.h" #include #include "sl_system_kernel.h" @@ -30,6 +29,34 @@ extern "C" { #include "sl_simple_button_instances.h" #endif +extern "C" { +#include + +#if CHIP_ENABLE_OPENTHREAD +#include "platform-efr32.h" + +#if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE +#include "openthread/heap.h" +#endif // OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE + +#endif // CHIP_ENABLE_OPENTHREAD + +#include "sl_component_catalog.h" +#include "sl_mbedtls.h" +#include "sl_system_init.h" +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI +#include "uart.h" +#endif + +#if SL_SYSTEM_VIEW +#include "SEGGER_SYSVIEW.h" +#endif +} + +#if SILABS_LOG_ENABLED +#include "silabs_utils.h" +#endif + namespace chip { namespace DeviceLayer { namespace Silabs { @@ -40,7 +67,25 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { - init_efrPlatform(); + sl_system_init(); + sl_mbedtls_init(); + +#if CHIP_ENABLE_OPENTHREAD + sl_ot_sys_init(); +#endif + +#if SL_SYSTEM_VIEW + SEGGER_SYSVIEW_Conf(); + SEGGER_SYSVIEW_Start(); +#endif + +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI + uartConsoleInit(); +#endif + +#if SILABS_LOG_ENABLED + silabsInitLog(); +#endif return CHIP_NO_ERROR; } diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index d39a1180a524ad..f226caeaaa8395 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -17,13 +17,14 @@ #include -#include "init_ccpPlatform.h" #include #include // TODO add includes ? extern "C" void RSI_Board_LED_Set(int, bool); extern "C" void RSI_Board_LED_Toggle(int); +extern "C" void RSI_Wakeupsw_config(void); +extern "C" void RSI_Wakeupsw_config_gpio0(void); namespace chip { namespace DeviceLayer { @@ -35,7 +36,12 @@ SilabsPlatform::SilabsButtonCb SilabsPlatform::mButtonCallback = nullptr; CHIP_ERROR SilabsPlatform::Init(void) { mButtonCallback = nullptr; - init_ccpPlatform(); + RSI_Wakeupsw_config(); + + RSI_Wakeupsw_config_gpio0(); +#if SILABS_LOG_ENABLED + silabsInitLog(); +#endif return CHIP_NO_ERROR; } diff --git a/src/protocols/secure_channel/CASEServer.cpp b/src/protocols/secure_channel/CASEServer.cpp index b78f5f40630680..f8d580fdd9957b 100644 --- a/src/protocols/secure_channel/CASEServer.cpp +++ b/src/protocols/secure_channel/CASEServer.cpp @@ -84,10 +84,17 @@ CHIP_ERROR CASEServer::OnMessageReceived(Messaging::ExchangeContext * ec, const bool watchdogFired = GetSession().InvokeBackgroundWorkWatchdog(); if (!watchdogFired) { - // Handshake wasn't stuck, let it continue its work - // TODO: Send Busy response, #27473 - ChipLogError(Inet, "CASE session is in establishing state, returning without responding"); - return CHIP_NO_ERROR; + // Handshake wasn't stuck, send the busy status report and let the existing handshake continue. + + // A successful CASE handshake can take several seconds and some may time out (30 seconds or more). + // TODO: Come up with better estimate: https://github.com/project-chip/connectedhomeip/issues/28288 + // For now, setting minimum wait time to 5000 milliseconds. + CHIP_ERROR err = SendBusyStatusReport(ec, System::Clock::Milliseconds16(5000)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Inet, "Failed to send the busy status report, err:%" CHIP_ERROR_FORMAT, err.Format()); + } + return err; } } @@ -181,4 +188,16 @@ void CASEServer::OnSessionEstablished(const SessionHandle & session) ChipLogValueScopedNodeId(session->GetPeer())); PrepareForSessionEstablishment(session->GetPeer()); } + +CHIP_ERROR CASEServer::SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime) +{ + ChipLogProgress(Inet, "Already in the middle of CASE handshake, sending busy status report"); + + System::PacketBufferHandle handle = Protocols::SecureChannel::StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + VerifyOrReturnError(!handle.IsNull(), CHIP_ERROR_NO_MEMORY); + + ChipLogProgress(Inet, "Sending status report, exchange " ChipLogFormatExchange, ChipLogValueExchange(ec)); + return ec->SendMessage(Protocols::SecureChannel::MsgType::StatusReport, std::move(handle)); +} + } // namespace chip diff --git a/src/protocols/secure_channel/CASEServer.h b/src/protocols/secure_channel/CASEServer.h index 894d496c93bfac..0c1f1d26dcb963 100644 --- a/src/protocols/secure_channel/CASEServer.h +++ b/src/protocols/secure_channel/CASEServer.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace chip { @@ -107,6 +108,13 @@ class CASEServer : public SessionEstablishmentDelegate, * */ void PrepareForSessionEstablishment(const ScopedNodeId & previouslyEstablishedPeer = ScopedNodeId()); + + // If we are in the middle of handshake and receive a Sigma1 then respond with Busy status code. + // @param[in] ec Exchange Context + // @param[in] minimumWaitTime Minimum wait time reported to client before it can attempt to resend sigma1 + // + // @return CHIP_NO_ERROR on success, error code otherwise + CHIP_ERROR SendBusyStatusReport(Messaging::ExchangeContext * ec, System::Clock::Milliseconds16 minimumWaitTime); }; } // namespace chip diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 07a75cf5fcbb2a..2afc40feacaf02 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1977,6 +1977,10 @@ CHIP_ERROR CASESession::OnFailureStatusReport(Protocols::SecureChannel::GeneralS err = CHIP_ERROR_NO_SHARED_TRUSTED_ROOT; break; + case kProtocolCodeBusy: + err = CHIP_ERROR_BUSY; + break; + default: err = CHIP_ERROR_INTERNAL; break; diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index 6e59f06dcaa660..ccbbd4a452ae64 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -174,6 +174,29 @@ class DLL_EXPORT PairingSession : public SessionDelegate else { err = OnFailureStatusReport(report.GetGeneralCode(), report.GetProtocolCode()); + + if (report.GetGeneralCode() == Protocols::SecureChannel::GeneralStatusCode::kBusy && + report.GetProtocolCode() == Protocols::SecureChannel::kProtocolCodeBusy) + { + if (!report.GetProtocolData().IsNull()) + { + Encoding::LittleEndian::Reader reader(report.GetProtocolData()->Start(), + report.GetProtocolData()->DataLength()); + + uint16_t minimumWaitTime = 0; + err = reader.Read16(&minimumWaitTime).StatusCode(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SecureChannel, "Failed to read the minimum wait time: %" CHIP_ERROR_FORMAT, err.Format()); + } + else + { + // TODO: CASE: Notify minimum wait time to clients on receiving busy status report #28290 + ChipLogProgress(SecureChannel, "Received busy status report with minimum wait time: %u ms", + minimumWaitTime); + } + } + } } return err; diff --git a/src/protocols/secure_channel/StatusReport.cpp b/src/protocols/secure_channel/StatusReport.cpp index 18df6f7383e516..e31c832b469f51 100644 --- a/src/protocols/secure_channel/StatusReport.cpp +++ b/src/protocols/secure_channel/StatusReport.cpp @@ -95,6 +95,34 @@ size_t StatusReport::Size() const return WriteToBuffer(emptyBuf).Needed(); } +System::PacketBufferHandle StatusReport::MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime) +{ + using namespace Protocols::SecureChannel; + constexpr uint8_t kBusyStatusReportProtocolDataSize = sizeof(minimumWaitTime.count()); // 16-bits + + auto handle = System::PacketBufferHandle::New(kBusyStatusReportProtocolDataSize, 0); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to allocate protocol data for busy status report")); + + // Build the protocol data with minimum wait time + Encoding::LittleEndian::PacketBufferWriter protocolDataBufferWriter(std::move(handle)); + protocolDataBufferWriter.Put16(minimumWaitTime.count()); + handle = protocolDataBufferWriter.Finalize(); + VerifyOrReturnValue(!handle.IsNull(), handle, + ChipLogError(SecureChannel, "Failed to finalize protocol data for busy status report")); + + // Build a busy status report + StatusReport statusReport(GeneralStatusCode::kBusy, Protocols::SecureChannel::Id, kProtocolCodeBusy, std::move(handle)); + + // Build the status report message + handle = System::PacketBufferHandle::New(statusReport.Size()); + VerifyOrReturnValue(!handle.IsNull(), handle, ChipLogError(SecureChannel, "Failed to allocate status report message")); + Encoding::LittleEndian::PacketBufferWriter bbuf(std::move(handle)); + + statusReport.WriteToBuffer(bbuf); + return bbuf.Finalize(); +} + } // namespace SecureChannel } // namespace Protocols } // namespace chip diff --git a/src/protocols/secure_channel/StatusReport.h b/src/protocols/secure_channel/StatusReport.h index cd26b798eab1db..e25f2c6dc1a20b 100644 --- a/src/protocols/secure_channel/StatusReport.h +++ b/src/protocols/secure_channel/StatusReport.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace chip { @@ -94,6 +95,15 @@ class DLL_EXPORT StatusReport uint16_t GetProtocolCode() const { return mProtocolCode; } const System::PacketBufferHandle & GetProtocolData() const { return mProtocolData; } + /** + * Builds a busy status report with protocol data containing the minimum wait time. + * + * @param[in] minimumWaitTime Time in milliseconds before initiator retries the request + * + * @return Packet buffer handle which can be passed to SendMessage. + */ + static System::PacketBufferHandle MakeBusyStatusReportMessage(System::Clock::Milliseconds16 minimumWaitTime); + private: GeneralStatusCode mGeneralCode; Protocols::Id mProtocolId; diff --git a/src/protocols/secure_channel/tests/TestStatusReport.cpp b/src/protocols/secure_channel/tests/TestStatusReport.cpp index 35cbe1b5bca65e..093453029b156b 100644 --- a/src/protocols/secure_channel/tests/TestStatusReport.cpp +++ b/src/protocols/secure_channel/tests/TestStatusReport.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include #include #include #include @@ -104,6 +105,33 @@ void TestBadStatusReport(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); } +void TestMakeBusyStatusReport(nlTestSuite * inSuite, void * inContext) +{ + GeneralStatusCode generalCode = GeneralStatusCode::kBusy; + auto protocolId = SecureChannel::Id; + uint16_t protocolCode = kProtocolCodeBusy; + System::Clock::Milliseconds16 minimumWaitTime = System::Clock::Milliseconds16(5000); + + System::PacketBufferHandle handle = StatusReport::MakeBusyStatusReportMessage(minimumWaitTime); + NL_TEST_ASSERT(inSuite, !handle.IsNull()); + + StatusReport reportToParse; + CHIP_ERROR err = reportToParse.Parse(std::move(handle)); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == err); + NL_TEST_ASSERT(inSuite, reportToParse.GetGeneralCode() == generalCode); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolId() == protocolId); + NL_TEST_ASSERT(inSuite, reportToParse.GetProtocolCode() == protocolCode); + + const System::PacketBufferHandle & rcvData = reportToParse.GetProtocolData(); + NL_TEST_ASSERT(inSuite, !rcvData.IsNull()); + NL_TEST_ASSERT(inSuite, rcvData->DataLength() == sizeof(minimumWaitTime)); + + uint16_t readMinimumWaitTime = 0; + Encoding::LittleEndian::Reader reader(rcvData->Start(), rcvData->DataLength()); + NL_TEST_ASSERT(inSuite, CHIP_NO_ERROR == reader.Read16(&readMinimumWaitTime).StatusCode()); + NL_TEST_ASSERT(inSuite, System::Clock::Milliseconds16(readMinimumWaitTime) == minimumWaitTime); +} + // Test Suite /** @@ -115,6 +143,7 @@ static const nlTest sTests[] = NL_TEST_DEF("TestStatusReport_NoData", TestStatusReport_NoData), NL_TEST_DEF("TestStatusReport_WithData", TestStatusReport_WithData), NL_TEST_DEF("TestBadStatusReport", TestBadStatusReport), + NL_TEST_DEF("TestMakeBusyStatusReport", TestMakeBusyStatusReport), NL_TEST_SENTINEL() }; diff --git a/src/python_testing/TC_OPSTATE_2_1.py b/src/python_testing/TC_OPSTATE_2_1.py new file mode 100644 index 00000000000000..1b0e253f4aeb11 --- /dev/null +++ b/src/python_testing/TC_OPSTATE_2_1.py @@ -0,0 +1,185 @@ +# +# Copyright (c) 2023 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 logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_OPSTATE_2_1(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.OperationalState + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def read_and_validate_opstate(self, step, expected_state): + self.print_step(step, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.OperationalState.Attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, expected_state, + "OperationalState(%s) should equal %s" % (operational_state, expected_state)) + + async def read_and_validate_operror(self, step, expected_error): + self.print_step(step, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.OperationalState.Attributes.OperationalError) + logging.info("OperationalError: %s" % (operational_error)) + asserts.assert_equal(operational_error.errorStateID, expected_error, + "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + + @async_test_body + async def test_TC_OPSTATE_2_1(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + attributes = Clusters.OperationalState.Attributes + + self.print_step(1, "Commissioning, already done") + + if self.check_pics("OPSTATE.S.A0000"): + self.print_step(2, "Read PhaseList attribute") + phase_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.PhaseList) + + if phase_list == NullValue: + logging.info("PhaseList is null") + else: + logging.info("PhaseList: %s" % (phase_list)) + + phase_list_len = len(phase_list) + + asserts.assert_less_equal(phase_list_len, 32, + "PhaseList length(%d) must be less than 32!" % phase_list_len) + + if self.check_pics("OPSTATE.S.A0001"): + self.print_step(3, "Read CurrentPhase attribute") + current_phase = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CurrentPhase) + logging.info("CurrentPhase: %s" % (current_phase)) + + if phase_list == NullValue: + asserts.assert_true(current_phase == NullValue, "CurrentPhase(%s) should be null" % current_phase) + else: + asserts.assert_true(0 <= current_phase and current_phase < phase_list_len, + "CurrentPhase(%s) must be between 0 and %s" % (current_phase, (phase_list_len - 1))) + + if self.check_pics("OPSTATE.S.A0002"): + self.print_step(4, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + + logging.info("CountdownTime: %s" % (countdown_time)) + if countdown_time is not NullValue: + asserts.assert_true(0 <= countdown_time <= 259200, + "CountdownTime(%s) must be between 0 and 259200" % countdown_time) + + if self.check_pics("OPSTATE.S.A0003"): + self.print_step(5, "Read OperationalStateList attribute") + operational_state_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalStateList) + + logging.info("OperationalStateList: %s" % (operational_state_list)) + + defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum + if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] + + for state in operational_state_list: + in_range = (0x80 <= state.operationalStateID <= 0xBF) + asserts.assert_true(state.operationalStateID in defined_states or in_range, + "Found a OperationalStateList entry with invalid ID value!") + if in_range: + asserts.assert_true(state.operationalStateLabel is not None, + "The OperationalStateLabel should be populated") + if state.operationalStateID == Clusters.OperationalState.Enums.OperationalStateEnum.kError: + error_state_present = True + + asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") + + if self.check_pics("OPSTATE.S.A0004"): + self.print_step(6, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + + logging.info("OperationalState: %s" % (operational_state)) + + in_range = (0x80 <= operational_state <= 0xBF) + asserts.assert_true(operational_state in defined_states or in_range, "OperationalState has an invalid ID value!") + + if self.check_pics("OPSTATE.S.M.ST_STOPPED"): + self.print_step("6a", "Manually put the device in the stopped state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6b", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kStopped) + if self.check_pics("OPSTATE.S.M.ST_RUNNING"): + self.print_step("6c", "Manually put the device in the running state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning) + if self.check_pics("OPSTATE.S.M.ST_PAUSED"): + self.print_step("6e", "Manually put the device in the paused state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused) + if self.check_pics("OPSTATE.S.M.ST_ERROR"): + self.print_step("6g", "Manually put the device in the error state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) + + if self.check_pics("OPSTATE.S.A0005"): + self.print_step(7, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalError) + + logging.info("OperationalError: %s" % (operational_error)) + + # Defined Errors + defined_errors = [error.value for error in Clusters.OperationalState.Enums.ErrorStateEnum + if error is not Clusters.OperationalState.Enums.ErrorStateEnum.kUnknownEnumValue] + + in_range = (0x80 <= operational_error.errorStateID <= 0xBF) + asserts.assert_true(operational_error.errorStateID in defined_errors + or in_range, "OperationalError has an invalid ID value!") + if in_range: + asserts.assert_true(operational_error.errorStateLabel is not None, "ErrorStateLabel should be populated") + + if self.check_pics("OPSTATE.S.M.ERR_NO_ERROR"): + self.print_step("7a", "Manually put the device in the no error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7b", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kNoError) + if self.check_pics("OPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME"): + self.print_step("7c", "Manually put the device in the unable to start or resume error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) + if self.check_pics("OPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"): + self.print_step("7e", "Manually put the device in the unable to complete operation error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) + if self.check_pics("OPSTATE.S.M.ERR_COMMAND_INVALID_STATE"): + self.print_step("7g", "Manually put the device in the command invalid error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OPSTATE_2_3.py b/src/python_testing/TC_OPSTATE_2_3.py new file mode 100644 index 00000000000000..d8950c90ad81f3 --- /dev/null +++ b/src/python_testing/TC_OPSTATE_2_3.py @@ -0,0 +1,158 @@ +# +# Copyright (c) 2023 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 logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + +# This test requires several additional command line arguments +# run with +# --int-arg PIXIT_ENDPOINT: + + +class TC_OPSTATE_2_3(MatterBaseTest): + + async def read_mod_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.OperationalState + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def send_pause_cmd(self) -> Clusters.Objects.OperationalState.Commands.Pause: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OperationalState.Commands.Pause(), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OperationalState.Commands.OperationalCommandResponse), + "Unexpected return type for Pause") + return ret + + async def send_resume_cmd(self) -> Clusters.Objects.OperationalState.Commands.Resume: + ret = await self.send_single_cmd(cmd=Clusters.Objects.OperationalState.Commands.Resume(), endpoint=self.endpoint) + asserts.assert_true(type_matches(ret, Clusters.Objects.OperationalState.Commands.OperationalCommandResponse), + "Unexpected return type for Resume") + return ret + + @async_test_body + async def test_TC_OPSTATE_2_3(self): + + asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, + "PIXIT_ENDPOINT must be included on the command line in " + "the --int-arg flag as PIXIT_ENDPOINT:") + + self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] + + asserts.assert_true(self.check_pics("OPSTATE.S.A0002"), "OPSTATE.S.A0002 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.A0003"), "OPSTATE.S.A0003 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.A0004"), "OPSTATE.S.A0004 must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.C00.Rsp"), "OPSTATE.S.C00.Rsp must be supported") + asserts.assert_true(self.check_pics("OPSTATE.S.C03.Rsp"), "OPSTATE.S.C03.Rsp must be supported") + + attributes = Clusters.OperationalState.Attributes + + self.print_step(1, "Commissioning, already done") + + self.print_step(2, "Manually put the device in a state where it can receive a Pause command") + input("Press Enter when done.\n") + + self.print_step(3, "Read OperationalStateList attribute") + op_state_list = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalStateList) + + logging.info("OperationalStateList: %s" % (op_state_list)) + + defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum + if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] + + state_ids = set([s.operationalStateID for s in op_state_list]) + + asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") + + self.print_step(4, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(5, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, + "OperationalState ID should be Paused(0x02)") + + self.print_step(6, "Read CountdownTime attribute") + initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (initial_countdown_time)) + if initial_countdown_time is not NullValue: + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null " % initial_countdown_time) + + self.print_step(7, "Waiting for 5 seconds") + time.sleep(5) + + self.print_step(8, "Read CountdownTime attribute") + countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) + logging.info("CountdownTime: %s" % (countdown_time)) + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) + asserts.assert_equal(countdown_time, initial_countdown_time, "CountdownTime(%s) does not equal to the intial CountdownTime(%s)" + % (countdown_time, initial_countdown_time)) + + self.print_step(9, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(10, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(11, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, + attribute=attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, + "OperationalState(%s) should be Running(0x01)" % operational_state) + + self.print_step(12, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) + + self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") + input("Press Enter when done.\n") + + self.print_step(14, "Send Pause command") + ret = await self.send_pause_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + + self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") + input("Press Enter when done.\n") + + self.print_step(16, "Send Resume command") + ret = await self.send_resume_cmd() + asserts.assert_equal(ret.commandResponseState.errorStateID, + Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index 8a2683c2317472..e082b83bb67a20 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCCLEANM.MODE_CHANGE_OK: PIXIT.RVCCLEANM.MODE_CHANGE_FAIL: class TC_RVCCLEANM_2_1(MatterBaseTest): @@ -44,20 +44,16 @@ async def test_TC_RVCCLEANM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCCLEANM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCCLEANM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCCLEANM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCCLEANM.S.A0000"), "RVCCLEANM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCCLEANM.S.A0001"), "RVCCLEANM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index acd0ba35b6a4f4..29d2757363a726 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -33,6 +33,22 @@ async def read_mod_attribute_expect_success(self, endpoint, attribute): cluster = Clusters.Objects.RvcOperationalState return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + async def read_and_validate_opstate(self, step, expected_state): + self.print_step(step, "Read OperationalState attribute") + operational_state = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalState) + logging.info("OperationalState: %s" % (operational_state)) + asserts.assert_equal(operational_state, expected_state, + "OperationalState(%s) should equal %s" % (operational_state, expected_state)) + + async def read_and_validate_operror(self, step, expected_error): + self.print_step(step, "Read OperationalError attribute") + operational_error = await self.read_mod_attribute_expect_success( + endpoint=self.endpoint, attribute=Clusters.RvcOperationalState.Attributes.OperationalError) + logging.info("OperationalError: %s" % (operational_error)) + asserts.assert_equal(operational_error.errorStateID, expected_error, + "errorStateID(%s) should equal %s" % (operational_error.errorStateID, expected_error)) + @async_test_body async def test_TC_RVCOPSTATE_2_1(self): @@ -57,7 +73,7 @@ async def test_TC_RVCOPSTATE_2_1(self): phase_list_len = len(phase_list) - asserts.assert_less_equal(phase_list_len, 32, "PhaseList must have no more than 32 entries!") + asserts.assert_less_equal(phase_list_len, 32, "PhaseList length(%d) must be less than 32!" % phase_list_len) if self.check_pics("RVCOPSTATE.S.A0001"): self.print_step(3, "Read CurrentPhase attribute") @@ -65,10 +81,10 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CurrentPhase: %s" % (current_phase)) if phase_list == NullValue: - asserts.assert_true(current_phase == NullValue, "CurrentPhase should be null") + asserts.assert_true(current_phase == NullValue, "CurrentPhase(%s) should be null" % current_phase) else: - asserts.assert_true(0 <= current_phase and current_phase <= (phase_list_len - 1), - "CurrentPhase must be between 0 and (phase-list-size - 1)") + asserts.assert_true(0 <= current_phase < phase_list_len, + "CurrentPhase(%s) must be between 0 and %d" % (current_phase, (phase_list_len - 1))) if self.check_pics("RVCOPSTATE.S.A0002"): self.print_step(4, "Read CountdownTime attribute") @@ -77,7 +93,8 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("CountdownTime: %s" % (countdown_time)) if countdown_time is not NullValue: - asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, "CountdownTime must be between 0 and 259200") + asserts.assert_true(countdown_time >= 0 and countdown_time <= 259200, + "CountdownTime(%s) must be between 0 and 259200" % countdown_time) if self.check_pics("RVCOPSTATE.S.A0003"): self.print_step(5, "Read OperationalStateList attribute") @@ -86,20 +103,22 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalStateList: %s" % (operational_state_list)) - state_ids = [s.operationalStateID for s in operational_state_list] - defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] defined_states.extend(state.value for state in Clusters.RvcOperationalState.Enums.OperationalStateEnum if state is not Clusters.RvcOperationalState.Enums.OperationalStateEnum.kUnknownEnumValue) - for state_id in state_ids: - in_range = (0x8000 <= state_id and state_id <= 0xBFFF) - asserts.assert_true(state_id in defined_states or in_range, - "Found a OperationalStateList entry with invalid ID value!") - if state_id == Clusters.OperationalState.Enums.OperationalStateEnum.kError: - error_present_in_list = True - asserts.assert_true(error_present_in_list, "The OperationalStateList does not have an ID entry of Error(0x03)") + for state in operational_state_list: + in_range = (0x80 <= state.operationalStateID <= 0xBF) + asserts.assert_true(state.operationalStateID in defined_states or in_range, + "Found an OperationalStateList entry with an invalid ID value: %s" % state.operationalStateID) + if in_range: + asserts.assert_true(state.operationalStateLabel is not None, + "The OperationalStateLabel should be populated") + if state.operationalStateID == Clusters.OperationalState.Enums.OperationalStateEnum.kError: + error_state_present = True + + asserts.assert_true(error_state_present, "The OperationalStateList does not have an ID entry of Error(0x03)") if self.check_pics("RVCOPSTATE.S.A0004"): self.print_step(6, "Read OperationalState attribute") @@ -108,9 +127,38 @@ async def test_TC_RVCOPSTATE_2_1(self): logging.info("OperationalState: %s" % (operational_state)) - in_range = (0x8000 <= operational_state and operational_state <= 0xBFFF) + in_range = (0x80 <= operational_state and operational_state <= 0xBF) asserts.assert_true(operational_state in defined_states or in_range, "OperationalState has an invalid ID value!") + if self.check_pics("RVCOPSTATE.S.M.ST_STOPPED"): + self.print_step("6a", "Manually put the device in the stopped state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6b", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kStopped) + if self.check_pics("RVCOPSTATE.S.M.ST_RUNNING"): + self.print_step("6c", "Manually put the device in the running state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6d", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kRunning) + if self.check_pics("RVCOPSTATE.S.M.ST_PAUSED"): + self.print_step("6e", "Manually put the device in the paused state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6f", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kPaused) + if self.check_pics("RVCOPSTATE.S.M.ST_ERROR"): + self.print_step("6g", "Manually put the device in the error state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) + if self.check_pics("RVCOPSTATE.S.M.ST_SEEKING_CHARGER"): + self.print_step("6i", "Manually put the device in the seeking charger state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6j", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kSeekingCharger) + if self.check_pics("RVCOPSTATE.S.M.ST_CHARGING"): + self.print_step("6k", "Manually put the device in the charging state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6l", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kCharging) + if self.check_pics("RVCOPSTATE.S.M.ST_DOCKED"): + self.print_step("6m", "Manually put the device in the docked state") + input("Press Enter when done.\n") + await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked) + if self.check_pics("RVCOPSTATE.S.A0005"): self.print_step(7, "Read OperationalError attribute") operational_error = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, @@ -124,9 +172,60 @@ async def test_TC_RVCOPSTATE_2_1(self): defined_errors.extend(error.value for error in Clusters.RvcOperationalState.Enums.ErrorStateEnum if error is not Clusters.RvcOperationalState.Enums.ErrorStateEnum.kUnknownEnumValue) - in_range = (0x8000 <= operational_error.errorStateID and operational_error.errorStateID <= 0xBFFF) + in_range = (0x80 <= operational_error.errorStateID <= 0xBF) asserts.assert_true(operational_error.errorStateID in defined_errors - or in_range, "OperationalError has an invalid ID value!") + or in_range, "OperationalError(%s) has an invalid ID value!" % operational_error.errorStateID) + if in_range: + asserts.assert_true(operational_error.errorStateLabel is not None, "ErrorStateLabel should be populated") + + if self.check_pics("RVCOPSTATE.S.M.ERR_NO_ERROR"): + self.print_step("7a", "Manually put the device in the no error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7b", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kNoError) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME"): + self.print_step("7c", "Manually put the device in the unable to start or resume error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) + if self.check_pics("RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION"): + self.print_step("7e", "Manually put the device in the unable to complete operation error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) + if self.check_pics("RVCOPSTATE.S.M.ERR_COMMAND_INVALID_STATE"): + self.print_step("7g", "Manually put the device in the command invalid error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) + if self.check_pics("RVCOPSTATE.S.M.ERR_FAILED_FIND_DOCK"): + self.print_step("7i", "Manually put the device in the failed to find dock error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7j", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kFailedToFindChargingDock) + if self.check_pics("RVCOPSTATE.S.M.ERR_STUCK"): + self.print_step("7k", "Manually put the device in the stuck error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7l", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kStuck) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING"): + self.print_step("7m", "Manually put the device in the dust bin missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7n", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_DUST_BIN_FULL"): + self.print_step("7o", "Manually put the device in the dust bin full error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7p", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinFull) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY"): + self.print_step("7q", "Manually put the device in the water tank empty error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7r", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankEmpty) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING"): + self.print_step("7s", "Manually put the device in the water tank missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7t", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankMissing) + if self.check_pics("RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN"): + self.print_step("7u", "Manually put the device in the water tank lid open error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7v", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankLidOpen) + if self.check_pics("RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING"): + self.print_step("7w", "Manually put the device in the mop cleaning pad missing error state") + input("Press Enter when done.\n") + await self.read_and_validate_operror(step="7x", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kMopCleaningPadMissing) if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index 288e40f7099ba3..405523cb4a4f25 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -77,29 +77,30 @@ async def test_TC_RVCOPSTATE_2_3(self): defined_states = [state.value for state in Clusters.OperationalState.Enums.OperationalStateEnum if state is not Clusters.OperationalState.Enums.OperationalStateEnum.kUnknownEnumValue] - state_ids = [s.operationalStateID for s in op_state_list] + state_ids = set([s.operationalStateID for s in op_state_list]) asserts.assert_true(all(id in state_ids for id in defined_states), "OperationalStateList is missing a required entry") self.print_step(4, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(5, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kPaused, - "OperationalState ID should be Paused(0x02)") + "OperationalState(%s) should be Paused(0x02)" % operational_state) self.print_step(6, "Read CountdownTime attribute") initial_countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (initial_countdown_time)) if initial_countdown_time is not NullValue: - in_range = (1 <= initial_countdown_time and initial_countdown_time <= 259200) - asserts.assert_true(initial_countdown_time is NullValue or in_range, "invalid CountdownTime") + in_range = (1 <= initial_countdown_time <= 259200) + asserts.assert_true(initial_countdown_time is NullValue or in_range, + "invalid CountdownTime(%s). Must be in between 1 and 259200, or null" % initial_countdown_time) self.print_step(7, "Waiting for 5 seconds") time.sleep(5) @@ -107,31 +108,32 @@ async def test_TC_RVCOPSTATE_2_3(self): self.print_step(8, "Read CountdownTime attribute") countdown_time = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.CountdownTime) logging.info("CountdownTime: %s" % (countdown_time)) - asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, "invalid CountdownTime") + asserts.assert_true(countdown_time != 0 or countdown_time == NullValue, + "invalid CountdownTime(%s). Must be a non zero integer, or null" % countdown_time) asserts.assert_equal(countdown_time, initial_countdown_time, - "CountdownTime does not equal to the intial CountdownTime %s" % initial_countdown_time) + "CountdownTime(%s) does not equal to the intial CountdownTime (%s)" % (countdown_time, initial_countdown_time)) self.print_step(9, "Send Pause command") ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(10, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "ErrorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(11, "Read OperationalState attribute") operational_state = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.OperationalState) logging.info("OperationalState: %s" % (operational_state)) asserts.assert_equal(operational_state, Clusters.OperationalState.Enums.OperationalStateEnum.kRunning, - "OperationalState ID should be Running(0x01)") + "OperationalState(%s) should be Running(0x01)" % operational_state) self.print_step(12, "Send Resume command") ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kNoError, - "errorStateID should be NoError(0x00)") + "errorStateID(%s) should be NoError(0x00)" % ret.commandResponseState.errorStateID) self.print_step(13, "Manually put the device in a state where it cannot receive a Pause command") input("Press Enter when done.\n") @@ -140,7 +142,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_pause_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) self.print_step(15, "Manually put the device in a state where it cannot receive a Resume command") input("Press Enter when done.\n") @@ -149,7 +151,7 @@ async def test_TC_RVCOPSTATE_2_3(self): ret = await self.send_resume_cmd() asserts.assert_equal(ret.commandResponseState.errorStateID, Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState, - "errorStateID should be CommandInvalidInState(0x03)") + "errorStateID(%s) should be CommandInvalidInState(0x03)" % ret.commandResponseState.errorStateID) if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index f9bd8937ae59bb..f6be1d2287f371 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -23,7 +23,7 @@ # This test requires several additional command line arguments # run with -# --int-arg PIXIT_ENDPOINT: PIXIT_MODEOK: PIXIT_MODEFAIL: +# --int-arg PIXIT_ENDPOINT: PIXIT.RVCRUNM.MODE_CHANGE_OK: PIXIT.RVCRUNM.MODE_CHANGE_FAIL: class TC_RVCRUNM_2_1(MatterBaseTest): @@ -44,20 +44,16 @@ async def test_TC_RVCRUNM_2_1(self): asserts.assert_true('PIXIT_ENDPOINT' in self.matter_test_config.global_test_params, "PIXIT_ENDPOINT must be included on the command line in " "the --int-arg flag as PIXIT_ENDPOINT:") - asserts.assert_true('PIXIT_MODEOK' in self.matter_test_config.global_test_params, - "PIXIT_MODEOK must be included on the command line in " - "the --int-arg flag as PIXIT_MODEOK:") - asserts.assert_true('PIXIT_MODEFAIL' in self.matter_test_config.global_test_params, - "PIXIT_MODEFAIL must be included on the command line in " - "the --int-arg flag as PIXIT_MODEFAIL:") - asserts.assert_true('pixit_can_test_mode_failure' in self.matter_test_config.global_test_params, - "PIXIT_CAN_TEST_MODE_FAILURE must be included on the command line in " - "the --bool-arg flag as PIXIT_CAN_TEST_MODE_FAILURE:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_OK' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_OK must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_OK:") + asserts.assert_true('PIXIT.RVCRUNM.MODE_CHANGE_FAIL' in self.matter_test_config.global_test_params, + "PIXIT.RVCRUNM.MODE_CHANGE_FAIL must be included on the command line in " + "the --int-arg flag as PIXIT.RVCRUNM.MODE_CHANGE_FAIL:") self.endpoint = self.matter_test_config.global_test_params['PIXIT_ENDPOINT'] - self.modeok = self.matter_test_config.global_test_params['PIXIT_MODEOK'] - self.modefail = self.matter_test_config.global_test_params['PIXIT_MODEFAIL'] - self.can_test_mode_failure = self.matter_test_config.global_test_params['pixit_can_test_mode_failure'] + self.modeok = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_OK'] + self.modefail = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_CHANGE_FAIL'] asserts.assert_true(self.check_pics("RVCRUNM.S.A0000"), "RVCRUNM.S.A0000 must be supported") asserts.assert_true(self.check_pics("RVCRUNM.S.A0001"), "RVCRUNM.S.A0001 must be supported") @@ -101,7 +97,7 @@ class CommonCodes(Enum): ret = await self.send_change_to_mode_cmd(newMode=old_current_mode) asserts.assert_true(ret.status == CommonCodes.SUCCESS.value, "Changing the mode to the current mode should be a no-op") - if self.can_test_mode_failure is True: + if self.check_pics("RVCRUNM.S.M.CAN_TEST_MODE_FAILURE"): self.print_step(5, "Manually put the device in a state from which it will FAIL to transition to mode %d" % (self.modefail)) input("Press Enter when done.\n") diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index 9a250bb730ad22..59df8e9d54f03d 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -45,7 +45,7 @@ pw_proto_library("nl_test_service") { efr32_sdk("sdk") { sources = [ "${efr32_project_dir}/include/CHIPProjectConfig.h", - "${examples_plat_dir}/FreeRTOSConfig.h", + "${examples_common_plat_dir}/FreeRTOSConfig.h", ] include_dirs = [ @@ -73,7 +73,6 @@ silabs_executable("efr32_device_tests") { "${examples_common_plat_dir}/PigweedLogger.cpp", "${examples_common_plat_dir}/heap_4_silabs.c", "${examples_common_plat_dir}/syscalls_stubs.cpp", - "${examples_plat_dir}/init_efrPlatform.cpp", "${examples_plat_dir}/uart.cpp", "src/main.cpp", ] @@ -86,7 +85,7 @@ silabs_executable("efr32_device_tests") { "${chip_root}/src:tests", "${chip_root}/src/lib", "${chip_root}/src/lib/support:testing", - "${examples_plat_dir}/pw_sys_io:pw_sys_io_efr32", + "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs", "${nlunit_test_root}:nlunit-test", ] @@ -108,7 +107,7 @@ silabs_executable("efr32_device_tests") { include_dirs = [ "${chip_root}/examples/common/pigweed/efr32" ] - ldscript = "${examples_plat_dir}/ldscripts/${silabs_family}.ld" + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" inputs = [ ldscript ] diff --git a/src/test_driver/efr32/src/main.cpp b/src/test_driver/efr32/src/main.cpp index 03f0a626f1b9a7..533fb5f94c307e 100644 --- a/src/test_driver/efr32/src/main.cpp +++ b/src/test_driver/efr32/src/main.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include @@ -181,7 +181,7 @@ void RunRpcService(void *) int main(void) { - init_efrPlatform(); + chip::DeviceLayer::Silabs::GetPlatform().Init(); PigweedLogger::init(); mbedtls_platform_set_calloc_free(CHIPPlatformMemoryCalloc, CHIPPlatformMemoryFree); diff --git a/src/test_driver/esp32/main/main_app.cpp b/src/test_driver/esp32/main/main_app.cpp index 1eef2ae345439a..0ff3ce4690d6b8 100644 --- a/src/test_driver/esp32/main/main_app.cpp +++ b/src/test_driver/esp32/main/main_app.cpp @@ -19,12 +19,12 @@ #include "esp_heap_caps_init.h" #include "esp_log.h" #include "esp_netif.h" -#include "esp_spi_flash.h" #include "esp_system.h" #include "esp_wifi.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "nvs_flash.h" +#include "spi_flash_mmap.h" #include @@ -48,17 +48,6 @@ static void tester_task(void * pvParameters) extern "C" void app_main() { - esp_chip_info_t chip_info; - esp_chip_info(&chip_info); - - ESP_LOGI(TAG, "This is ESP32 chip with %d CPU cores, WiFi%s%s, ", chip_info.cores, - (chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "", (chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : ""); - - ESP_LOGI(TAG, "silicon revision %d, ", chip_info.revision); - - ESP_LOGI(TAG, "%dMB %s flash\n", spi_flash_get_chip_size() / (1024 * 1024), - (chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external"); - // Initialize the ESP NVS layer. esp_err_t err = nvs_flash_init(); if (err != ESP_OK) diff --git a/src/tools/chip-cert/CertUtils.cpp b/src/tools/chip-cert/CertUtils.cpp index 3fcf474e9abba8..db880f75f3c5dc 100644 --- a/src/tools/chip-cert/CertUtils.cpp +++ b/src/tools/chip-cert/CertUtils.cpp @@ -1284,8 +1284,7 @@ bool ResignCert(X509 * cert, X509 * caCert, EVP_PKEY * caKey) bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subjectVID, uint16_t subjectPID, bool encodeVIDandPIDasCN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, - X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, const FutureExtensionWithNID * exts, - uint8_t extsCount) + X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, X509_EXTENSION * cdpExt) { bool res = true; uint16_t vid = certConfig.IsSubjectVIDMismatch() ? static_cast(subjectVID + 1) : subjectVID; @@ -1469,9 +1468,16 @@ bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subje VerifyTrueOrExit(res); } - for (uint8_t i = 0; i < extsCount; i++) + if (cdpExt != nullptr) { - res = AddExtension(newCert, exts[i].nid, exts[i].info); + int result = X509_add_ext(newCert, cdpExt, -1); + VerifyTrueOrExit(result == 1); + } + + if (certConfig.IsExtensionCDPPresent()) + { + // Add second CDP extension. + res = AddExtension(newCert, NID_crl_distribution_points, "URI:http://example.com/test_crl.pem"); VerifyTrueOrExit(res); } diff --git a/src/tools/chip-cert/Cmd_GenAttCert.cpp b/src/tools/chip-cert/Cmd_GenAttCert.cpp index 7f57e1df20542d..3c30991dc9e8dc 100644 --- a/src/tools/chip-cert/Cmd_GenAttCert.cpp +++ b/src/tools/chip-cert/Cmd_GenAttCert.cpp @@ -31,6 +31,8 @@ #include +#include + namespace { using namespace chip; @@ -45,22 +47,23 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char // clang-format off OptionDef gCmdOptionDefs[] = { - { "type", kArgumentRequired, 't' }, - { "subject-cn", kArgumentRequired, 'c' }, - { "subject-vid", kArgumentRequired, 'V' }, - { "subject-pid", kArgumentRequired, 'P' }, - { "vid-pid-as-cn", kNoArgument, 'a' }, - { "key", kArgumentRequired, 'k' }, - { "ca-cert", kArgumentRequired, 'C' }, - { "ca-key", kArgumentRequired, 'K' }, - { "out", kArgumentRequired, 'o' }, - { "out-key", kArgumentRequired, 'O' }, - { "valid-from", kArgumentRequired, 'f' }, - { "lifetime", kArgumentRequired, 'l' }, - { "cpd-ext", kArgumentRequired, 'x' }, -#if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES - { "ignore-error", kNoArgument, 'I' }, - { "error-type", kArgumentRequired, 'E' }, + { "type", kArgumentRequired, 't' }, + { "subject-cn", kArgumentRequired, 'c' }, + { "subject-vid", kArgumentRequired, 'V' }, + { "subject-pid", kArgumentRequired, 'P' }, + { "vid-pid-as-cn", kNoArgument, 'a' }, + { "key", kArgumentRequired, 'k' }, + { "ca-cert", kArgumentRequired, 'C' }, + { "ca-key", kArgumentRequired, 'K' }, + { "out", kArgumentRequired, 'o' }, + { "out-key", kArgumentRequired, 'O' }, + { "valid-from", kArgumentRequired, 'f' }, + { "lifetime", kArgumentRequired, 'l' }, + { "cdp-uri", kArgumentRequired, 'x' }, + { "crl-issuer-cert", kArgumentRequired, 'L' }, + #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES + { "ignore-error", kNoArgument, 'I' }, + { "error-type", kArgumentRequired, 'E' }, #endif { } }; @@ -126,11 +129,17 @@ const char * const gCmdOptionHelp = " 4294967295 to indicate that certificate doesn't have well defined\n" " expiration date\n" "\n" - " -x, --cpd-ext \n" + " -x, --cdp-uri \n" "\n" " CRL Distribution Points (CDP) extension (NID_crl_distribution_points) extension to be added to the list\n" " of certificate extensions.\n" "\n" + " -L, --crl-issuer-cert \n" + "\n" + " File or string containing the CRL Issuer certificate (in an X.509 PEM format).\n" + " The Subject name will be extracted from this certificate to be included in the\n" + " cRLIssuer field of the CRL Distribution Point (CDP) extension.\n" + "\n" #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES " -I, --ignore-error\n" "\n" @@ -180,6 +189,10 @@ const char * const gCmdOptionHelp = " ext-extended-key-usage - Certificate will include optional Extended Key Usage extension.\n" " ext-authority-info-access - Certificate will include optional Authority Information Access extension.\n" " ext-subject-alt-name - Certificate will include optional Subject Alternative Name extension.\n" + " ext-cdp-uri-duplicate - Certificate will include additional URI Field in the CDP extension.\n" + " ext-cdp-crl-issuer-duplicate - Certificate will include additional CRL Issuer Field in the CDP extension.\n" + " ext-cdp-dist-point-duplicate - Certificate will include additional CRL Distribution Point Field in the CDP extension.\n" + " ext-cdp-add - Certificate will include additional CDP extension.\n" "\n" #endif // CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES ; @@ -207,19 +220,19 @@ OptionSet *gCmdOptionSets[] = }; // clang-format on -AttCertType gAttCertType = kAttCertType_NotSpecified; -const char * gSubjectCN = nullptr; -uint16_t gSubjectVID = VendorId::NotSpecified; -uint16_t gSubjectPID = 0; -bool gEncodeVIDandPIDasCN = false; -const char * gCACertFileNameOrStr = nullptr; -const char * gCAKeyFileNameOrStr = nullptr; -const char * gInKeyFileNameOrStr = nullptr; -const char * gOutCertFileName = nullptr; -const char * gOutKeyFileName = nullptr; -uint32_t gValidDays = kCertValidDays_Undefined; -FutureExtensionWithNID gCPDExtensions[3] = { { 0, nullptr } }; -uint8_t gCPDExtensionsCount = 0; +AttCertType gAttCertType = kAttCertType_NotSpecified; +const char * gSubjectCN = nullptr; +uint16_t gSubjectVID = VendorId::NotSpecified; +uint16_t gSubjectPID = 0; +bool gEncodeVIDandPIDasCN = false; +const char * gCACertFileNameOrStr = nullptr; +const char * gCAKeyFileNameOrStr = nullptr; +const char * gInKeyFileNameOrStr = nullptr; +const char * gOutCertFileName = nullptr; +const char * gOutKeyFileName = nullptr; +uint32_t gValidDays = kCertValidDays_Undefined; +const char * gCDPURI = nullptr; +const char * gCRLIssuerCertFileName = nullptr; struct tm gValidFrom; CertStructConfig gCertConfig; @@ -300,9 +313,10 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char } break; case 'x': - gCPDExtensions[gCPDExtensionsCount].nid = NID_crl_distribution_points; - gCPDExtensions[gCPDExtensionsCount].info = arg; - gCPDExtensionsCount++; + gCDPURI = arg; + break; + case 'L': + gCRLIssuerCertFileName = arg; break; #if CHIP_CONFIG_INTERNAL_FLAG_GENERATE_DA_TEST_CASES case 'I': @@ -409,6 +423,22 @@ bool HandleOption(const char * progName, OptionSet * optSet, int id, const char { gCertConfig.SetExtensionSubjectAltNamePresent(); } + else if (strcmp(arg, "ext-cdp-uri-duplicate") == 0) + { + gCertConfig.SetExtensionCDPURIDuplicate(); + } + else if (strcmp(arg, "ext-cdp-crl-issuer-duplicate") == 0) + { + gCertConfig.SetExtensionCDPCRLIssuerDuplicate(); + } + else if (strcmp(arg, "ext-cdp-dist-point-duplicate") == 0) + { + gCertConfig.SetExtensionCDPDistPointDuplicate(); + } + else if (strcmp(arg, "ext-cdp-add") == 0) + { + gCertConfig.SetExtensionCDPPresent(); + } else if (strcmp(arg, "no-error") != 0) { PrintArgError("%s: Invalid value specified for the error type: %s\n", progName, arg); @@ -432,6 +462,17 @@ bool Cmd_GenAttCert(int argc, char * argv[]) std::unique_ptr newCert(X509_new(), &X509_free); std::unique_ptr newKey(EVP_PKEY_new(), &EVP_PKEY_free); + // Declarations related to the CRL Distribution Points (CDP) Extention + std::unique_ptr cRLIssuerCert(nullptr, &X509_free); + std::unique_ptr cdpExtension(nullptr, &X509_EXTENSION_free); + STACK_OF(DIST_POINT) * distPoints = nullptr; + DIST_POINT * distPoint = nullptr; + ASN1_IA5STRING * uri = nullptr; + GENERAL_NAME * distPointName = nullptr; + GENERAL_NAME * crlIssuerName = nullptr; + + std::unique_ptr cdpExtension2(nullptr, &X509_EXTENSION_free); + { time_t now = time(nullptr); gValidFrom = *gmtime(&now); @@ -565,10 +606,82 @@ bool Cmd_GenAttCert(int argc, char * argv[]) } } + if (gCRLIssuerCertFileName != nullptr || gCDPURI != nullptr) + { + int result; + + // Create a DIST_POINT object + distPoint = DIST_POINT_new(); + VerifyOrReturnError(distPoint != nullptr, false); + + if (gCDPURI != nullptr) + { + // Set the distribution point name + distPoint->distpoint = DIST_POINT_NAME_new(); + VerifyOrReturnError(distPoint->distpoint != nullptr, false); + + distPoint->distpoint->type = 0; // fullName + distPoint->distpoint->name.fullname = GENERAL_NAMES_new(); + VerifyOrReturnError(distPoint->distpoint->name.fullname != nullptr, false); + + // Create and set URI string + uri = ASN1_IA5STRING_new(); + VerifyOrReturnError(uri != nullptr, false); + result = ASN1_STRING_set(uri, gCDPURI, -1); + VerifyOrReturnError(result != 0, false); + + // Set fullName as a URI + distPointName = GENERAL_NAME_new(); + VerifyOrReturnError(distPointName != nullptr, false); + distPointName->type = GEN_URI; + distPointName->d.uniformResourceIdentifier = uri; + sk_GENERAL_NAME_push(distPoint->distpoint->name.fullname, distPointName); + + if (gCertConfig.IsExtensionCDPURIDuplicate()) + { + // Add second instance of CDP URI - invalid configuration + sk_GENERAL_NAME_push(distPoint->distpoint->name.fullname, distPointName); + } + } + + if (gCRLIssuerCertFileName != nullptr) + { + // Extract Subject from the CRL Issuer Certificate + res = ReadCert(gCRLIssuerCertFileName, cRLIssuerCert); + VerifyTrueOrExit(res); + + crlIssuerName = GENERAL_NAME_new(); + VerifyOrReturnError(crlIssuerName != nullptr, false); + crlIssuerName->type = GEN_DIRNAME; + crlIssuerName->d.directoryName = X509_get_subject_name(cRLIssuerCert.get()); + distPoint->CRLissuer = GENERAL_NAMES_new(); + sk_GENERAL_NAME_push(distPoint->CRLissuer, crlIssuerName); + + if (gCertConfig.IsExtensionCDPCRLIssuerDuplicate()) + { + // Add second instance of CDP CRL Issuer - invalid configuration + sk_GENERAL_NAME_push(distPoint->CRLissuer, crlIssuerName); + } + } + + // Push single DIST_POINT into array of CRL Distribution Points + distPoints = sk_DIST_POINT_new_null(); + sk_DIST_POINT_push(distPoints, distPoint); + + if (gCertConfig.IsExtensionCDPDistPointDuplicate()) + { + // Add second instance of CDP URI - invalid configuration + sk_DIST_POINT_push(distPoints, distPoint); + } + + cdpExtension.reset(X509V3_EXT_i2d(NID_crl_distribution_points, 0, distPoints)); + VerifyOrReturnError(cdpExtension.get() != nullptr, false); + } + if (gAttCertType == kAttCertType_PAA) { res = MakeAttCert(gAttCertType, gSubjectCN, gSubjectVID, gSubjectPID, gEncodeVIDandPIDasCN, newCert.get(), newKey.get(), - gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, gCPDExtensions, gCPDExtensionsCount); + gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, cdpExtension.get()); VerifyTrueOrExit(res); } else @@ -583,7 +696,7 @@ bool Cmd_GenAttCert(int argc, char * argv[]) VerifyTrueOrExit(res); res = MakeAttCert(gAttCertType, gSubjectCN, gSubjectVID, gSubjectPID, gEncodeVIDandPIDasCN, caCert.get(), caKey.get(), - gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, gCPDExtensions, gCPDExtensionsCount); + gValidFrom, gValidDays, newCert.get(), newKey.get(), gCertConfig, cdpExtension.get()); VerifyTrueOrExit(res); } diff --git a/src/tools/chip-cert/chip-cert.h b/src/tools/chip-cert/chip-cert.h index 2f203193e38e44..82d4d8e4c8190b 100644 --- a/src/tools/chip-cert/chip-cert.h +++ b/src/tools/chip-cert/chip-cert.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2021-2022 Project CHIP Authors + * Copyright (c) 2021-2023 Project CHIP Authors * Copyright (c) 2013-2017 Nest Labs, Inc. * All rights reserved. * @@ -185,6 +185,10 @@ class CertStructConfig void SetExtensionExtendedKeyUsagePresent() { mFlags.Set(CertErrorFlags::kExtExtendedKeyUsage); } void SetExtensionAuthorityInfoAccessPresent() { mFlags.Set(CertErrorFlags::kExtAuthorityInfoAccess); } void SetExtensionSubjectAltNamePresent() { mFlags.Set(CertErrorFlags::kExtSubjectAltName); } + void SetExtensionCDPPresent() { mFlags.Set(CertErrorFlags::kExtCRLDistributionPoints); } + void SetExtensionCDPURIDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPURIDuplicate); } + void SetExtensionCDPCRLIssuerDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPCRLIssuerDuplicate); } + void SetExtensionCDPDistPointDuplicate() { mFlags.Set(CertErrorFlags::kExtCDPDistPointDuplicate); } void SetSignatureError() { mFlags.Set(CertErrorFlags::kSignature); } void SetCertOversized() { mFlags.Set(CertErrorFlags::kCertOversized); } @@ -314,6 +318,10 @@ class CertStructConfig bool IsExtensionExtendedKeyUsagePresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtExtendedKeyUsage)); } bool IsExtensionAuthorityInfoAccessPresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtAuthorityInfoAccess)); } bool IsExtensionSubjectAltNamePresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtSubjectAltName)); } + bool IsExtensionCDPPresent() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCRLDistributionPoints)); } + bool IsExtensionCDPURIDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPURIDuplicate)); } + bool IsExtensionCDPCRLIssuerDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPCRLIssuerDuplicate)); } + bool IsExtensionCDPDistPointDuplicate() { return (mEnabled && mFlags.Has(CertErrorFlags::kExtCDPDistPointDuplicate)); } bool IsSignatureError() { return (mEnabled && mFlags.Has(CertErrorFlags::kSignature)); } bool IsCertOversized() { return (mEnabled && mFlags.Has(CertErrorFlags::kCertOversized)); } @@ -368,26 +376,30 @@ class CertStructConfig kExtExtendedKeyUsage = 0x0000000002000000, // DA specific kExtAuthorityInfoAccess = 0x0000000004000000, // DA specific kExtSubjectAltName = 0x0000000008000000, // DA specific - kSignature = 0x0000000010000000, + kExtCRLDistributionPoints = 0x0000000010000000, // DA specific + kExtCDPURIDuplicate = 0x0000000020000000, // DA specific + kExtCDPCRLIssuerDuplicate = 0x0000000040000000, // DA specific + kExtCDPDistPointDuplicate = 0x0000000080000000, // DA specific + kSignature = 0x0000000100000000, // Op Cert Specific Flags: - kCertOversized = 0x0000000100000000, - kSerialNumberMissing = 0x0000000200000000, - kIssuerMissing = 0x0000000400000000, - kValidityNotBeforeMissing = 0x0000000800000000, - kValidityNotAfterMissing = 0x0000001000000000, - kValidityWrong = 0x0000002000000000, - kSubjectMissing = 0x0000004000000000, - kSubjectMatterIdMissing = 0x0000008000000000, - kSubjectNodeIdInvalid = 0x0000010000000000, - kSubjectMatterIdTwice = 0x0000020000000000, - kSubjectFabricIdMissing = 0x0000040000000000, - kSubjectFabricIdInvalid = 0x0000080000000000, - kSubjectFabricIdTwice = 0x0000100000000000, - kSubjectFabricIdMismatch = 0x0000200000000000, - kSubjectCATInvalid = 0x0000400000000000, - kSubjectCATTwice = 0x0000800000000000, - kExtExtendedKeyUsageMissing = 0x0001000000000000, + kCertOversized = 0x0000001000000000, + kSerialNumberMissing = 0x0000002000000000, + kIssuerMissing = 0x0000004000000000, + kValidityNotBeforeMissing = 0x0000008000000000, + kValidityNotAfterMissing = 0x0000010000000000, + kValidityWrong = 0x0000020000000000, + kSubjectMissing = 0x0000040000000000, + kSubjectMatterIdMissing = 0x0000080000000000, + kSubjectNodeIdInvalid = 0x0000100000000000, + kSubjectMatterIdTwice = 0x0000200000000000, + kSubjectFabricIdMissing = 0x0000400000000000, + kSubjectFabricIdInvalid = 0x0000800000000000, + kSubjectFabricIdTwice = 0x0001000000000000, + kSubjectFabricIdMismatch = 0x0002000000000000, + kSubjectCATInvalid = 0x0004000000000000, + kSubjectCATTwice = 0x0008000000000000, + kExtExtendedKeyUsageMissing = 0x0010000000000000, }; static constexpr uint32_t kExtraBufferLengthForOvesizedCert = 300; @@ -437,8 +449,7 @@ extern bool ResignCert(X509 * cert, X509 * caCert, EVP_PKEY * caKey); extern bool MakeAttCert(AttCertType attCertType, const char * subjectCN, uint16_t subjectVID, uint16_t subjectPID, bool encodeVIDandPIDasCN, X509 * caCert, EVP_PKEY * caKey, const struct tm & validFrom, uint32_t validDays, - X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, const FutureExtensionWithNID * exts, - uint8_t extsCount); + X509 * newCert, EVP_PKEY * newKey, CertStructConfig & certConfig, X509_EXTENSION * cdpExt); extern bool GenerateKeyPair(EVP_PKEY * key); extern bool GenerateKeyPair_Secp256k1(EVP_PKEY * key); extern bool ReadKey(const char * fileNameOrStr, std::unique_ptr & key, diff --git a/third_party/imgui/repo b/third_party/imgui/repo index 1109de38277fd2..19ae142bdddf9f 160000 --- a/third_party/imgui/repo +++ b/third_party/imgui/repo @@ -1 +1 @@ -Subproject commit 1109de38277fd2d14d4dca4c1cb8d4a2c4ff0f95 +Subproject commit 19ae142bdddf9fcb840549b4b1279739a36c3fa6 diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 4e73afe6ed21ed..e15b8d21d62a68 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 4e73afe6ed21edfc03057f2c97d541b57d0d01e9 +Subproject commit e15b8d21d62a68ac602c4f8dbfd6cb17d04bf06c diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index ab19ecbe1b9f37..09a356071fb9c2 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit ab19ecbe1b9f377ab4ee8e762bfe16c39068ad68 +Subproject commit 09a356071fb9c2a31671ad1cf982dc52d5fae1d2 diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 7f4c7fca2e72e2..e958f8827ede37 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 7f4c7fca2e72e2fee3c33f8acf14d36d1be205a6 +Subproject commit e958f8827ede37d543e962513d332d00dab6b1c3 diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index f4d0b3563c09d9..cf4291da443f5b 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit f4d0b3563c09d945478267fcff619a959cd3e9f6 +Subproject commit cf4291da443f5b2db18827747bb66499459de5bd diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 3267d87e9bd398..9c64cd951cd5d9 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -46,10 +46,16 @@ declare_args() { # Enable Segger System View use_system_view = false - # ICD Configuration flags - sl_ot_idle_interval_ms = 30000 # 30s Idle Intervals - sl_ot_active_interval_ms = 200 # 500ms Active Intervals - sl_active_mode_threshold = 1000 # 1s Active mode threshold + # ICD Openthread Configuration flags + sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals + sl_ot_active_interval_ms = 200 # 200ms Active Intervals + + # ICD Matter Configuration flags + sl_idle_mode_interval_ms = 600000 # 10min Idle Mode Interval + sl_active_mode_interval_ms = 1000 # 1s Active Mode Interval + sl_active_mode_threshold_ms = 500 # 500ms Active Mode Threshold + sl_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric + sl_use_subscription_synching = false silabs_log_enabled = true @@ -149,12 +155,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/system/inc", "${efr32_sdk_root}/platform/service/udelay/inc", "${efr32_sdk_root}/platform/service/legacy_hal/inc", - "${efr32_sdk_root}/platform/service/token_manager/config", - "${efr32_sdk_root}/platform/service/token_manager/inc", - "${efr32_sdk_root}/platform/service/token_manager/test", - "${efr32_sdk_root}/platform/service/token_manager/test/include", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/config", - "${efr32_sdk_root}/platform/service/token_manager/test/stack/include", "${efr32_sdk_root}/platform/middleware/glib", "${efr32_sdk_root}/platform/middleware/glib/config", "${efr32_sdk_root}/platform/middleware/glib/glib", @@ -181,6 +181,9 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/driver/debug/inc", "${silabs_gen_folder}/config", "${silabs_gen_folder}/autogen", + + # Headers needed for Init no function will be called if OT is not used + "${sl_ot_efr32_root}", ] if (silabs_family != "mgm24") { @@ -332,11 +335,21 @@ template("efr32_sdk") { if (chip_enable_icd_server) { defines += [ - "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", - "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", - "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold}", + "SL_ICD_ENABLED=1", + "SL_ACTIVE_MODE_THRESHOLD=${sl_active_mode_threshold_ms}", + "SL_ACTIVE_MODE_INTERVAL=${sl_active_mode_interval_ms}", + "SL_IDLE_MODE_INTERVAL=${sl_idle_mode_interval_ms}", + "SL_ICD_SUPPORTED_CLIENTS_PER_FABRIC=${sl_icd_supported_clients_per_fabric}", ] + if (defined(invoker.chip_enable_openthread) && + invoker.chip_enable_openthread) { + defines += [ + "SL_OT_IDLE_INTERVAL=${sl_ot_idle_interval_ms}", + "SL_OT_ACTIVE_INTERVAL=${sl_ot_active_interval_ms}", + ] + } + if (defined(invoker.chip_enable_wifi) && invoker.chip_enable_wifi) { defines += [ # Used for wifi devices to get packet details @@ -377,9 +390,15 @@ template("efr32_sdk") { "${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart", ] } + if (invoker.enable_dic) { _include_dirs += [ "${chip_root}/third_party/silabs/mqtt/stack" ] } + + if (sl_use_subscription_synching) { + defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ] + } + if (silabs_family == "efr32mg12") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Include", @@ -393,6 +412,7 @@ template("efr32_sdk") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg12_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM4_gcc.a", + "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg1x_gcc.a", ] if (!chip_enable_ble_rs911x) { @@ -400,26 +420,6 @@ template("efr32_sdk") { } defines += [ "EFR32MG12" ] - } else if (silabs_family == "efr32mg21") { - _include_dirs += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Include", - "${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg2x", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21/config", - "${efr32_sdk_root}/platform/service/device_init/config/s2/", - ] - - libs += [ - "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG21/GCC/libbluetooth.a", - "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg21_gcc_release.a", - "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", - ] - - defines += [ - "EFR32MG21", - "EFR32_SERIES2_CONFIG1_MICRO", - ] } else if (silabs_family == "efr32mg24") { _include_dirs += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Include", @@ -435,6 +435,7 @@ template("efr32_sdk") { "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", + "${sdk_support_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", ] defines += [ @@ -601,7 +602,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfrco.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager.c", - "${efr32_sdk_root}/platform/service/legacy_hal/src/token_legacy.c", "${efr32_sdk_root}/platform/service/mpu/src/sl_mpu.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager.c", "${efr32_sdk_root}/platform/service/power_manager/src/sl_power_manager_debug.c", @@ -612,9 +612,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_def.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manager.c", - "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manufacturing.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay_armv6m_gcc.S", "${efr32_sdk_root}/util/plugin/security_manager/security_manager.c", @@ -839,84 +836,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s1.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F/port.c", ] - } else if (silabs_family == "efr32mg21") { - sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/startup_efr32mg21.c", - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/system_efr32mg21.c", - "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rf_path/sl_rail_util_rf_path.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_alt/source/sl_se_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_gcm.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfrco.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", - ] } else if (silabs_family == "efr32mg24") { sources += [ "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/startup_efr32mg24.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/system_efr32mg24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_entropy.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_key_handling.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_signature.c", - "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_aes.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/se_jpake.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_key_management.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_opaque_key_derivation.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_aead.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_cipher.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_hash.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_driver_mac.c", - "${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_se_transparent_key_derivation.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", - "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", ] } else if (silabs_family == "mgm24") { sources += [ @@ -924,6 +849,12 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/Device/SiliconLabs/MGM24/Source/system_mgm24.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c", + "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", + ] + } + + if (silabs_family == "mgm24" || silabs_family == "efr32mg24") { + sources += [ "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_attestation.c", "${efr32_sdk_root}/platform/security/sl_component/se_manager/src/sl_se_manager_cipher.c", @@ -953,7 +884,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", - "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_mgm24.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfxo_s2.c", "${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager_hal_s2.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 433ccfc014ffe3..f76916640f577c 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 433ccfc014ffe313bf5cbc848478701778040ef2 +Subproject commit f76916640f577ce81db2ec361d560c77c2e21478 diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 6cef8dce3faef4..2e07f6be4d9132 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1444,6 +1444,12 @@ enum class GroupKeySecurityPolicyEnum : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 2, }; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kCacheAndSync = 0x1, +}; } // namespace GroupKeyManagement namespace FixedLabel {} // namespace FixedLabel diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index e92d7f7c750d82..cc148609f900ff 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -19841,7 +19841,9 @@ void registerClusterAny(Commands & commands, CredentialIssuerCommands * credsIss make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 7caa48359ca68f..d157cf5183082c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -32078,7 +32078,7 @@ class TestIcdManagementClusterSuite : public TestCommand { uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("idleModeInterval", value, 500UL)); + VerifyOrReturn(CheckValue("idleModeInterval", value, 2000UL)); } break; case 2: @@ -113404,7 +113404,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 48, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 64, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113471,21 +113471,66 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -113506,7 +113551,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 1110002ULL)); } break; - case 12: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType value; @@ -113516,19 +113561,22 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value.groupKeySetIDs, 0U)); } break; - case 13: + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + break; + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; - case 14: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 15: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113557,7 +113605,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 18: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113602,7 +113650,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 19: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113631,7 +113679,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 20: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113676,7 +113724,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 21: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113685,7 +113733,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 22: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113694,7 +113742,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 258U)); } break; - case 23: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113703,7 +113751,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 24: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113712,7 +113760,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 260U)); } break; - case 25: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; @@ -113721,7 +113769,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 261U)); } break; - case 26: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113790,7 +113838,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 27: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113873,7 +113921,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 28: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113900,7 +113948,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 29: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -113983,13 +114031,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 30: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 32: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114010,7 +114058,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 33: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -114031,7 +114079,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2110002ULL)); } break; - case 34: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; @@ -114040,7 +114088,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 257U)); } break; - case 35: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114095,10 +114143,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 36: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114111,28 +114159,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 38: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; - case 40: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 41: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 42: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114149,10 +114197,10 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } } break; - case 46: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 47: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -114224,7 +114272,430 @@ class TestGroupKeyManagementClusterSuite : public TestCommand GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "KeySet Write 1"); + LogStep(6, "KeySetWrite with EpochKey0 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNull(); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 7: { + LogStep(7, "KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNull(); + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 8: { + LogStep(8, "KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 0ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 9: { + LogStep(9, "KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\240garbage: not in length on purpose"), 1); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 10: { + LogStep(10, "KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 11: { + LogStep(11, "KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNull(); + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 12: { + LogStep(12, "KeySetWrite with EpochKey1 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNull(); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\260garbage: not in length on purpose"), 1); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 14: { + LogStep(14, "KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 15: { + LogStep(15, "KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 16: { + LogStep(16, "KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNull(); + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 17: { + LogStep(17, "KeySetWrite with EpochKey2 null fails INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNull(); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 18: { + LogStep(18, "KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("\300garbage: not in length on purpose"), 1); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 19: { + LogStep(19, "KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = + chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 1110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 20: { + LogStep(20, "KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 417U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 1110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 1110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 100ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 21: { + LogStep(21, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114258,8 +114729,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 7: { - LogStep(7, "KeySet Write 2 CacheAndSync"); + case 22: { + LogStep(22, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114294,8 +114765,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 8: { - LogStep(8, "KeySet Write 2 TrustFirst"); + case 23: { + LogStep(23, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114330,8 +114801,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 9: { - LogStep(9, "KeySet Write 3 CacheAndSync"); + case 24: { + LogStep(24, "KeySet Write 3 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114364,8 +114835,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 10: { - LogStep(10, "KeySet Write 3 TrustFirst"); + case 25: { + LogStep(25, "KeySet Write 3 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114398,8 +114869,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 11: { - LogStep(11, "KeySet Read"); + case 26: { + LogStep(26, "KeySet Read"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -114408,8 +114879,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 12: { - LogStep(12, "KeySet Read All Indices"); + case 27: { + LogStep(27, "KeySet Read All Indices"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, @@ -114417,8 +114888,43 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 13: { - LogStep(13, "Write Group Keys (invalid)"); + case 28: { + LogStep(28, "Write one keyset too many when already full"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 546U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 3110000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 3110001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char( + "\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377garbage: not in length on purpose"), + 16); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 3110002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 29: { + LogStep(29, "Write Group Keys (invalid)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114436,8 +114942,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 14: { - LogStep(14, "Write Group Keys (too many)"); + case 30: { + LogStep(30, "Write Group Keys (too many)"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114507,8 +115013,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 15: { - LogStep(15, "Write Group Keys on alpha"); + case 31: { + LogStep(31, "Write Group Keys on alpha"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114538,8 +115044,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Write Group Keys on beta"); + case 32: { + LogStep(32, "Write Group Keys on beta"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114569,28 +115075,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 17: { - LogStep(17, "Read Group Keys on alpha"); + case 33: { + LogStep(33, "Read Group Keys on alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read Group Keys on alpha without fabric filtering"); + case 34: { + LogStep(34, "Read Group Keys on alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 19: { - LogStep(19, "Read Group Keys on beta"); + case 35: { + LogStep(35, "Read Group Keys on beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Read Group Keys on beta without fabric filtering"); + case 36: { + LogStep(36, "Read Group Keys on beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, false, chip::NullOptional); } - case 21: { - LogStep(21, "Add Group 1"); + case 37: { + LogStep(37, "Add Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 257U; @@ -114599,8 +115105,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 22: { - LogStep(22, "Add Group 2"); + case 38: { + LogStep(38, "Add Group 2"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 258U; @@ -114609,8 +115115,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 23: { - LogStep(23, "Add Group 3"); + case 39: { + LogStep(39, "Add Group 3"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -114619,8 +115125,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 24: { - LogStep(24, "Add Group 4"); + case 40: { + LogStep(40, "Add Group 4"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 260U; @@ -114629,8 +115135,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 25: { - LogStep(25, "Add Group 5"); + case 41: { + LogStep(41, "Add Group 5"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 261U; @@ -114639,28 +115145,28 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 26: { - LogStep(26, "Read GroupTable from alpha"); + case 42: { + LogStep(42, "Read GroupTable from alpha"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read GroupTable from alpha without fabric filtering"); + case 43: { + LogStep(43, "Read GroupTable from alpha without fabric filtering"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 28: { - LogStep(28, "Read GroupTable from beta"); + case 44: { + LogStep(44, "Read GroupTable from beta"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read GroupTable from beta without fabric filtering"); + case 45: { + LogStep(45, "Read GroupTable from beta without fabric filtering"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, false, chip::NullOptional); } - case 30: { - LogStep(30, "KeySet Remove 1"); + case 46: { + LogStep(46, "KeySet Remove 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -114669,8 +115175,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 31: { - LogStep(31, "KeySet Read (removed)"); + case 47: { + LogStep(47, "KeySet Read (removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 417U; @@ -114679,8 +115185,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 32: { - LogStep(32, "KeySet Read (not removed) CacheAndSync"); + case 48: { + LogStep(48, "KeySet Read (not removed) CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -114690,8 +115196,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 33: { - LogStep(33, "KeySet Read (not removed) TrustFirst"); + case 49: { + LogStep(49, "KeySet Read (not removed) TrustFirst"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; @@ -114701,8 +115207,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 34: { - LogStep(34, "Remove Group 1"); + case 50: { + LogStep(50, "Remove Group 1"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveGroup::Type value; value.groupID = 257U; @@ -114711,13 +115217,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 35: { - LogStep(35, "Read GroupTable 2"); + case 51: { + LogStep(51, "Read GroupTable 2"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Remove All"); + case 52: { + LogStep(52, "Remove All"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, @@ -114725,13 +115231,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 37: { - LogStep(37, "Read GroupTable 3"); + case 53: { + LogStep(53, "Read GroupTable 3"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "KeySet Remove 2"); + case 54: { + LogStep(54, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -114740,8 +115246,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 39: { - LogStep(39, "KeySet Read (also removed)"); + case 55: { + LogStep(55, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -114750,8 +115256,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 40: { - LogStep(40, "KeySet Write 1"); + case 56: { + LogStep(56, "KeySet Write 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114785,8 +115291,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 41: { - LogStep(41, "KeySet Write 2 CacheAndSync"); + case 57: { + LogStep(57, "KeySet Write 2 CacheAndSync"); VerifyOrDo(!ShouldSkip("GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114821,8 +115327,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 42: { - LogStep(42, "KeySet Write 2 TrustFirst"); + case 58: { + LogStep(58, "KeySet Write 2 TrustFirst"); VerifyOrDo(!ShouldSkip("!GRPKEY.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; @@ -114857,8 +115363,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 43: { - LogStep(43, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); + case 59: { + LogStep(59, "Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2"); ListFreer listFreer; chip::app::DataModel::List value; @@ -114884,8 +115390,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 44: { - LogStep(44, "Remove keyset 1"); + case 60: { + LogStep(60, "Remove keyset 1"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 417U; @@ -114894,13 +115400,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 45: { - LogStep(45, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); + case 61: { + LogStep(61, "TH verifies GroupKeyMap entries for KeySet 1 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Remove keyset 2"); + case 62: { + LogStep(62, "Remove keyset 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -114909,8 +115415,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 47: { - LogStep(47, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); + case 63: { + LogStep(63, "TH verifies GroupKeyMap entries for KeySet 2 have been removed"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index a7e81dca8316ac..e753c024da9f07 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -43148,7 +43148,7 @@ class TestIcdManagementCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 500UL)); + VerifyOrReturn(CheckValue("IdleModeInterval", actualValue, 2000UL)); } NextTest(); @@ -175716,204 +175716,276 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestReadMaxGroupKeysPerFabric_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : KeySet Write 1\n"); - err = TestKeySetWrite1_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : KeySetWrite with EpochKey0 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : KeySet Write 2 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2CacheAndSync_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : KeySet Write 2 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite2TrustFirst_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : KeySet Write 3 CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3CacheAndSync_9(); + ChipLogProgress( + chipTool, " ***** Test Step 9 : KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : KeySet Write 3 TrustFirst\n"); - if (ShouldSkip("!GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetWrite3TrustFirst_10(); + ChipLogProgress( + chipTool, " ***** Test Step 10 : KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : KeySet Read\n"); - err = TestKeySetRead_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Read All Indices\n"); - err = TestKeySetReadAllIndices_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : KeySetWrite with EpochKey1 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Write Group Keys (invalid)\n"); - err = TestWriteGroupKeysInvalid_13(); + ChipLogProgress( + chipTool, " ***** Test Step 13 : KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Write Group Keys (too many)\n"); - err = TestWriteGroupKeysTooMany_14(); + ChipLogProgress( + chipTool, " ***** Test Step 14 : KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Write Group Keys on alpha\n"); - err = TestWriteGroupKeysOnAlpha_15(); + ChipLogProgress(chipTool, + " ***** Test Step 15 : KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Write Group Keys on beta\n"); - err = TestWriteGroupKeysOnBeta_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read Group Keys on alpha\n"); - err = TestReadGroupKeysOnAlpha_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : KeySetWrite with EpochKey2 null fails INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read Group Keys on alpha without fabric filtering\n"); - err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_18(); + ChipLogProgress( + chipTool, " ***** Test Step 18 : KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read Group Keys on beta\n"); - err = TestReadGroupKeysOnBeta_19(); + ChipLogProgress( + chipTool, " ***** Test Step 19 : KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR\n"); + err = TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read Group Keys on beta without fabric filtering\n"); - err = TestReadGroupKeysOnBetaWithoutFabricFiltering_20(); + ChipLogProgress(chipTool, + " ***** Test Step 20 : KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND\n"); + err = TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Add Group 1\n"); - err = TestAddGroup1_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : KeySet Write 1\n"); + err = TestKeySetWrite1_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Add Group 2\n"); - err = TestAddGroup2_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Add Group 3\n"); - err = TestAddGroup3_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : KeySet Write 2 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2TrustFirst_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Add Group 4\n"); - err = TestAddGroup4_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : KeySet Write 3 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3CacheAndSync_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Add Group 5\n"); - err = TestAddGroup5_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : KeySet Write 3 TrustFirst\n"); + if (ShouldSkip("!GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite3TrustFirst_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read GroupTable from alpha\n"); - err = TestReadGroupTableFromAlpha_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : KeySet Read\n"); + err = TestKeySetRead_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read GroupTable from alpha without fabric filtering\n"); - err = TestReadGroupTableFromAlphaWithoutFabricFiltering_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : KeySet Read All Indices\n"); + err = TestKeySetReadAllIndices_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read GroupTable from beta\n"); - err = TestReadGroupTableFromBeta_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Write one keyset too many when already full\n"); + err = TestWriteOneKeysetTooManyWhenAlreadyFull_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read GroupTable from beta without fabric filtering\n"); - err = TestReadGroupTableFromBetaWithoutFabricFiltering_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : KeySet Remove 1\n"); - err = TestKeySetRemove1_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Write Group Keys (too many)\n"); + err = TestWriteGroupKeysTooMany_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Write Group Keys on alpha\n"); + err = TestWriteGroupKeysOnAlpha_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : KeySet Read (not removed) CacheAndSync\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedCacheAndSync_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Write Group Keys on beta\n"); + err = TestWriteGroupKeysOnBeta_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : KeySet Read (not removed) TrustFirst\n"); - if (ShouldSkip("GRPKEY.S.F00")) { - NextTest(); - return; - } - err = TestKeySetReadNotRemovedTrustFirst_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read Group Keys on alpha\n"); + err = TestReadGroupKeysOnAlpha_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Remove Group 1\n"); - err = TestRemoveGroup1_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read Group Keys on alpha without fabric filtering\n"); + err = TestReadGroupKeysOnAlphaWithoutFabricFiltering_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read GroupTable 2\n"); - err = TestReadGroupTable2_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read Group Keys on beta\n"); + err = TestReadGroupKeysOnBeta_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Remove All\n"); - err = TestRemoveAll_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read Group Keys on beta without fabric filtering\n"); + err = TestReadGroupKeysOnBetaWithoutFabricFiltering_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read GroupTable 3\n"); - err = TestReadGroupTable3_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Add Group 1\n"); + err = TestAddGroup1_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : KeySet Remove 2\n"); - err = TestKeySetRemove2_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Add Group 2\n"); + err = TestAddGroup2_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Add Group 3\n"); + err = TestAddGroup3_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : KeySet Write 1\n"); - err = TestKeySetWrite1_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Add Group 4\n"); + err = TestAddGroup4_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : KeySet Write 2 CacheAndSync\n"); + ChipLogProgress(chipTool, " ***** Test Step 41 : Add Group 5\n"); + err = TestAddGroup5_41(); + break; + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : Read GroupTable from alpha\n"); + err = TestReadGroupTableFromAlpha_42(); + break; + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : Read GroupTable from alpha without fabric filtering\n"); + err = TestReadGroupTableFromAlphaWithoutFabricFiltering_43(); + break; + case 44: + ChipLogProgress(chipTool, " ***** Test Step 44 : Read GroupTable from beta\n"); + err = TestReadGroupTableFromBeta_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Read GroupTable from beta without fabric filtering\n"); + err = TestReadGroupTableFromBetaWithoutFabricFiltering_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : KeySet Remove 1\n"); + err = TestKeySetRemove1_46(); + break; + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : KeySet Read (not removed) CacheAndSync\n"); if (ShouldSkip("GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2CacheAndSync_41(); + err = TestKeySetReadNotRemovedCacheAndSync_48(); break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : KeySet Write 2 TrustFirst\n"); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : KeySet Read (not removed) TrustFirst\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetReadNotRemovedTrustFirst_49(); + break; + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : Remove Group 1\n"); + err = TestRemoveGroup1_50(); + break; + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : Read GroupTable 2\n"); + err = TestReadGroupTable2_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Remove All\n"); + err = TestRemoveAll_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Read GroupTable 3\n"); + err = TestReadGroupTable3_53(); + break; + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : KeySet Remove 2\n"); + err = TestKeySetRemove2_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_55(); + break; + case 56: + ChipLogProgress(chipTool, " ***** Test Step 56 : KeySet Write 1\n"); + err = TestKeySetWrite1_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : KeySet Write 2 CacheAndSync\n"); + if (ShouldSkip("GRPKEY.S.F00")) { + NextTest(); + return; + } + err = TestKeySetWrite2CacheAndSync_57(); + break; + case 58: + ChipLogProgress(chipTool, " ***** Test Step 58 : KeySet Write 2 TrustFirst\n"); if (ShouldSkip("!GRPKEY.S.F00")) { NextTest(); return; } - err = TestKeySetWrite2TrustFirst_42(); + err = TestKeySetWrite2TrustFirst_58(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); - err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43(); + case 59: + ChipLogProgress(chipTool, " ***** Test Step 59 : Map Group 1 and Group 2 to KeySet 1 and group 2 to KeySet 2\n"); + err = TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Remove keyset 1\n"); - err = TestRemoveKeyset1_44(); + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Remove keyset 1\n"); + err = TestRemoveKeyset1_60(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45(); + case 61: + ChipLogProgress(chipTool, " ***** Test Step 61 : TH verifies GroupKeyMap entries for KeySet 1 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61(); break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Remove keyset 2\n"); - err = TestRemoveKeyset2_46(); + case 62: + ChipLogProgress(chipTool, " ***** Test Step 62 : Remove keyset 2\n"); + err = TestRemoveKeyset2_62(); break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); - err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47(); + case 63: + ChipLogProgress(chipTool, " ***** Test Step 63 : TH verifies GroupKeyMap entries for KeySet 2 have been removed\n"); + err = TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63(); break; } @@ -175945,49 +176017,49 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176011,16 +176083,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176044,7 +176116,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -176068,6 +176140,54 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 58: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 61: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 62: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -176083,7 +176203,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 48; + const uint16_t mTestCount = 64; chip::Optional mNodeId; chip::Optional mCluster; @@ -176183,7 +176303,620 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_6() + CHIP_ERROR TestKeySetWriteWithEpochKey0NullFailsInvalidCommand_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime0NullFailsInvalidCommand_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime0 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime0SetToZeroFailsInvalidCommand_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:0ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime0 set to zero fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength116FailsWithConstraintError_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\240" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey0WithLength016FailsWithConstraintError_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey0 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime1NullFailsInvalidCommand_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime1 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1NullFailsInvalidCommand_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength116FailsWithConstraintError_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"\260" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey1WithLength016FailsWithConstraintError_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey1 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime1NotLaterThanEpochStart0FailsWithInvalidCommand_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"KeySetWrite with EpochStartTime1 not later than EpochStart0 fails with INVALID_COMMAND Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime2NullFailsInvalidCommand_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = nil; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochStartTime2 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2NullFailsInvalidCommand_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = nil; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 null fails INVALID_COMMAND Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength116FailsWithConstraintError_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"\300" + length:1]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 with length 1 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochKey2WithLength016FailsWithConstraintError_19() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = [[NSData alloc] initWithBytes:"" + length:0]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"KeySetWrite with EpochKey2 with length 0 != 16 fails with CONSTRAINT_ERROR Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWriteWithEpochStartTime2NotLaterThanEpochStart1FailsWithInvalidCommand_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:100ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog( + @"KeySetWrite with EpochStartTime2 not later than EpochStart1 fails with INVALID_COMMAND Error: %@", + err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_INVALID_COMMAND)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetWrite1_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176223,7 +176956,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_7() + CHIP_ERROR TestKeySetWrite2CacheAndSync_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176263,7 +176996,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_8() + CHIP_ERROR TestKeySetWrite2TrustFirst_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176303,7 +177036,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite3CacheAndSync_9() + CHIP_ERROR TestKeySetWrite3CacheAndSync_24() { MTRBaseDevice * device = GetDevice("beta"); @@ -176343,7 +177076,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite3TrustFirst_10() + CHIP_ERROR TestKeySetWrite3TrustFirst_25() { MTRBaseDevice * device = GetDevice("beta"); @@ -176383,7 +177116,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRead_11() + CHIP_ERROR TestKeySetRead_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176434,7 +177167,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAllIndices_12() + CHIP_ERROR TestKeySetReadAllIndices_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176459,7 +177192,50 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysInvalid_13() + CHIP_ERROR TestWriteOneKeysetTooManyWhenAlreadyFull_28() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:546U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\321\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:3110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\341\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:3110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\361\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:3110002ULL]; + + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Write one keyset too many when already full Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) + : 0, + EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteGroupKeysInvalid_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176494,7 +177270,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysTooMany_14() + CHIP_ERROR TestWriteGroupKeysTooMany_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176594,7 +177370,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnAlpha_15() + CHIP_ERROR TestWriteGroupKeysOnAlpha_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176640,7 +177416,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteGroupKeysOnBeta_16() + CHIP_ERROR TestWriteGroupKeysOnBeta_32() { MTRBaseDevice * device = GetDevice("beta"); @@ -176686,7 +177462,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlpha_17() + CHIP_ERROR TestReadGroupKeysOnAlpha_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176748,7 +177524,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_18() + CHIP_ERROR TestReadGroupKeysOnAlphaWithoutFabricFiltering_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -176842,7 +177618,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBeta_19() + CHIP_ERROR TestReadGroupKeysOnBeta_35() { MTRBaseDevice * device = GetDevice("beta"); @@ -176904,7 +177680,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_20() + CHIP_ERROR TestReadGroupKeysOnBetaWithoutFabricFiltering_36() { MTRBaseDevice * device = GetDevice("beta"); @@ -176998,7 +177774,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup1_21() + CHIP_ERROR TestAddGroup1_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177030,7 +177806,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup2_22() + CHIP_ERROR TestAddGroup2_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177062,7 +177838,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup3_23() + CHIP_ERROR TestAddGroup3_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177094,7 +177870,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup4_24() + CHIP_ERROR TestAddGroup4_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177126,7 +177902,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestAddGroup5_25() + CHIP_ERROR TestAddGroup5_41() { MTRBaseDevice * device = GetDevice("beta"); @@ -177158,7 +177934,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlpha_26() + CHIP_ERROR TestReadGroupTableFromAlpha_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177247,7 +178023,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_27() + CHIP_ERROR TestReadGroupTableFromAlphaWithoutFabricFiltering_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177351,7 +178127,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBeta_28() + CHIP_ERROR TestReadGroupTableFromBeta_44() { MTRBaseDevice * device = GetDevice("beta"); @@ -177395,7 +178171,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_29() + CHIP_ERROR TestReadGroupTableFromBetaWithoutFabricFiltering_45() { MTRBaseDevice * device = GetDevice("beta"); @@ -177499,7 +178275,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_30() + CHIP_ERROR TestKeySetRemove1_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177522,7 +178298,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_31() + CHIP_ERROR TestKeySetReadRemoved_47() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177549,7 +178325,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_32() + CHIP_ERROR TestKeySetReadNotRemovedCacheAndSync_48() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177600,7 +178376,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_33() + CHIP_ERROR TestKeySetReadNotRemovedTrustFirst_49() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177651,7 +178427,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveGroup1_34() + CHIP_ERROR TestRemoveGroup1_50() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177682,7 +178458,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable2_35() + CHIP_ERROR TestReadGroupTable2_51() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177756,7 +178532,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_36() + CHIP_ERROR TestRemoveAll_52() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177774,7 +178550,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable3_37() + CHIP_ERROR TestReadGroupTable3_53() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177803,7 +178579,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_38() + CHIP_ERROR TestKeySetRemove2_54() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177826,7 +178602,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_39() + CHIP_ERROR TestKeySetReadAlsoRemoved_55() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177853,7 +178629,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite1_40() + CHIP_ERROR TestKeySetWrite1_56() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177893,7 +178669,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2CacheAndSync_41() + CHIP_ERROR TestKeySetWrite2CacheAndSync_57() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177933,7 +178709,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetWrite2TrustFirst_42() + CHIP_ERROR TestKeySetWrite2TrustFirst_58() { MTRBaseDevice * device = GetDevice("alpha"); @@ -177973,7 +178749,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_43() + CHIP_ERROR TestMapGroup1AndGroup2ToKeySet1AndGroup2ToKeySet2_59() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178014,7 +178790,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset1_44() + CHIP_ERROR TestRemoveKeyset1_60() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178037,7 +178813,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_45() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet1HaveBeenRemoved_61() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178075,7 +178851,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveKeyset2_46() + CHIP_ERROR TestRemoveKeyset2_62() { MTRBaseDevice * device = GetDevice("alpha"); @@ -178098,7 +178874,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_47() + CHIP_ERROR TestThVerifiesGroupKeyMapEntriesForKeySet2HaveBeenRemoved_63() { MTRBaseDevice * device = GetDevice("alpha");