diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index dc47f2772e8b55..7e63af38cb99c8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.6.47" + "BUILD_VERSION": "0.7.0" } }, "remoteUser": "vscode", diff --git a/.flake8 b/.flake8 index eb983226f07b05..fe0075bf560c49 100644 --- a/.flake8 +++ b/.flake8 @@ -90,6 +90,7 @@ exclude = third_party src/controller/python/chip/yaml/__init__.py src/controller/python/chip/yaml/format_converter.py src/controller/python/chip/yaml/runner.py + src/controller/python/py_matter_yamltest_repl_adapter/matter_yamltest_repl_adapter/runner.py src/lib/asn1/gen_asn1oid.py src/pybindings/pycontroller/build-chip-wheel.py src/pybindings/pycontroller/pychip/__init__.py diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2d43504f1cd83d..4b91d6cb46ff81 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -434,6 +434,7 @@ Dnsmasq dnsmasqd DNSSD DNSStubListener +docbuild Dockerfile Dockerfiles Don'ts @@ -984,6 +985,7 @@ otatesting otaURL OTBR otcli +outform outgoingCommands OxygenConcentrationMeasurement OzoneConcentrationMeasurement @@ -1023,6 +1025,7 @@ Pigweed PinCode pinrequest pkgconfig +PKI plaintext PlatformManager PlatformManagerImpl @@ -1179,6 +1182,7 @@ sdkconfig SDKs SDKTARGETSYSROOT sdl +SecureCertDACProvider SED SEGGER semver diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index b5de443569d2e6..17b890acb8d618 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d0daa83fc2fd35..3db04035806804 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -60,7 +60,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -148,7 +148,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -177,7 +177,7 @@ jobs: # with: # languages: "cpp" - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -261,6 +261,8 @@ jobs: run: | ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" mv scripts/codegen.py scripts/codegen.py.renamed + - name: Clean output + run: rm -rf ./out - name: Build using build_examples.py (pregen) timeout-minutes: 60 run: | @@ -273,10 +275,10 @@ jobs: " - name: Check no code generation in output run: | - CNT=$(find -name "CHIPClusters.h" out | wc -l) + CNT=$(find out -name "CHIPClusters.h" | wc -l) if [ "${CNT}" != "0" ]; then echo "ERROR: found unexpected generated files:" - find -name "CHIPClusters.h" out + find out -name "CHIPClusters.h" exit 1 fi - name: Undo code pre-generation changes (make compile time codegen work again) @@ -318,7 +320,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -342,7 +344,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 @@ -398,7 +400,7 @@ jobs: # with: # languages: "cpp" - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Try to ensure the directory for diagnostic log collection exists run: | mkdir -p ~/Library/Logs/DiagnosticReports || true @@ -485,7 +487,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -501,7 +503,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index ab8622f64be6c4..1581ab30078ba0 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -30,7 +30,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 options: --user root steps: @@ -43,7 +43,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 timeout-minutes: 10 @@ -66,7 +66,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.47 + image: connectedhomeip/chip-build-esp32:0.7.0 options: --user root steps: @@ -79,7 +79,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform esp32 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - name: Bootstrap cache uses: actions/cache@v3 timeout-minutes: 10 @@ -102,7 +102,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.6.47 + image: connectedhomeip/chip-build-nrf-platform:0.7.0 options: --user root steps: @@ -115,7 +115,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform nrfconnect + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect - name: Bootstrap cache uses: actions/cache@v3 timeout-minutes: 10 diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index ea5d4c3755c56d..3ba684577149de 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 90 env: - DOCKER_RUN_VERSION: 0.6.47 + DOCKER_RUN_VERSION: 0.7.0 GITHUB_CACHE_PATH: /tmp/cirque-cache runs-on: ubuntu-latest @@ -39,7 +39,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: connectedhomeip/chip-build-cirque:0.6.47 + # image: connectedhomeip/chip-build-cirque:0.7.0 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" @@ -58,7 +58,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index a0c8642d557d04..5e4d26d27e41c3 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -54,7 +54,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -121,6 +121,19 @@ jobs: --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " + - name: Run OTA Test + timeout-minutes: 5 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/tests/run_darwin_framework_ota_test.py \ + run \ + --darwin-framework-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \ + --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ + --ota-data-file /tmp/rawImage \ + --ota-image-file /tmp/otaImage \ + --ota-destination-file /tmp/downloadedImage \ + --ota-candidate-file /tmp/otaCandidateJSON \ + " - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 5f054d177001bb..2a7c3642919323 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -42,7 +42,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment run: brew install python@3.9 @@ -68,7 +68,7 @@ jobs: - name: Block zap-cli from being used # xcodebuild is NOT expected to require zap-cli - run: scripts/run_in_build_env.sh 'mv $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli.moved' + run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved' - name: Validate zap-cli is NOT available # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' @@ -112,7 +112,7 @@ jobs: run: xcodebuild clean working-directory: src/darwin/Framework - name: Make zap-cli work again - run: scripts/run_in_build_env.sh 'mv $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli.moved $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli' + run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli.moved)) && mv $D/zap-cli.moved $D/zap-cli' - name: Validate zap-cli is again available run: scripts/run_in_build_env.sh 'zap-cli --version' - name: Build example All Clusters Server @@ -126,7 +126,7 @@ jobs: - name: Build example OTA Requestor timeout-minutes: 10 run: | - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false + 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 - name: Delete Defaults run: defaults delete com.apple.dt.xctest.tool continue-on-error: true @@ -139,6 +139,12 @@ jobs: run: | mkdir -p /tmp/darwin/framework-tests ../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + # Make each ota-requestor is using a different port, discriminator, and KVS from + # all-clusters-app and from other requestors. + # + # 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) & xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) working-directory: src/darwin/Framework - name: Uploading log files diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 692ab763340db7..7c24e5fb5c776f 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-doxygen:0.6.47 + image: connectedhomeip/chip-build-doxygen:0.7.0 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 3ed0d5a866bc15..b902a3815838c1 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: connectedhomeip/chip-build-ameba:0.6.47 + image: connectedhomeip/chip-build-ameba:0.7.0 options: --user root steps: @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform ameba + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ameba - name: Bootstrap cache uses: actions/cache@v3 timeout-minutes: 10 diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 1760458c2b03ab..e7fbe4a8a13856 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-bouffalolab:0.6.47 + image: connectedhomeip/chip-build-bouffalolab:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform bouffalolab --recursive + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform bouffalolab --recursive - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 254c4a041c8ccf..2e0bee2f65cd3a 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.47 + image: connectedhomeip/chip-build-ti:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -51,7 +51,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform cc13x2_26x2 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13x2_26x2 - name: Set up environment for size reports if: ${{ !env.ACT }} env: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index fed502b34d7530..4ebc1114cfc35d 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.47 + image: connectedhomeip/chip-build-ti:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -48,7 +48,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform cc32xx + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc32xx - name: Set up environment for size reports if: ${{ !env.ACT }} env: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 084226e14510a0..ce2163d1581b18 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.6.50 + image: connectedhomeip/chip-build-efr32:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -52,7 +52,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform silabs_docker + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform silabs_docker # - name: Out of Tree verification # run: third_party/silabs/out_of_tree_verification.sh @@ -82,7 +82,11 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - + - name: Test SLC gen + timeout-minutes: 30 + run: | + scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32 ./out/light-app BRD4187C --slc_generate --docker + rm -rf ./out/ - name: Build some BRD4187C variants timeout-minutes: 90 run: | diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 74dee213b71be8..42cf0bdf72839c 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.47 + image: connectedhomeip/chip-build-esp32:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform esp32 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -87,10 +87,18 @@ jobs: build \ --copy-artifacts-to out/artifacts \ " + - name: Prepare bloat report + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + esp32 m5stack all-clusters-app \ + out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \ + /tmp/bloat_reports/ - name: Prepare code pregen and ensure compile time pregen not possible run: | ./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated" mv scripts/codegen.py scripts/codegen.py.renamed + - name: Clean output + run: rm -rf ./out - name: Build some M5Stack variations with pregen timeout-minutes: 60 run: | @@ -105,22 +113,16 @@ jobs: " - name: Check no code generation in output run: | - CNT=$(find -name "CHIPClusters.h" out | wc -l) + CNT=$(find out -name "CHIPClusters.h" | wc -l) if [ "${CNT}" != "0" ]; then echo "ERROR: found unexpected generated files:" - find -name "CHIPClusters.h" out + find out -name "CHIPClusters.h" exit 1 fi - name: Undo code pregeneration changes run: | rm -rf ./zzz_pregenerated mv scripts/codegen.py.renamed scripts/codegen.py - - name: Prepare bloat report - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - esp32 m5stack all-clusters-app \ - out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \ - /tmp/bloat_reports/ - name: Build example All Clusters App C3 timeout-minutes: 15 run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults @@ -158,7 +160,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.47 + image: connectedhomeip/chip-build-esp32:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -172,7 +174,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform esp32 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 46db43bca68fa7..b3f3e946e53b49 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.6.47 + image: connectedhomeip/chip-build-infineon:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform infineon + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform infineon - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 77b9826f6f8231..a9c405d010fd4a 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.6.47 + image: connectedhomeip/chip-build-k32w:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -51,7 +51,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform k32w0 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform k32w0 - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index f0b78a5b46b383..0d949bdc748b97 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.6.47 + image: connectedhomeip/chip-build-crosscompile:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index ded33cb5756ae9..1c6220bdca5fb7 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-imx:0.6.47 + image: connectedhomeip/chip-build-imx:0.7.0 steps: - uses: Wandalen/wretry.action@v1.0.36 @@ -47,7 +47,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 8d2d87f067b916..fc40301b2b9249 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -49,7 +49,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 53da5ba28ba613..dadbb5eff3d476 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.6.47 + image: connectedhomeip/chip-build-mbed-os:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -55,7 +55,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform mbed + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mbed - name: Detect changed paths uses: dorny/paths-filter@v2 diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 1aea2f34557a52..36f7c9cdb26c2e 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -51,7 +51,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform mw320 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mw320 - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 4f0efb889359c8..2c4a318ee6ed9a 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.6.47 + image: connectedhomeip/chip-build-nrf-platform:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -52,7 +52,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform nrfconnect + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect - name: Detect changed paths uses: dorny/paths-filter@v2 id: changed_paths @@ -99,7 +99,9 @@ jobs: run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" - name: Run unit tests of factory data generation script timeout-minutes: 15 - run: scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" + run: | + scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.nrfconnect.txt' + scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" - name: Build example nRF Connect SDK Lock App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' timeout-minutes: 15 diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index ddf3868d878cc1..2e3af4d79473ef 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-openiotsdk:0.6.47 + image: connectedhomeip/chip-build-openiotsdk:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged @@ -51,7 +51,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --recursive --platform openiotsdk + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 65376a17a86490..3320d618d07798 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -51,7 +51,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform qpg + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform qpg - name: Set up environment for size reports if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index e94962ca7b8d23..2ebd9923551732 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.6.47 + image: connectedhomeip/chip-build-telink:0.6.53 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -50,7 +50,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform telink + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform telink - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -144,7 +144,7 @@ jobs: - name: Build example Telink Lighting App with Factory Data run: | - ./scripts/checkout_submodules.py --shallow --platform linux + ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux ./scripts/build/gn_gen.sh ./scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE chip-cert chip-tool spake2p" ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index b5d4c33ece6542..2946170d872793 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.6.47 + image: connectedhomeip/chip-build-tizen:0.7.0 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -50,7 +50,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform tizen + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index d28d3fb1679b2d..76bc42944c7fcc 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.47 + image: connectedhomeip/chip-build-android:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -61,7 +61,7 @@ jobs: if: ${{ env.ACT }} name: Checkout (ACT for local build) - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform android + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index ae4658086ced6b..82aa03af5cef67 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index caac210d7dfa91..5125f69106bef0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -54,7 +54,7 @@ jobs: # Bootstrap and checkout for internal scripts (like idl_lint) # to run - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 timeout-minutes: 10 @@ -79,10 +79,7 @@ jobs: # https://github.com/project-chip/connectedhomeip/issues/19169 # https://github.com/project-chip/connectedhomeip/issues/22640 if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter' ]; then continue; fi if [ "$idl_file" = './examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter' ]; then continue; fi @@ -221,3 +218,12 @@ jobs: if: always() run: | flake8 --extend-ignore=E501,W391 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)" + if: always() + run: | + git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index c91e378691d976..9cff443cfeb0c3 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.6.47 + image: connectedhomeip/chip-build-esp32-qemu:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -53,7 +53,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform esp32 + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - name: Bootstrap cache uses: actions/cache@v3 @@ -103,7 +103,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen-qemu:0.6.47 + image: connectedhomeip/chip-build-tizen-qemu:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -117,7 +117,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform tizen + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index b43247453230fb..f725931e760da5 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.6.47 + image: connectedhomeip/chip-build-esp32:0.7.0 steps: - uses: Wandalen/wretry.action@v1.0.36 @@ -85,7 +85,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.6.47 + image: connectedhomeip/chip-build-efr32:0.7.0 steps: - uses: Wandalen/wretry.action@v1.0.36 name: Checkout diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 90987df038cb79..ba1124b23af05a 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.47 + image: connectedhomeip/chip-build-android:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -52,7 +52,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform android + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/smoketest-darwin.yaml b/.github/workflows/smoketest-darwin.yaml index d4b06f4f2d3c89..abf9ce606e8402 100644 --- a/.github/workflows/smoketest-darwin.yaml +++ b/.github/workflows/smoketest-darwin.yaml @@ -42,7 +42,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment run: brew install python@3.9 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2eda3b67aa45fd..f52c3ccf8f1d7d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -72,7 +72,7 @@ jobs: if: ${{ env.ACT }} name: Checkout (ACT for local build) - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -324,7 +324,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -442,7 +442,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -450,7 +450,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -499,6 +499,7 @@ jobs: scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1 --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_TestEventTrigger.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --bool-arg allow_sdk_dac:true"' scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_ACE_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --int-arg PIXIT.ACE.APPENDPOINT:1 PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff PIXIT.ACE.APPATTRIBUTE:OnOff"' scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' + scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} @@ -528,7 +529,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-java:0.6.47 + image: connectedhomeip/chip-build-java:0.7.0 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -536,7 +537,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -705,7 +706,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform darwin + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment # coreutils for stdbuf run: brew install coreutils diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 540e4a9563f283..7623e8082c97cd 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -53,7 +53,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap timeout-minutes: 10 run: | diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 257b86e81914a7..406e546a6b4a96 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 defaults: run: shell: sh @@ -45,7 +45,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index d1a846b9968cb0..9e0febe3f817c0 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.47 + image: connectedhomeip/chip-build:0.7.0 defaults: run: shell: sh @@ -46,7 +46,7 @@ jobs: attempt_limit: 3 attempt_delay: 2000 - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform linux + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - name: Bootstrap cache uses: actions/cache@v3 diff --git a/README.md b/README.md index 03e41c39f2b448..1dd90182ee5181 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Builds](https://github.com/project-chip/connectedhomeip/workflows/Builds/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/build.yaml) +**Examples:** [![Examples - EFR32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20EFR32/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-efr32.yaml) [![Examples - ESP32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ESP32/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-esp32.yaml) [![Examples - i.MX Linux](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20i.MX%20Linux/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-linux-imx.yaml) @@ -14,14 +15,22 @@ [![Build example - Infineon](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-infineon.yaml) [![Build example - BouffaloLab](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20BouffaloLab/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/examples-bouffalolab.yaml) +**Platforms:** [![Android](https://github.com/project-chip/connectedhomeip/workflows/Android/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/android.yaml) +**Tests:** [![Unit / Integration Tests](https://github.com/project-chip/connectedhomeip/workflows/Unit%20/%20Integration%20Tests/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/unit_integration_test.yaml) [![Cirque](https://github.com/project-chip/connectedhomeip/workflows/Cirque/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/cirque.yaml) [![QEMU](https://github.com/project-chip/connectedhomeip/workflows/QEMU/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/qemu.yaml) +**Tools:** [![ZAP Templates](https://github.com/project-chip/connectedhomeip/workflows/ZAP/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/zap_templates.yaml) +**Documentation:** +[![Documentation Build](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml/badge.svg)](https://github.com/project-chip/connectedhomeip/actions/workflows/docbuild.yaml) + +- [Matter SDK documentation page](https://project-chip.github.io/connectedhomeip-doc/index.html) + # About Matter (formerly Project CHIP) creates more connections between more objects, @@ -180,26 +189,26 @@ Instructions about how to build Matter can be found [here](./docs/README.md) . The Matter repository is structured as follows: -| File/Folder | Content | -| ------------------ | ------------------------------------------------------------------ | -| build | Build system support content and built output directories | -| build_overrides | Build system parameter customization for different platforms | -| config | Project configurations | -| credentials | Development and test credentials | -| docs | Documentation, including guides | -| examples | Example firmware applications that demonstrate use of Matter | -| integrations | 3rd Party integrations | -| scripts | Scripts needed to work with the Matter repository | -| src | Implementation of Matter | -| third_party | 3rd party code used by Matter | -| zzz_generated | zap generated template code - Revolving around cluster information | -| BUILD.gn | Build file for the gn build system | -| CODE_OF_CONDUCT.md | Code of conduct for Matter and contribution to it | -| CONTRIBUTING.md | Guidelines for contributing to Matter | -| LICENSE | Matter license file | -| REVIEWERS.md | PR reviewers | -| gn_build.sh | Build script for specific projects such as Android, EFR32, etc. | -| README.md | This File | +| File/Folder | Content | +| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| build | Build system support content and built output directories | +| build_overrides | Build system parameter customization for different platforms | +| config | Project configurations | +| credentials | Development and test credentials | +| docs | Documentation, including guides. Visit the [Matter SDK documentation page](https://project-chip.github.io/connectedhomeip-doc/index.html) to read it. | +| examples | Example firmware applications that demonstrate use of Matter | +| integrations | 3rd Party integrations | +| scripts | Scripts needed to work with the Matter repository | +| src | Implementation of Matter | +| third_party | 3rd party code used by Matter | +| zzz_generated | zap generated template code - Revolving around cluster information | +| BUILD.gn | Build file for the gn build system | +| CODE_OF_CONDUCT.md | Code of conduct for Matter and contribution to it | +| CONTRIBUTING.md | Guidelines for contributing to Matter | +| LICENSE | Matter license file | +| REVIEWERS.md | PR reviewers | +| gn_build.sh | Build script for specific projects such as Android, EFR32, etc. | +| README.md | This File | # License diff --git a/build/chip/fuzz_test.gni b/build/chip/fuzz_test.gni index 3d101c21e03762..7d40a70851a222 100644 --- a/build/chip/fuzz_test.gni +++ b/build/chip/fuzz_test.gni @@ -45,17 +45,21 @@ template("chip_fuzz_target") { executable(target_name) { forward_variables_from(invoker, "*") - if (defined(public_configs)) { - public_configs += [ - "//build/config/compiler:libfuzzer_fuzzing", - "//build/config/compiler:sanitize_address", - ] + fuzz_configs = [] + if (oss_fuzz) { + fuzz_configs += [ "//build/config/compiler:oss_fuzz" ] } else { - public_configs = [ + fuzz_configs += [ "//build/config/compiler:libfuzzer_fuzzing", "//build/config/compiler:sanitize_address", ] } + + if (defined(public_configs)) { + public_configs += fuzz_configs + } else { + public_configs = fuzz_configs + } if (!defined(oubput_dir)) { output_dir = "${root_out_dir}/tests" } diff --git a/build/config/android/config.gni b/build/config/android/config.gni index 508543144bc0f0..ca2b0afc9a8171 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -20,5 +20,5 @@ declare_args() { android_ndk_root = "" # Version of the Android SDK. - android_sdk_version = 21 + android_sdk_version = 26 } diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 5c2accfcdc078e..577dac76c66642 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -453,11 +453,20 @@ config("libfuzzer_fuzzing") { ldflags = cflags } +config("oss_fuzz") { + cflags = string_split(getenv("CFLAGS")) + ldflags = string_split(getenv("CXXFLAGS")) + ldflags += [ getenv("LIB_FUZZING_ENGINE") ] +} + config("fuzzing_default") { configs = [] if (is_libfuzzer) { configs += [ ":libfuzzer_fuzzing" ] } + if (oss_fuzz) { + configs += [ ":oss_fuzz" ] + } } config("coverage") { diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index b25aa5c51ca957..5717df7fa33474 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -56,4 +56,7 @@ declare_args() { # Debug prefix mapping (values for -fdebug-prefix-map=). prefix_mappings = [] + + # Enable fuzzer build for OSS-Fuzz + oss_fuzz = false } diff --git a/build/config/linux/pkg_config.gni b/build/config/linux/pkg_config.gni index fb8f5aab32d703..016defafbc3617 100644 --- a/build/config/linux/pkg_config.gni +++ b/build/config/linux/pkg_config.gni @@ -125,6 +125,17 @@ template("pkg_config") { lib_dirs = pkgresult[3] } + # Link libraries statically for OSS-Fuzz fuzzer build + if (oss_fuzz) { + libs = [] + ldflags = [ "-Wl,-Bstatic" ] + foreach(lib, pkgresult[2]) { + ldflags += [ "-l$lib" ] + } + ldflags += [ "-Wl,-Bdynamic" ] + lib_dirs = pkgresult[3] + } + forward_variables_from(invoker, [ "defines", diff --git a/config/ameba/chip.cmake b/config/ameba/chip.cmake index 8de905ae3a9a95..d221ab57352f94 100644 --- a/config/ameba/chip.cmake +++ b/config/ameba/chip.cmake @@ -107,7 +107,7 @@ string(APPEND CHIP_GN_ARGS "ameba_cc = \"arm-none-eabi-gcc\"\n") string(APPEND CHIP_GN_ARGS "ameba_cxx = \"arm-none-eabi-c++\"\n") string(APPEND CHIP_GN_ARGS "ameba_cpu = \"ameba\"\n") string(APPEND CHIP_GN_ARGS "chip_inet_config_enable_ipv4 = false\n") -string(APPEND CHIP_GN_ARGS "chip_use_transitional_commissionable_data_provider = false\n") +string(APPEND CHIP_GN_ARGS "chip_use_transitional_commissionable_data_provider = true\n") # Enable persistent storage audit if (matter_enable_persistentstorage_audit) diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index e31baa2e0a6be2..a88839a5565fee 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -155,12 +155,16 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE)) endif() endif() -if (CONFIG_OPENTHREAD_ENABLED) +if (CONFIG_ENABLE_MATTER_OVER_THREAD) chip_gn_arg_append("chip_enable_openthread" "true") +else() + chip_gn_arg_append("chip_enable_openthread" "false") endif() if (CONFIG_OPENTHREAD_FTD) chip_gn_arg_append("chip_openthread_ftd" "true") +else() + chip_gn_arg_append("chip_openthread_ftd" "false") endif() if (CONFIG_ENABLE_OTA_REQUESTOR) @@ -174,6 +178,9 @@ endif() if (CONFIG_CHIP_ENABLE_EXTERNAL_PLATFORM) chip_gn_arg_append("chip_device_platform" "\"external\"") + if (CONFIG_ENABLE_CHIP_SHELL) + chip_gn_arg_append("chip_shell_platform" "\"esp32\"") + endif() chip_gn_arg_append("chip_platform_target" "\"//${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}\"") endif() @@ -204,6 +211,11 @@ if (CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER) chip_gn_arg_append("chip_use_device_info_provider" "true") endif() +if (CONFIG_SEC_CERT_DAC_PROVIDER) + chip_gn_arg_append("chip_use_secure_cert_dac_provider" "true") +endif() + + set(args_gn_input "${CMAKE_CURRENT_BINARY_DIR}/args.gn.in") file(GENERATE OUTPUT "${args_gn_input}" CONTENT "${chip_gn_args}") @@ -343,6 +355,11 @@ endif() idf_component_get_property(main_lib main COMPONENT_LIB) list(APPEND chip_libraries $) +if (CONFIG_SEC_CERT_DAC_PROVIDER) + idf_component_get_property(esp32_secure_cert_mgr_lib espressif__esp_secure_cert_mgr COMPONENT_LIB) + list(APPEND chip_libraries $) +endif() + 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 2b2175f3e834c3..3b6d84a5c776fc 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -498,6 +498,13 @@ menu "CHIP Device Layer" menu "CHIP Thread Options" visible if OPENTHREAD_ENABLED + config ENABLE_MATTER_OVER_THREAD + bool "Enable Matter-over-Thread Support" + default y + depends on OPENTHREAD_ENABLED + help + Enables support for sending and receiving CHIP messages over a Thread Connection. + config THREAD_TASK_STACK_SIZE int "Thread task stack size" default 5120 @@ -678,6 +685,13 @@ menu "CHIP Device Layer" help Enable ESP32 Device LocationCapability + config SEC_CERT_DAC_PROVIDER + bool "Use Secure Cert DAC Provider" + default n + help + Use ESP32 Secure Cert DAC Provider which is ESP32 DeviceAttestationCredentialsProvider implementation which reads attestation + information from the esp_secure_cert partition + endmenu diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index 7ffcad18792541..30d77e8b2eb7c9 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -5,3 +5,8 @@ dependencies: rules: - if: "idf_version >=5.0" - if: "target != esp32h2" + + espressif/esp_secure_cert_mgr: + version: "^2.2.1" + rules: + - if: "idf_version >=4.3" diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 2a0eb84dda52b3..a7006062f12ace 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -209,6 +209,10 @@ list(APPEND CHIP_DEFINES PW_RPC_USE_GLOBAL_MUTEX=0 ) +# TODO: Update this to use target_link_libraries instead of +# target_include_directories. target_include_directories never should be used to +# access other libraries since it does not add source files to the build graph +# and does not support transitive dependencies. target_include_directories(${APP_TARGET} PRIVATE ${PIGWEED_ROOT}/pw_sys_io/public ${PIGWEED_ROOT}/pw_assert/public @@ -241,6 +245,7 @@ target_include_directories(${APP_TARGET} PRIVATE ${PIGWEED_ROOT}/pw_function/public ${PIGWEED_ROOT}/pw_preprocessor/public ${PIGWEED_ROOT}/pw_rpc/system_server/public + ${PIGWEED_ROOT}/pw_toolchain/public ${PIGWEED_ROOT}/third_party/fuchsia/repo/sdk/lib/fit/include ${PIGWEED_ROOT}/third_party/fuchsia/repo/sdk/lib/stdcompat/include ${CHIP_ROOT}/third_party/nanopb/repo diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 390a99b1556e77..e5fbdb405e365d 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -139,6 +139,14 @@ config CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE when flashing the firmware using the west tool, includes the factory data as well. +config CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES + bool "Generate onboarding codes during the generation of a factory data set" + help + Enables generation of onboarding codes (manual pairing code and QR code) + during the generation of a factory data set. You can provide the + onboarding codes a Matter controller to commission a device to a Matter + network. + # Select source of the certificates choice CHIP_FACTORY_DATA_CERT_SOURCE prompt "Attestation certificate file source" diff --git a/config/nrfconnect/chip-module/generate_factory_data.cmake b/config/nrfconnect/chip-module/generate_factory_data.cmake index b1df43fa59cfce..a754f22873c13d 100644 --- a/config/nrfconnect/chip-module/generate_factory_data.cmake +++ b/config/nrfconnect/chip-module/generate_factory_data.cmake @@ -91,6 +91,10 @@ string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n") string(APPEND script_args "--include_passcode\n") string(APPEND script_args "--overwrite\n") +if(CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES) + string(APPEND script_args "--generate_onboarding\n") +endif() + # check if spake2 verifier should be generated using script if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER) # Spake2 verifier should be provided using kConfig diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index ddef211ffa0c86..ebf6c3abe5edfc 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -129,3 +129,6 @@ CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=255 # Legacy CONFIG_LEGACY_INCLUDE_PATH=y + +# BLE MAC address +CONFIG_B91_BLE_CTRL_MAC_FLASH_ADDR=0x1FE000 diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index f047a9cace7526..7760b734632648 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -168,3 +168,10 @@ config CHIP_ENABLE_PM_DURING_BLE default y help Enable PM during BLE operation. + +config CHIP_OPENTHREAD_TX_POWER + int "OpenThread Transmission power" + range -30 9 + default 0 + help + OpenThread Transmission power in dBm. diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 4026219328fa2f..03bf49fe4b3ccb 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -8,238 +8,144 @@ This file was **AUTOMATICALLY** generated by - [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors) - [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors) - [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors) -- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn.1-layer-errors) +- [ASN1 Layer errors: range `0x300..0x3FF`](#asn1-layer-errors) - [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors) - [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors) ## SDK Core errors -| Decimal | Hex | Name | -| ------- | ---- | ---------------------------------------------------- | -| 0 | 0x00 | `CHIP_NO_ERROR` | -| 1 | 0x01 | `CHIP_ERROR_SENDING_BLOCKED` | -| 2 | 0x02 | `CHIP_ERROR_CONNECTION_ABORTED` | -| 3 | 0x03 | `CHIP_ERROR_INCORRECT_STATE` | -| 4 | 0x04 | `CHIP_ERROR_MESSAGE_TOO_LONG` | -| 5 | 0x05 | `CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION` | -| 6 | 0x06 | `CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS` | -| 7 | 0x07 | `CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER` | -| 8 | 0x08 | `CHIP_ERROR_NO_CONNECTION_HANDLER` | -| 9 | 0x09 | `CHIP_ERROR_TOO_MANY_PEER_NODES` | -| 10 | 0x0A | `CHIP_ERROR_SENTINEL` | -| 11 | 0x0B | `CHIP_ERROR_NO_MEMORY` | -| 12 | 0x0C | `CHIP_ERROR_NO_MESSAGE_HANDLER` | -| 13 | 0x0D | `CHIP_ERROR_MESSAGE_INCOMPLETE` | -| 14 | 0x0E | `CHIP_ERROR_DATA_NOT_ALIGNED` | -| 15 | 0x0F | `CHIP_ERROR_UNKNOWN_KEY_TYPE` | -| 16 | 0x10 | `CHIP_ERROR_KEY_NOT_FOUND` | -| 17 | 0x11 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE` | -| 18 | 0x12 | `CHIP_ERROR_TOO_MANY_KEYS` | -| 19 | 0x13 | `CHIP_ERROR_INTEGRITY_CHECK_FAILED` | -| 20 | 0x14 | `CHIP_ERROR_INVALID_SIGNATURE` | -| 21 | 0x15 | `CHIP_ERROR_UNSUPPORTED_MESSAGE_VERSION` | -| 22 | 0x16 | `CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE` | -| 23 | 0x17 | `CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE` | -| 24 | 0x18 | `CHIP_ERROR_INVALID_MESSAGE_LENGTH` | -| 25 | 0x19 | `CHIP_ERROR_BUFFER_TOO_SMALL` | -| 26 | 0x1A | `CHIP_ERROR_DUPLICATE_KEY_ID` | -| 27 | 0x1B | `CHIP_ERROR_WRONG_KEY_TYPE` | -| 28 | 0x1C | `CHIP_ERROR_WELL_UNINITIALIZED` | -| 29 | 0x1D | `CHIP_ERROR_WELL_EMPTY` | -| 30 | 0x1E | `CHIP_ERROR_INVALID_STRING_LENGTH` | -| 31 | 0x1F | `CHIP_ERROR_INVALID_LIST_LENGTH` | -| 32 | 0x20 | `CHIP_ERROR_INVALID_INTEGRITY_TYPE` | -| 33 | 0x21 | `CHIP_ERROR_END_OF_TLV` | -| 34 | 0x22 | `CHIP_ERROR_TLV_UNDERRUN` | -| 35 | 0x23 | `CHIP_ERROR_INVALID_TLV_ELEMENT` | -| 36 | 0x24 | `CHIP_ERROR_INVALID_TLV_TAG` | -| 37 | 0x25 | `CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG` | -| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` | -| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` | -| 40 | 0x28 | `CHIP_ERROR_INVALID_TRANSFER_MODE` | -| 41 | 0x29 | `CHIP_ERROR_INVALID_PROFILE_ID` | -| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` | -| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` | -| 44 | 0x2C | `CHIP_ERROR_STATUS_REPORT_RECEIVED` | -| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` | -| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` | -| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` | -| 48 | 0x30 | `CHIP_ERROR_INVALID_PATH_LIST` | -| 49 | 0x31 | `CHIP_ERROR_INVALID_DATA_LIST` | -| 50 | 0x32 | `CHIP_ERROR_TIMEOUT` | -| 51 | 0x33 | `CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR` | -| 52 | 0x34 | `CHIP_ERROR_UNSUPPORTED_DEVICE_DESCRIPTOR_VERSION` | -| 53 | 0x35 | `CHIP_ERROR_END_OF_INPUT` | -| 54 | 0x36 | `CHIP_ERROR_RATE_LIMIT_EXCEEDED` | -| 55 | 0x37 | `CHIP_ERROR_SECURITY_MANAGER_BUSY` | -| 56 | 0x38 | `CHIP_ERROR_INVALID_PASE_PARAMETER` | -| 57 | 0x39 | `CHIP_ERROR_PASE_SUPPORTS_ONLY_CONFIG1` | -| 58 | 0x3A | `CHIP_ERROR_KEY_CONFIRMATION_FAILED` | -| 59 | 0x3B | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY` | -| 60 | 0x3C | `CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY` | -| 61 | 0x3D | `CHIP_ERROR_MISSING_TLV_ELEMENT` | -| 62 | 0x3E | `CHIP_ERROR_RANDOM_DATA_UNAVAILABLE` | -| 63 | 0x3F | `CHIP_ERROR_UNSUPPORTED_HOST_PORT_ELEMENT` | -| 64 | 0x40 | `CHIP_ERROR_INVALID_HOST_SUFFIX_INDEX` | -| 65 | 0x41 | `CHIP_ERROR_HOST_PORT_LIST_EMPTY` | -| 66 | 0x42 | `CHIP_ERROR_UNSUPPORTED_AUTH_MODE` | -| 67 | 0x43 | `CHIP_ERROR_INVALID_SERVICE_EP` | -| 68 | 0x44 | `CHIP_ERROR_INVALID_DIRECTORY_ENTRY_TYPE` | -| 69 | 0x45 | `CHIP_ERROR_FORCED_RESET` | -| 70 | 0x46 | `CHIP_ERROR_NO_ENDPOINT` | -| 71 | 0x47 | `CHIP_ERROR_INVALID_DESTINATION_NODE_ID` | -| 72 | 0x48 | `CHIP_ERROR_NOT_CONNECTED` | -| 73 | 0x49 | `CHIP_ERROR_NO_SW_UPDATE_AVAILABLE` | -| 74 | 0x4A | `CHIP_ERROR_CA_CERT_NOT_FOUND` | -| 75 | 0x4B | `CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED` | -| 76 | 0x4C | `CHIP_ERROR_CERT_PATH_TOO_LONG` | -| 77 | 0x4D | `CHIP_ERROR_CERT_USAGE_NOT_ALLOWED` | -| 78 | 0x4E | `CHIP_ERROR_CERT_EXPIRED` | -| 79 | 0x4F | `CHIP_ERROR_CERT_NOT_VALID_YET` | -| 80 | 0x50 | `CHIP_ERROR_UNSUPPORTED_CERT_FORMAT` | -| 81 | 0x51 | `CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE` | -| 82 | 0x52 | `CHIP_ERROR_CERT_NOT_USED` | -| 83 | 0x53 | `CHIP_ERROR_CERT_NOT_FOUND` | -| 84 | 0x54 | `CHIP_ERROR_INVALID_CASE_PARAMETER` | -| 85 | 0x55 | `CHIP_ERROR_UNSUPPORTED_CASE_CONFIGURATION` | -| 86 | 0x56 | `CHIP_ERROR_CERT_LOAD_FAILED` | -| 87 | 0x57 | `CHIP_ERROR_CERT_NOT_TRUSTED` | -| 88 | 0x58 | `CHIP_ERROR_INVALID_ACCESS_TOKEN` | -| 89 | 0x59 | `CHIP_ERROR_WRONG_CERT_DN` | -| 90 | 0x5A | `CHIP_ERROR_INVALID_PROVISIONING_BUNDLE` | -| 91 | 0x5B | `CHIP_ERROR_PROVISIONING_BUNDLE_DECRYPTION_ERROR` | -| 92 | 0x5C | `CHIP_ERROR_WRONG_NODE_ID` | -| 93 | 0x5D | `CHIP_ERROR_CONN_ACCEPTED_ON_WRONG_PORT` | -| 94 | 0x5E | `CHIP_ERROR_CALLBACK_REPLACED` | -| 95 | 0x5F | `CHIP_ERROR_NO_CASE_AUTH_DELEGATE` | -| 96 | 0x60 | `CHIP_ERROR_DEVICE_LOCATE_TIMEOUT` | -| 97 | 0x61 | `CHIP_ERROR_DEVICE_CONNECT_TIMEOUT` | -| 98 | 0x62 | `CHIP_ERROR_DEVICE_AUTH_TIMEOUT` | -| 99 | 0x63 | `CHIP_ERROR_MESSAGE_NOT_ACKNOWLEDGED` | -| 100 | 0x64 | `CHIP_ERROR_RETRANS_TABLE_FULL` | -| 101 | 0x65 | `CHIP_ERROR_INVALID_ACK_MESSAGE_COUNTER` | -| 102 | 0x66 | `CHIP_ERROR_SEND_THROTTLED` | -| 103 | 0x67 | `CHIP_ERROR_WRONG_MSG_VERSION_FOR_EXCHANGE` | -| 104 | 0x68 | `CHIP_ERROR_TRANSACTION_CANCELED` | -| 105 | 0x69 | `CHIP_ERROR_LISTENER_ALREADY_STARTED` | -| 106 | 0x6A | `CHIP_ERROR_LISTENER_ALREADY_STOPPED` | -| 107 | 0x6B | `CHIP_ERROR_INVALID_SUBSCRIPTION` | -| 108 | 0x6C | `CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE` | -| 109 | 0x6D | `CHIP_ERROR_PASE_RECONFIGURE_REQUIRED` | -| 110 | 0x6E | `CHIP_ERROR_INVALID_PASE_CONFIGURATION` | -| 111 | 0x6F | `CHIP_ERROR_NO_COMMON_PASE_CONFIGURATIONS` | -| 112 | 0x70 | `CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR` | -| 113 | 0x71 | `CHIP_ERROR_INVALID_FABRIC_INDEX` | -| 114 | 0x72 | `CHIP_ERROR_TOO_MANY_CONNECTIONS` | -| 115 | 0x73 | `CHIP_ERROR_SHUT_DOWN` | -| 116 | 0x74 | `CHIP_ERROR_CANCELLED` | -| 117 | 0x75 | `CHIP_ERROR_DRBG_ENTROPY_SOURCE_FAILED` | -| 118 | 0x76 | `CHIP_ERROR_TLV_TAG_NOT_FOUND` | -| 119 | 0x77 | `CHIP_ERROR_MISSING_SECURE_SESSION` | -| 120 | 0x78 | `CHIP_ERROR_INVALID_ADMIN_SUBJECT` | -| 121 | 0x79 | `CHIP_ERROR_INSUFFICIENT_PRIVILEGE` | -| 122 | 0x7A | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_IB` | -| 123 | 0x7B | `CHIP_ERROR_IM_MALFORMED_EVENT_STATUS_IB` | -| 124 | 0x7C | `CHIP_ERROR_IM_MALFORMED_STATUS_RESPONSE_MESSAGE` | -| 125 | 0x7D | `CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED` | -| 126 | 0x7E | `CHIP_ERROR_FABRIC_EXISTS` | -| 127 | 0x7F | `CHIP_ERROR_KEY_NOT_FOUND_FROM_PEER` | -| 128 | 0x80 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER` | -| 129 | 0x81 | `CHIP_ERROR_UNKNOWN_KEY_TYPE_FROM_PEER` | -| 130 | 0x82 | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY_FROM_PEER` | -| 131 | 0x83 | `CHIP_ERROR_UNSUPPORTED_ENCRYPTION_TYPE_FROM_PEER` | -| 132 | 0x84 | `CHIP_ERROR_INTERNAL_KEY_ERROR_FROM_PEER` | -| 133 | 0x85 | `CHIP_ERROR_INVALID_KEY_ID` | -| 134 | 0x86 | `CHIP_ERROR_INVALID_TIME` | -| 135 | 0x87 | `CHIP_ERROR_LOCKING_FAILURE` | -| 136 | 0x88 | `CHIP_ERROR_UNSUPPORTED_PASSCODE_CONFIG` | -| 137 | 0x89 | `CHIP_ERROR_PASSCODE_AUTHENTICATION_FAILED` | -| 138 | 0x8A | `CHIP_ERROR_PASSCODE_FINGERPRINT_FAILED` | -| 139 | 0x8B | `CHIP_ERROR_SERIALIZATION_ELEMENT_NULL` | -| 140 | 0x8C | `CHIP_ERROR_WRONG_CERT_SIGNATURE_ALGORITHM` | -| 141 | 0x8D | `CHIP_ERROR_WRONG_CHIP_SIGNATURE_ALGORITHM` | -| 142 | 0x8E | `CHIP_ERROR_SCHEMA_MISMATCH` | -| 143 | 0x8F | `CHIP_ERROR_INVALID_INTEGER_VALUE` | -| 144 | 0x90 | `CHIP_ERROR_CASE_RECONFIG_REQUIRED` | -| 145 | 0x91 | `CHIP_ERROR_TOO_MANY_CASE_RECONFIGURATIONS` | -| 146 | 0x92 | `CHIP_ERROR_BAD_REQUEST` | -| 147 | 0x93 | `CHIP_ERROR_INVALID_MESSAGE_FLAG` | -| 148 | 0x94 | `CHIP_ERROR_KEY_EXPORT_RECONFIGURE_REQUIRED` | -| 149 | 0x95 | `CHIP_ERROR_INVALID_KEY_EXPORT_CONFIGURATION` | -| 150 | 0x96 | `CHIP_ERROR_NO_COMMON_KEY_EXPORT_CONFIGURATIONS` | -| 151 | 0x97 | `CHIP_ERROR_NO_KEY_EXPORT_DELEGATE` | -| 152 | 0x98 | `CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_REQUEST` | -| 153 | 0x99 | `CHIP_ERROR_UNAUTHORIZED_KEY_EXPORT_RESPONSE` | -| 154 | 0x9A | `CHIP_ERROR_EXPORTED_KEY_AUTHENTICATION_FAILED` | -| 155 | 0x9B | `CHIP_ERROR_TOO_MANY_SHARED_SESSION_END_NODES` | -| 156 | 0x9C | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_DATA_IB` | -| 157 | 0x9D | `CHIP_ERROR_WRONG_CERT_TYPE` | -| 158 | 0x9E | `CHIP_ERROR_DEFAULT_EVENT_HANDLER_NOT_CALLED` | -| 159 | 0x9F | `CHIP_ERROR_PERSISTED_STORAGE_FAILED` | -| 160 | 0xA0 | `CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND` | -| 161 | 0xA1 | `CHIP_ERROR_IM_FABRIC_DELETED` | -| 162 | 0xA2 | `CHIP_ERROR_PROFILE_STRING_CONTEXT_NOT_REGISTERED` | -| 163 | 0xA3 | `CHIP_ERROR_INCOMPATIBLE_SCHEMA_VERSION` | -| 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` | -| 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` | -| 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` | -| 168 | 0xA8 | `CHIP_ERROR_UNSUPPORTED_THREAD_NETWORK_CREATE` | -| 169 | 0xA9 | `CHIP_ERROR_INCONSISTENT_CONDITIONALITY` | -| 170 | 0xAA | `CHIP_ERROR_LOCAL_DATA_INCONSISTENT` | -| 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` | -| 172 | 0xAC | `CHIP_ERROR_INTERNAL` | -| 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` | -| 174 | 0xAE | `CHIP_ERROR_READ_FAILED` | -| 175 | 0xAF | `CHIP_ERROR_WRITE_FAILED` | -| 176 | 0xB0 | `CHIP_ERROR_DECODE_FAILED` | -| 177 | 0xB1 | `CHIP_ERROR_SESSION_KEY_SUSPENDED` | -| 178 | 0xB2 | `CHIP_ERROR_UNSUPPORTED_WIRELESS_REGULATORY_DOMAIN` | -| 179 | 0xB3 | `CHIP_ERROR_UNSUPPORTED_WIRELESS_OPERATING_LOCATION` | -| 180 | 0xB4 | `CHIP_ERROR_MDNS_COLLISION` | -| 181 | 0xB5 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB` | -| 182 | 0xB6 | `CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB` | -| 183 | 0xB7 | `CHIP_ERROR_IM_MALFORMED_COMMAND_PATH_IB` | -| 184 | 0xB8 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_STATUS_IB` | -| 185 | 0xB9 | `CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB` | -| 186 | 0xBA | `CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB` | -| 187 | 0xBB | `CHIP_ERROR_IM_MALFORMED_STATUS_IB` | -| 188 | 0xBC | `CHIP_ERROR_PEER_NODE_NOT_FOUND` | -| 189 | 0xBD | `CHIP_ERROR_HSM` | -| 190 | 0xBE | `CHIP_ERROR_INTERMEDIATE_CA_NOT_REQUIRED` | -| 191 | 0xBF | `CHIP_ERROR_REAL_TIME_NOT_SYNCED` | -| 192 | 0xC0 | `CHIP_ERROR_UNEXPECTED_EVENT` | -| 193 | 0xC1 | `CHIP_ERROR_ENDPOINT_POOL_FULL` | -| 194 | 0xC2 | `CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG` | -| 195 | 0xC3 | `CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG` | -| 196 | 0xC4 | `CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED` | -| 197 | 0xC5 | `CHIP_ERROR_INVALID_PUBLIC_KEY` | -| 198 | 0xC6 | `CHIP_ERROR_FABRIC_MISMATCH_ON_ICA` | -| 199 | 0xC7 | `CHIP_ERROR_MESSAGE_COUNTER_OUT_OF_WINDOW` | -| 200 | 0xC8 | `CHIP_ERROR_REBOOT_SIGNAL_RECEIVED` | -| 201 | 0xC9 | `CHIP_ERROR_NO_SHARED_TRUSTED_ROOT` | -| 202 | 0xCA | `CHIP_ERROR_IM_STATUS_CODE_RECEIVED` | -| 203 | 0xCB | `CHIP_ERROR_IM_MALFORMED_COMMAND_STATUS_IB` | -| 204 | 0xCC | `CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_IB` | -| 205 | 0xCD | `CHIP_ERROR_IM_MALFORMED_INVOKE_REQUEST_MESSAGE` | -| 206 | 0xCE | `CHIP_ERROR_IM_MALFORMED_INVOKE_RESPONSE_MESSAGE` | -| 207 | 0xCF | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_REPORT_MESSAGE` | -| 208 | 0xD0 | `CHIP_ERROR_IM_MALFORMED_WRITE_REQUEST_MESSAGE` | -| 209 | 0xD1 | `CHIP_ERROR_IM_MALFORMED_EVENT_FILTER_IB` | -| 210 | 0xD2 | `CHIP_ERROR_IM_MALFORMED_READ_REQUEST_MESSAGE` | -| 211 | 0xD3 | `CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_REQUEST_MESSAGE` | -| 212 | 0xD4 | `CHIP_ERROR_IM_MALFORMED_SUBSCRIBE_RESPONSE_MESSAGE` | -| 213 | 0xD5 | `CHIP_ERROR_IM_MALFORMED_EVENT_REPORT_IB` | -| 214 | 0xD6 | `CHIP_ERROR_IM_MALFORMED_CLUSTER_PATH_IB` | -| 215 | 0xD7 | `CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB` | -| 216 | 0xD8 | `CHIP_ERROR_NOT_FOUND` | -| 217 | 0xD9 | `CHIP_ERROR_IM_MALFORMED_TIMED_REQUEST_MESSAGE` | -| 218 | 0xDA | `CHIP_ERROR_INVALID_FILE_IDENTIFIER` | -| 219 | 0xDB | `CHIP_ERROR_BUSY` | -| 220 | 0xDC | `CHIP_ERROR_MAX_RETRY_EXCEEDED` | -| 221 | 0xDD | `CHIP_ERROR_PROVIDER_LIST_EXHAUSTED` | -| 222 | 0xDE | `CHIP_ERROR_ANOTHER_COMMISSIONING_IN_PROGRESS` | -| 223 | 0xDF | `CHIP_ERROR_INVALID_SCHEME_PREFIX` | -| 224 | 0xE0 | `CHIP_ERROR_MISSING_URI_SEPARATOR` | +| Decimal | Hex | Name | +| ------- | ---- | -------------------------------------------------- | +| 0 | 0x00 | `CHIP_NO_ERROR` | +| 1 | 0x01 | `CHIP_ERROR_SENDING_BLOCKED` | +| 2 | 0x02 | `CHIP_ERROR_CONNECTION_ABORTED` | +| 3 | 0x03 | `CHIP_ERROR_INCORRECT_STATE` | +| 4 | 0x04 | `CHIP_ERROR_MESSAGE_TOO_LONG` | +| 5 | 0x05 | `CHIP_ERROR_UNSUPPORTED_EXCHANGE_VERSION` | +| 6 | 0x06 | `CHIP_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS` | +| 7 | 0x07 | `CHIP_ERROR_NO_UNSOLICITED_MESSAGE_HANDLER` | +| 8 | 0x08 | `CHIP_ERROR_NO_CONNECTION_HANDLER` | +| 9 | 0x09 | `CHIP_ERROR_TOO_MANY_PEER_NODES` | +| 10 | 0x0A | `CHIP_ERROR_SENTINEL` | +| 11 | 0x0B | `CHIP_ERROR_NO_MEMORY` | +| 12 | 0x0C | `CHIP_ERROR_NO_MESSAGE_HANDLER` | +| 13 | 0x0D | `CHIP_ERROR_MESSAGE_INCOMPLETE` | +| 14 | 0x0E | `CHIP_ERROR_DATA_NOT_ALIGNED` | +| 15 | 0x0F | `CHIP_ERROR_UNKNOWN_KEY_TYPE` | +| 16 | 0x10 | `CHIP_ERROR_KEY_NOT_FOUND` | +| 17 | 0x11 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE` | +| 19 | 0x13 | `CHIP_ERROR_INTEGRITY_CHECK_FAILED` | +| 20 | 0x14 | `CHIP_ERROR_INVALID_SIGNATURE` | +| 23 | 0x17 | `CHIP_ERROR_UNSUPPORTED_SIGNATURE_TYPE` | +| 24 | 0x18 | `CHIP_ERROR_INVALID_MESSAGE_LENGTH` | +| 25 | 0x19 | `CHIP_ERROR_BUFFER_TOO_SMALL` | +| 26 | 0x1A | `CHIP_ERROR_DUPLICATE_KEY_ID` | +| 27 | 0x1B | `CHIP_ERROR_WRONG_KEY_TYPE` | +| 28 | 0x1C | `CHIP_ERROR_WELL_UNINITIALIZED` | +| 29 | 0x1D | `CHIP_ERROR_WELL_EMPTY` | +| 30 | 0x1E | `CHIP_ERROR_INVALID_STRING_LENGTH` | +| 31 | 0x1F | `CHIP_ERROR_INVALID_LIST_LENGTH` | +| 33 | 0x21 | `CHIP_ERROR_END_OF_TLV` | +| 34 | 0x22 | `CHIP_ERROR_TLV_UNDERRUN` | +| 35 | 0x23 | `CHIP_ERROR_INVALID_TLV_ELEMENT` | +| 36 | 0x24 | `CHIP_ERROR_INVALID_TLV_TAG` | +| 37 | 0x25 | `CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG` | +| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` | +| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` | +| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` | +| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` | +| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` | +| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` | +| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` | +| 48 | 0x30 | `CHIP_ERROR_INVALID_PATH_LIST` | +| 49 | 0x31 | `CHIP_ERROR_INVALID_DATA_LIST` | +| 50 | 0x32 | `CHIP_ERROR_TIMEOUT` | +| 51 | 0x33 | `CHIP_ERROR_INVALID_DEVICE_DESCRIPTOR` | +| 56 | 0x38 | `CHIP_ERROR_INVALID_PASE_PARAMETER` | +| 59 | 0x3B | `CHIP_ERROR_INVALID_USE_OF_SESSION_KEY` | +| 60 | 0x3C | `CHIP_ERROR_CONNECTION_CLOSED_UNEXPECTEDLY` | +| 61 | 0x3D | `CHIP_ERROR_MISSING_TLV_ELEMENT` | +| 62 | 0x3E | `CHIP_ERROR_RANDOM_DATA_UNAVAILABLE` | +| 65 | 0x41 | `CHIP_ERROR_HOST_PORT_LIST_EMPTY` | +| 69 | 0x45 | `CHIP_ERROR_FORCED_RESET` | +| 70 | 0x46 | `CHIP_ERROR_NO_ENDPOINT` | +| 71 | 0x47 | `CHIP_ERROR_INVALID_DESTINATION_NODE_ID` | +| 72 | 0x48 | `CHIP_ERROR_NOT_CONNECTED` | +| 74 | 0x4A | `CHIP_ERROR_CA_CERT_NOT_FOUND` | +| 75 | 0x4B | `CHIP_ERROR_CERT_PATH_LEN_CONSTRAINT_EXCEEDED` | +| 76 | 0x4C | `CHIP_ERROR_CERT_PATH_TOO_LONG` | +| 77 | 0x4D | `CHIP_ERROR_CERT_USAGE_NOT_ALLOWED` | +| 78 | 0x4E | `CHIP_ERROR_CERT_EXPIRED` | +| 79 | 0x4F | `CHIP_ERROR_CERT_NOT_VALID_YET` | +| 80 | 0x50 | `CHIP_ERROR_UNSUPPORTED_CERT_FORMAT` | +| 81 | 0x51 | `CHIP_ERROR_UNSUPPORTED_ELLIPTIC_CURVE` | +| 83 | 0x53 | `CHIP_ERROR_CERT_NOT_FOUND` | +| 84 | 0x54 | `CHIP_ERROR_INVALID_CASE_PARAMETER` | +| 86 | 0x56 | `CHIP_ERROR_CERT_LOAD_FAILED` | +| 87 | 0x57 | `CHIP_ERROR_CERT_NOT_TRUSTED` | +| 89 | 0x59 | `CHIP_ERROR_WRONG_CERT_DN` | +| 92 | 0x5C | `CHIP_ERROR_WRONG_NODE_ID` | +| 100 | 0x64 | `CHIP_ERROR_RETRANS_TABLE_FULL` | +| 104 | 0x68 | `CHIP_ERROR_TRANSACTION_CANCELED` | +| 107 | 0x6B | `CHIP_ERROR_INVALID_SUBSCRIPTION` | +| 108 | 0x6C | `CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE` | +| 112 | 0x70 | `CHIP_ERROR_UNSOLICITED_MSG_NO_ORIGINATOR` | +| 113 | 0x71 | `CHIP_ERROR_INVALID_FABRIC_INDEX` | +| 114 | 0x72 | `CHIP_ERROR_TOO_MANY_CONNECTIONS` | +| 115 | 0x73 | `CHIP_ERROR_SHUT_DOWN` | +| 116 | 0x74 | `CHIP_ERROR_CANCELLED` | +| 118 | 0x76 | `CHIP_ERROR_TLV_TAG_NOT_FOUND` | +| 119 | 0x77 | `CHIP_ERROR_MISSING_SECURE_SESSION` | +| 120 | 0x78 | `CHIP_ERROR_INVALID_ADMIN_SUBJECT` | +| 121 | 0x79 | `CHIP_ERROR_INSUFFICIENT_PRIVILEGE` | +| 125 | 0x7D | `CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED` | +| 126 | 0x7E | `CHIP_ERROR_FABRIC_EXISTS` | +| 128 | 0x80 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER` | +| 133 | 0x85 | `CHIP_ERROR_INVALID_KEY_ID` | +| 134 | 0x86 | `CHIP_ERROR_INVALID_TIME` | +| 142 | 0x8E | `CHIP_ERROR_SCHEMA_MISMATCH` | +| 143 | 0x8F | `CHIP_ERROR_INVALID_INTEGER_VALUE` | +| 146 | 0x92 | `CHIP_ERROR_BAD_REQUEST` | +| 157 | 0x9D | `CHIP_ERROR_WRONG_CERT_TYPE` | +| 159 | 0x9F | `CHIP_ERROR_PERSISTED_STORAGE_FAILED` | +| 160 | 0xA0 | `CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND` | +| 161 | 0xA1 | `CHIP_ERROR_IM_FABRIC_DELETED` | +| 164 | 0xA4 | `CHIP_ERROR_IN_PROGRESS` | +| 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` | +| 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` | +| 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` | +| 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` | +| 172 | 0xAC | `CHIP_ERROR_INTERNAL` | +| 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` | +| 174 | 0xAE | `CHIP_ERROR_READ_FAILED` | +| 175 | 0xAF | `CHIP_ERROR_WRITE_FAILED` | +| 176 | 0xB0 | `CHIP_ERROR_DECODE_FAILED` | +| 180 | 0xB4 | `CHIP_ERROR_MDNS_COLLISION` | +| 181 | 0xB5 | `CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB` | +| 182 | 0xB6 | `CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB` | +| 185 | 0xB9 | `CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_IB` | +| 186 | 0xBA | `CHIP_ERROR_IM_MALFORMED_EVENT_DATA_IB` | +| 188 | 0xBC | `CHIP_ERROR_PEER_NODE_NOT_FOUND` | +| 189 | 0xBD | `CHIP_ERROR_HSM` | +| 191 | 0xBF | `CHIP_ERROR_REAL_TIME_NOT_SYNCED` | +| 192 | 0xC0 | `CHIP_ERROR_UNEXPECTED_EVENT` | +| 193 | 0xC1 | `CHIP_ERROR_ENDPOINT_POOL_FULL` | +| 194 | 0xC2 | `CHIP_ERROR_INBOUND_MESSAGE_TOO_BIG` | +| 195 | 0xC3 | `CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG` | +| 196 | 0xC4 | `CHIP_ERROR_DUPLICATE_MESSAGE_RECEIVED` | +| 197 | 0xC5 | `CHIP_ERROR_INVALID_PUBLIC_KEY` | +| 198 | 0xC6 | `CHIP_ERROR_FABRIC_MISMATCH_ON_ICA` | +| 201 | 0xC9 | `CHIP_ERROR_NO_SHARED_TRUSTED_ROOT` | +| 202 | 0xCA | `CHIP_ERROR_IM_STATUS_CODE_RECEIVED` | +| 215 | 0xD7 | `CHIP_ERROR_IM_MALFORMED_DATA_VERSION_FILTER_IB` | +| 216 | 0xD8 | `CHIP_ERROR_NOT_FOUND` | +| 218 | 0xDA | `CHIP_ERROR_INVALID_FILE_IDENTIFIER` | +| 219 | 0xDB | `CHIP_ERROR_BUSY` | +| 220 | 0xDC | `CHIP_ERROR_MAX_RETRY_EXCEEDED` | +| 221 | 0xDD | `CHIP_ERROR_PROVIDER_LIST_EXHAUSTED` | +| 223 | 0xDF | `CHIP_ERROR_INVALID_SCHEME_PREFIX` | +| 224 | 0xE0 | `CHIP_ERROR_MISSING_URI_SEPARATOR` | +| 225 | 0xE1 | `CHIP_ERROR_HANDLER_NOT_SET` | ## SDK Inet Layer errors @@ -271,7 +177,7 @@ This file was **AUTOMATICALLY** generated by | 515 | 0x203 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_ABORTED` | | 516 | 0x204 | `CHIP_DEVICE_ERROR_SOFTWARE_UPDATE_IGNORED` | -## ASN.1 Layer errors +## ASN1 Layer errors | Decimal | Hex | Name | | ------- | ----- | --------------------------------- | diff --git a/docs/code_generation.md b/docs/code_generation.md index f9b0d587f3fd9b..318cfedd359954 100644 --- a/docs/code_generation.md +++ b/docs/code_generation.md @@ -234,9 +234,48 @@ scripts/codepregen.py ${OUTPUT_DIRECTORY:-./zzz_pregenerated/} # To generate a single output you can use `--input-glob`: -scripts/codepregen.py --input-glob "*all-clusters*" ${OUTPUT_DIRECTORY:-./zzz_pregenerated/} +scripts/codepregen.py --input-glob "*all-clusters*" --input-glob "*controller*" ${OUTPUT_DIRECTORY:-./zzz_pregenerated/} ``` +### External applications/zap files + +#### Ensure you have a `.matter` file + +Code generation generally will use both `.zap` or `.matter` files. If you only +have a `.zap` file, you can create the corresponding `.matter` file via: + +```bash +scripts/tools/zap/generate.py ${ZAP_FILE_PATH} +``` + +The above will use the template `src/app/zap-templates/matter-idl.json` to +generate a `.matter` file corresponding to the input `.zap` file. + +`.matter` files are designed to be human readable. It is recommended to take a +look at the generated file and see if it contains what is expected and also lint +it. If anything seems wrong, the `.zap` file should be fixed (`.matter` +represents the content of `.zap`). To lint use: + +```bash +scripts/idl_lint.py ${MATTER_FILE_PATH} +``` + +#### Running pre-generation + +If you have zap files outside the CHIP repository (i.e. not in `src` or +`examples`) you should provide the root of your application source. + +```bash +scripts/codepregen.py --external-root ${PATH_TO_SOURCE_ROOT} ${OUTPUT_DIRECTORY:-./zzz_pregenerated/} +``` + +NOTE: `$PATH_TO_SOURCE_ROOT` should be a top-level directory containing +zap/matter files as the code pre-generation will generate files based on the +path inside the root: + +- if files are `$PATH_TO_SOURCE_ROOT/some/path/foo.zap` this will generate + files into `$OUTPUT_DIRECTORY/some/path/foo/...` + ### Using pre-generated code Instead of generating code at compile time, the chip build system accepts usage diff --git a/docs/conf.py b/docs/conf.py index 2434c39e7a7224..bf83e215be05b5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ # -- Project information ----------------------------------------------------- project = "Matter" -copyright = "2022, Matter Contributors" +copyright = "2020-2023, Matter Contributors" author = "Matter Contributors" version = "1.0.0" @@ -31,6 +31,7 @@ "examples/providers/README.md", "examples/thermostat/nxp/linux-se05x/README.md", "examples/common/m5stack-tft/repo", + "docs/guides/README.md", ] diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 2bc999d9ecc5ac..655cc226fb6e0c 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -257,14 +257,15 @@ Alternatively, you can also use a QR code payload. ##### Commissioning with setup PIN code -To discover devices and try to pair with the first discovered device using the -provided setup code, use the following command pattern: +To discover devices and try to pair with one of them using the provided setup +code, use the following command pattern: ``` $ ./chip-tool pairing onnetwork ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ is device specific _setup PIN code_ determined in the @@ -273,14 +274,15 @@ In this command: ##### Commissioning with long discriminator -To discover devices with a long discriminator and try to pair with the first -discovered one using the provided setup code, use the following command pattern: +To discover devices with a long discriminator and try to pair with one of them +using the provided setup code, use the following command pattern: ``` $ ./chip-tool pairing onnetwork-long ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ and __ are device specific keys determined in @@ -292,14 +294,14 @@ In this command: Matter devices log the QR code payload and manual pairing code when they boot. To discover devices based on the given QR code payload or manual pairing code -and try to pair with the first discovered one, use the following command -pattern: +and try to pair with one of them, use the following command pattern: ``` $ ./chip-tool pairing code ``` -In this command: +The command keeps trying devices until pairing with one of them succeeds or +until it runs out of pairing possibilities. In this command: - __ is the user-defined ID of the node being commissioned. - __ is the QR code payload ID, for example @@ -410,10 +412,15 @@ The CHIP Tool can run in one of the following modes: [1650992689511] [32397:1415601] CHIP: [TOO] Run command failure: ../../../examples/chip-tool/commands/common/CHIPCommand.cpp:392: CHIP Error 0x00000032: Timeout ``` + Moreover, when using the single-command mode, the CHIP Tool will establish a + new CASE session with every command sent. + - Interactive mode - In this mode, a command will terminate with an error if it does not complete within the timeout period. However, the CHIP Tool will not be terminated and it will not terminate processes that previous commands - have started. + have started. Moreover, when using the interactive mode, the CHIP Tool will + establish a new CASE session only when there is no session available yet. On + the following commands, it will use the existing session. #### Modifying timeout duration in single-command mode diff --git a/docs/guides/esp32/README.md b/docs/guides/esp32/README.md index ebdfaac513209d..a77fa0ca970384 100644 --- a/docs/guides/esp32/README.md +++ b/docs/guides/esp32/README.md @@ -16,3 +16,4 @@ example on ESP32 series of SoCs - [Flash and NVS encryption for securing factory data](flash_nvs_encryption.md) - [RPC Console and Device Tracing](rpc_console.md) - [Matter OTA](ota.md) +- [Generating and Using ESP Secure Cert Parttiton](secure_cert_partition.md) diff --git a/docs/guides/esp32/secure_cert_partition.md b/docs/guides/esp32/secure_cert_partition.md new file mode 100644 index 00000000000000..a001fb0f030cf2 --- /dev/null +++ b/docs/guides/esp32/secure_cert_partition.md @@ -0,0 +1,183 @@ +# Using esp_secure_cert partition + +## 1.1 ESP Secure Cert Partition + +- When a device is pre-provisioned, the PKI credentials are generated for the + device and stored in a partition named esp_secure_cert. +- In the Matter Pre-Provisioning service, the Matter DAC certificate is + pre-flashed in esp_secure_cert partition. +- The ESP32SecureCertDACProvider reads the PKI credentials from + esp_secure_cert_partition. +- The DAC,PAI and private key are read from the esp_secure_cert_partition, but + the certificate declaration is read from the factory data partition. + Therefore, we need to also generate a factory partition besides + esp_secure_cert_partition. +- The esp_secure_cert partition can be generated on host with help of + configure_esp_secure_cert.py utility. +- The use of esp_secure_cert_partition is demonstrated in lighting-app. + +## 1.2 Prerequisites: + +To generate the esp_secure_cert_partition and the factory_data_partition, we +need the DAC and PAI certificate as well as the private key(DAC key) in .der +format. The factory_data_provider in addition requires the certificate +declaration in .der format. The generation of the required certificates and keys +is mentioned in the steps given below. + +### 1.2.1 Build certification generation tool: + +Run the commands below: + +``` +cd path/to/connectedhomeip +source scripts/activate.sh +gn gen out/host +ninja -C out/host chip-cert +cd out/host +``` + +At /path/to/connectedhomeip/out/host run the below commands. + +### 1.2.2 Generating Certification Declaration + +``` +./chip-cert gen-cd -K ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem -C ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -O esp_dac_fff1_8000.der -f 1 -V 0xfff1 -p 0x8000 -d 0x0016 -c "CSA00000SWC00000-01" -l 0 -i 0 -n 1 -t 0 +``` + +### 1.2.3 Generating PAI + +``` +./chip-cert gen-att-cert -t i -c "ESP TEST PAI" -V 0xfff1 -P 0x8000 -C ../../credentials/development/attestation/Chip-Development-PAA-Cert.pem -K ../../credentials/development/attestation/Chip-Development-PAA-Key.pem -o Esp-Development-PAI-Cert.pem -O Esp-Development-PAI-Key.pem -l 4294967295 +``` + +### 1.2.4 Generating DAC + +``` +./chip-cert gen-att-cert -t d -c "ESP TEST DAC 01" -V 0xfff1 -P 0x8000 -C Esp-Development-PAI-Cert.pem -K Esp-Development-PAI-Key.pem -o Esp-Development-DAC-01.pem -O Esp-Development-DAC-Key-01.pem -l 4294967295 +``` + +### 1.2.5 Change format for the certificates and key (.pem to .der format) + +- Convert DAC key from .pem to .der format. + +``` +openssl ec -in Esp-Development-DAC-Key-01.pem -out Esp-Development-DAC-Key-01.der -inform pem -outform der +``` + +- Convert DAC and PAI cert from .pem to .der format + +``` +openssl x509 -in Esp-Development-DAC-01.pem -out Esp-Development-DAC-01.der-inform pem -outform der +openssl x509 -in Esp-Development-PAI-Cert.pem -out Esp-Development-PAI-Cert.der -inform pem -outform der +``` + +The certificates in the steps 1.2 will be generated at +/path/to/connectedhomeip/out/host.For steps 1.3 and 1.4 go to +connectedhomeip/scripts/tools , set IDF_PATH. + +## 1.3 Generating esp_secure_cert_partition + +To generate the esp_secure_cert_partition install esp-secure-cert-tool using + +``` +pip install esp-secure-cert-tool +``` + +Example command to generate a esp_secure_cert_partition + +``` +configure_esp_secure_cert.py --private-key path/to/dac-key \ +--device-cert path/to/dac-cert \ +--ca-cert path/to/pai-cert \ +--target_chip esp32c3 \ +--port /dev/ttyUSB0 -- skip_flash +``` + +Refer +https://github.com/espressif/esp_secure_cert_mgr/tree/main/tools#generate-esp_secure_cert-partition +for more help. + +## 1.4 Generating the factory_data_partition + +Example command to generate a factory_data_partition + +``` +./generate_esp32_chip_factory_bin.py -d 3434 -p 99663300 \ + --product-name ESP-lighting-app --product-id 0x8000 \ + --vendor-name Test-vendor --vendor-id 0xFFF1 \ + --hw-ver 1 --hw-ver-str DevKit \ + --dac-cert path/to/dac-cert \ + --dac-key path/to/dac-key \ + --pai-cert path/to/pai-cert \ + --cd path/to/certificate-declaration +``` + +Refer +https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/esp32/factory_data.md#generate-nvs-binary-image +to generate a factory_data_partition. + +## 1.5 Build the firmware with below configuration options + +``` +# Disable the DS Peripheral support +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n +# Use DAC Provider implementation which reads attestation data from secure cert partition +CONFIG_SEC_CERT_DAC_PROVIDER=y +# Enable some options which reads CD and other basic info from the factory partition +CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER=y +CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER=y +CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION_LABEL="fctry" +``` + +In order to use the esp_secure_cert_partition, in addition to enabling the above +config options, you should also have the esp_secure_cert_partition and factory +partition in your app. For reference, refer to partitions.csv file of +lighting-app. + +## 1.6 Flashing firmware, secure cert and factory partition + +### Build and flash + +``` +idf.py -p (PORT) build flash +``` + +### Flash `esp_secure_cert` and factory partition binaries + +The `esp_secure_cert` partition binary contains device attestation information +and the factory partition binary contains Matter manufacturing specific data. + +- Flash `esp_secure_cert` partition binary + +``` +esptool.py -p (PORT) write_flash 0xd000 path/to/secure_cert_partition.bin +``` + +- Flash factory partition binary + +``` +esptool.py -p (PORT) write_flash 0x3E0000 path/to/factory_partition.bin +``` + +### Monitor + +``` +idf.py monitor +``` + +Please flash the above mentioned partitions by looking into the addresses in +partitions.csv.The above commands are for example purpose. + +## 1.6 Test commissioning using chip-tool + +Run the following command from host to commission the device. + +``` +./chip-tool pairing ble-wifi 1234 my_SSID my_PASSPHRASE my_PASSCODE my_DISCRIMINATOR --paa-trust-store-path /path/to/PAA-Certificates/ +``` + +For example: + +``` +./chip-tool pairing ble-wifi 0x7283 my_SSID my_PASSPHRASE 99663300 3434 --paa-trust-store-path /path/to/connectedhomeip/credentials/development/attestation/ +``` diff --git a/docs/guides/index.md b/docs/guides/index.md index 9b2d1b249d47e9..c6a488f8e8add5 100644 --- a/docs/guides/index.md +++ b/docs/guides/index.md @@ -6,7 +6,56 @@ and features. ```{toctree} :glob: :maxdepth: 1 +:hidden: * esp32/README ``` + +## Build Guides + +- [Building](./BUILDING.md) + +## Platform Guides + +- [Android - Building](./android_building.md) +- [Apple - Testing with iPhone, iPad, macOS, Apple TV, HomePod, Watch, etc](./darwin.md) +- [Espressif (ESP32) - Getting Started Guide](./esp32/README.md) +- [Infineon PSoC6 - Software Update](./infineon_psoc6_software_update.md) +- [Linux - Simulated Devices](./simulated_device_linux.md) +- [mbedOS - Adding a new target](./mbedos_add_new_target.md) +- [mbedOS - Commissioning](./mbedos_commissioning.md) +- [mbedOS - Platform Overview](./mbedos_platform_overview.md) +- [nRF Connect - Android Commissioning](./nrfconnect_android_commissioning.md) +- [nRF Connect - CLI Guide](./nrfconnect_examples_cli.md) +- [nRF Connect - Configuration](./nrfconnect_examples_configuration.md) +- [nRF Connect - Factory Data Configuration](./nrfconnect_factory_data_configuration.md) +- [nRF Connect - Platform Overview](./nrfconnect_platform_overview.md) +- [nRF Connect - Software Update](./nrfconnect_examples_software_update.md) +- [NXP - Android Commissioning](./nxp_k32w_android_commissioning.md) +- [NXP - Linux Examples](./nxp_imx8m_linux_examples.md) +- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme) +- [Silicon Labs - Building](./silabs_efr32_building.md) +- [Silicon Labs - Software Update](./silabs_efr32_software_update.md) +- [TI - Platform Overview](./ti_platform_overview.md) + +## Tool Guides + +- [CHIP Tool](./chip_tool_guide.md) +- [Python Matter-Repl](./matter-repl.md) +- [python-chip-controller - Advanced](./python_chip_controller_advanced_usage.md) +- [python-chip-controller - Building](./python_chip_controller_building.md) + +## Development Guides + +- [Access Control](./access-control-guide.md) +- [IP Commissioning](./ip_commissioning.md) + +## Setup Guides + +- [Open Thread - Hardware suggestions](./openthread_rcp_nrf_dongle.md) +- [Open Thread - Setting up a Raspberry Pi as a Border Router](./openthread_border_router_pi.md) + +## Troubleshooting Guides + +- [Avahi - Troubleshooting](./troubleshooting_avahi.md) diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index dd881349683a0c..16a9210c41fb8c 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -42,6 +42,8 @@ data secure by applying hardware write protection. - [Option 1: Using the php-json-schema tool](#option-1-using-the-php-json-schema-tool) - [Option 2: Using a website validator](#option-2-using-a-website-validator) - [Option 3: Using the nRF Connect Python script](#option-3-using-the-nrf-connect-python-script) + - [Generating onboarding codes](#generating-onboarding-codes) + - [Enabling onboarding codes generation within the build system](#enabling-onboarding-codes-generation-within-the-build-system) - [Preparing factory data partition on a device](#preparing-factory-data-partition-on-a-device) - [Creating a factory data partition with the second script](#creating-a-factory-data-partition-with-the-second-script) - [Building an example with factory data](#building-an-example-with-factory-data) @@ -493,6 +495,59 @@ as an additional argument. To do this, complete the following steps: > **Note:** To learn more about the JSON schema, visit > [this unofficial JSON Schema tool usage website](https://json-schema.org/understanding-json-schema/). +### Generating onboarding codes + +The +[generate_nrfconnect_chip_factory_data.py](../../scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py) +script lets you generating a manual code and a QR code from the given factory +data parameters. You can use these codes to perform commissioning to the Matter +network over Bluetooth LE since they include all the pairing data required by +the Matter controller. You can place these codes on the device packaging or on +the device itself during production. + +To generate a manual pairing code and a QR code, complete the following steps: + +1. Install all required Python dependencies for Matter: + + ``` + $ python -m pip install -r ./scripts/setup/requirements.nrfconnect.txt + ``` + +2. Complete steps 1, 2, and 3 from the + [Creating the factory data JSON file with the first script](#creating-the-factory-data-json-file-with-the-first-script) + section to prepare the final invocation of the Python script. + +3. Add the `--generate_onboarding` argument to the Python script final + invocation. + +4. Run the script. + +5. Navigate to the output directory provided as the `-o` argument. + +The output directory contains the following files you need: + +- JSON file containing the latest factory data set. +- Test file containing the generated manual code and the text version of the + QR Code. +- PNG file containing the generated QR Code as an image. + +#### Enabling onboarding codes generation within the build system + +You can generate onboarding codes using the nRF Connect platform build system +described in +[Building an example with factory data](#building-an-example-with-factory-data), +and build an example with the following additional option: +`-DCONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES=y`. + +For example, the build command for the nRF52840 DK could look like this: + +``` +$ west build -b nrf52840dk_nrf52840 -- \ +-DCONFIG_CHIP_FACTORY_DATA=y \ +-DCONFIG_CHIP_FACTORY_DATA_BUILD=y \ +-DCONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES=y +``` + ### Preparing factory data partition on a device The factory data partition is an area in the device's persistent storage where a diff --git a/docs/requirements.txt b/docs/requirements.txt index 988f0b3f668058..8ec13856113df5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,3 +3,4 @@ Sphinx>=4.5 sphinx-book-theme myst-parser breathe>=4.34 +pydata-sphinx-theme==0.13.1 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 99acb67bc867a9..7d5c990db66e81 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 @@ -1,11 +1,17 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; +} + struct LabelStruct { char_string<16> label = 0; char_string<16> value = 1; } +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -51,8 +57,9 @@ server cluster Identify = 3 { command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } +/** Attributes and commands for group configuration and manipulation. */ server cluster Groups = 4 { - bitmap GroupClusterFeature : BITMAP32 { + bitmap GroupsFeature : BITMAP32 { kGroupNames = 0x1; } @@ -115,18 +122,14 @@ server cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } +/** Attributes and commands for scene configuration and manipulation. */ server cluster Scenes = 5 { - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; + bitmap ScenesFeature : BITMAP32 { + kSceneNames = 0x1; } struct AttributeValuePair { @@ -134,6 +137,11 @@ server cluster Scenes = 5 { int8u 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; @@ -231,6 +239,7 @@ server cluster Scenes = 5 { fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ client cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; @@ -262,10 +271,10 @@ client cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly attribute boolean globalSceneControl = 16384; - attribute int16u onTime = 16385; - attribute int16u offWaitTime = 16386; - attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable OnOffStartUpOnOff startUpOnOff = 16387; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -273,11 +282,32 @@ client cluster OnOff = 6 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectIdentifier = 0; + int8u effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; @@ -339,6 +369,7 @@ server cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } +/** Attributes and commands for configuring On/Off switching devices. */ server cluster OnOffSwitchConfiguration = 7 { readonly attribute enum8 switchType = 0; attribute enum8 switchActions = 16; @@ -350,6 +381,7 @@ server cluster OnOffSwitchConfiguration = 7 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ server cluster LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -457,6 +489,7 @@ server cluster LevelControl = 8 { command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } +/** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ server cluster BinaryInputBasic = 15 { attribute boolean outOfService = 81; attribute boolean presentValue = 85; @@ -469,6 +502,7 @@ server cluster BinaryInputBasic = 15 { readonly attribute int16u clusterRevision = 65533; } +/** 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; @@ -487,6 +521,7 @@ server cluster Descriptor = 29 { readonly attribute int16u clusterRevision = 65533; } +/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ server cluster Binding = 30 { fabric_scoped struct TargetStruct { optional node_id node = 1; @@ -505,6 +540,10 @@ server cluster Binding = 30 { 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; @@ -526,6 +565,12 @@ server cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + 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; @@ -534,12 +579,6 @@ server cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; @@ -574,6 +613,7 @@ server cluster AccessControl = 31 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ server cluster Actions = 37 { enum ActionErrorEnum : ENUM8 { kUnknown = 0; @@ -658,6 +698,9 @@ server cluster Actions = 37 { 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 { struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; @@ -707,6 +750,7 @@ server cluster BasicInformation = 40 { readonly attribute int16u clusterRevision = 65533; } +/** Provides an interface for providing OTA software updates */ client cluster OtaSoftwareUpdateProvider = 41 { enum OTAApplyUpdateAction : ENUM8 { kProceed = 0; @@ -746,14 +790,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; } - request struct NotifyUpdateAppliedRequest { + request struct ApplyUpdateRequestRequest { OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; + INT32U newVersion = 1; } response struct ApplyUpdateResponse = 3 { @@ -761,11 +811,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } +/** Provides an interface for downloading and applying OTA software updates */ server cluster OtaSoftwareUpdateRequestor = 42 { enum OTAAnnouncementReason : ENUM8 { kSimpleAnnouncement = 0; @@ -840,6 +899,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ server cluster LocalizationConfiguration = 43 { attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; @@ -851,6 +914,10 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ server cluster TimeFormatLocalization = 44 { enum CalendarTypeEnum : ENUM8 { kBuddhist = 0; @@ -883,6 +950,10 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ server cluster UnitLocalization = 45 { enum TempUnitEnum : ENUM8 { kFahrenheit = 0; @@ -903,6 +974,7 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; readonly attribute command_id generatedCommandList[] = 65528; @@ -913,6 +985,7 @@ server cluster PowerSourceConfiguration = 46 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { kUnspecified = 0; @@ -1099,6 +1172,21 @@ server cluster PowerSource = 47 { kReplaceable = 0x8; } + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + info event WiredFaultChange = 0 { WiredFaultEnum current[] = 0; WiredFaultEnum previous[] = 1; @@ -1128,6 +1216,7 @@ server cluster PowerSource = 47 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to manage global aspects of the Commissioning flow. */ server cluster GeneralCommissioning = 48 { enum CommissioningError : ENUM8 { kOk = 0; @@ -1191,6 +1280,7 @@ server cluster GeneralCommissioning = 48 { 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 NetworkCommissioningStatus : ENUM8 { kSuccess = 0; @@ -1235,15 +1325,6 @@ server cluster NetworkCommissioning = 49 { boolean connected = 1; } - struct WiFiInterfaceScanResult { - WiFiSecurity security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBand wiFiBand = 4; - int8s rssi = 5; - } - struct ThreadInterfaceScanResult { int16u panId = 0; int64u extendedPanId = 1; @@ -1255,6 +1336,15 @@ server cluster NetworkCommissioning = 49 { int8u lqi = 7; } + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfo networks[] = 1; readonly attribute int8u scanMaxTimeSeconds = 2; @@ -1329,6 +1419,7 @@ server cluster NetworkCommissioning = 49 { 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; @@ -1365,6 +1456,7 @@ server cluster DiagnosticLogs = 50 { 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; @@ -1469,6 +1561,7 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } +/** The Software Diagnostics Cluster provides 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 SoftwareDiagnostics = 52 { bitmap SoftwareDiagnosticsFeature : BITMAP32 { kWaterMarks = 0x1; @@ -1502,6 +1595,7 @@ server cluster SoftwareDiagnostics = 52 { command ResetWatermarks(): DefaultSuccess = 0; } +/** The Thread Network Diagnostics Cluster provides 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 ThreadNetworkDiagnostics = 53 { enum ConnectionStatusEnum : ENUM8 { kConnected = 0; @@ -1549,6 +1643,21 @@ server cluster ThreadNetworkDiagnostics = 53 { boolean isChild = 13; } + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + struct RouteTable { int64u extAddress = 0; int16u rloc16 = 1; @@ -1567,21 +1676,6 @@ server cluster ThreadNetworkDiagnostics = 53 { int16u flags = 1; } - struct OperationalDatasetComponents { - boolean activeTimestampPresent = 0; - boolean pendingTimestampPresent = 1; - boolean masterKeyPresent = 2; - boolean networkNamePresent = 3; - boolean extendedPanIdPresent = 4; - boolean meshLocalPrefixPresent = 5; - boolean delayPresent = 6; - boolean panIdPresent = 7; - boolean channelPresent = 8; - boolean pskcPresent = 9; - boolean securityPolicyPresent = 10; - boolean channelMaskPresent = 11; - } - info event ConnectionStatus = 0 { ConnectionStatusEnum connectionStatus = 0; } @@ -1664,6 +1758,7 @@ server cluster ThreadNetworkDiagnostics = 53 { command ResetCounts(): DefaultSuccess = 0; } +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; @@ -1736,6 +1831,7 @@ server cluster WiFiNetworkDiagnostics = 54 { command ResetCounts(): DefaultSuccess = 0; } +/** The Ethernet Network Diagnostics Cluster provides 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 EthernetNetworkDiagnostics = 55 { enum PHYRateEnum : ENUM8 { kRate10M = 0; @@ -1774,6 +1870,9 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): 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 SwitchFeature : BITMAP32 { kLatchingSwitch = 0x1; @@ -1824,6 +1923,7 @@ server cluster Switch = 59 { 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; @@ -1864,6 +1964,7 @@ server cluster AdministratorCommissioning = 60 { 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; @@ -1883,12 +1984,6 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct NOCStruct { - fabric_sensitive octet_string noc = 1; - nullable fabric_sensitive octet_string icac = 2; - fabric_idx fabricIndex = 254; - } - fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; vendor_id vendorID = 2; @@ -1898,6 +1993,12 @@ server cluster OperationalCredentials = 62 { 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; @@ -1979,22 +2080,23 @@ server cluster OperationalCredentials = 62 { 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; } - fabric_scoped struct GroupKeyMapStruct { + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; - int16u groupKeySetID = 2; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } - fabric_scoped struct GroupInfoMapStruct { + fabric_scoped struct GroupKeyMapStruct { group_id groupId = 1; - endpoint_no endpoints[] = 2; - optional char_string<16> groupName = 3; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } @@ -2050,7 +2152,14 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ server cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + readonly attribute LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2060,7 +2169,13 @@ server cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ server cluster UserLabel = 65 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + attribute access(write: manage) LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2070,6 +2185,7 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface to a boolean state called StateValue. */ server cluster BooleanState = 69 { info event StateChange = 0 { boolean stateValue = 0; @@ -2084,22 +2200,23 @@ server cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { bitmap ModeSelectFeature : BITMAP32 { kDeponoff = 0x1; } + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; SemanticTagStruct semanticTags[] = 2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - readonly attribute char_string<32> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; @@ -2121,6 +2238,7 @@ server cluster ModeSelect = 80 { command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } +/** An interface to a generic way to secure a door */ server cluster DoorLock = 257 { enum AlarmCodeEnum : ENUM8 { kLockJammed = 0; @@ -2656,6 +2774,7 @@ server cluster DoorLock = 257 { timed command access(invoke: administer) ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; } +/** Provides an interface for controlling and adjusting automatic window coverings. */ server cluster WindowCovering = 258 { enum EndProductType : ENUM8 { kRollerShade = 0; @@ -2709,14 +2828,6 @@ server cluster WindowCovering = 258 { kTiltEncoderControlled = 0x40; } - bitmap Feature : BITMAP32 { - kLift = 0x1; - kTilt = 0x2; - kPositionAwareLift = 0x4; - kAbsolutePosition = 0x8; - kPositionAwareTilt = 0x10; - } - bitmap Mode : BITMAP8 { kMotorDirectionReversed = 0x1; kCalibrationMode = 0x2; @@ -2745,6 +2856,14 @@ server cluster WindowCovering = 258 { kProtection = 0x800; } + bitmap WindowCoveringFeature : BITMAP32 { + kLift = 0x1; + kTilt = 0x2; + kPositionAwareLift = 0x4; + kAbsolutePosition = 0x8; + kPositionAwareTilt = 0x10; + } + readonly attribute Type type = 0; readonly attribute int16u physicalClosedLimitLift = 1; readonly attribute int16u physicalClosedLimitTilt = 2; @@ -2799,6 +2918,7 @@ server cluster WindowCovering = 258 { command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } +/** This cluster provides control of a barrier (garage door). */ server cluster BarrierControl = 259 { readonly attribute enum8 barrierMovingState = 1; readonly attribute bitmap16 barrierSafetyStatus = 2; @@ -2819,6 +2939,7 @@ server cluster BarrierControl = 259 { command BarrierControlStop(): DefaultSuccess = 1; } +/** An interface for configuring and controlling pumps. */ server cluster PumpConfigurationAndControl = 512 { enum ControlModeEnum : ENUM8 { kConstantSpeed = 0; @@ -2836,7 +2957,7 @@ server cluster PumpConfigurationAndControl = 512 { kLocal = 3; } - bitmap PumpFeature : BITMAP32 { + bitmap PumpConfigurationAndControlFeature : BITMAP32 { kConstantPressure = 0x1; kCompensatedPressure = 0x2; kConstantFlow = 0x4; @@ -2940,6 +3061,7 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute int16u clusterRevision = 65533; } +/** An interface for configuring and controlling the functionality of a thermostat. */ server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { kHeat = 0; @@ -3034,6 +3156,7 @@ server cluster Thermostat = 513 { command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; } +/** An interface for controlling a fan in a heating/cooling system. */ server cluster FanControl = 514 { enum FanModeSequenceType : ENUM8 { kOffLowMedHigh = 0; @@ -3096,6 +3219,7 @@ server cluster FanControl = 514 { 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; @@ -3108,6 +3232,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { kDeactivate = 0; @@ -3406,6 +3531,7 @@ server cluster ColorControl = 768 { command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; } +/** Attributes and commands for configuring a lighting ballast. */ server cluster BallastConfiguration = 769 { readonly attribute int8u physicalMinLevel = 0; readonly attribute int8u physicalMaxLevel = 1; @@ -3429,6 +3555,7 @@ server cluster BallastConfiguration = 769 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ server cluster IlluminanceMeasurement = 1024 { enum LightSensorType : ENUM8 { kPhotodiode = 0; @@ -3448,6 +3575,7 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ server cluster TemperatureMeasurement = 1026 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; @@ -3461,8 +3589,9 @@ server cluster TemperatureMeasurement = 1026 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ server cluster PressureMeasurement = 1027 { - bitmap PressureFeature : BITMAP32 { + bitmap PressureMeasurementFeature : BITMAP32 { kExtended = 0x1; } @@ -3477,6 +3606,7 @@ server cluster PressureMeasurement = 1027 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ server cluster FlowMeasurement = 1028 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; @@ -3490,6 +3620,7 @@ server cluster FlowMeasurement = 1028 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; @@ -3503,6 +3634,7 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ server cluster OccupancySensing = 1030 { enum OccupancySensorTypeEnum : ENUM8 { kPir = 0; @@ -3532,6 +3664,7 @@ server cluster OccupancySensing = 1030 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ server cluster WakeOnLan = 1283 { readonly attribute char_string<32> MACAddress = 0; readonly attribute command_id generatedCommandList[] = 65528; @@ -3542,6 +3675,7 @@ server cluster WakeOnLan = 1283 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for controlling the current Channel on a device. */ server cluster Channel = 1284 { enum ChannelStatusEnum : ENUM8 { kSuccess = 0; @@ -3566,6 +3700,13 @@ server cluster Channel = 1284 { optional char_string affiliateCallSign = 4; } + struct LineupInfoStruct { + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; + LineupInfoTypeEnum lineupInfoType = 3; + } + readonly attribute ChannelInfoStruct channelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3575,6 +3716,7 @@ server cluster Channel = 1284 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ server cluster TargetNavigator = 1285 { enum TargetNavigatorStatusEnum : ENUM8 { kSuccess = 0; @@ -3609,6 +3751,7 @@ server cluster TargetNavigator = 1285 { command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } +/** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ server cluster MediaPlayback = 1286 { enum MediaPlaybackStatusEnum : ENUM8 { kSuccess = 0; @@ -3631,6 +3774,11 @@ server cluster MediaPlayback = 1286 { kVariableSpeed = 0x2; } + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; + nullable int64u position = 1; + } + readonly attribute PlaybackStateEnum currentState = 0; readonly attribute nullable epoch_us startTime = 1; readonly attribute nullable int64u duration = 2; @@ -3645,6 +3793,7 @@ server cluster MediaPlayback = 1286 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ server cluster MediaInput = 1287 { enum InputTypeEnum : ENUM8 { kInternal = 0; @@ -3696,6 +3845,7 @@ server cluster MediaInput = 1287 { command RenameInput(RenameInputRequest): DefaultSuccess = 3; } +/** This cluster provides an interface for managing low power mode on a device. */ server cluster LowPower = 1288 { readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3707,6 +3857,7 @@ server cluster LowPower = 1288 { command Sleep(): DefaultSuccess = 0; } +/** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { enum CecKeyCode : ENUM8 { kSelect = 0; @@ -3827,6 +3978,7 @@ server cluster KeypadInput = 1289 { command SendKey(SendKeyRequest): SendKeyResponse = 0; } +/** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ server cluster ContentLauncher = 1290 { enum ContentLaunchStatusEnum : ENUM8 { kSuccess = 0; @@ -3866,8 +4018,15 @@ server cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -3876,9 +4035,14 @@ server cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -3890,18 +4054,6 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute CHAR_STRING acceptHeader[] = 0; attribute bitmap32 supportedStreamingProtocols = 1; readonly attribute command_id generatedCommandList[] = 65528; @@ -3912,6 +4064,7 @@ server cluster ContentLauncher = 1290 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for controlling the Output on a media device such as a TV. */ server cluster AudioOutput = 1291 { enum OutputTypeEnum : ENUM8 { kHdmi = 0; @@ -3942,6 +4095,7 @@ server cluster AudioOutput = 1291 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ server cluster ApplicationLauncher = 1292 { enum ApplicationLauncherStatusEnum : ENUM8 { kSuccess = 0; @@ -3958,6 +4112,11 @@ server cluster ApplicationLauncher = 1292 { char_string applicationID = 1; } + struct ApplicationEPStruct { + ApplicationStruct application = 0; + optional endpoint_no endpoint = 1; + } + readonly attribute INT16U catalogList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3967,6 +4126,7 @@ server cluster ApplicationLauncher = 1292 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ server cluster ApplicationBasic = 1293 { enum ApplicationStatusEnum : ENUM8 { kStopped = 0; @@ -3975,6 +4135,11 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + readonly attribute char_string<32> vendorName = 0; readonly attribute vendor_id vendorID = 1; readonly attribute char_string<32> applicationName = 2; @@ -3990,6 +4155,7 @@ server cluster ApplicationBasic = 1293 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ server cluster AccountLogin = 1294 { readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3999,6 +4165,7 @@ server cluster AccountLogin = 1294 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ server cluster ElectricalMeasurement = 2820 { readonly attribute bitmap32 measurementType = 0; readonly attribute int32s totalActivePower = 772; @@ -4019,6 +4186,7 @@ server cluster ElectricalMeasurement = 2820 { readonly attribute int16u clusterRevision = 65533; } +/** Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. */ server cluster ClientMonitoring = 4166 { fabric_scoped struct MonitoringRegistration { node_id clientNodeId = 1; @@ -4051,6 +4219,7 @@ server cluster ClientMonitoring = 4166 { command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; } +/** The Test Cluster is meant to validate the generated code */ server cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { kUnspecified = 0; @@ -4093,26 +4262,6 @@ server cluster UnitTesting = 4294048773 { kValueC = 0x4; } - struct TestListStructOctet { - int64u member1 = 0; - octet_string<32> member2 = 1; - } - - struct NullablesAndOptionalsStruct { - nullable int16u nullableInt = 0; - optional int16u optionalInt = 1; - optional nullable int16u nullableOptionalInt = 2; - nullable char_string nullableString = 3; - optional char_string optionalString = 4; - optional nullable char_string nullableOptionalString = 5; - nullable SimpleStruct nullableStruct = 6; - optional SimpleStruct optionalStruct = 7; - optional nullable SimpleStruct nullableOptionalStruct = 8; - nullable SimpleEnum nullableList[] = 9; - optional SimpleEnum optionalList[] = 10; - optional nullable SimpleEnum nullableOptionalList[] = 11; - } - struct SimpleStruct { int8u a = 0; boolean b = 1; @@ -4135,6 +4284,21 @@ server cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + struct NullablesAndOptionalsStruct { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + struct NestedStruct { int8u a = 0; boolean b = 1; @@ -4151,6 +4315,15 @@ server cluster UnitTesting = 4294048773 { int8u g[] = 6; } + struct DoubleNestedStructList { + NestedStructList a[] = 0; + } + + struct TestListStructOctet { + int64u member1 = 0; + octet_string<32> member2 = 1; + } + info event TestEvent = 1 { INT8U arg1 = 1; SimpleEnum arg2 = 2; @@ -4368,6 +4541,7 @@ server cluster UnitTesting = 4294048773 { command TestEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventRequestRequest): TestEmitTestFabricScopedEventResponse = 21; } +/** The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). */ server cluster FaultInjection = 4294048774 { enum FaultType : ENUM8 { kUnspecified = 0; @@ -4407,15 +4581,15 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; server cluster Identify { - ram attribute identifyTime; - ram attribute identifyType; - ram attribute featureMap; + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -4424,13 +4598,13 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster Binding { callback attribute binding; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4442,7 +4616,7 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -4457,20 +4631,20 @@ endpoint 0 { callback attribute productID; persist attribute nodeLabel; callback attribute location default = "XX"; - callback attribute hardwareVersion; + callback attribute hardwareVersion default = 0; callback attribute hardwareVersionString; - callback attribute softwareVersion; + 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; + persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4478,49 +4652,49 @@ endpoint 0 { emits event StateTransition; emits event VersionApplied; emits event DownloadError; - callback attribute defaultOTAProviders; + callback attribute defaultOTAProviders default = 0; ram attribute updatePossible default = 1; - ram attribute updateState; - ram attribute updateStateProgress; - ram attribute featureMap; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster TimeFormatLocalization { - persist attribute hourFormat; - persist attribute activeCalendarType; + persist attribute hourFormat default = 0; + persist attribute activeCalendarType default = 0; callback attribute supportedCalendarTypes; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UnitLocalization { - persist attribute temperatureUnit; + persist attribute temperatureUnit default = 0; ram attribute featureMap default = 0x1; ram attribute clusterRevision default = 1; } server cluster PowerSourceConfiguration { callback attribute sources; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster PowerSource { - ram attribute status; + ram attribute status default = 0; ram attribute order default = 3; ram attribute description default = "B1"; - ram attribute batChargeLevel; + ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; ram attribute featureMap default = 2; @@ -4528,12 +4702,12 @@ endpoint 0 { } server cluster GeneralCommissioning { - ram attribute breadcrumb; + ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; - callback attribute regulatoryConfig; - callback attribute locationCapability; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4551,7 +4725,7 @@ endpoint 0 { } server cluster DiagnosticLogs { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4561,9 +4735,9 @@ endpoint 0 { emits event NetworkFaultChange; emits event BootReason; callback attribute networkInterfaces; - callback attribute rebootCount; - callback attribute upTime; - callback attribute totalOperationalHours; + callback attribute rebootCount default = 0x0000; + callback attribute upTime default = 0x0000000000000000; + callback attribute totalOperationalHours default = 0x00000000; callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; @@ -4572,16 +4746,16 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster SoftwareDiagnostics { emits event SoftwareFault; callback attribute threadMetrics; - callback attribute currentHeapFree; - callback attribute currentHeapUsed; - callback attribute currentHeapHighWatermark; + callback attribute currentHeapFree default = 0x0000000000000000; + callback attribute currentHeapUsed default = 0x0000000000000000; + callback attribute currentHeapHighWatermark default = 0x0000000000000000; ram attribute featureMap default = 1; ram attribute clusterRevision default = 1; } @@ -4589,11 +4763,11 @@ endpoint 0 { server cluster ThreadNetworkDiagnostics { callback attribute channel; callback attribute routingRole; - callback attribute networkName; - callback attribute panId; - callback attribute extendedPanId; + callback attribute networkName default = "0"; + callback attribute panId default = 0x0000; + callback attribute extendedPanId default = 0x0000000000000000; callback attribute meshLocalPrefix; - callback attribute overrunCount; + callback attribute overrunCount default = 0x0000000000000000; callback attribute neighborTable; callback attribute routeTable; callback attribute partitionId; @@ -4601,53 +4775,53 @@ endpoint 0 { callback attribute dataVersion; callback attribute stableDataVersion; callback attribute leaderRouterId; - callback attribute detachedRoleCount; - callback attribute childRoleCount; - callback attribute routerRoleCount; - callback attribute leaderRoleCount; - callback attribute attachAttemptCount; - callback attribute partitionIdChangeCount; - callback attribute betterPartitionAttachAttemptCount; - callback attribute parentChangeCount; - callback attribute txTotalCount; - callback attribute txUnicastCount; - callback attribute txBroadcastCount; - callback attribute txAckRequestedCount; - callback attribute txAckedCount; - callback attribute txNoAckRequestedCount; - callback attribute txDataCount; - callback attribute txDataPollCount; - callback attribute txBeaconCount; - callback attribute txBeaconRequestCount; - callback attribute txOtherCount; - callback attribute txRetryCount; - callback attribute txDirectMaxRetryExpiryCount; - callback attribute txIndirectMaxRetryExpiryCount; - callback attribute txErrCcaCount; - callback attribute txErrAbortCount; - callback attribute txErrBusyChannelCount; - callback attribute rxTotalCount; - callback attribute rxUnicastCount; - callback attribute rxBroadcastCount; - callback attribute rxDataCount; - callback attribute rxDataPollCount; - callback attribute rxBeaconCount; - callback attribute rxBeaconRequestCount; - callback attribute rxOtherCount; - callback attribute rxAddressFilteredCount; - callback attribute rxDestAddrFilteredCount; - callback attribute rxDuplicatedCount; - callback attribute rxErrNoFrameCount; - callback attribute rxErrUnknownNeighborCount; - callback attribute rxErrInvalidSrcAddrCount; - callback attribute rxErrSecCount; - callback attribute rxErrFcsCount; - callback attribute rxErrOtherCount; - callback attribute activeTimestamp; - callback attribute pendingTimestamp; - callback attribute delay; + callback attribute detachedRoleCount default = 0x0000; + callback attribute childRoleCount default = 0x0000; + callback attribute routerRoleCount default = 0x0000; + callback attribute leaderRoleCount default = 0x0000; + callback attribute attachAttemptCount default = 0x0000; + callback attribute partitionIdChangeCount default = 0x0000; + callback attribute betterPartitionAttachAttemptCount default = 0x0000; + callback attribute parentChangeCount default = 0x0000; + callback attribute txTotalCount default = 0x0000; + callback attribute txUnicastCount default = 0x0000; + callback attribute txBroadcastCount default = 0x0000; + callback attribute txAckRequestedCount default = 0x0000; + callback attribute txAckedCount default = 0x0000; + callback attribute txNoAckRequestedCount default = 0x0000; + callback attribute txDataCount default = 0x0000; + callback attribute txDataPollCount default = 0x0000; + callback attribute txBeaconCount default = 0x0000; + callback attribute txBeaconRequestCount default = 0x0000; + callback attribute txOtherCount default = 0x0000; + callback attribute txRetryCount default = 0x0000; + callback attribute txDirectMaxRetryExpiryCount default = 0x0000; + callback attribute txIndirectMaxRetryExpiryCount default = 0x0000; + callback attribute txErrCcaCount default = 0x0000; + callback attribute txErrAbortCount default = 0x0000; + callback attribute txErrBusyChannelCount default = 0x0000; + callback attribute rxTotalCount default = 0x0000; + callback attribute rxUnicastCount default = 0x0000; + callback attribute rxBroadcastCount default = 0x0000; + callback attribute rxDataCount default = 0x0000; + callback attribute rxDataPollCount default = 0x0000; + callback attribute rxBeaconCount default = 0x0000; + callback attribute rxBeaconRequestCount default = 0x0000; + callback attribute rxOtherCount default = 0x0000; + callback attribute rxAddressFilteredCount default = 0x0000; + callback attribute rxDestAddrFilteredCount default = 0x0000; + callback attribute rxDuplicatedCount default = 0x0000; + callback attribute rxErrNoFrameCount default = 0x0000; + callback attribute rxErrUnknownNeighborCount default = 0x0000; + callback attribute rxErrInvalidSrcAddrCount default = 0x0000; + callback attribute rxErrSecCount default = 0x0000; + callback attribute rxErrFcsCount default = 0x0000; + callback attribute rxErrOtherCount default = 0x0000; + callback attribute activeTimestamp default = 0x0000000000000000; + callback attribute pendingTimestamp default = 0x0000000000000000; + callback attribute delay default = 0x0000; callback attribute securityPolicy; - callback attribute channelPage0Mask; + callback attribute channelPage0Mask default = "0x0000"; callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; ram attribute featureMap default = 0x000F; @@ -4661,39 +4835,39 @@ endpoint 0 { callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; - callback attribute channelNumber; - callback attribute rssi; - callback attribute beaconLostCount; - callback attribute beaconRxCount; - callback attribute packetMulticastRxCount; - callback attribute packetMulticastTxCount; - callback attribute packetUnicastRxCount; - callback attribute packetUnicastTxCount; - callback attribute currentMaxRate; - callback attribute overrunCount; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + callback attribute beaconLostCount default = 0x00000000; + callback attribute beaconRxCount default = 0x00000000; + callback attribute packetMulticastRxCount default = 0x00000000; + callback attribute packetMulticastTxCount default = 0x00000000; + callback attribute packetUnicastRxCount default = 0x00000000; + callback attribute packetUnicastTxCount default = 0x00000000; + callback attribute currentMaxRate default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } server cluster EthernetNetworkDiagnostics { callback attribute PHYRate; - callback attribute fullDuplex; - callback attribute packetRxCount; - callback attribute packetTxCount; - callback attribute txErrCount; - callback attribute collisionCount; - callback attribute overrunCount; - callback attribute carrierDetect; - callback attribute timeSinceReset; + callback attribute fullDuplex default = 0x00; + callback attribute packetRxCount default = 0x0000000000000000; + callback attribute packetTxCount default = 0x0000000000000000; + callback attribute txErrCount default = 0x0000000000000000; + callback attribute collisionCount default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute carrierDetect default = 0x00; + callback attribute timeSinceReset default = 0x0000000000000000; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } server cluster AdministratorCommissioning { - callback attribute windowStatus; + callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; - callback attribute adminVendorId; - ram attribute featureMap; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4704,7 +4878,7 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4713,27 +4887,27 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster FixedLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster RelativeHumidityMeasurement { ram attribute measuredValue; - ram attribute minMeasuredValue; + ram attribute minMeasuredValue default = 0; ram attribute maxMeasuredValue default = 0x2710; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -4745,7 +4919,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4753,7 +4927,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } } @@ -4762,33 +4936,33 @@ endpoint 1 { binding cluster OnOff; server cluster Identify { - ram attribute identifyTime; - ram attribute identifyType; - ram attribute featureMap; + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Scenes { - ram attribute sceneCount; - ram attribute currentScene; - ram attribute currentGroup; - ram attribute sceneValid; + ram attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster OnOff { - persist attribute onOff; + persist attribute onOff default = 0x00; ram attribute globalSceneControl default = 0x01; - ram attribute onTime; - ram attribute offWaitTime; + ram attribute onTime default = 0x0000; + ram attribute offWaitTime default = 0x0000; persist attribute startUpOnOff default = 0xFF; ram attribute featureMap default = 0x0001; ram attribute clusterRevision default = 4; @@ -4796,21 +4970,21 @@ endpoint 1 { server cluster OnOffSwitchConfiguration { ram attribute switchType; - ram attribute switchActions; - ram attribute featureMap; + ram attribute switchActions default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster LevelControl { persist attribute currentLevel default = 0xFE; - ram attribute remainingTime; + ram attribute remainingTime default = 0x0000; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; - ram attribute currentFrequency; - ram attribute minFrequency; - ram attribute maxFrequency; - ram attribute options; - ram attribute onOffTransitionTime; + ram attribute currentFrequency default = 0x0000; + ram attribute minFrequency default = 0x0000; + ram attribute maxFrequency default = 0x0000; + ram attribute options default = 0x00; + ram attribute onOffTransitionTime default = 0x0000; ram attribute onLevel default = 0xFF; ram attribute onTransitionTime; ram attribute offTransitionTime; @@ -4821,10 +4995,10 @@ endpoint 1 { } server cluster BinaryInputBasic { - ram attribute outOfService; + ram attribute outOfService default = 0x00; ram attribute presentValue; - ram attribute statusFlags; - ram attribute featureMap; + ram attribute statusFlags default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4833,13 +5007,13 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster Binding { callback attribute binding; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4847,16 +5021,16 @@ endpoint 1 { callback attribute actionList; callback attribute endpointLists; callback attribute setupURL; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster PowerSource { emits event BatFaultChange; - ram attribute status; + ram attribute status default = 0; ram attribute order default = 2; ram attribute description default = "B2"; - ram attribute batChargeLevel; + ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; ram attribute featureMap default = 2; @@ -4874,28 +5048,28 @@ endpoint 1 { server cluster FixedLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster BooleanState { - ram attribute stateValue; - ram attribute featureMap; + ram attribute stateValue default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ModeSelect { ram attribute description default = "Coffee"; - ram attribute standardNamespace; - callback attribute supportedModes; - persist attribute currentMode; - persist attribute startUpMode; + ram attribute standardNamespace default = 0; + callback attribute supportedModes default = 0; + persist attribute currentMode default = 0; + persist attribute startUpMode default = 0; persist attribute onMode default = 255; callback attribute generatedCommandList; callback attribute acceptedCommandList; @@ -4922,7 +5096,7 @@ endpoint 1 { ram attribute numberOfRFIDUsersSupported default = 10; ram attribute numberOfWeekDaySchedulesSupportedPerUser default = 10; ram attribute numberOfYearDaySchedulesSupportedPerUser default = 10; - ram attribute numberOfHolidaySchedulesSupported; + ram attribute numberOfHolidaySchedulesSupported default = 0; ram attribute maxPINCodeLength default = 6; ram attribute minPINCodeLength default = 6; ram attribute maxRFIDCodeLength default = 20; @@ -4931,16 +5105,16 @@ endpoint 1 { ram attribute numberOfCredentialsSupportedPerUser default = 5; ram attribute language default = "en"; ram attribute autoRelockTime default = 60; - ram attribute soundVolume; - ram attribute operatingMode; + ram attribute soundVolume default = 0x00; + ram attribute operatingMode default = 0x00; ram attribute supportedOperatingModes default = 0xFFF6; - ram attribute defaultConfigurationRegister; - ram attribute enableOneTouchLocking; - ram attribute enableInsideStatusLED; - ram attribute enablePrivacyModeButton; + ram attribute defaultConfigurationRegister default = 0; + ram attribute enableOneTouchLocking default = 0x00; + ram attribute enableInsideStatusLED default = 0; + ram attribute enablePrivacyModeButton default = 0x00; ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; - ram attribute requirePINforRemoteOperation; + ram attribute requirePINforRemoteOperation default = 0; ram attribute featureMap default = 0xD13; ram attribute clusterRevision default = 6; } @@ -4951,23 +5125,23 @@ endpoint 1 { ram attribute physicalClosedLimitTilt default = 0xFFFF; persist attribute currentPositionLift default = 0x7FFF; persist attribute currentPositionTilt default = 0x7FFF; - persist attribute numberOfActuationsLift; - persist attribute numberOfActuationsTilt; + persist attribute numberOfActuationsLift default = 0x0000; + persist attribute numberOfActuationsTilt default = 0x0000; persist attribute configStatus default = 0x03; persist attribute currentPositionLiftPercentage default = 50; persist attribute currentPositionTiltPercentage default = 50; - ram attribute operationalStatus; + ram attribute operationalStatus default = 0x00; ram attribute targetPositionLiftPercent100ths default = 5000; ram attribute targetPositionTiltPercent100ths default = 5000; - ram attribute endProductType; + ram attribute endProductType default = 0x00; persist attribute currentPositionLiftPercent100ths default = 5000; persist attribute currentPositionTiltPercent100ths default = 5000; - persist attribute installedOpenLimitLift; + persist attribute installedOpenLimitLift default = 0x0000; persist attribute installedClosedLimitLift default = 0xFFFF; - persist attribute installedOpenLimitTilt; + persist attribute installedOpenLimitTilt default = 0x0000; persist attribute installedClosedLimitTilt default = 0xFFFF; - persist attribute mode; - ram attribute safetyStatus; + persist attribute mode default = 0x00; + ram attribute safetyStatus default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -4980,7 +5154,7 @@ endpoint 1 { ram attribute barrierSafetyStatus; ram attribute barrierCapabilities; ram attribute barrierPosition; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -5003,11 +5177,11 @@ endpoint 1 { ram attribute effectiveControlMode; ram attribute capacity; ram attribute speed; - ram attribute lifetimeRunningHours; + ram attribute lifetimeRunningHours default = 0x000000; ram attribute power; - ram attribute lifetimeEnergyConsumed; - ram attribute operationMode; - ram attribute controlMode; + ram attribute lifetimeEnergyConsumed default = 0x00000000; + ram attribute operationMode default = 0x00; + ram attribute controlMode default = 0x00; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 4; } @@ -5035,40 +5209,40 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode; + ram attribute fanMode default = 0x00; ram attribute fanModeSequence default = 0x02; - ram attribute percentSetting; - ram attribute percentCurrent; + ram attribute percentSetting default = 0x00; + ram attribute percentCurrent default = 0x00; ram attribute speedMax default = 100; - ram attribute speedSetting; - ram attribute speedCurrent; - ram attribute rockSupport; - ram attribute rockSetting; - ram attribute windSupport; - ram attribute windSetting; + ram attribute speedSetting default = 0x00; + ram attribute speedCurrent default = 0x00; + ram attribute rockSupport default = 0x00; + ram attribute rockSetting default = 0x00; + ram attribute windSupport default = 0x00; + ram attribute windSetting default = 0x00; ram attribute featureMap default = 0x0F; ram attribute clusterRevision default = 2; } server cluster ThermostatUserInterfaceConfiguration { - ram attribute temperatureDisplayMode; - ram attribute keypadLockout; + ram attribute temperatureDisplayMode default = 0x00; + ram attribute keypadLockout default = 0x00; ram attribute scheduleProgrammingVisibility; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } server cluster ColorControl { - ram attribute currentHue; - ram attribute currentSaturation; - ram attribute remainingTime; + ram attribute currentHue default = 0x00; + ram attribute currentSaturation default = 0x00; + ram attribute remainingTime default = 0x0000; ram attribute currentX default = 0x616B; ram attribute currentY default = 0x607D; ram attribute driftCompensation; ram attribute compensationText; ram attribute colorTemperatureMireds default = 0x00FA; ram attribute colorMode default = 0x01; - ram attribute options; + ram attribute options default = 0x00; ram attribute numberOfPrimaries; ram attribute primary1X; ram attribute primary1Y; @@ -5099,15 +5273,15 @@ endpoint 1 { ram attribute colorPointBX; ram attribute colorPointBY; ram attribute colorPointBIntensity; - ram attribute enhancedCurrentHue; + ram attribute enhancedCurrentHue default = 0x0000; ram attribute enhancedColorMode default = 0x01; - ram attribute colorLoopActive; - ram attribute colorLoopDirection; + ram attribute colorLoopActive default = 0x00; + ram attribute colorLoopDirection default = 0x00; ram attribute colorLoopTime default = 0x0019; ram attribute colorLoopStartEnhancedHue default = 0x2300; - ram attribute colorLoopStoredEnhancedHue; + ram attribute colorLoopStoredEnhancedHue default = 0x0000; ram attribute colorCapabilities default = 0x1F; - ram attribute colorTempPhysicalMinMireds; + ram attribute colorTempPhysicalMinMireds default = 0x0000; ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; ram attribute coupleColorTempToLevelMinMireds; ram attribute startUpColorTemperatureMireds; @@ -5118,7 +5292,7 @@ endpoint 1 { server cluster BallastConfiguration { ram attribute physicalMinLevel default = 0x01; ram attribute physicalMaxLevel default = 0xFE; - ram attribute ballastStatus; + ram attribute ballastStatus default = 0x00; ram attribute minLevel default = 0x01; ram attribute maxLevel default = 0xFE; ram attribute intrinsicBallastFactor; @@ -5127,23 +5301,23 @@ endpoint 1 { ram attribute lampType; ram attribute lampManufacturer; ram attribute lampRatedHours default = 0xFFFFFF; - ram attribute lampBurnHours; - ram attribute lampAlarmMode; + ram attribute lampBurnHours default = 0x000000; + ram attribute lampAlarmMode default = 0x00; ram attribute lampBurnHoursTripPoint default = 0xFFFFFF; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster IlluminanceMeasurement { - ram attribute measuredValue; + ram attribute measuredValue default = 0x0000; ram attribute minMeasuredValue default = 0x01; ram attribute maxMeasuredValue default = 0xFFFE; ram attribute tolerance; ram attribute lightSensorType default = 0xFF; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -5152,15 +5326,15 @@ endpoint 1 { ram attribute minMeasuredValue default = 0x8000; ram attribute maxMeasuredValue default = 0x8000; ram attribute tolerance; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster PressureMeasurement { - ram attribute measuredValue; + ram attribute measuredValue default = 0x0000; ram attribute minMeasuredValue; ram attribute maxMeasuredValue; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -5168,17 +5342,17 @@ endpoint 1 { ram attribute measuredValue; ram attribute minMeasuredValue; ram attribute maxMeasuredValue; - ram attribute tolerance; - ram attribute featureMap; + ram attribute tolerance default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster RelativeHumidityMeasurement { ram attribute measuredValue; - ram attribute minMeasuredValue; + ram attribute minMeasuredValue default = 0; ram attribute maxMeasuredValue default = 0x2710; ram attribute tolerance; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -5186,74 +5360,74 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster WakeOnLan { ram attribute MACAddress; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster Channel { callback attribute channelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster TargetNavigator { callback attribute targetList; - ram attribute currentTarget; - ram attribute featureMap; + ram attribute currentTarget default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster MediaPlayback { - ram attribute currentState; + ram attribute currentState default = 0x00; ram attribute startTime default = 0xFF; ram attribute duration; ram attribute playbackSpeed; ram attribute seekRangeEnd; ram attribute seekRangeStart; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster MediaInput { callback attribute inputList; - ram attribute currentInput; - ram attribute featureMap; + ram attribute currentInput default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster LowPower { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster KeypadInput { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ContentLauncher { callback attribute acceptHeader; ram attribute supportedStreamingProtocols; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster AudioOutput { callback attribute outputList; - ram attribute currentOutput; - ram attribute featureMap; + ram attribute currentOutput default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ApplicationLauncher { callback attribute catalogList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -5265,18 +5439,18 @@ endpoint 1 { ram attribute status; ram attribute applicationVersion; callback attribute allowedVendorList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster AccountLogin { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ElectricalMeasurement { - ram attribute measurementType; - ram attribute totalActivePower; + ram attribute measurementType default = 0x000000; + ram attribute totalActivePower default = 0x000000; ram attribute rmsVoltage default = 0xffff; ram attribute rmsVoltageMin default = 0x8000; ram attribute rmsVoltageMax default = 0x8000; @@ -5286,38 +5460,38 @@ endpoint 1 { ram attribute activePower default = 0xffff; ram attribute activePowerMin default = 0xffff; ram attribute activePowerMax default = 0xffff; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster UnitTesting { emits event TestEvent; emits event TestFabricScopedEvent; - ram attribute boolean; - ram attribute bitmap8; - ram attribute bitmap16; - ram attribute bitmap32; - ram attribute bitmap64; - ram attribute int8u; - ram attribute int16u; - ram attribute int24u; - ram attribute int32u; - ram attribute int40u; - ram attribute int48u; - ram attribute int56u; - ram attribute int64u; - ram attribute int8s; - ram attribute int16s; - ram attribute int24s; - ram attribute int32s; - ram attribute int40s; - ram attribute int48s; - ram attribute int56s; - ram attribute int64s; - ram attribute enum8; - ram attribute enum16; - ram attribute floatSingle; - ram attribute floatDouble; + ram attribute boolean default = false; + ram attribute bitmap8 default = 0; + ram attribute bitmap16 default = 0; + ram attribute bitmap32 default = 0; + ram attribute bitmap64 default = 0; + ram attribute int8u default = 0; + ram attribute int16u default = 0; + ram attribute int24u default = 0; + ram attribute int32u default = 0; + ram attribute int40u default = 0; + ram attribute int48u default = 0; + ram attribute int56u default = 0; + ram attribute int64u default = 0; + ram attribute int8s default = 0; + ram attribute int16s default = 0; + ram attribute int24s default = 0; + ram attribute int32s default = 0; + ram attribute int40s default = 0; + ram attribute int48s default = 0; + ram attribute int56s default = 0; + ram attribute int64s default = 0; + ram attribute enum8 default = 0; + ram attribute enum16 default = 0; + ram attribute floatSingle default = 0; + ram attribute floatDouble default = 0; ram attribute octetString; callback attribute listInt8u; callback attribute listOctetString; @@ -5340,31 +5514,31 @@ endpoint 1 { ram attribute timedWriteBoolean; callback attribute generalErrorBoolean; callback attribute clusterErrorBoolean; - ram attribute nullableBoolean; - ram attribute nullableBitmap8; - ram attribute nullableBitmap16; - ram attribute nullableBitmap32; - ram attribute nullableBitmap64; - ram attribute nullableInt8u; - ram attribute nullableInt16u; - ram attribute nullableInt24u; - ram attribute nullableInt32u; - ram attribute nullableInt40u; - ram attribute nullableInt48u; - ram attribute nullableInt56u; - ram attribute nullableInt64u; - ram attribute nullableInt8s; - ram attribute nullableInt16s; - ram attribute nullableInt24s; - ram attribute nullableInt32s; - ram attribute nullableInt40s; - ram attribute nullableInt48s; - ram attribute nullableInt56s; - ram attribute nullableInt64s; - ram attribute nullableEnum8; - ram attribute nullableEnum16; - ram attribute nullableFloatSingle; - ram attribute nullableFloatDouble; + ram attribute nullableBoolean default = false; + ram attribute nullableBitmap8 default = 0; + ram attribute nullableBitmap16 default = 0; + ram attribute nullableBitmap32 default = 0; + ram attribute nullableBitmap64 default = 0; + ram attribute nullableInt8u default = 0; + ram attribute nullableInt16u default = 0; + ram attribute nullableInt24u default = 0; + ram attribute nullableInt32u default = 0; + ram attribute nullableInt40u default = 0; + ram attribute nullableInt48u default = 0; + ram attribute nullableInt56u default = 0; + ram attribute nullableInt64u default = 0; + ram attribute nullableInt8s default = 0; + ram attribute nullableInt16s default = 0; + ram attribute nullableInt24s default = 0; + ram attribute nullableInt32s default = 0; + ram attribute nullableInt40s default = 0; + ram attribute nullableInt48s default = 0; + ram attribute nullableInt56s default = 0; + ram attribute nullableInt64s default = 0; + ram attribute nullableEnum8 default = 0; + ram attribute nullableEnum16 default = 0; + ram attribute nullableFloatSingle default = 0; + ram attribute nullableFloatDouble default = 0; ram attribute nullableOctetString; ram attribute nullableCharString; ram attribute nullableEnumAttr; @@ -5373,8 +5547,8 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt8s default = -20; ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; - callback attribute writeOnlyInt8u; - ram attribute featureMap; + callback attribute writeOnlyInt8u default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } } @@ -5383,17 +5557,17 @@ endpoint 2 { server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster OnOff { - ram attribute onOff; + ram attribute onOff default = 0x00; ram attribute globalSceneControl default = 1; - ram attribute onTime; - ram attribute offWaitTime; + ram attribute onTime default = 0; + ram attribute offWaitTime default = 0; ram attribute startUpOnOff; - ram attribute featureMap; + ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 4; } @@ -5402,15 +5576,15 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster PowerSource { - ram attribute status; + ram attribute status default = 0; ram attribute order default = 1; ram attribute description default = "B3"; - ram attribute batChargeLevel; + ram attribute batChargeLevel default = 0; ram attribute batReplacementNeeded; ram attribute batReplaceability; ram attribute featureMap default = 2; @@ -5421,7 +5595,7 @@ endpoint 2 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } } @@ -5437,7 +5611,7 @@ endpoint 65534 { callback attribute lastNetworkingStatus; callback attribute lastNetworkID; callback attribute lastConnectErrorValue; - callback attribute featureMap; + callback attribute featureMap default = 0; callback attribute clusterRevision default = 1; } } diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index df0cb9c4064032..7440551e2fda27 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -13,6 +13,10 @@ set(pigweed_dir "${chip_dir}/third_party/pigweed/repo") include(${pigweed_dir}/pw_build/pigweed.cmake) include(${pigweed_dir}/pw_protobuf_compiler/proto.cmake) +include(${pigweed_dir}/pw_assert/backend.cmake) +include(${pigweed_dir}/pw_log/backend.cmake) +include(${pigweed_dir}/pw_sys_io/backend.cmake) +include(${pigweed_dir}/pw_trace/backend.cmake) set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING "" FORCE) diff --git a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp index 4c1b55fbddb9fc..d0db78341501a5 100644 --- a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp @@ -28,11 +28,15 @@ #include "CHIPDeviceManager.h" #include #include +#include +#include +#include #include #include #include using namespace ::chip; +using namespace ::chip::Credentials; namespace chip { @@ -40,6 +44,8 @@ namespace DeviceManager { using namespace ::chip::DeviceLayer; +chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; + void CHIPDeviceManager::CommonDeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) { CHIPDeviceManagerCallbacks * cb = reinterpret_cast(arg); @@ -61,6 +67,19 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) err = PlatformMgr().InitChipStack(); SuccessOrExit(err); + err = mFactoryDataProvider.Init(); + if (err == CHIP_NO_ERROR) + { + SetCommissionableDataProvider(&mFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); + SetDeviceInstanceInfoProvider(&mFactoryDataProvider); + } + else + { + ChipLogProgress(DeviceLayer, "Using example DAC provider"); + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + } + if (CONFIG_NETWORK_LAYER_BLE) { ConnectivityMgr().SetBLEAdvertisingEnabled(true); diff --git a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp index 3f1d88621bdbfb..b31d2629af14aa 100644 --- a/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ case DeviceEventType::kCommissioningComplete: ChipLogProgress(DeviceLayer, "Commissioning Complete"); + chip::DeviceLayer::Internal::AmebaUtils::SetCurrentProvisionedNetwork(); break; } } @@ -142,8 +144,9 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event chip::app::DnssdServer::Instance().StartServer(); #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Init OTA requestor only when we have gotten IPv6 address - if (OTAInitializer::Instance().CheckInit()) + if (!OTAInitializer::Instance().CheckInit()) { + ChipLogProgress(DeviceLayer, "Initializing OTA"); chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds32(kInitOTARequestorDelaySec), InitOTARequestorHandler, nullptr); } diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index c0e918e2082a86..c8b2e9a4333e14 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -31,11 +31,8 @@ #include #include #include -#include -#include #include #include -#include #include #include #include @@ -51,7 +48,6 @@ #endif using namespace ::chip; -using namespace ::chip::Credentials; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; using namespace ::chip::System; @@ -122,7 +118,6 @@ Identify gIdentify1 = { static DeviceCallbacks EchoCallbacks; chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; -chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; static void InitServer(intptr_t context) { @@ -158,10 +153,6 @@ extern "C" void ChipTest(void) initPref(); - mFactoryDataProvider.Init(); - SetCommissionableDataProvider(&mFactoryDataProvider); - SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); - CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); err = deviceMgr.Init(&EchoCallbacks); @@ -170,10 +161,6 @@ extern "C" void ChipTest(void) ChipLogError(DeviceLayer, "DeviceManagerInit() - ERROR!\r\n"); } - // Set DeviceInstanceInfoProvider after CHIPDeviceManager init - // CHIPDeviceManager init will set GenericDeviceInsanceInfoProvider first - SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, 0); statusLED1.Init(STATUS_LED_GPIO_NUM); diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 144dbd4892af33..4b2f6a464e2933 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -249,6 +249,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC target_link_options(${COMPONENT_LIB} PUBLIC "-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld" + "-L${PIGWEED_ROOT}/pw_tokenizer" ) target_compile_options(${COMPONENT_LIB} PRIVATE diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 0694c091cb3787..cf5a5aa1cb1980 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -545,18 +545,6 @@ class SetupListModel : public TouchesMatterStackModel private: std::vector options; }; -class CustomScreen : public Screen -{ -public: - virtual void Display() - { - TFT_drawCircle(0.3 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawCircle(0.7 * DisplayWidth, 0.3 * DisplayHeight, 8, TFT_BLUE); - TFT_drawLine(0.2 * DisplayWidth, 0.6 * DisplayHeight, 0.3 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.3 * DisplayWidth, 0.7 * DisplayHeight, 0.7 * DisplayWidth, 0.7 * DisplayHeight, TFT_BLUE); - TFT_drawLine(0.7 * DisplayWidth, 0.7 * DisplayHeight, 0.8 * DisplayWidth, 0.6 * DisplayHeight, TFT_BLUE); - } -}; void SetupPretendDevices() { @@ -729,20 +717,10 @@ esp_err_t InitM5Stack(std::string qrCodeText) ESP_LOGI(TAG, "Opening Setup list"); ScreenManager::PushScreen(chip::Platform::New(chip::Platform::New())); }) - ->Item("Status", - [=]() { - ESP_LOGI(TAG, "Opening Status screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("Custom", - []() { - ESP_LOGI(TAG, "Opening custom screen"); - ScreenManager::PushScreen(chip::Platform::New()); - }) - ->Item("More") - ->Item("Items") - ->Item("For") - ->Item("Demo"))); + ->Item("Status", [=]() { + ESP_LOGI(TAG, "Opening Status screen"); + ScreenManager::PushScreen(chip::Platform::New()); + }))); return ESP_OK; } #endif diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 0bd2a859f936af..1a794d80f8c16a 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -181,7 +181,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) GeneralFaults previous; GeneralFaults current; -#if CHIP_CONFIG_TEST using GeneralDiagnostics::HardwareFaultEnum; // On Linux Simulation, set following hardware faults statically. @@ -192,7 +191,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kSensor))); ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kPowerSource))); ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kUserInterfaceFault))); -#endif Clusters::GeneralDiagnosticsServer::Instance().OnHardwareFaultsDetect(previous, current); } else if (eventId == Clusters::GeneralDiagnostics::Events::RadioFaultChange::Id) @@ -200,7 +198,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) GeneralFaults previous; GeneralFaults current; -#if CHIP_CONFIG_TEST // On Linux Simulation, set following radio faults statically. ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_ENUM_WI_FI_FAULT)); ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_ENUM_THREAD_FAULT)); @@ -209,7 +206,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_ENUM_CELLULAR_FAULT)); ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_ENUM_THREAD_FAULT)); ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_ENUM_NFC_FAULT)); -#endif Clusters::GeneralDiagnosticsServer::Instance().OnRadioFaultsDetect(previous, current); } else if (eventId == Clusters::GeneralDiagnostics::Events::NetworkFaultChange::Id) @@ -217,7 +213,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) GeneralFaults previous; GeneralFaults current; -#if CHIP_CONFIG_TEST // On Linux Simulation, set following radio faults statically. ReturnOnFailure(previous.add(EMBER_ZCL_NETWORK_FAULT_ENUM_HARDWARE_FAILURE)); ReturnOnFailure(previous.add(EMBER_ZCL_NETWORK_FAULT_ENUM_NETWORK_JAMMED)); @@ -225,7 +220,6 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_HARDWARE_FAILURE)); ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_NETWORK_JAMMED)); ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_CONNECTION_FAILED)); -#endif Clusters::GeneralDiagnosticsServer::Instance().OnNetworkFaultsDetect(previous, current); } else diff --git a/examples/all-clusters-app/linux/fuzzing-main.cpp b/examples/all-clusters-app/linux/fuzzing-main.cpp index b1736826ef335a..4fe21865727371 100644 --- a/examples/all-clusters-app/linux/fuzzing-main.cpp +++ b/examples/all-clusters-app/linux/fuzzing-main.cpp @@ -18,9 +18,17 @@ #include "AppMain.h" #include +#include + using namespace chip; using namespace chip::DeviceLayer; +namespace { + +LinuxCommissionableDataProvider gCommissionableDataProvider; + +} + void CleanShutdown() { Server::GetInstance().Shutdown(); @@ -40,6 +48,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * aData, size_t aSize) VerifyOrDie(Platform::MemoryInit() == CHIP_NO_ERROR); VerifyOrDie(PlatformMgr().InitChipStack() == CHIP_NO_ERROR); + VerifyOrDie(chip::examples::InitCommissionableDataProvider(gCommissionableDataProvider, + LinuxDeviceOptions::GetInstance()) == CHIP_NO_ERROR); + SetCommissionableDataProvider(&gCommissionableDataProvider); + // ChipLinuxAppMainLoop blocks, and we don't want that here. static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); 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 6a8b066ef5148a..059bdeae17cece 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 @@ -1,16 +1,17 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. -struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; -} - struct ApplicationStruct { int16u catalogVendorID = 0; char_string applicationID = 1; } +struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ server cluster Identify = 3 { enum IdentifyEffectIdentifier : ENUM8 { kBlink = 0; @@ -50,8 +51,9 @@ server cluster Identify = 3 { command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; } +/** Attributes and commands for group configuration and manipulation. */ server cluster Groups = 4 { - bitmap GroupClusterFeature : BITMAP32 { + bitmap GroupsFeature : BITMAP32 { kGroupNames = 0x1; } @@ -114,18 +116,14 @@ server cluster Groups = 4 { fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } +/** Attributes and commands for scene configuration and manipulation. */ server cluster Scenes = 5 { - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePair attributeValueList[] = 1; + bitmap ScenesFeature : BITMAP32 { + kSceneNames = 0x1; } struct AttributeValuePair { @@ -133,6 +131,11 @@ server cluster Scenes = 5 { int8u 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; @@ -230,6 +233,7 @@ server cluster Scenes = 5 { fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; } +/** Attributes and commands for switching devices between 'On' and 'Off' states. */ server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; @@ -273,6 +277,7 @@ server cluster OnOff = 6 { command Toggle(): DefaultSuccess = 2; } +/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ server cluster LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -369,6 +374,7 @@ server cluster LevelControl = 8 { command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; } +/** 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; @@ -387,6 +393,7 @@ server cluster Descriptor = 29 { readonly attribute int16u clusterRevision = 65533; } +/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ server cluster Binding = 30 { fabric_scoped struct TargetStruct { optional node_id node = 1; @@ -405,6 +412,10 @@ server cluster Binding = 30 { 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; @@ -426,6 +437,12 @@ server cluster AccessControl = 31 { kRemoved = 2; } + struct Target { + 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; @@ -434,10 +451,9 @@ server cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - struct Target { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; } fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { @@ -468,6 +484,7 @@ server cluster AccessControl = 31 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ server cluster Actions = 37 { enum ActionErrorEnum : ENUM8 { kUnknown = 0; @@ -551,6 +568,9 @@ server cluster Actions = 37 { 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 { struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; @@ -592,6 +612,7 @@ server cluster BasicInformation = 40 { readonly attribute int16u clusterRevision = 65533; } +/** Provides an interface for providing OTA software updates */ client cluster OtaSoftwareUpdateProvider = 41 { enum OTAApplyUpdateAction : ENUM8 { kProceed = 0; @@ -631,14 +652,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { optional OCTET_STRING<512> metadataForProvider = 7; } - request struct ApplyUpdateRequestRequest { - OCTET_STRING<32> updateToken = 0; - INT32U newVersion = 1; + response struct QueryImageResponse = 1 { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING<256> imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING<64> softwareVersionString = 4; + optional OCTET_STRING<32> updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING<512> metadataForRequestor = 7; } - request struct NotifyUpdateAppliedRequest { + request struct ApplyUpdateRequestRequest { OCTET_STRING<32> updateToken = 0; - INT32U softwareVersion = 1; + INT32U newVersion = 1; } response struct ApplyUpdateResponse = 3 { @@ -646,11 +673,20 @@ client cluster OtaSoftwareUpdateProvider = 41 { INT32U delayedActionTime = 1; } + request struct NotifyUpdateAppliedRequest { + OCTET_STRING<32> updateToken = 0; + INT32U softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; } +/** Provides an interface for downloading and applying OTA software updates */ server cluster OtaSoftwareUpdateRequestor = 42 { enum OTAAnnouncementReason : ENUM8 { kSimpleAnnouncement = 0; @@ -725,6 +761,10 @@ server cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ server cluster LocalizationConfiguration = 43 { attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; @@ -736,6 +776,10 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ server cluster TimeFormatLocalization = 44 { enum CalendarTypeEnum : ENUM8 { kBuddhist = 0; @@ -766,6 +810,10 @@ server cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ server cluster UnitLocalization = 45 { enum TempUnitEnum : ENUM8 { kFahrenheit = 0; @@ -785,6 +833,7 @@ server cluster UnitLocalization = 45 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a Device's power system. */ server cluster PowerSourceConfiguration = 46 { readonly attribute INT8U sources[] = 0; readonly attribute command_id generatedCommandList[] = 65528; @@ -795,6 +844,7 @@ server cluster PowerSourceConfiguration = 46 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ server cluster PowerSource = 47 { enum BatApprovedChemistryEnum : ENUM16 { kUnspecified = 0; @@ -981,6 +1031,21 @@ server cluster PowerSource = 47 { kReplaceable = 0x8; } + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + info event WiredFaultChange = 0 { WiredFaultEnum current[] = 0; WiredFaultEnum previous[] = 1; @@ -1007,6 +1072,7 @@ server cluster PowerSource = 47 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to manage global aspects of the Commissioning flow. */ server cluster GeneralCommissioning = 48 { enum CommissioningError : ENUM8 { kOk = 0; @@ -1070,6 +1136,7 @@ server cluster GeneralCommissioning = 48 { 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 NetworkCommissioningStatus : ENUM8 { kSuccess = 0; @@ -1114,15 +1181,6 @@ server cluster NetworkCommissioning = 49 { boolean connected = 1; } - struct WiFiInterfaceScanResult { - WiFiSecurity security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBand wiFiBand = 4; - int8s rssi = 5; - } - struct ThreadInterfaceScanResult { int16u panId = 0; int64u extendedPanId = 1; @@ -1134,6 +1192,15 @@ server cluster NetworkCommissioning = 49 { int8u lqi = 7; } + struct WiFiInterfaceScanResult { + WiFiSecurity security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBand wiFiBand = 4; + int8s rssi = 5; + } + readonly attribute access(read: administer) int8u maxNetworks = 0; readonly attribute access(read: administer) NetworkInfo networks[] = 1; readonly attribute int8u scanMaxTimeSeconds = 2; @@ -1208,6 +1275,7 @@ server cluster NetworkCommissioning = 49 { 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; @@ -1244,6 +1312,7 @@ server cluster DiagnosticLogs = 50 { 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; @@ -1342,11 +1411,20 @@ server cluster GeneralDiagnostics = 51 { command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; } +/** The Software Diagnostics Cluster provides 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 SoftwareDiagnostics = 52 { bitmap SoftwareDiagnosticsFeature : BITMAP32 { kWaterMarks = 0x1; } + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + info event SoftwareFault = 0 { INT64U id = 0; optional CHAR_STRING name = 1; @@ -1361,6 +1439,7 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int16u clusterRevision = 65533; } +/** The Thread Network Diagnostics Cluster provides 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 ThreadNetworkDiagnostics = 53 { enum ConnectionStatusEnum : ENUM8 { kConnected = 0; @@ -1408,6 +1487,21 @@ server cluster ThreadNetworkDiagnostics = 53 { boolean isChild = 13; } + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + struct RouteTable { int64u extAddress = 0; int16u rloc16 = 1; @@ -1426,21 +1520,6 @@ server cluster ThreadNetworkDiagnostics = 53 { int16u flags = 1; } - struct OperationalDatasetComponents { - boolean activeTimestampPresent = 0; - boolean pendingTimestampPresent = 1; - boolean masterKeyPresent = 2; - boolean networkNamePresent = 3; - boolean extendedPanIdPresent = 4; - boolean meshLocalPrefixPresent = 5; - boolean delayPresent = 6; - boolean panIdPresent = 7; - boolean channelPresent = 8; - boolean pskcPresent = 9; - boolean securityPolicyPresent = 10; - boolean channelMaskPresent = 11; - } - info event ConnectionStatus = 0 { ConnectionStatusEnum connectionStatus = 0; } @@ -1475,6 +1554,7 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute int16u clusterRevision = 65533; } +/** The Wi-Fi Network Diagnostics Cluster provides 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 WiFiNetworkDiagnostics = 54 { enum AssociationFailureCauseEnum : ENUM8 { kUnknown = 0; @@ -1537,6 +1617,7 @@ server cluster WiFiNetworkDiagnostics = 54 { readonly attribute int16u clusterRevision = 65533; } +/** The Ethernet Network Diagnostics Cluster provides 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 EthernetNetworkDiagnostics = 55 { enum PHYRateEnum : ENUM8 { kRate10M = 0; @@ -1575,6 +1656,9 @@ server cluster EthernetNetworkDiagnostics = 55 { command ResetCounts(): 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 SwitchFeature : BITMAP32 { kLatchingSwitch = 0x1; @@ -1624,6 +1708,7 @@ server cluster Switch = 59 { 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; @@ -1659,6 +1744,7 @@ server cluster AdministratorCommissioning = 60 { 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; @@ -1678,12 +1764,6 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct NOCStruct { - fabric_sensitive octet_string noc = 1; - nullable fabric_sensitive octet_string icac = 2; - fabric_idx fabricIndex = 254; - } - fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; vendor_id vendorID = 2; @@ -1693,6 +1773,12 @@ server cluster OperationalCredentials = 62 { 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; @@ -1774,22 +1860,23 @@ server cluster OperationalCredentials = 62 { 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; } - fabric_scoped struct GroupKeyMapStruct { + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; - int16u groupKeySetID = 2; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } - fabric_scoped struct GroupInfoMapStruct { + fabric_scoped struct GroupKeyMapStruct { group_id groupId = 1; - endpoint_no endpoints[] = 2; - optional char_string<16> groupName = 3; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } @@ -1845,7 +1932,14 @@ server cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ server cluster FixedLabel = 64 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + readonly attribute LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1855,7 +1949,13 @@ server cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ server cluster UserLabel = 65 { + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + attribute access(write: manage) LabelStruct labelList[] = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1865,6 +1965,7 @@ server cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface to a boolean state called StateValue. */ server cluster BooleanState = 69 { info event StateChange = 0 { boolean stateValue = 0; @@ -1879,22 +1980,23 @@ server cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { bitmap ModeSelectFeature : BITMAP32 { kDeponoff = 0x1; } + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + struct ModeOptionStruct { char_string<64> label = 0; int8u mode = 1; SemanticTagStruct semanticTags[] = 2; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; - } - readonly attribute char_string<32> description = 0; readonly attribute nullable enum16 standardNamespace = 1; readonly attribute ModeOptionStruct supportedModes[] = 2; @@ -1913,6 +2015,7 @@ server cluster ModeSelect = 80 { command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; } +/** An interface to a generic way to secure a door */ server cluster DoorLock = 257 { enum AlarmCodeEnum : ENUM8 { kLockJammed = 0; @@ -2312,6 +2415,7 @@ server cluster DoorLock = 257 { timed command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; } +/** Provides an interface for controlling and adjusting automatic window coverings. */ server cluster WindowCovering = 258 { enum EndProductType : ENUM8 { kRollerShade = 0; @@ -2365,14 +2469,6 @@ server cluster WindowCovering = 258 { kTiltEncoderControlled = 0x40; } - bitmap Feature : BITMAP32 { - kLift = 0x1; - kTilt = 0x2; - kPositionAwareLift = 0x4; - kAbsolutePosition = 0x8; - kPositionAwareTilt = 0x10; - } - bitmap Mode : BITMAP8 { kMotorDirectionReversed = 0x1; kCalibrationMode = 0x2; @@ -2401,6 +2497,14 @@ server cluster WindowCovering = 258 { kProtection = 0x800; } + bitmap WindowCoveringFeature : BITMAP32 { + kLift = 0x1; + kTilt = 0x2; + kPositionAwareLift = 0x4; + kAbsolutePosition = 0x8; + kPositionAwareTilt = 0x10; + } + readonly attribute Type type = 0; readonly attribute ConfigStatus configStatus = 7; readonly attribute OperationalStatus operationalStatus = 10; @@ -2418,6 +2522,7 @@ server cluster WindowCovering = 258 { command StopMotion(): DefaultSuccess = 2; } +/** An interface for configuring and controlling pumps. */ server cluster PumpConfigurationAndControl = 512 { enum ControlModeEnum : ENUM8 { kConstantSpeed = 0; @@ -2435,7 +2540,7 @@ server cluster PumpConfigurationAndControl = 512 { kLocal = 3; } - bitmap PumpFeature : BITMAP32 { + bitmap PumpConfigurationAndControlFeature : BITMAP32 { kConstantPressure = 0x1; kCompensatedPressure = 0x2; kConstantFlow = 0x4; @@ -2525,6 +2630,7 @@ server cluster PumpConfigurationAndControl = 512 { readonly attribute int16u clusterRevision = 65533; } +/** An interface for configuring and controlling the functionality of a thermostat. */ server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { kHeat = 0; @@ -2609,6 +2715,7 @@ server cluster Thermostat = 513 { command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; } +/** An interface for controlling a fan in a heating/cooling system. */ server cluster FanControl = 514 { enum FanModeSequenceType : ENUM8 { kOffLowMedHigh = 0; @@ -2664,6 +2771,7 @@ server cluster FanControl = 514 { 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; @@ -2675,6 +2783,7 @@ server cluster ThermostatUserInterfaceConfiguration = 516 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for controlling the color properties of a color-capable light. */ server cluster ColorControl = 768 { enum ColorLoopAction : ENUM8 { kDeactivate = 0; @@ -2758,6 +2867,7 @@ server cluster ColorControl = 768 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring a lighting ballast. */ server cluster BallastConfiguration = 769 { readonly attribute int8u physicalMinLevel = 0; readonly attribute int8u physicalMaxLevel = 1; @@ -2772,6 +2882,7 @@ server cluster BallastConfiguration = 769 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of illuminance, and reporting illuminance measurements. */ server cluster IlluminanceMeasurement = 1024 { enum LightSensorType : ENUM8 { kPhotodiode = 0; @@ -2789,6 +2900,7 @@ server cluster IlluminanceMeasurement = 1024 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ server cluster TemperatureMeasurement = 1026 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; @@ -2801,8 +2913,9 @@ server cluster TemperatureMeasurement = 1026 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of pressure, and reporting pressure measurements. */ server cluster PressureMeasurement = 1027 { - bitmap PressureFeature : BITMAP32 { + bitmap PressureMeasurementFeature : BITMAP32 { kExtended = 0x1; } @@ -2817,6 +2930,7 @@ server cluster PressureMeasurement = 1027 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of flow, and reporting flow measurements. */ server cluster FlowMeasurement = 1028 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; @@ -2829,6 +2943,7 @@ server cluster FlowMeasurement = 1028 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring the measurement of relative humidity, and reporting relative humidity measurements. */ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute nullable int16u measuredValue = 0; readonly attribute nullable int16u minMeasuredValue = 1; @@ -2841,6 +2956,7 @@ server cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } +/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ server cluster OccupancySensing = 1030 { enum OccupancySensorTypeEnum : ENUM8 { kPir = 0; @@ -2870,6 +2986,7 @@ server cluster OccupancySensing = 1030 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ server cluster WakeOnLan = 1283 { readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2879,6 +2996,7 @@ server cluster WakeOnLan = 1283 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for controlling the current Channel on a device. */ server cluster Channel = 1284 { enum ChannelStatusEnum : ENUM8 { kSuccess = 0; @@ -2895,6 +3013,21 @@ server cluster Channel = 1284 { kLineupInfo = 0x2; } + struct ChannelInfoStruct { + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string name = 2; + optional char_string callSign = 3; + optional char_string affiliateCallSign = 4; + } + + struct LineupInfoStruct { + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; + LineupInfoTypeEnum lineupInfoType = 3; + } + readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2915,6 +3048,7 @@ server cluster Channel = 1284 { command SkipChannel(SkipChannelRequest): DefaultSuccess = 3; } +/** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ server cluster TargetNavigator = 1285 { enum TargetNavigatorStatusEnum : ENUM8 { kSuccess = 0; @@ -2948,6 +3082,7 @@ server cluster TargetNavigator = 1285 { command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; } +/** This cluster provides an interface for controlling Media Playback (PLAY, PAUSE, etc) on a media device such as a TV or Speaker. */ server cluster MediaPlayback = 1286 { enum MediaPlaybackStatusEnum : ENUM8 { kSuccess = 0; @@ -2970,6 +3105,11 @@ server cluster MediaPlayback = 1286 { kVariableSpeed = 0x2; } + struct PlaybackPositionStruct { + epoch_us updatedAt = 0; + nullable int64u position = 1; + } + readonly attribute PlaybackStateEnum currentState = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2988,6 +3128,7 @@ server cluster MediaPlayback = 1286 { command Stop(): PlaybackResponse = 2; } +/** This cluster provides an interface for controlling the Input Selector on a media device such as a TV. */ server cluster MediaInput = 1287 { enum InputTypeEnum : ENUM8 { kInternal = 0; @@ -3033,6 +3174,7 @@ server cluster MediaInput = 1287 { command HideInputStatus(): DefaultSuccess = 2; } +/** This cluster provides an interface for managing low power mode on a device. */ server cluster LowPower = 1288 { readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3044,6 +3186,7 @@ server cluster LowPower = 1288 { command Sleep(): DefaultSuccess = 0; } +/** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { enum CecKeyCode : ENUM8 { kSelect = 0; @@ -3164,6 +3307,7 @@ server cluster KeypadInput = 1289 { command SendKey(SendKeyRequest): SendKeyResponse = 0; } +/** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ server cluster ContentLauncher = 1290 { enum ContentLaunchStatusEnum : ENUM8 { kSuccess = 0; @@ -3203,8 +3347,15 @@ server cluster ContentLauncher = 1290 { kHls = 0x2; } - struct ContentSearchStruct { - ParameterStruct parameterList[] = 0; + struct DimensionStruct { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + struct AdditionalInfoStruct { + char_string name = 0; + char_string value = 1; } struct ParameterStruct { @@ -3213,9 +3364,14 @@ server cluster ContentLauncher = 1290 { optional AdditionalInfoStruct externalIDList[] = 2; } - struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + struct ContentSearchStruct { + ParameterStruct parameterList[] = 0; + } + + struct StyleInformationStruct { + optional char_string imageURL = 0; + optional char_string color = 1; + optional DimensionStruct size = 2; } struct BrandingInformationStruct { @@ -3227,18 +3383,6 @@ server cluster ContentLauncher = 1290 { optional StyleInformationStruct waterMark = 5; } - struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; - optional DimensionStruct size = 2; - } - - struct DimensionStruct { - double width = 0; - double height = 1; - MetricTypeEnum metric = 2; - } - readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3247,6 +3391,7 @@ server cluster ContentLauncher = 1290 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface for controlling the Output on a media device such as a TV. */ server cluster AudioOutput = 1291 { enum OutputTypeEnum : ENUM8 { kHdmi = 0; @@ -3283,6 +3428,7 @@ server cluster AudioOutput = 1291 { command SelectOutput(SelectOutputRequest): DefaultSuccess = 0; } +/** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ server cluster ApplicationLauncher = 1292 { enum ApplicationLauncherStatusEnum : ENUM8 { kSuccess = 0; @@ -3294,6 +3440,16 @@ server cluster ApplicationLauncher = 1292 { kApplicationPlatform = 0x1; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + + struct ApplicationEPStruct { + ApplicationStruct application = 0; + optional endpoint_no endpoint = 1; + } + readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3324,6 +3480,7 @@ server cluster ApplicationLauncher = 1292 { command HideApp(HideAppRequest): LauncherResponse = 2; } +/** This cluster provides information about an application running on a TV or media player device which is represented as an endpoint. */ server cluster ApplicationBasic = 1293 { enum ApplicationStatusEnum : ENUM8 { kStopped = 0; @@ -3332,6 +3489,11 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationStruct { + int16u catalogVendorID = 0; + char_string applicationID = 1; + } + readonly attribute char_string<32> applicationName = 2; readonly attribute ApplicationStruct application = 4; readonly attribute ApplicationStatusEnum status = 5; @@ -3345,6 +3507,7 @@ server cluster ApplicationBasic = 1293 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides commands that facilitate user account login on a Content App or a node. For example, a Content App running on a Video Player device, which is represented as an endpoint (see [TV Architecture]), can use this cluster to help make the user account on the Content App match the user account on the Client. */ server cluster AccountLogin = 1294 { readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3371,6 +3534,7 @@ server cluster AccountLogin = 1294 { timed command Logout(): DefaultSuccess = 3; } +/** The Test Cluster is meant to validate the generated code */ server cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { kUnspecified = 0; @@ -3413,26 +3577,6 @@ server cluster UnitTesting = 4294048773 { kValueC = 0x4; } - struct TestListStructOctet { - int64u member1 = 0; - octet_string<32> member2 = 1; - } - - struct NullablesAndOptionalsStruct { - nullable int16u nullableInt = 0; - optional int16u optionalInt = 1; - optional nullable int16u nullableOptionalInt = 2; - nullable char_string nullableString = 3; - optional char_string optionalString = 4; - optional nullable char_string nullableOptionalString = 5; - nullable SimpleStruct nullableStruct = 6; - optional SimpleStruct optionalStruct = 7; - optional nullable SimpleStruct nullableOptionalStruct = 8; - nullable SimpleEnum nullableList[] = 9; - optional SimpleEnum optionalList[] = 10; - optional nullable SimpleEnum nullableOptionalList[] = 11; - } - struct SimpleStruct { int8u a = 0; boolean b = 1; @@ -3455,6 +3599,21 @@ server cluster UnitTesting = 4294048773 { fabric_idx fabricIndex = 254; } + struct NullablesAndOptionalsStruct { + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; + nullable SimpleStruct nullableStruct = 6; + optional SimpleStruct optionalStruct = 7; + optional nullable SimpleStruct nullableOptionalStruct = 8; + nullable SimpleEnum nullableList[] = 9; + optional SimpleEnum optionalList[] = 10; + optional nullable SimpleEnum nullableOptionalList[] = 11; + } + struct NestedStruct { int8u a = 0; boolean b = 1; @@ -3471,6 +3630,15 @@ server cluster UnitTesting = 4294048773 { int8u g[] = 6; } + struct DoubleNestedStructList { + NestedStructList a[] = 0; + } + + struct TestListStructOctet { + int64u member1 = 0; + octet_string<32> member2 = 1; + } + info event TestEvent = 1 { INT8U arg1 = 1; SimpleEnum arg2 = 2; @@ -3692,15 +3860,15 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; server cluster Identify { - ram attribute identifyTime; - ram attribute identifyType; - ram attribute featureMap; + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } @@ -3709,13 +3877,13 @@ endpoint 0 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster Binding { callback attribute binding; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3725,7 +3893,7 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 4; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } @@ -3738,12 +3906,12 @@ endpoint 0 { callback attribute productID; persist attribute nodeLabel; callback attribute location default = "XX"; - callback attribute hardwareVersion; + callback attribute hardwareVersion default = 0; callback attribute hardwareVersionString; - callback attribute softwareVersion; + callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3751,56 +3919,56 @@ endpoint 0 { emits event StateTransition; emits event VersionApplied; emits event DownloadError; - callback attribute defaultOTAProviders; + callback attribute defaultOTAProviders default = 0; ram attribute updatePossible default = 1; - ram attribute updateState; - ram attribute updateStateProgress; - ram attribute featureMap; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster LocalizationConfiguration { persist attribute activeLocale default = "en-US"; callback attribute supportedLocales; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster TimeFormatLocalization { - persist attribute hourFormat; + persist attribute hourFormat default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UnitLocalization { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster PowerSourceConfiguration { callback attribute sources; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster PowerSource { - ram attribute status; + ram attribute status default = 0; ram attribute order default = 3; ram attribute description default = "B1"; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster GeneralCommissioning { - ram attribute breadcrumb; + ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; - callback attribute regulatoryConfig; - callback attribute locationCapability; + callback attribute regulatoryConfig default = 0; + callback attribute locationCapability default = 0; callback attribute supportsConcurrentConnection default = 1; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3818,32 +3986,32 @@ endpoint 0 { } server cluster DiagnosticLogs { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster GeneralDiagnostics { callback attribute networkInterfaces; - callback attribute rebootCount; + callback attribute rebootCount default = 0x0000; callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster SoftwareDiagnostics { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ThreadNetworkDiagnostics { callback attribute channel; callback attribute routingRole; - callback attribute networkName; - callback attribute panId; - callback attribute extendedPanId; + callback attribute networkName default = "0"; + callback attribute panId default = 0x0000; + callback attribute extendedPanId default = 0x0000000000000000; callback attribute meshLocalPrefix; callback attribute neighborTable; callback attribute routeTable; @@ -3853,10 +4021,10 @@ endpoint 0 { callback attribute stableDataVersion; callback attribute leaderRouterId; callback attribute securityPolicy; - callback attribute channelPage0Mask; + callback attribute channelPage0Mask default = "0x0000"; callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3864,31 +4032,31 @@ endpoint 0 { callback attribute bssid; callback attribute securityType; callback attribute wiFiVersion; - callback attribute channelNumber; - callback attribute rssi; - ram attribute featureMap; + callback attribute channelNumber default = 0x0000; + callback attribute rssi default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster EthernetNetworkDiagnostics { callback attribute PHYRate; - callback attribute fullDuplex; - callback attribute packetRxCount; - callback attribute packetTxCount; - callback attribute txErrCount; - callback attribute collisionCount; - callback attribute overrunCount; - callback attribute carrierDetect; - callback attribute timeSinceReset; + callback attribute fullDuplex default = 0x00; + callback attribute packetRxCount default = 0x0000000000000000; + callback attribute packetTxCount default = 0x0000000000000000; + callback attribute txErrCount default = 0x0000000000000000; + callback attribute collisionCount default = 0x0000000000000000; + callback attribute overrunCount default = 0x0000000000000000; + callback attribute carrierDetect default = 0x00; + callback attribute timeSinceReset default = 0x0000000000000000; ram attribute featureMap default = 3; ram attribute clusterRevision default = 1; } server cluster AdministratorCommissioning { - callback attribute windowStatus; + callback attribute windowStatus default = 0; callback attribute adminFabricIndex default = 1; - callback attribute adminVendorId; - ram attribute featureMap; + callback attribute adminVendorId default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3899,7 +4067,7 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -3908,27 +4076,27 @@ endpoint 0 { callback attribute groupTable; callback attribute maxGroupsPerFabric; callback attribute maxGroupKeysPerFabric; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster FixedLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster RelativeHumidityMeasurement { ram attribute measuredValue; - ram attribute minMeasuredValue; + ram attribute minMeasuredValue default = 0; ram attribute maxMeasuredValue default = 0x2710; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } } @@ -3936,39 +4104,39 @@ endpoint 1 { device type onofflight = 256, version 1; server cluster Identify { - ram attribute identifyTime; - ram attribute identifyType; - ram attribute featureMap; + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster Scenes { - ram attribute sceneCount; - ram attribute currentScene; - ram attribute currentGroup; - ram attribute sceneValid; + ram attribute sceneCount default = 0x00; + ram attribute currentScene default = 0x00; + ram attribute currentGroup default = 0x0000; + ram attribute sceneValid default = 0x00; ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster OnOff { - persist attribute onOff; - ram attribute featureMap; + persist attribute onOff default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster LevelControl { persist attribute currentLevel default = 0xFE; - ram attribute options; + ram attribute options default = 0x00; ram attribute onLevel default = 0xFF; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } @@ -3977,28 +4145,28 @@ endpoint 1 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster Binding { callback attribute binding; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster Actions { callback attribute actionList; callback attribute endpointLists; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster PowerSource { - ram attribute status; + ram attribute status default = 0; ram attribute order default = 2; ram attribute description default = "B2"; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4011,31 +4179,31 @@ endpoint 1 { server cluster FixedLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster BooleanState { - ram attribute stateValue; - ram attribute featureMap; + ram attribute stateValue default = 0; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ModeSelect { ram attribute description default = "Coffee"; - ram attribute standardNamespace; - callback attribute supportedModes; - persist attribute currentMode; + ram attribute standardNamespace default = 0; + callback attribute supportedModes default = 0; + persist attribute currentMode default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4047,18 +4215,18 @@ endpoint 1 { ram attribute lockType; ram attribute actuatorEnabled; ram attribute autoRelockTime default = 60; - ram attribute operatingMode; + ram attribute operatingMode default = 0x00; ram attribute supportedOperatingModes default = 0xFFF6; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 6; } server cluster WindowCovering { - ram attribute type; + ram attribute type default = 0x00; persist attribute configStatus default = 0x03; - ram attribute operationalStatus; - ram attribute endProductType; - persist attribute mode; + ram attribute operationalStatus default = 0x00; + ram attribute endProductType default = 0x00; + persist attribute mode default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -4075,7 +4243,7 @@ endpoint 1 { ram attribute effectiveOperationMode; ram attribute effectiveControlMode; ram attribute capacity; - ram attribute operationMode; + ram attribute operationMode default = 0x00; ram attribute featureMap default = 1; ram attribute clusterRevision default = 4; } @@ -4090,28 +4258,28 @@ endpoint 1 { } server cluster FanControl { - ram attribute fanMode; + ram attribute fanMode default = 0x00; ram attribute fanModeSequence default = 0x02; - ram attribute percentSetting; - ram attribute percentCurrent; - ram attribute featureMap; + ram attribute percentSetting default = 0x00; + ram attribute percentCurrent default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } server cluster ThermostatUserInterfaceConfiguration { - ram attribute temperatureDisplayMode; - ram attribute keypadLockout; - ram attribute featureMap; + ram attribute temperatureDisplayMode default = 0x00; + ram attribute keypadLockout default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; } server cluster ColorControl { ram attribute colorMode default = 0x01; - ram attribute options; - ram attribute numberOfPrimaries; + ram attribute options default = 0x00; + ram attribute numberOfPrimaries default = 0; ram attribute enhancedColorMode default = 0x01; ram attribute colorCapabilities default = 0x1F; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 5; } @@ -4124,15 +4292,15 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster IlluminanceMeasurement { - ram attribute measuredValue; + ram attribute measuredValue default = 0x0000; ram attribute minMeasuredValue default = 0x01; ram attribute maxMeasuredValue default = 0xFFFE; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -4140,15 +4308,15 @@ endpoint 1 { ram attribute measuredValue default = 0x8000; ram attribute minMeasuredValue default = 0x8000; ram attribute maxMeasuredValue default = 0x8000; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster PressureMeasurement { - ram attribute measuredValue; + ram attribute measuredValue default = 0x0000; ram attribute minMeasuredValue; ram attribute maxMeasuredValue; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -4156,15 +4324,15 @@ endpoint 1 { ram attribute measuredValue; ram attribute minMeasuredValue; ram attribute maxMeasuredValue; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster RelativeHumidityMeasurement { ram attribute measuredValue; - ram attribute minMeasuredValue; + ram attribute minMeasuredValue default = 0; ram attribute maxMeasuredValue default = 0x2710; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } @@ -4172,63 +4340,63 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } server cluster WakeOnLan { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster Channel { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster TargetNavigator { callback attribute targetList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster MediaPlayback { - ram attribute currentState; - ram attribute featureMap; + ram attribute currentState default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster MediaInput { callback attribute inputList; - ram attribute currentInput; - ram attribute featureMap; + ram attribute currentInput default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster LowPower { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster KeypadInput { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ContentLauncher { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster AudioOutput { callback attribute outputList; - ram attribute currentOutput; - ram attribute featureMap; + ram attribute currentOutput default = 0x00; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster ApplicationLauncher { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4238,43 +4406,43 @@ endpoint 1 { ram attribute status; ram attribute applicationVersion; callback attribute allowedVendorList; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster AccountLogin { - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } server cluster UnitTesting { emits event TestEvent; emits event TestFabricScopedEvent; - ram attribute boolean; - ram attribute bitmap8; - ram attribute bitmap16; - ram attribute bitmap32; - ram attribute bitmap64; - ram attribute int8u; - ram attribute int16u; - ram attribute int24u; - ram attribute int32u; - ram attribute int40u; - ram attribute int48u; - ram attribute int56u; - ram attribute int64u; - ram attribute int8s; - ram attribute int16s; - ram attribute int24s; - ram attribute int32s; - ram attribute int40s; - ram attribute int48s; - ram attribute int56s; - ram attribute int64s; - ram attribute enum8; - ram attribute enum16; - ram attribute floatSingle; - ram attribute floatDouble; + ram attribute boolean default = false; + ram attribute bitmap8 default = 0; + ram attribute bitmap16 default = 0; + ram attribute bitmap32 default = 0; + ram attribute bitmap64 default = 0; + ram attribute int8u default = 0; + ram attribute int16u default = 0; + ram attribute int24u default = 0; + ram attribute int32u default = 0; + ram attribute int40u default = 0; + ram attribute int48u default = 0; + ram attribute int56u default = 0; + ram attribute int64u default = 0; + ram attribute int8s default = 0; + ram attribute int16s default = 0; + ram attribute int24s default = 0; + ram attribute int32s default = 0; + ram attribute int40s default = 0; + ram attribute int48s default = 0; + ram attribute int56s default = 0; + ram attribute int64s default = 0; + ram attribute enum8 default = 0; + ram attribute enum16 default = 0; + ram attribute floatSingle default = 0; + ram attribute floatDouble default = 0; ram attribute octetString; callback attribute listInt8u; callback attribute listOctetString; @@ -4297,31 +4465,31 @@ endpoint 1 { ram attribute timedWriteBoolean; callback attribute generalErrorBoolean; callback attribute clusterErrorBoolean; - ram attribute nullableBoolean; - ram attribute nullableBitmap8; - ram attribute nullableBitmap16; - ram attribute nullableBitmap32; - ram attribute nullableBitmap64; - ram attribute nullableInt8u; - ram attribute nullableInt16u; - ram attribute nullableInt24u; - ram attribute nullableInt32u; - ram attribute nullableInt40u; - ram attribute nullableInt48u; - ram attribute nullableInt56u; - ram attribute nullableInt64u; - ram attribute nullableInt8s; - ram attribute nullableInt16s; - ram attribute nullableInt24s; - ram attribute nullableInt32s; - ram attribute nullableInt40s; - ram attribute nullableInt48s; - ram attribute nullableInt56s; - ram attribute nullableInt64s; - ram attribute nullableEnum8; - ram attribute nullableEnum16; - ram attribute nullableFloatSingle; - ram attribute nullableFloatDouble; + ram attribute nullableBoolean default = false; + ram attribute nullableBitmap8 default = 0; + ram attribute nullableBitmap16 default = 0; + ram attribute nullableBitmap32 default = 0; + ram attribute nullableBitmap64 default = 0; + ram attribute nullableInt8u default = 0; + ram attribute nullableInt16u default = 0; + ram attribute nullableInt24u default = 0; + ram attribute nullableInt32u default = 0; + ram attribute nullableInt40u default = 0; + ram attribute nullableInt48u default = 0; + ram attribute nullableInt56u default = 0; + ram attribute nullableInt64u default = 0; + ram attribute nullableInt8s default = 0; + ram attribute nullableInt16s default = 0; + ram attribute nullableInt24s default = 0; + ram attribute nullableInt32s default = 0; + ram attribute nullableInt40s default = 0; + ram attribute nullableInt48s default = 0; + ram attribute nullableInt56s default = 0; + ram attribute nullableInt64s default = 0; + ram attribute nullableEnum8 default = 0; + ram attribute nullableEnum16 default = 0; + ram attribute nullableFloatSingle default = 0; + ram attribute nullableFloatDouble default = 0; ram attribute nullableOctetString; ram attribute nullableCharString; ram attribute nullableEnumAttr; @@ -4330,7 +4498,7 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt8s default = -20; ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } } @@ -4339,13 +4507,13 @@ endpoint 2 { server cluster Groups { ram attribute nameSupport; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; } server cluster OnOff { - ram attribute onOff; - ram attribute featureMap; + ram attribute onOff default = 0x00; + ram attribute featureMap default = 0x0000; ram attribute clusterRevision default = 4; } @@ -4354,15 +4522,15 @@ endpoint 2 { callback attribute serverList; callback attribute clientList; callback attribute partsList; - ram attribute featureMap; + ram attribute featureMap default = 0; callback attribute clusterRevision default = 1; } server cluster PowerSource { - ram attribute status; + ram attribute status default = 0; ram attribute order default = 1; ram attribute description default = "B3"; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -4370,7 +4538,7 @@ endpoint 2 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap; + ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } } @@ -4386,7 +4554,7 @@ endpoint 65534 { callback attribute lastNetworkingStatus; callback attribute lastNetworkID; callback attribute lastConnectErrorValue; - callback attribute featureMap; + callback attribute featureMap default = 0; callback attribute clusterRevision default = 1; } } diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index e2ed8315f4223f..9587e26f048d7d 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -244,6 +244,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC target_link_options(${COMPONENT_LIB} PUBLIC "-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld" + "-L${PIGWEED_ROOT}/pw_tokenizer" ) target_compile_options(${COMPONENT_LIB} PRIVATE diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt index 4e723faeffecd3..c94a64d1b8d00f 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt @@ -1,6 +1,7 @@ package com.google.chip.chiptool.attestation import android.util.Base64 +import android.util.Log import chip.devicecontroller.AttestationTrustStoreDelegate import chip.devicecontroller.ChipDeviceController import java.util.* @@ -13,7 +14,7 @@ class ExampleAttestationTrustStoreDelegate(val chipDeviceController: ChipDeviceC override fun getProductAttestationAuthorityCert(skid: ByteArray): ByteArray? { return paaCerts .map { Base64.decode(it, Base64.DEFAULT) } - .firstOrNull { cert -> chipDeviceController.extractSkidFromPaaCert(cert) == skid } + .firstOrNull { cert -> Arrays.equals(chipDeviceController.extractSkidFromPaaCert(cert), skid) } } companion object { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt index 9e7c021aad039a..5579c04735d83b 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt @@ -20,7 +20,11 @@ class AddressUpdateFragment: Fragment() { val deviceId: Long get() = binding.deviceIdEd.text.toString().toULong().toLong() - + var endpointId : Int + get() = binding.epIdEd.text.toString().toInt() + set(value) { + binding.epIdEd.setText(value.toString()) + } private var _binding: AddressUpdateFragmentBinding? = null private val binding get() = _binding!! @@ -39,6 +43,7 @@ class AddressUpdateFragment: Fragment() { val compressedFabricId = deviceController.compressedFabricId binding.fabricIdEd.setText(compressedFabricId.toULong().toString(16).padStart(16, '0')) binding.deviceIdEd.setText(DeviceIdUtil.getLastDeviceId(requireContext()).toString()) + binding.epIdEd.setText(endpointId.toString()) } override fun onDestroyView() { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt index 792850b7bc3f1a..9e73c5d4e645ea 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/BasicClientFragment.kt @@ -42,7 +42,6 @@ class BasicClientFragment : Fragment() { addressUpdateFragment = childFragmentManager.findFragmentById(R.id.addressUpdateFragment) as AddressUpdateFragment - binding.writeNodeLabelBtn.setOnClickListener { scope.launch { sendWriteNodeLabelAttribute() binding.nodeLabelEd.onEditorAction(EditorInfo.IME_ACTION_DONE) @@ -480,10 +479,15 @@ class BasicClientFragment : Fragment() { private suspend fun getBasicClusterForDevice(): BasicInformationCluster { return BasicInformationCluster( - ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), ENDPOINT + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), addressUpdateFragment.endpointId ) } + override fun onResume() { + super.onResume() + addressUpdateFragment.endpointId = ENDPOINT + } + companion object { private const val TAG = "BasicClientFragment" private const val ENDPOINT = 0 diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt index 02188301d2ec40..891d63bf0414bd 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt @@ -166,7 +166,7 @@ class OnOffClientFragment : Fragment() { private suspend fun sendLevelCommandClick() { val cluster = ChipClusters.LevelControlCluster( ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - LEVEL_CONTROL_CLUSTER_ENDPOINT + addressUpdateFragment.endpointId ) cluster.moveToLevel(object : ChipClusters.DefaultClusterCallback { override fun onSuccess() { @@ -223,8 +223,9 @@ class OnOffClientFragment : Fragment() { private suspend fun getOnOffClusterForDevice(): OnOffCluster { return OnOffCluster( + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - ON_OFF_CLUSTER_ENDPOINT + addressUpdateFragment.endpointId ) } @@ -240,6 +241,12 @@ class OnOffClientFragment : Fragment() { } } + override fun onResume() { + super.onResume() + addressUpdateFragment.endpointId = ON_OFF_CLUSTER_ENDPOINT + + } + companion object { private const val TAG = "OnOffClientFragment" diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index 83a3ba0eae7cbc..c665adaeb97b47 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -229,7 +229,7 @@ class WildcardFragment : Fragment() { return stringBuilder.toString() } - private suspend fun subscribe(minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean) { + private suspend fun subscribe(minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean, eventMin: Long?) { val subscriptionEstablishedCallback = SubscriptionEstablishedCallback { subscriptionId -> @@ -255,17 +255,19 @@ class WildcardFragment : Fragment() { maxInterval, keepSubscriptions, isFabricFiltered, - /* imTimeoutMs= */ 0) + /* imTimeoutMs= */ 0, + eventMin) } - private suspend fun read(isFabricFiltered: Boolean) { + private suspend fun read(isFabricFiltered: Boolean, eventMin: Long?) { deviceController.readPath(reportCallback, ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), attributePath.ifEmpty { null }, eventPath.ifEmpty { null }, isFabricFiltered, - /* imTimeoutMs= */ 0) + /* imTimeoutMs= */ 0, + eventMin) } private suspend fun write(writeValueType: String, writeValue: String, dataVersion: Int?, timedRequestTimeoutMs: Int, imTimeoutMs: Int) { @@ -336,14 +338,20 @@ class WildcardFragment : Fragment() { return } val dialogView = requireActivity().layoutInflater.inflate(R.layout.read_dialog, null) + val eventMinEd = dialogView.findViewById(R.id.eventMinEd) + eventMinEd.visibility = if (eventPath.isNotEmpty()) { View.VISIBLE } else { View.GONE } val dialog = AlertDialog.Builder(requireContext()).apply { setView(dialogView) }.create() - val isFabricFilteredEd = dialogView.findViewById(R.id.isFabricFilteredSp) + val isFabricFilteredEd = dialogView.findViewById(R.id.isFabricFilteredSp) dialogView.findViewById