diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 4b91d6cb46ff81..2e809977c1dc1a 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -1239,6 +1239,7 @@ softwareVersionStr SoftwareVersionString softwareVersionValid sphinxcontrib +SparkFun SPI spiflash spinel diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3db04035806804..7b3ef0fa68bbf2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -77,7 +77,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -194,7 +194,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -356,7 +356,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Setup Build, Run Build and Run Tests timeout-minutes: 50 @@ -415,7 +415,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -515,7 +515,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 1581ab30078ba0..ccad5e54903d51 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -54,7 +54,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: CI Examples Linux shell: bash run: | @@ -90,7 +90,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: CI Examples ESP32 shell: bash run: | @@ -126,7 +126,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: CI Examples NRFConnect shell: bash run: | diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 3ba684577149de..ba63170544e724 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -75,7 +75,7 @@ jobs: integrations/docker/images/chip-build-cirque/run.sh \ -- sh -c " \ git config --global --add safe.directory '*' \ - && scripts/build/gn_bootstrap.sh \ + && bash scripts/bootstrap.sh \ && chown -R $(id -u):$(id -g) .environment \ " diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 5e4d26d27e41c3..face48a25e88e0 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -76,7 +76,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 2a7c3642919323..169606644a9e19 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -56,7 +56,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index b902a3815838c1..edfbeab2211cdb 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -59,7 +59,7 @@ jobs: .environment build_overrides/pigweed_environment.gni - name: Bootstrap - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build example Ameba All Clusters App run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index e7fbe4a8a13856..f16e063e699414 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -67,7 +67,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 2e0bee2f65cd3a..1011e900e30729 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -68,7 +68,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 4ebc1114cfc35d..e542294194dbc7 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -65,7 +65,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index ce2163d1581b18..5974ce33ab5f3d 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -73,7 +73,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 42cf0bdf72839c..afaa375cc501c5 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -67,7 +67,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -186,7 +186,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 262f2fcc7cd42f..42678cd5e64589 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -67,7 +67,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index a9c405d010fd4a..047d6cd68d2a50 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -69,7 +69,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 0d949bdc748b97..0eb21a41ec0778 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -67,7 +67,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 1c6220bdca5fb7..9530b4ca343053 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -58,7 +58,7 @@ jobs: .environment build_overrides/pigweed_environment.gni - name: Bootstrap - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build lighting-app timeout-minutes: 30 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index f2931055be403e..2664f9f9896b09 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -67,7 +67,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index dadbb5eff3d476..55ad878b91fecd 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -83,7 +83,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 36f7c9cdb26c2e..f980b3249f9168 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -69,7 +69,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 2c4a318ee6ed9a..09ec03dd1896da 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -84,7 +84,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 2e3af4d79473ef..a4d873a5e813c9 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -69,7 +69,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build and install Python controller timeout-minutes: 10 diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 3320d618d07798..cfa56c20acddec 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -69,7 +69,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 2ebd9923551732..103538b8a35cad 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -68,7 +68,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build example Telink All Clusters App run: | diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 2946170d872793..ab6ffb2dfb8b5d 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -61,7 +61,7 @@ jobs: .environment build_overrides/pigweed_environment.gni - name: Bootstrap - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build Tizen examples run: | diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 76bc42944c7fcc..d57b493097e984 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -73,7 +73,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 82aa03af5cef67..801a1cf20a71a8 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -64,7 +64,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -124,7 +124,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5125f69106bef0..85af069b51d8f6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -65,7 +65,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Check for matter lint errors if: always() @@ -79,22 +79,6 @@ 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/rootnode_contactsensor_lFAGG1bfRO.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 - if [ "$idl_file" = './examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi - if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 3883512f0d729b..cf2bcad747d673 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -65,7 +65,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -129,7 +129,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Build and run tests run: | diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index f725931e760da5..b9bbd6376a701d 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -53,7 +53,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -108,7 +108,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index ba1124b23af05a..d9b723645c564c 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -64,7 +64,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/smoketest-darwin.yaml b/.github/workflows/smoketest-darwin.yaml index abf9ce606e8402..7cefedeca044b0 100644 --- a/.github/workflows/smoketest-darwin.yaml +++ b/.github/workflows/smoketest-darwin.yaml @@ -56,7 +56,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f52c3ccf8f1d7d..69d83a5e00748e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -90,7 +90,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -346,7 +346,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -468,7 +468,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -555,7 +555,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} @@ -728,7 +728,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 7623e8082c97cd..a797c4116370ee 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -58,7 +58,7 @@ jobs: timeout-minutes: 10 run: | mkdir -p /tmp/log_output ; - scripts/build/gn_bootstrap.sh ; + bash scripts/bootstrap.sh ; - name: Uploading bootstrap logs uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 406e546a6b4a96..1057e83af455ba 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -57,7 +57,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Generate all timeout-minutes: 5 diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 9e0febe3f817c0..5b0ba11fa6ca69 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -58,7 +58,7 @@ jobs: build_overrides/pigweed_environment.gni - name: Bootstrap timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py diff --git a/build/config/tizen/config.gni b/build/config/tizen/config.gni index 06a03d59b86881..84891db9545d57 100644 --- a/build/config/tizen/config.gni +++ b/build/config/tizen/config.gni @@ -14,8 +14,8 @@ declare_args() { # Location of Tizen SDK - tizen_sdk_root = getenv("TIZEN_SDK_ROOT") + tizen_sdk_root = "" # Location of Tizen SDK sysroot - tizen_sdk_sysroot = getenv("TIZEN_SDK_SYSROOT") + tizen_sdk_sysroot = "" } diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index a88839a5565fee..6f30e30e297e34 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -86,10 +86,29 @@ chip_gn_arg_append("esp32_cpu" "\"esp32\"") chip_gn_arg_bool("is_debug" ${is_debug}) # Config the chip log level by IDF menuconfig -chip_gn_arg_bool ("chip_error_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1) -chip_gn_arg_bool ("chip_progress_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3) -chip_gn_arg_bool ("chip_detail_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4) -chip_gn_arg_bool ("chip_automation_logging" CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5) +if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1) + chip_gn_arg_bool ("chip_error_logging" "true") +else() + chip_gn_arg_bool ("chip_error_logging" "false") +endif() + +if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3) + chip_gn_arg_bool ("chip_progress_logging" "true") +else() + chip_gn_arg_bool ("chip_progress_logging" "false") +endif() + +if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4) + chip_gn_arg_bool ("chip_detail_logging" "true") +else() + chip_gn_arg_bool ("chip_detail_logging" "false") +endif() + +if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5) + chip_gn_arg_bool ("chip_automation_logging" "true") +else() + chip_gn_arg_bool ("chip_automation_logging" "false") +endif() if(CONFIG_ENABLE_CHIPOBLE) chip_gn_arg_append("chip_config_network_layer_ble" "true") @@ -155,6 +174,10 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE)) endif() endif() +if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER) + chip_gn_arg_append("chip_enable_ble_controller" "true") +endif() + if (CONFIG_ENABLE_MATTER_OVER_THREAD) chip_gn_arg_append("chip_enable_openthread" "true") else() @@ -369,8 +392,10 @@ target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group add_dependencies(${COMPONENT_LIB} chip_gn) if(CONFIG_ENABLE_PW_RPC) - set(WRAP_FUNCTIONS esp_log_write) - target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=${WRAP_FUNCTIONS}") + set(WRAP_FUNCTIONS esp_log_write esp_log_writev) + foreach(func ${WRAP_FUNCTIONS}) + target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=${func}") + endforeach() endif() # Build Matter OTA image diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 077331b16cb3ef..dc3b03b07ac555 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -917,13 +917,6 @@ menu "CHIP Device Layer" help Enable esp32 as a BLE Commissioner. - config ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE - bool "Enable Commissionee and Commissioner mode" - default n - depends on ENABLE_ESP32_BLE_Controller - help - Enable including commissioner code (CHIPDeviceController.cpp) in the commissionee (Server.cpp) code. - endmenu endmenu diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 2a97b363833dcc..a8a4c0af92b8a7 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -46,7 +46,6 @@ CONFIG_LOG_MAX_LEVEL=3 # Generic networking options CONFIG_NETWORKING=y -CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POSIX_NAMES=n CONFIG_NET_CONFIG_INIT_TIMEOUT=0 @@ -94,9 +93,6 @@ CONFIG_NET_L2_OPENTHREAD=y CONFIG_OPENTHREAD_DEBUG=y CONFIG_OPENTHREAD_L2_DEBUG=y -CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::1" -CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::2" - # OpenThread configs CONFIG_OPENTHREAD_SLAAC=y CONFIG_OPENTHREAD_RADIO_WORKQUEUE_STACK_SIZE=608 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 651bb1bfb52b90..e57aaf1f464ec4 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 @@ -777,7 +777,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute ProductAppearanceStruct productAppearance = 20; @@ -4647,7 +4646,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute productAppearance; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 399ac119c1f433..55a6cb9995e1e1 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1466,7 +1466,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 93733fa58ac7ad..6a7d96dd7752aa 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -564,7 +564,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1660,7 +1659,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute generatedCommandList; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 87aff9c88798bd..c7f1b81a3f95d8 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -783,7 +783,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7625,5 +7625,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/README.md b/examples/chef/README.md index f03b46e01d7ea4..da87ca307f847f 100644 --- a/examples/chef/README.md +++ b/examples/chef/README.md @@ -150,7 +150,7 @@ chef_$PLATFORM: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform $PLATFORM - name: Bootstrap timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh + run: bash scripts/bootstrap.sh - name: CI Examples $PLATFORM shell: bash run: | diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 67a9957cc7e5c9..b22e383af2ad27 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -216,6 +216,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -932,6 +938,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1225,6 +1233,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1253,6 +1264,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1270,6 +1282,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1288,6 +1301,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1335,6 +1349,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index b60155192a97c3..1d9fd78706cee2 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1820,6 +1884,22 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SupportedLocales", "code": 1, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4525,6 +4621,38 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -6191,5 +6319,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 4a65b6ec23dd33..140935ef9ee206 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -216,6 +216,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -932,6 +938,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1693,6 +1701,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1721,6 +1732,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1738,6 +1750,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1756,6 +1769,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 6; ram attribute clusterRevision default = 0x0001; } @@ -1803,6 +1817,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index d3f8b5cefaeb1e..d3a89febeb0b44 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index b930a77109fdd0..05c3478971017c 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -365,6 +365,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -454,6 +457,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -616,6 +620,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -686,6 +691,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1081,6 +1087,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1414,6 +1422,7 @@ server cluster ColorControl = 768 { readonly attribute int16u colorTemperatureMireds = 7; readonly attribute enum8 colorMode = 8; attribute bitmap8 options = 15; + readonly attribute nullable int8u numberOfPrimaries = 16; readonly attribute int16u enhancedCurrentHue = 16384; readonly attribute enum8 enhancedColorMode = 16385; readonly attribute int8u colorLoopActive = 16386; @@ -1626,6 +1635,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1654,6 +1666,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1671,6 +1684,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1689,6 +1703,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 6; ram attribute clusterRevision default = 0x0001; } @@ -1736,6 +1751,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1846,6 +1863,7 @@ endpoint 1 { ram attribute colorTemperatureMireds default = 0x00FA; ram attribute colorMode default = 0x01; ram attribute options default = 0x00; + ram attribute numberOfPrimaries default = 0; ram attribute enhancedCurrentHue default = 0x0000; ram attribute enhancedColorMode default = 0x01; ram attribute colorLoopActive default = 0x00; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index ee043c19756934..1dad6a1f0af97d 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1820,6 +1884,22 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SupportedLocales", "code": 1, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4525,6 +4621,38 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -7387,11 +7515,11 @@ "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8481,5 +8609,6 @@ "endpointVersion": 1, "deviceIdentifier": 269 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5a6ce98fdf76a1..7cfc2fabca5579 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1295,6 +1303,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1323,6 +1334,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1340,6 +1352,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1358,6 +1371,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1405,6 +1419,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index be736085657aee..a875091a1cb1c5 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 5645faafec18e9..790801e6d0dc21 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -186,6 +186,7 @@ server cluster LevelControl = 8 { readonly attribute nullable int8u currentLevel = 0; readonly attribute int8u minLevel = 2; readonly attribute int8u maxLevel = 3; + attribute LevelControlOptions options = 15; attribute nullable int8u onLevel = 17; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -358,6 +359,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -447,6 +451,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -609,6 +614,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -679,6 +685,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1074,6 +1081,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1567,6 +1576,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1595,6 +1607,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1612,6 +1625,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1630,6 +1644,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1677,6 +1692,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1752,6 +1769,7 @@ endpoint 1 { ram attribute currentLevel default = 0; ram attribute minLevel default = 0; ram attribute maxLevel default = 0xFE; + ram attribute options default = 1; ram attribute onLevel default = 0xFE; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 8c71d1a954b375..abc314d2429fdf 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1820,6 +1884,22 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SupportedLocales", "code": 1, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4525,6 +4621,38 @@ "side": "server", "enabled": 1, "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -6417,7 +6545,7 @@ "mfgCode": null, "side": "server", "type": "LevelControlOptions", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -8059,5 +8187,6 @@ "endpointVersion": 1, "deviceIdentifier": 768 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 85c29d39db7e2e..061546fcd14fe4 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1295,6 +1303,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1323,6 +1334,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1340,6 +1352,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1358,6 +1371,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1405,6 +1419,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 2a41f49fd56f23..28a3bda1f0cbed 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 914ff39853f2c1..ab408221539d94 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1300,6 +1308,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1328,6 +1339,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1345,6 +1357,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1363,6 +1376,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 6; ram attribute clusterRevision default = 0x0001; } @@ -1410,6 +1424,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 0404fe4a4b3339..fce7f9bc5ad74e 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -6257,4 +6385,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 7fb1b7d3fee8c5..ed687a8a792a4a 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1311,6 +1319,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1339,6 +1350,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1356,6 +1368,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1374,6 +1387,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1421,6 +1435,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 6f86fdbb29054f..fa7b7e97eb5004 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 6d224d2d25837f..61151ed87e3264 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -365,6 +365,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -454,6 +457,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -616,6 +620,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -686,6 +691,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1081,6 +1087,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1359,6 +1367,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1387,6 +1398,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1404,6 +1416,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1422,6 +1435,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 6; ram attribute clusterRevision default = 0x0001; } @@ -1469,6 +1483,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 4deb87b2ccef7b..6cda946228e3c2 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 55bf7b8a647c60..d610effe96b829 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -328,6 +328,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -417,6 +420,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -579,6 +583,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -649,6 +654,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1044,6 +1050,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1322,6 +1330,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1350,6 +1361,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1367,6 +1379,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1385,6 +1398,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1432,6 +1446,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 95855e2279edb5..d7f5c1531329cc 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 50878d3fd877d6..cb20eb0010bef2 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -264,6 +264,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -353,6 +356,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -515,6 +519,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -585,6 +590,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -980,6 +986,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1258,6 +1266,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1286,6 +1297,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1303,6 +1315,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1321,6 +1334,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1368,6 +1382,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 075d42554911ee..fae71f853ca6a0 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 21db6a5ffb2314..e6a48ec1d33c99 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1314,6 +1322,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1342,6 +1353,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1359,6 +1371,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1377,6 +1390,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1424,6 +1438,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 6062728ccfe563..e1542aea915884 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 35e6efc6ffd53c..570a451d306239 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -359,6 +359,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -448,6 +451,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -610,6 +614,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -680,6 +685,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1075,6 +1081,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1353,6 +1361,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1381,6 +1392,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1398,6 +1410,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1416,6 +1429,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1463,6 +1477,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 2e6d8405d6f774..3536614448a94d 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index d1ed28a7454369..bcf4f5fe127047 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -287,6 +287,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -376,6 +379,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -538,6 +542,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -608,6 +613,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1003,6 +1009,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1294,6 +1302,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1322,6 +1333,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1339,6 +1351,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1357,6 +1370,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1404,6 +1418,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index ffe39cbd285b64..7c76328fad7416 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 322bfa30fe6fcf..c7f90bd36eee7b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -216,6 +216,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -932,6 +938,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1460,6 +1468,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1488,6 +1499,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1505,6 +1517,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1523,6 +1536,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1570,6 +1584,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 7d40c50e40b1ff..b77fce2b8d2475 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4589,6 +4685,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index df34979e9d7eaa..ab5184084acaf1 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -216,6 +216,9 @@ server cluster AccessControl = 31 { attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { 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; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 { readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -932,6 +938,8 @@ server cluster Switch = 59 { INT8U totalNumberOfPressesCounted = 1; } + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1354,6 +1362,9 @@ endpoint 0 { emits event AccessControlExtensionChanged; callback attribute acl; callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1382,6 +1393,7 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; ram attribute reachable default = 1; callback attribute uniqueID; + callback attribute capabilityMinima; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } @@ -1399,6 +1411,7 @@ endpoint 0 { } server cluster LocalizationConfiguration { + ram attribute activeLocale; callback attribute supportedLocales; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -1417,6 +1430,7 @@ endpoint 0 { callback attribute basicCommissioningInfo; callback attribute regulatoryConfig default = 0; callback attribute locationCapability default = 0; + callback attribute supportsConcurrentConnection default = 1; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; } @@ -1464,6 +1478,8 @@ endpoint 0 { } server cluster Switch { + ram attribute numberOfPositions default = 2; + ram attribute currentPosition; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index c7e89df17bd247..b78cd6315182a1 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -1034,6 +1034,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -1438,6 +1486,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1836,6 +1900,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2184,6 +2264,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -4541,6 +4637,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h index afb4b40b92f416..1a95949b48c615 100644 --- a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h +++ b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h @@ -94,7 +94,7 @@ class ShutdownAllSubscriptions : public CHIPCommand private: }; -void registerClusterSubscriptions(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerCommandsSubscriptions(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { const char * clusterName = "Subscriptions"; @@ -104,5 +104,5 @@ void registerClusterSubscriptions(Commands & commands, CredentialIssuerCommands make_unique(credsIssuerConfig), // }; - commands.Register(clusterName, clusterCommands); + commands.Register(clusterName, clusterCommands, "Commands for shutting down subscriptions."); } diff --git a/examples/chip-tool/commands/common/Commands.cpp b/examples/chip-tool/commands/common/Commands.cpp index 8e9aa8d59c1cdc..b59aaf0ff47d59 100644 --- a/examples/chip-tool/commands/common/Commands.cpp +++ b/examples/chip-tool/commands/common/Commands.cpp @@ -119,11 +119,12 @@ static void DetectAndLogMismatchedDoubleQuotes(int argc, char ** argv) } // namespace -void Commands::Register(const char * clusterName, commands_list commandsList) +void Commands::Register(const char * clusterName, commands_list commandsList, const char * helpText) { + mClusters[clusterName].second = helpText; for (auto & command : commandsList) { - mClusters[clusterName].push_back(std::move(command)); + mClusters[clusterName].first.push_back(std::move(command)); } } @@ -186,7 +187,6 @@ int Commands::RunInteractive(const char * command) CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) { - std::map::iterator cluster; Command * command = nullptr; if (argc <= 1) @@ -196,29 +196,32 @@ CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) return CHIP_ERROR_INVALID_ARGUMENT; } - cluster = GetCluster(argv[1]); - if (cluster == mClusters.end()) + auto clusterIter = GetCluster(argv[1]); + if (clusterIter == mClusters.end()) { ChipLogError(chipTool, "Unknown cluster: %s", argv[1]); ShowClusters(argv[0]); return CHIP_ERROR_INVALID_ARGUMENT; } + auto & commandList = clusterIter->second.first; + auto * clusterHelp = clusterIter->second.second; + if (argc <= 2) { ChipLogError(chipTool, "Missing command name"); - ShowCluster(argv[0], argv[1], cluster->second); + ShowCluster(argv[0], argv[1], commandList, clusterHelp); return CHIP_ERROR_INVALID_ARGUMENT; } bool isGlobalCommand = IsGlobalCommand(argv[2]); if (!isGlobalCommand) { - command = GetCommand(cluster->second, argv[2]); + command = GetCommand(commandList, argv[2]); if (command == nullptr) { ChipLogError(chipTool, "Unknown command: %s", argv[2]); - ShowCluster(argv[0], argv[1], cluster->second); + ShowCluster(argv[0], argv[1], commandList, clusterHelp); return CHIP_ERROR_INVALID_ARGUMENT; } } @@ -227,15 +230,15 @@ CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) if (argc <= 3) { ChipLogError(chipTool, "Missing event name"); - ShowClusterEvents(argv[0], argv[1], argv[2], cluster->second); + ShowClusterEvents(argv[0], argv[1], argv[2], commandList); return CHIP_ERROR_INVALID_ARGUMENT; } - command = GetGlobalCommand(cluster->second, argv[2], argv[3]); + command = GetGlobalCommand(commandList, argv[2], argv[3]); if (command == nullptr) { ChipLogError(chipTool, "Unknown event: %s", argv[3]); - ShowClusterEvents(argv[0], argv[1], argv[2], cluster->second); + ShowClusterEvents(argv[0], argv[1], argv[2], commandList); return CHIP_ERROR_INVALID_ARGUMENT; } } @@ -244,15 +247,15 @@ CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) if (argc <= 3) { ChipLogError(chipTool, "Missing attribute name"); - ShowClusterAttributes(argv[0], argv[1], argv[2], cluster->second); + ShowClusterAttributes(argv[0], argv[1], argv[2], commandList); return CHIP_ERROR_INVALID_ARGUMENT; } - command = GetGlobalCommand(cluster->second, argv[2], argv[3]); + command = GetGlobalCommand(commandList, argv[2], argv[3]); if (command == nullptr) { ChipLogError(chipTool, "Unknown attribute: %s", argv[3]); - ShowClusterAttributes(argv[0], argv[1], argv[2], cluster->second); + ShowClusterAttributes(argv[0], argv[1], argv[2], commandList); return CHIP_ERROR_INVALID_ARGUMENT; } } @@ -271,7 +274,7 @@ CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive) return interactive ? command->RunAsInteractive() : command->Run(); } -std::map::iterator Commands::GetCluster(std::string clusterName) +Commands::ClusterMap::iterator Commands::GetCluster(std::string clusterName) { for (auto & cluster : mClusters) { @@ -342,14 +345,21 @@ void Commands::ShowClusters(std::string executable) std::transform(clusterName.begin(), clusterName.end(), clusterName.begin(), [](unsigned char c) { return std::tolower(c); }); fprintf(stderr, " | * %-82s|\n", clusterName.c_str()); + ShowHelpText(cluster.second.second); } fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); } -void Commands::ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands) +void Commands::ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands, const char * helpText) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s %s command_name [param1 param2 ...]\n", executable.c_str(), clusterName.c_str()); + + if (helpText) + { + fprintf(stderr, "\n%s\n", helpText); + } + fprintf(stderr, "\n"); fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); fprintf(stderr, " | Commands: |\n"); @@ -399,23 +409,7 @@ void Commands::ShowCluster(std::string executable, std::string clusterName, Comm if (shouldPrint) { fprintf(stderr, " | * %-82s|\n", command->GetName()); - const char * helpText = command->GetHelpText(); - if (command->GetHelpText()) - { - // We leave 82 chars for command names. The help text starts - // two chars further to the right, so there are 80 chars left - // for it. - if (strlen(helpText) > 80) - { - // Add "..." at the end to indicate truncation, and only - // show the first 77 chars, since that's what will fit. - fprintf(stderr, " | - %.77s...|\n", helpText); - } - else - { - fprintf(stderr, " | - %-80s|\n", helpText); - } - } + ShowHelpText(command->GetHelpText()); } } fprintf(stderr, " +-------------------------------------------------------------------------------------+\n"); @@ -541,16 +535,18 @@ bool Commands::DecodeArgumentsFromBase64EncodedJson(const char * json, std::vect auto commandName = jsonValue[kJsonCommandKey].asString(); auto arguments = jsonValue[kJsonArgumentsKey].asString(); - auto cluster = GetCluster(clusterName); - VerifyOrReturnValue(cluster != mClusters.end(), false, + auto clusterIter = GetCluster(clusterName); + VerifyOrReturnValue(clusterIter != mClusters.end(), false, ChipLogError(chipTool, "Cluster '%s' is not supported.", clusterName.c_str())); - auto command = GetCommand(cluster->second, commandName); + auto & commandList = clusterIter->second.first; + + auto command = GetCommand(commandList, commandName); if (jsonValue.isMember(kJsonCommandSpecifierKey) && IsGlobalCommand(commandName)) { auto commandSpecifierName = jsonValue[kJsonCommandSpecifierKey].asString(); - command = GetGlobalCommand(cluster->second, commandName, commandSpecifierName); + command = GetGlobalCommand(commandList, commandName, commandSpecifierName); } VerifyOrReturnValue(nullptr != command, false, ChipLogError(chipTool, "Unknown command.")); @@ -602,3 +598,25 @@ bool Commands::DecodeArgumentsFromStringStream(const char * command, std::vector return true; } + +void Commands::ShowHelpText(const char * helpText) +{ + if (helpText == nullptr) + { + return; + } + + // We leave 82 chars for command/cluster names. The help text starts + // two chars further to the right, so there are 80 chars left + // for it. + if (strlen(helpText) > 80) + { + // Add "..." at the end to indicate truncation, and only + // show the first 77 chars, since that's what will fit. + fprintf(stderr, " | - %.77s...|\n", helpText); + } + else + { + fprintf(stderr, " | - %-80s|\n", helpText); + } +} diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h index 80f585931f65db..eae7946e84c5ef 100644 --- a/examples/chip-tool/commands/common/Commands.h +++ b/examples/chip-tool/commands/common/Commands.h @@ -30,14 +30,16 @@ class Commands public: using CommandsVector = ::std::vector>; - void Register(const char * clusterName, commands_list commandsList); + void Register(const char * clusterName, commands_list commandsList, const char * helpText = nullptr); int Run(int argc, char ** argv); int RunInteractive(const char * command); private: + using ClusterMap = std::map>; + CHIP_ERROR RunCommand(int argc, char ** argv, bool interactive = false); - std::map::iterator GetCluster(std::string clusterName); + ClusterMap::iterator GetCluster(std::string clusterName); Command * GetCommand(CommandsVector & commands, std::string commandName); Command * GetGlobalCommand(CommandsVector & commands, std::string commandName, std::string attributeName); bool IsAttributeCommand(std::string commandName) const; @@ -45,7 +47,7 @@ class Commands bool IsGlobalCommand(std::string commandName) const; void ShowClusters(std::string executable); - void ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands); + void ShowCluster(std::string executable, std::string clusterName, CommandsVector & commands, const char * helpText); void ShowClusterAttributes(std::string executable, std::string clusterName, std::string commandName, CommandsVector & commands); void ShowClusterEvents(std::string executable, std::string clusterName, std::string commandName, CommandsVector & commands); void ShowCommand(std::string executable, std::string clusterName, Command * command); @@ -54,7 +56,10 @@ class Commands bool DecodeArgumentsFromBase64EncodedJson(const char * encodedData, std::vector & args); bool DecodeArgumentsFromStringStream(const char * command, std::vector & args); - std::map mClusters; + // helpText may be null, in which case it's not shown. + static void ShowHelpText(const char * helpText); + + ClusterMap mClusters; #ifdef CONFIG_USE_LOCAL_STORAGE PersistentStorage mStorage; #endif // CONFIG_USE_LOCAL_STORAGE diff --git a/examples/chip-tool/main.cpp b/examples/chip-tool/main.cpp index 0ca5b243c9243e..c45998a8c8e337 100644 --- a/examples/chip-tool/main.cpp +++ b/examples/chip-tool/main.cpp @@ -19,6 +19,7 @@ #include "commands/common/Commands.h" #include "commands/example/ExampleCredentialIssuerCommands.h" +#include "commands/clusters/SubscriptionsCommands.h" #include "commands/delay/Commands.h" #include "commands/discover/Commands.h" #include "commands/group/Commands.h" @@ -45,6 +46,7 @@ int main(int argc, char * argv[]) registerCommandsTests(commands, &credIssuerCommands); registerCommandsGroup(commands, &credIssuerCommands); registerClusters(commands, &credIssuerCommands); + registerCommandsSubscriptions(commands, &credIssuerCommands); registerCommandsStorage(commands); return commands.Run(argc, argv); diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 2fcc7e1abb94e2..8f47277816f30f 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -10,7 +10,6 @@ #include #include #include -#include #include {{> clusters_header}} @@ -146,5 +145,4 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue {{#zcl_clusters}} registerCluster{{asUpperCamelCase name}}(commands, credsIssuerConfig); {{/zcl_clusters}} - registerClusterSubscriptions(commands, credsIssuerConfig); } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 041ffa8bb9ef2c..2392eae700b844 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -293,7 +293,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1518,7 +1517,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index d93ae8c35658a2..c31f3f5868b11e 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1460,7 +1460,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -8785,5 +8785,6 @@ "endpointVersion": 1, "deviceIdentifier": 21 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index c9b18b9e0f0a40..e388939cfa02a4 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -564,7 +564,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1661,7 +1660,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute generatedCommandList; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap index 570bfd85a49dc4..a360a32c025fc0 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -790,7 +790,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7614,5 +7614,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index f480bbe17114a9..b05ef0db02b8a3 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -601,7 +601,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -2151,7 +2150,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index a5c77707454345..71ec40c2b6d97f 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1508,7 +1508,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -9334,5 +9334,6 @@ "endpointVersion": 1, "deviceIdentifier": 15 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 10d41625f70b25..e7ee0a37995e04 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1897,7 +1896,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 3678fd16460206..99f60b937f3162 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1460,7 +1460,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index cd4d0833e0f95d..357b26a4b301f6 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1806,7 +1805,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index cb6676170a79b3..55e4b7aa8adea0 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1460,7 +1460,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -8343,4 +8343,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index ac3941ed0da579..d3569ce26c1874 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1993,7 +1992,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 755f82a37b2630..664ec3b5bd9dd5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1460,7 +1460,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7041,7 +7041,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -8341,5 +8341,6 @@ "endpointVersion": 1, "deviceIdentifier": 257 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 690c1ef00c3472..8ecceae4110b58 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -458,7 +458,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1758,7 +1757,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute generatedCommandList; diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index ccd32d3549f65d..2b5010994b9700 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1572,7 +1572,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter index 10f515bf7763a1..aacd7361c3fe2c 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1698,7 +1697,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap index 9131b9a3819d55..a7b2737e97f4f6 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1444,7 +1444,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/lighting-app/silabs/efr32/README.md b/examples/lighting-app/silabs/efr32/README.md index 1cd0ed3df33193..382a69a7871a5c 100644 --- a/examples/lighting-app/silabs/efr32/README.md +++ b/examples/lighting-app/silabs/efr32/README.md @@ -96,6 +96,8 @@ Silicon Labs platform. - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD2703A / MG24 Explorer Kit + - BRD2704A / SparkFun Thing Plus MGM240P board * Build the example application: @@ -276,11 +278,10 @@ combination with JLinkRTTClient as follows: [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - Here is an example with the CHIPTool: + Here is an example with the chip-tool: - chip-tool pairing ble-thread 1 hex: 20202021 3840 - - chip-tool onoff on 1 1 + $ chip-tool pairing ble-thread 1 hex: 20202021 3840 + $ chip-tool onoff on 1 1 ### Notes diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter index 4ed286292677b3..26d34db585312b 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1788,7 +1787,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap index 05a948eec9f423..60a5e50ba52621 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1418,7 +1418,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter index 10f515bf7763a1..aacd7361c3fe2c 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter @@ -463,7 +463,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1698,7 +1697,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap index 9131b9a3819d55..a7b2737e97f4f6 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1444,7 +1444,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index d3d4f7f68bbdb8..43d0b253a9d1c5 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -270,7 +270,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -2270,7 +2269,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 3f4335a182fe21..c2cd392271397d 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1208,7 +1208,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7919,5 +7919,6 @@ "endpointVersion": 1, "deviceIdentifier": 10 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index a9cfa9df861607..dc00f672a41758 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,65 @@ namespace { constexpr int extDiscTimeoutSecs = 20; } +EmberAfIdentifyEffectIdentifier sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + +/********************************************************** + * Identify Callbacks + *********************************************************/ + +namespace { +void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) +{ + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; +} +} // namespace + +void OnTriggerIdentifyEffect(Identify * identify) +{ + sIdentifyEffect = identify->mCurrentEffectIdentifier; + + if (identify->mCurrentEffectIdentifier == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE) + { + ChipLogProgress(Zcl, "IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE - Not supported, use effect variant %d", + identify->mEffectVariant); + sIdentifyEffect = static_cast(identify->mEffectVariant); + } + + switch (sIdentifyEffect) + { + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE: + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_FINISH_EFFECT: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT: + SystemLayer().ScheduleLambda( + [identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); }); + sIdentifyEffect = EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_STOP_EFFECT; + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + } +} + +Identify gIdentify = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_VISIBLE_LED, + OnTriggerIdentifyEffect, +}; + void LockOpenThreadTask(void) { chip::DeviceLayer::ThreadStackMgr().LockThreadStack(); diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 4466f92a12e4a7..51ec266cee8595 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -292,7 +292,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1888,7 +1887,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute generatedCommandList; diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 9e480a2bbb4e1a..626470736fcc08 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1320,7 +1320,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -2189,7 +2189,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6151,7 +6151,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6167,7 +6167,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6183,7 +6183,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6199,7 +6199,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7851,7 +7851,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "PowerSourceStatus", + "type": "PowerSourceStatusEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7915,7 +7915,7 @@ "code": 14, "mfgCode": null, "side": "server", - "type": "BatChargeLevel", + "type": "BatChargeLevelEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7947,7 +7947,7 @@ "code": 16, "mfgCode": null, "side": "server", - "type": "BatReplaceability", + "type": "BatReplaceabilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/log-source-app/log-source-common/log-source-app.zap b/examples/log-source-app/log-source-common/log-source-app.zap index c5836ae74694c2..b084545f88519d 100644 --- a/examples/log-source-app/log-source-common/log-source-app.zap +++ b/examples/log-source-app/log-source-common/log-source-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1210,7 +1210,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -3527,5 +3527,6 @@ "endpointVersion": 1, "deviceIdentifier": null } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index af44c58c246f4c..60ba29378fb02a 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -255,7 +255,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1008,7 +1007,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 485543b8697751..1b19d3cc68417e 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1424,7 +1424,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -4991,5 +4991,6 @@ "endpointVersion": 1, "deviceIdentifier": 22 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 1d69db27f6a3ec..c71b13938be727 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -355,7 +355,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1183,7 +1182,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 2e385b38a057ec..e72b4bd18643c0 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1406,7 +1406,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7468,5 +7468,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index b7c6c71c46b561..eefd492aea1e31 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -3467,7 +3467,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 7bd6786e0dbaec..792cecc48722dd 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 94, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -1088,7 +1088,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7354,7 +7354,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7370,7 +7370,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7386,7 +7386,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7402,7 +7402,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7602,7 +7602,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7618,7 +7618,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7634,7 +7634,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7650,7 +7650,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7954,7 +7954,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7970,7 +7970,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7986,7 +7986,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8002,7 +8002,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8232,7 +8232,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8248,7 +8248,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8264,7 +8264,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8280,7 +8280,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8670,7 +8670,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8686,7 +8686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8702,7 +8702,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8718,7 +8718,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8818,7 +8818,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8834,7 +8834,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8850,7 +8850,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8866,7 +8866,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8882,7 +8882,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8898,7 +8898,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8914,7 +8914,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8930,7 +8930,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index fa31f5b3dc58ec..4fc58eb00c4dc4 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -3428,7 +3428,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index e0b0a83f65aa1e..12201697f898d7 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -1,5 +1,5 @@ { - "featureLevel": 94, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../../../src/app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -1088,7 +1088,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -7638,7 +7638,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7654,7 +7654,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7670,7 +7670,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7686,7 +7686,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7886,7 +7886,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7902,7 +7902,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7918,7 +7918,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7934,7 +7934,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8238,7 +8238,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8254,7 +8254,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8270,7 +8270,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8286,7 +8286,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8516,7 +8516,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8532,7 +8532,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8548,7 +8548,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8564,7 +8564,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8954,7 +8954,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8970,7 +8970,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8986,7 +8986,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9002,7 +9002,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9102,7 +9102,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9118,7 +9118,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9134,7 +9134,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9150,7 +9150,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9166,7 +9166,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9182,7 +9182,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9198,7 +9198,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -9214,7 +9214,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", diff --git a/examples/platform/esp32/PigweedLogger.cpp b/examples/platform/esp32/PigweedLogger.cpp index cc75c60043683d..e7bb260f9da034 100644 --- a/examples/platform/esp32/PigweedLogger.cpp +++ b/examples/platform/esp32/PigweedLogger.cpp @@ -86,6 +86,28 @@ SemaphoreHandle_t * getSemaphore() return &esp_log_mutex; } +static const char * getLogColorForLevel(esp_log_level_t level) +{ + switch (level) + { + case ESP_LOG_ERROR: + return LOG_COLOR_E "E"; + + case ESP_LOG_INFO: + return LOG_COLOR_I "I"; + + default: + // default is kept as ESP_LOG_DEBUG + return LOG_COLOR_D "D"; + } +} + +// ESP_LOGx(...) logs are funneled to esp_log_write() and it has the specific format. It contains color codes, +// log level character, timestamp, tag, and actual log message. Everything here is part of format and variadic argument. +// +// ChipLogx(...) logs are funneled to esp_log_writev() will only have actual log message without color codes, log level +// character, timestamp, and tag. So, to match up __wrap_esp_log_writev() adds those details when sending log to pigweed +// logger. extern "C" void __wrap_esp_log_write(esp_log_level_t level, const char * tag, const char * format, ...) { va_list v; @@ -107,4 +129,30 @@ extern "C" void __wrap_esp_log_write(esp_log_level_t level, const char * tag, co va_end(v); } +extern "C" void __wrap_esp_log_writev(esp_log_level_t level, const char * tag, const char * format, va_list v) +{ +#ifndef CONFIG_LOG_DEFAULT_LEVEL_NONE + if (uartInitialised && level <= CONFIG_LOG_MAXIMUM_LEVEL) + { + const char * logColor = getLogColorForLevel(level); + PigweedLogger::putString(logColor, strlen(logColor)); + + char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + size_t len = snprintf(formattedMsg, sizeof formattedMsg, " (%u) %s: ", esp_log_timestamp(), tag); + PigweedLogger::putString(formattedMsg, len); + + memset(formattedMsg, 0, sizeof formattedMsg); + len = vsnprintf(formattedMsg, sizeof formattedMsg, format, v); + if (len >= sizeof formattedMsg) + { + len = sizeof formattedMsg - 1; + } + PigweedLogger::putString(formattedMsg, len); + + const char * logResetColor = LOG_RESET_COLOR "\n"; + PigweedLogger::putString(logResetColor, strlen(logResetColor)); + } +#endif +} + } // namespace PigweedLogger diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 37e8bf36d4846a..341839796a4922 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -223,7 +223,7 @@ CHIP_ERROR AppTaskCommon::InitCommonParts(void) #if APP_SET_NETWORK_COMM_ENDPOINT_SEC // We only have network commissioning on endpoint 0. // Set up a valid Network Commissioning cluster on endpoint 0 is done in - // src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp + // src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); #endif @@ -247,27 +247,27 @@ void AppTaskCommon::InitButtons(void) #if CONFIG_CHIP_BUTTON_MANAGER_IRQ_MODE sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_1, FactoryResetButtonEventHandler); sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, StartBleAdvButtonEventHandler); -#if APP_USE_THREAD_START_BUTTON - sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, StartThreadButtonEventHandler); -#endif #if APP_USE_EXAMPLE_START_BUTTON if (ExampleActionEventHandler) { sExampleActionButton.Configure(BUTTON_PORT, BUTTON_PIN_2, ExampleActionButtonEventHandler); } #endif +#if APP_USE_THREAD_START_BUTTON + sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, StartThreadButtonEventHandler); +#endif #else sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, FactoryResetButtonEventHandler); sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, StartBleAdvButtonEventHandler); -#if APP_USE_THREAD_START_BUTTON - sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, StartThreadButtonEventHandler); -#endif #if APP_USE_EXAMPLE_START_BUTTON if (ExampleActionEventHandler) { sExampleActionButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_1, ExampleActionButtonEventHandler); } #endif +#if APP_USE_THREAD_START_BUTTON + sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, StartThreadButtonEventHandler); +#endif #endif ButtonManagerInst().AddButton(sFactoryResetButton); diff --git a/examples/temperature-measurement-app/telink/src/SensorManager.cpp b/examples/temperature-measurement-app/telink/src/SensorManager.cpp index 8ab8a42d9cc276..22d9bb1c57ef19 100644 --- a/examples/temperature-measurement-app/telink/src/SensorManager.cpp +++ b/examples/temperature-measurement-app/telink/src/SensorManager.cpp @@ -49,7 +49,7 @@ int16_t SensorManager::SensorEventHandler() #ifdef TEMPERATURE_SIMULATION_IS_USED static uint8_t nbOfRepetition = 0; static uint8_t simulatedIndex = 0; - if (simulatedIndex >= sizeof(mSimulatedTemp) - 1) + if (simulatedIndex >= ArraySize(mSimulatedTemp)) { simulatedIndex = 0; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 5d113b5e8d9693..d5baf418af4728 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -182,7 +182,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1067,7 +1066,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index f389822f276167..3dfa8891495ef0 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -874,7 +874,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -4207,5 +4207,6 @@ "endpointVersion": 1, "deviceIdentifier": 770 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/thermostat/silabs/efr32/src/SensorManager.cpp b/examples/thermostat/silabs/efr32/src/SensorManager.cpp index 427b1dad57d8ed..2d2246a44d20eb 100644 --- a/examples/thermostat/silabs/efr32/src/SensorManager.cpp +++ b/examples/thermostat/silabs/efr32/src/SensorManager.cpp @@ -104,7 +104,7 @@ void SensorManager::SensorTimerEventHandler(TimerHandle_t xTimer) #else static uint8_t nbOfRepetition = 0; static uint8_t simulatedIndex = 0; - if (simulatedIndex >= sizeof(mSimulatedTemp)) + if (simulatedIndex >= ArraySize(mSimulatedTemp)) { simulatedIndex = 0; } diff --git a/examples/thermostat/telink/src/SensorManager.cpp b/examples/thermostat/telink/src/SensorManager.cpp index 534a519b049cf4..981447c8a12bd6 100644 --- a/examples/thermostat/telink/src/SensorManager.cpp +++ b/examples/thermostat/telink/src/SensorManager.cpp @@ -62,7 +62,7 @@ void SensorManager::SensorTimerEventHandler(AppEvent * aEvent) static uint8_t nbOfRepetition = 0; static uint8_t simulatedIndex = 0; - if (simulatedIndex >= sizeof(mSimulatedTemp)) + if (simulatedIndex >= ArraySize(mSimulatedTemp)) { simulatedIndex = 0; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index ec79d34760e5c2..a4190214247cd9 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -477,7 +477,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1790,7 +1789,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 81ca71a259c3be..642f8acae39fb7 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -1442,7 +1442,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index db232108fbddd7..eb909228662b9c 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -372,7 +372,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -2472,7 +2471,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index f93946ca6f8cd6..4b73fdefc8e1d7 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 92, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1426,7 +1426,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, @@ -12460,5 +12460,6 @@ "endpointVersion": 1, "deviceIdentifier": 36 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index 485cf7917e6a29..6fa224518bedd1 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -161,7 +161,7 @@ int main(int argc, char * argv[]) } registerClusters(gCommands, &gCredIssuerCommands); - registerClusterSubscriptions(gCommands, &gCredIssuerCommands); + registerCommandsSubscriptions(gCommands, &gCredIssuerCommands); if (argc > 1) { diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index abb8e9f1edb116..cb5ee908d264c7 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -529,7 +529,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -2014,7 +2013,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; ram attribute featureMap default = 0; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 134634cc5e62d4..ad1f0d7ca2c3b0 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 95, + "featureLevel": 96, "creator": "zap", "keyValuePairs": [ { @@ -1408,7 +1408,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index a73f41a331b31c..e48d6d2d0f87f3 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -410,7 +410,6 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute command_id generatedCommandList[] = 65528; @@ -1951,7 +1950,6 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; persist attribute localConfigDisabled default = 0; - ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; callback attribute generatedCommandList; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 72c2db91f20e28..ef2182ccae36d3 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -1492,7 +1492,7 @@ "mfgCode": null, "side": "server", "type": "boolean", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 1, "bounded": 0, diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 77482fd18b39b7..bead6e74382730 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2023_04_03 +ARG TAG_NAME=ameba_update_2023_05_05 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 33084d044249a3..87721f4184776e 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.7.2 Version bump reason: [Telink] Update Telink Docker image (Zephyr update) +0.7.3 Version bump reason: [Ameba] Matter shell Update diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index a1a7f73d11aa95..d1d4992522daf5 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -201,7 +201,7 @@ RUN git clone https://github.com/project-chip/connectedhomeip.git /root/connecte WORKDIR /root/connectedhomeip/ RUN git checkout ${COMMITHASH} RUN ./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux -RUN scripts/build/gn_bootstrap.sh +RUN bash scripts/bootstrap.sh SHELL ["/bin/bash", "-c"] RUN set -x && \ source scripts/activate.sh \ diff --git a/scripts/build/gn_bootstrap.sh b/scripts/build/gn_bootstrap.sh deleted file mode 100755 index d2390771b78870..00000000000000 --- a/scripts/build/gn_bootstrap.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -set -e - -# Bootstrap script for GN build GitHub workflow. - -# This is used to account bootstrap time in a dedicated workflow step; there's -# no need to use this script locally. - -source "$(dirname "$0")/../../scripts/activate.sh" diff --git a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py index 64edb2b6850264..f3b2c6dabdf620 100755 --- a/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py +++ b/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py @@ -62,10 +62,9 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element): # - name (general name for this cluster) # - code (unique identifier, may be hex or numeric) # - attribute with side, code and optional attributes - try: name = element.find('name') - if not name or not name.text: + if name is None or not name.text: raise ElementNotFoundError('name') name = name.text.replace(' ', '') @@ -105,7 +104,7 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element): name=cmd.attrib["name"], code=parseNumberString(cmd.attrib['code']))) code = element.find('code') - if not code: + if code is None: raise Exception("Failed to find cluster code") return DecodedCluster( @@ -299,7 +298,6 @@ def CreateParser(file_name: str): # This Parser is generally not intended to be run as a stand-alone binary. # The ability to run is for debug and to print out the parsed AST. import click - import coloredlogs # Supported log levels, mapping string values required for argument # parsing into logging constants @@ -318,8 +316,10 @@ def CreateParser(file_name: str): help='Determines the verbosity of script output.') @click.argument('filename') def main(log_level, filename=None): - coloredlogs.install(level=__LOG_LEVELS__[ - log_level], fmt='%(asctime)s %(levelname)-7s %(message)s') + logging.basicConfig( + level=__LOG_LEVELS__[log_level], + format='%(asctime)s %(levelname)-7s %(message)s', + ) logging.info("Starting to parse ...") data = CreateParser(filename).parse() diff --git a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py index 44a35fcd57e3c4..f4ba7059bf605d 100755 --- a/scripts/py_matter_idl/matter_idl/matter_idl_parser.py +++ b/scripts/py_matter_idl/matter_idl/matter_idl_parser.py @@ -541,7 +541,6 @@ def CreateParser(skip_meta: bool = False): import pprint import click - import coloredlogs # Supported log levels, mapping string values required for argument # parsing into logging constants @@ -560,8 +559,10 @@ def CreateParser(skip_meta: bool = False): help='Determines the verbosity of script output.') @click.argument('filename') def main(log_level, filename=None): - coloredlogs.install(level=__LOG_LEVELS__[ - log_level], fmt='%(asctime)s %(levelname)-7s %(message)s') + logging.basicConfig( + level=__LOG_LEVELS__[log_level], + format='%(asctime)s %(levelname)-7s %(message)s', + ) logging.info("Starting to parse ...") data = CreateParser().parse(open(filename).read(), file_name=filename) diff --git a/scripts/py_matter_idl/matter_idl/xml_parser.py b/scripts/py_matter_idl/matter_idl/xml_parser.py index e4033f98d8a92e..5a07490e9c3b68 100755 --- a/scripts/py_matter_idl/matter_idl/xml_parser.py +++ b/scripts/py_matter_idl/matter_idl/xml_parser.py @@ -33,7 +33,6 @@ import pprint import click - import coloredlogs # Supported log levels, mapping string values required for argument # parsing into logging constants @@ -59,8 +58,10 @@ help='Do not pring output data (parsed data)') @ click.argument('filenames', nargs=-1) def main(log_level, no_print, filenames): - coloredlogs.install(level=__LOG_LEVELS__[ - log_level], fmt='%(asctime)s %(levelname)-7s %(message)s') + logging.basicConfig( + level=__LOG_LEVELS__[log_level], + format='%(asctime)s %(levelname)-7s %(message)s', + ) logging.info("Starting to parse ...") diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index 1affdf21fd6564..33ace02d5aca8c 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -962,8 +962,8 @@ def __init__(self, test_file: str, parser_config: TestParserConfig = TestParserC yaml_loader = YamlLoader() filename, name, pics, config, tests = yaml_loader.load(test_file) - self.__apply_config_override(config, parser_config.config_override) self.__apply_legacy_config(config) + self.__apply_config_override(config, parser_config.config_override) self.filename = filename self.name = name @@ -974,12 +974,21 @@ def __init__(self, test_file: str, parser_config: TestParserConfig = TestParserC PICSChecker(parser_config.pics), tests ) + self.timeout = config['timeout'] def __apply_config_override(self, config, config_override): for key, value in config_override.items(): - if value is None: + if value is None or not key in config: continue + if type(value) is str: + if key == 'timeout' or key == 'endpoint': + value = int(value) + elif key == 'nodeId' and value.startswith('0x'): + value = int(value, 16) + elif key == 'nodeId': + value = int(value) + if isinstance(config[key], dict) and 'defaultValue' in config[key]: config[key]['defaultValue'] = value else: diff --git a/scripts/py_matter_yamltests/matter_yamltests/runner.py b/scripts/py_matter_yamltests/matter_yamltests/runner.py index 884d2c249467df..3229dace1301bf 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/runner.py +++ b/scripts/py_matter_yamltests/matter_yamltests/runner.py @@ -43,10 +43,14 @@ class TestRunnerOptions: stop running the tests if a step index matches the number. This is mostly useful when running a single test file and for debugging purposes. + + delay_in_ms: If set to any value that is not zero the runner will + wait for the given time between steps. """ stop_on_error: bool = True stop_on_warning: bool = False stop_at_number: int = -1 + delay_in_ms: int = 0 @dataclass @@ -139,7 +143,9 @@ def run(self, parser_builder_config: TestParserBuilderConfig, runner_config: Tes if not parser or not runner_config: continue - result = asyncio.run(self._run(parser, runner_config)) + loop = asyncio.get_event_loop() + result = loop.run_until_complete(asyncio.wait_for( + self._run(parser, runner_config), parser.timeout)) if isinstance(result, Exception): raise (result) elif not result: @@ -200,6 +206,9 @@ async def _run(self, parser: TestParser, config: TestRunnerConfig): if (idx + 1) == config.options.stop_at_number: break + if config.options.delay_in_ms: + await asyncio.sleep(config.options.delay_in_ms / 1000) + hooks.test_stop(round(test_duration)) except Exception as exception: diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index a655fa894eb3c9..5b0f4a548f505c 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -283,7 +283,7 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, # happen if the relevant application does not exist. It's # non-fatal as long as we are not trying to run any tests that # need that application. - if len(path) == 1 and path[0] is None: + if path[-1] is None: continue # For the app indicated by self.target, give it the 'default' key to add to the register diff --git a/scripts/tests/yaml/chiptool.py b/scripts/tests/yaml/chiptool.py index d47a4d22d32882..81884b82687253 100755 --- a/scripts/tests/yaml/chiptool.py +++ b/scripts/tests/yaml/chiptool.py @@ -79,6 +79,14 @@ def chiptool_runner_options(f): help='Name of a websocket server to run at launch.')(f) f = click.option('--server_arguments', type=str, default='interactive server', help='Optional arguments to pass to the websocket server at launch.')(f) + f = click.option('--trace_file', type=click.Path(), default=None, + help='Optional file path to save the tracing output to.')(f) + f = click.option('--trace_decode', type=bool, default=True, + help='Decode the tracing ouput to a human readable format.')(f) + f = click.option('--delay-in-ms', '--delayInMs', type=int, default=0, show_default=True, + help='Add a delay between each test suite steps.')(f) + f = click.option('--continueOnFailure', type=bool, default=False, show_default=True, + help='Do not stop running the test suite on first error.')(f) f = click.option('--PICS', type=click.Path(exists=True), show_default=True, default=_DEFAULT_PICS_FILE, help='Path to the PICS file to use.')(f) return f @@ -88,13 +96,36 @@ def chiptool_runner_options(f): CONTEXT_SETTINGS['default_map']['chiptool']['use_test_harness_log_format'] = True +def maybe_update_server_arguments(ctx): + if ctx.params['trace_file']: + ctx.params['server_arguments'] += ' --trace_file {}'.format(ctx.params['trace_file']) + + if ctx.params['trace_decode']: + ctx.params['server_arguments'] += ' --trace_decode 1' + + del ctx.params['trace_file'] + del ctx.params['trace_decode'] + + return ctx.params['server_arguments'] + + +def maybe_update_stop_on_error(ctx): + if ctx.params['continueonfailure']: + ctx.params['stop_on_error'] = False + + del ctx.params['continueonfailure'] + + @click.command(context_settings=CONTEXT_SETTINGS) @click.argument('commands', nargs=-1) @chiptool_runner_options @click.pass_context -def chiptool_py(ctx, commands: list[str], server_path: str, server_name: str, server_arguments: str, pics: str): +def chiptool_py(ctx, commands: list[str], server_path: str, server_name: str, server_arguments: str, trace_file: str, trace_decode: bool, delay_in_ms: int, continueonfailure: bool, pics: str): success = False + server_arguments = maybe_update_server_arguments(ctx) + maybe_update_stop_on_error(ctx) + if len(commands) > 1 and commands[0] == 'tests': success = send_yaml_command(commands[1], server_path, server_arguments, pics, commands[2:]) else: diff --git a/scripts/tests/yaml/runner.py b/scripts/tests/yaml/runner.py index 7ccc6cf50253ea..4b60d5d1ab25b1 100755 --- a/scripts/tests/yaml/runner.py +++ b/scripts/tests/yaml/runner.py @@ -73,6 +73,8 @@ def test_runner_options(f): help='Show additional logs provided by the adapter on error.')(f) f = click.option('--use_test_harness_log_format', type=bool, default=False, show_default=True, help='Use the test harness log format.')(f) + f = click.option('--delay-in-ms', type=int, default=0, show_default=True, + help='Add a delay between test suite steps.')(f) return f @@ -263,10 +265,10 @@ def dry_run(parser_group: ParserGroup): @runner_base.command() @test_runner_options @pass_parser_group -def run(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool): +def run(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool, delay_in_ms: int): """Run the test suite.""" adapter = __import__(adapter, fromlist=[None]).Adapter(parser_group.builder_config.parser_config.definitions) - runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number) + runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number, delay_in_ms) runner_hooks = TestRunnerLogger(show_adapter_logs, show_adapter_logs_on_error, use_test_harness_log_format) runner_config = TestRunnerConfig(adapter, parser_group.pseudo_clusters, runner_options, runner_hooks) @@ -278,10 +280,10 @@ def run(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_wa @test_runner_options @websocket_runner_options @pass_parser_group -def websocket(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool, server_address: str, server_port: int, server_path: str, server_name: str, server_arguments: str): +def websocket(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool, delay_in_ms: int, server_address: str, server_port: int, server_path: str, server_name: str, server_arguments: str): """Run the test suite using websockets.""" adapter = __import__(adapter, fromlist=[None]).Adapter(parser_group.builder_config.parser_config.definitions) - runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number) + runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number, delay_in_ms) runner_hooks = TestRunnerLogger(show_adapter_logs, show_adapter_logs_on_error, use_test_harness_log_format) runner_config = TestRunnerConfig(adapter, parser_group.pseudo_clusters, runner_options, runner_hooks) @@ -301,10 +303,10 @@ def websocket(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop @test_runner_options @chip_repl_runner_options @pass_parser_group -def chip_repl(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool, runner: str, repl_storage_path: str, commission_on_network_dut: bool): +def chip_repl(parser_group: ParserGroup, adapter: str, stop_on_error: bool, stop_on_warning: bool, stop_at_number: int, show_adapter_logs: bool, show_adapter_logs_on_error: bool, use_test_harness_log_format: bool, delay_in_ms: int, runner: str, repl_storage_path: str, commission_on_network_dut: bool): """Run the test suite using chip-repl.""" adapter = __import__(adapter, fromlist=[None]).Adapter(parser_group.builder_config.parser_config.definitions) - runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number) + runner_options = TestRunnerOptions(stop_on_error, stop_on_warning, stop_at_number, delay_in_ms) runner_hooks = TestRunnerLogger(show_adapter_logs, show_adapter_logs_on_error, use_test_harness_log_format) runner_config = TestRunnerConfig(adapter, parser_group.pseudo_clusters, runner_options, runner_hooks) diff --git a/src/app/OperationalSessionSetup.cpp b/src/app/OperationalSessionSetup.cpp index cded2b4f404fb5..849490b40ab8c8 100644 --- a/src/app/OperationalSessionSetup.cpp +++ b/src/app/OperationalSessionSetup.cpp @@ -396,12 +396,18 @@ void OperationalSessionSetup::OnSessionEstablished(const SessionHandle & session ChipLogError(Discovery, "OnSessionEstablished was called while we were not connecting")); if (!mSecureSession.Grab(session)) - return; // Got an invalid session, do not change any state + { + // Got an invalid session, just dispatch an error. We have to do this + // so we don't leak. + DequeueConnectionCallbacks(CHIP_ERROR_INCORRECT_STATE); + + // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. + return; + } MoveToState(State::SecureConnected); DequeueConnectionCallbacks(CHIP_NO_ERROR); - // Do not touch `this` instance anymore; it has been destroyed in DequeueConnectionCallbacks. } void OperationalSessionSetup::CleanupCASEClient() @@ -413,14 +419,6 @@ void OperationalSessionSetup::CleanupCASEClient() } } -void OperationalSessionSetup::OnSessionReleased() -{ - // This is unlikely to be called since within the same call that we get SessionHandle we - // then call DequeueConnectionCallbacks which releases `this`. If this is called, and we - // we have any callbacks we will just send an error. - DequeueConnectionCallbacks(CHIP_ERROR_INCORRECT_STATE); -} - OperationalSessionSetup::~OperationalSessionSetup() { if (mAddressLookupHandle.IsActive()) diff --git a/src/app/OperationalSessionSetup.h b/src/app/OperationalSessionSetup.h index 5dbdff6ebb2f9c..c6208a00f4ba35 100644 --- a/src/app/OperationalSessionSetup.h +++ b/src/app/OperationalSessionSetup.h @@ -152,16 +152,13 @@ typedef void (*OnDeviceConnectionRetry)(void * context, const ScopedNodeId & pee * It is possible to determine which of the two purposes the OperationalSessionSetup is for by calling * IsForAddressUpdate(). */ -class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, - public SessionEstablishmentDelegate, - public AddressResolve::NodeListener +class DLL_EXPORT OperationalSessionSetup : public SessionEstablishmentDelegate, public AddressResolve::NodeListener { public: ~OperationalSessionSetup() override; OperationalSessionSetup(const CASEClientInitParams & params, CASEClientPoolDelegate * clientPool, ScopedNodeId peerId, - OperationalSessionReleaseDelegate * releaseDelegate) : - mSecureSession(*this) + OperationalSessionReleaseDelegate * releaseDelegate) { mInitParams = params; if (params.Validate() != CHIP_NO_ERROR || clientPool == nullptr || releaseDelegate == nullptr) @@ -201,11 +198,6 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, void OnSessionEstablished(const SessionHandle & session) override; void OnSessionEstablishmentError(CHIP_ERROR error) override; - //////////// SessionDelegate Implementation /////////////// - - // Called when a connection is closing. The object releases all resources associated with the connection. - void OnSessionReleased() override; - ScopedNodeId GetPeerId() const { return mPeerId; } static Transport::PeerAddress ToPeerAddress(const Dnssd::ResolvedNodeData & nodeData) @@ -268,7 +260,7 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate, Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any); - SessionHolderWithDelegate mSecureSession; + SessionHolder mSecureSession; Callback::CallbackDeque mConnectionSuccess; Callback::CallbackDeque mConnectionFailure; diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 78ed3f63ac06b2..c363ada6d4c30f 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -453,6 +453,20 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb return; } + Commands::GetUserResponse::Type response; + + // appclusters, 5.2.4.36.1: We need to add next occupied user after userIndex if any. + // + // We want to do this before we call emberAfPluginDoorLockGetUser, because this will + // make its own emberAfPluginDoorLockGetUser calls, and a + // EmberAfPluginDoorLockUserInfo might be pointing into some application-static + // buffers (for its credentials and whatnot). + uint16_t nextAvailableUserIndex = 0; + if (findOccupiedUserSlot(commandPath.mEndpointId, static_cast(userIndex + 1), nextAvailableUserIndex)) + { + response.nextUserIndex.SetNonNull(nextAvailableUserIndex); + } + EmberAfPluginDoorLockUserInfo user; if (!emberAfPluginDoorLockGetUser(commandPath.mEndpointId, userIndex, user)) { @@ -461,7 +475,6 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb return; } - Commands::GetUserResponse::Type response; response.userIndex = userIndex; // appclusters, 5.2.4.36: we should not set user-specific fields to non-null if the user status is set to Available @@ -498,12 +511,6 @@ void DoorLockServer::getUserCommandHandler(chip::app::CommandHandler * commandOb emberAfDoorLockClusterPrintln("[GetUser] User not found [userIndex=%d]", userIndex); } - // appclusters, 5.2.4.36.1: We need to add next occupied user after userIndex if any. - uint16_t nextAvailableUserIndex = 0; - if (findOccupiedUserSlot(commandPath.mEndpointId, static_cast(userIndex + 1), nextAvailableUserIndex)) - { - response.nextUserIndex.SetNonNull(nextAvailableUserIndex); - } commandObj->AddResponse(commandPath, response); } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index b80c3ca8f45b11..344776c49ac93b 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -128,7 +128,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mOperationalKeystore = initParams.operationalKeystore; mOpCertStore = initParams.opCertStore; - mCertificateValidityPolicy = initParams.certificateValidityPolicy; + mCertificateValidityPolicy.Init(initParams.certificateValidityPolicy); #if defined(CHIP_SUPPORT_ENABLE_STORAGE_API_AUDIT) VerifyOrDie(chip::audit::ExecutePersistentStorageApiAudit(*mDeviceStorage)); @@ -286,7 +286,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) .sessionInitParams = { .sessionManager = &mSessions, .sessionResumptionStorage = mSessionResumptionStorage, - .certificateValidityPolicy = mCertificateValidityPolicy, + .certificateValidityPolicy = &mCertificateValidityPolicy, .exchangeMgr = &mExchangeMgr, .fabricTable = &mFabrics, .groupDataProvider = mGroupsProvider, @@ -300,7 +300,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) SuccessOrExit(err); err = mCASEServer.ListenForSessionEstablishment(&mExchangeMgr, &mSessions, &mFabrics, mSessionResumptionStorage, - mCertificateValidityPolicy, mGroupsProvider); + &mCertificateValidityPolicy, mGroupsProvider); SuccessOrExit(err); err = chip::app::InteractionModelEngine::GetInstance()->Init(&mExchangeMgr, &GetFabricTable(), &mCASESessionManager, diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 45bcf0a7290515..380e8240abfed9 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -539,6 +539,53 @@ class Server Server * mServer = nullptr; }; + /** + * Since root certificates for Matter nodes cannot be updated in a reasonable + * way, it doesn't make sense to enforce expiration time on root certificates. + * This policy allows through root certificates, even if they're expired, and + * otherwise delegates to the provided policy, or to the default policy if no + * policy is provided. + */ + class IgnoreRootExpirationValidityPolicy : public Credentials::CertificateValidityPolicy + { + public: + IgnoreRootExpirationValidityPolicy() {} + + void Init(Credentials::CertificateValidityPolicy * providedPolicy) { mProvidedPolicy = providedPolicy; } + + CHIP_ERROR ApplyCertificateValidityPolicy(const Credentials::ChipCertificateData * cert, uint8_t depth, + Credentials::CertificateValidityResult result) override + { + switch (result) + { + case Credentials::CertificateValidityResult::kExpired: + case Credentials::CertificateValidityResult::kExpiredAtLastKnownGoodTime: + case Credentials::CertificateValidityResult::kTimeUnknown: { + uint8_t certType; + ReturnErrorOnFailure(cert->mSubjectDN.GetCertType(certType)); + if (certType == Credentials::kCertType_Root) + { + return CHIP_NO_ERROR; + } + + break; + } + default: + break; + } + + if (mProvidedPolicy) + { + return mProvidedPolicy->ApplyCertificateValidityPolicy(cert, depth, result); + } + + return Credentials::CertificateValidityPolicy::ApplyDefaultPolicy(cert, depth, result); + } + + private: + Credentials::CertificateValidityPolicy * mProvidedPolicy = nullptr; + }; + #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * mBleLayer = nullptr; #endif @@ -560,10 +607,11 @@ class Server #endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT CommissioningWindowManager mCommissioningWindowManager; + IgnoreRootExpirationValidityPolicy mCertificateValidityPolicy; + PersistentStorageDelegate * mDeviceStorage; SessionResumptionStorage * mSessionResumptionStorage; app::SubscriptionResumptionStorage * mSubscriptionResumptionStorage; - Credentials::CertificateValidityPolicy * mCertificateValidityPolicy; Credentials::GroupDataProvider * mGroupsProvider; Crypto::SessionKeystore * mSessionKeystore; app::DefaultAttributePersistenceProvider mAttributePersister; diff --git a/src/app/tests/suites/TestBasicInformation.yaml b/src/app/tests/suites/TestBasicInformation.yaml index 19f1af3cb2ec53..d15e5601329b35 100644 --- a/src/app/tests/suites/TestBasicInformation.yaml +++ b/src/app/tests/suites/TestBasicInformation.yaml @@ -74,7 +74,6 @@ tests: 14, 15, 16, - 17, 18, 19, 20, diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index c2aeee0e6abe43..e6e60b0685bee1 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1542,7 +1542,7 @@ BINFO.S.A000d=1 BINFO.S.A000e=1 BINFO.S.A000f=1 BINFO.S.A0010=1 -BINFO.S.A0011=1 +BINFO.S.A0011=0 BINFO.S.A0012=1 BINFO.S.A0013=1 diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 9d0a3dfc082ac7..3ae1902bb9f227 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -1,7 +1,95 @@ { + "ClientDirectories": { + "ACCESS_CONTROL_CLUSTER": [], + "ACCOUNT_LOGIN_CLUSTER": [], + "ACTIONS_CLUSTER": [], + "ADMINISTRATOR_COMMISSIONING_CLUSTER": [], + "ALARM_CLUSTER": [], + "APPLICATION_BASIC_CLUSTER": [], + "APPLICATION_LAUNCHER_CLUSTER": [], + "AUDIO_OUTPUT_CLUSTER": [], + "BALLAST_CONFIGURATION_CLUSTER": [], + "BARRIER_CONTROL_CLUSTER": [], + "BASIC_INFORMATION_CLUSTER": [], + "BINARY_INPUT_BASIC_CLUSTER": [], + "BINDING_CLUSTER": [], + "BOOLEAN_STATE_CLUSTER": [], + "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [], + "CHANNEL_CLUSTER": [], + "CLIENT_MONITORING_CLUSTER": [], + "COLOR_CONTROL_CLUSTER": [], + "COMMISSIONING_CLUSTER": [], + "CONTENT_LAUNCHER_CLUSTER": [], + "DESCRIPTOR_CLUSTER": [], + "DEVICE_TEMP_CLUSTER": [], + "DIAGNOSTIC_LOGS_CLUSTER": [], + "DOOR_LOCK_CLUSTER": [], + "ELECTRICAL_MEASUREMENT_CLUSTER": [], + "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [], + "FAN_CONTROL_CLUSTER": [], + "FAULT_INJECTION_CLUSTER": [], + "FIXED_LABEL_CLUSTER": [], + "FLOW_MEASUREMENT_CLUSTER": [], + "GENERAL_COMMISSIONING_CLUSTER": [], + "GENERAL_DIAGNOSTICS_CLUSTER": [], + "GROUP_KEY_MANAGEMENT_CLUSTER": [], + "GROUPS_CLUSTER": [], + "IAS_ZONE_CLUSTER": [], + "IDENTIFY_CLUSTER": [], + "ILLUMINANCE_MEASUREMENT_CLUSTER": [], + "KEYPAD_INPUT_CLUSTER": [], + "LEVEL_CONTROL_CLUSTER": [], + "LOCALIZATION_CONFIGURATION_CLUSTER": [], + "LOW_POWER_CLUSTER": [], + "MEDIA_INPUT_CLUSTER": [], + "MEDIA_PLAYBACK_CLUSTER": [], + "MODE_SELECT_CLUSTER": [], + "NETWORK_COMMISSIONING_CLUSTER": [], + "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], + "ON_OFF_CLUSTER": [], + "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], + "OPERATIONAL_CREDENTIALS_CLUSTER": [], + "OTA_BOOTLOAD_CLUSTER": [], + "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [], + "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [], + "POLL_CONTROL_CLUSTER": [], + "POWER_CONFIG_CLUSTER": [], + "POWER_PROFILE_CLUSTER": [], + "POWER_SOURCE_CLUSTER": [], + "POWER_SOURCE_CONFIGURATION_CLUSTER": [], + "PRESSURE_MEASUREMENT_CLUSTER": [], + "PROXY_CONFIGURATION_CLUSTER": [], + "PROXY_DISCOVERY_CLUSTER": [], + "PROXY_VALID_CLUSTER": [], + "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER": [ + "pump-configuration-and-control-client" + ], + "PWM_CLUSTER": [], + "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [], + "SCENES_CLUSTER": [], + "SOFTWARE_DIAGNOSTICS_CLUSTER": [], + "SWITCH_CLUSTER": [], + "TARGET_NAVIGATOR_CLUSTER": [], + "TEMPERATURE_MEASUREMENT_CLUSTER": [], + "THERMOSTAT_CLUSTER": ["thermostat-client"], + "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [], + "THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [], + "TIME_CLUSTER": [], + "TIME_FORMAT_LOCALIZATION_CLUSTER": [], + "TIME_SYNCHRONIZATION_CLUSTER": [], + "TRUSTED_ROOT_CERTIFICATES_CLUSTER": [], + "UNIT_LOCALIZATION_CLUSTER": [], + "UNIT_TESTING_CLUSTER": [], + "USER_LABEL_CLUSTER": [], + "WAKE_ON_LAN_CLUSTER": [], + "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], + "WINDOW_COVERING_CLUSTER": [], + "ZLL_COMMISSIONING_CLUSTER": [] + }, "ServerDirectories": { "ACCESS_CONTROL_CLUSTER": ["access-control-server"], "ACCOUNT_LOGIN_CLUSTER": ["account-login-server"], + "ACTIONS_CLUSTER": [], "ADMINISTRATOR_COMMISSIONING_CLUSTER": [ "administrator-commissioning-server" ], @@ -15,7 +103,6 @@ "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": ["bindings"], "BOOLEAN_STATE_CLUSTER": [], - "ACTIONS_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [ "bridged-device-basic-information-server" ], @@ -32,8 +119,8 @@ "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [ "ethernet-network-diagnostics-server" ], - "FAULT_INJECTION_CLUSTER": ["fault-injection-server"], "FAN_CONTROL_CLUSTER": ["fan-control-server"], + "FAULT_INJECTION_CLUSTER": ["fault-injection-server"], "FIXED_LABEL_CLUSTER": ["fixed-label-server"], "FLOW_MEASUREMENT_CLUSTER": [], "GENERAL_COMMISSIONING_CLUSTER": ["general-commissioning-server"], @@ -60,13 +147,13 @@ "OTA_BOOTLOAD_CLUSTER": [], "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"], "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"], + "POLL_CONTROL_CLUSTER": [], + "POWER_CONFIG_CLUSTER": [], + "POWER_PROFILE_CLUSTER": [], "POWER_SOURCE_CLUSTER": ["power-source-server"], "POWER_SOURCE_CONFIGURATION_CLUSTER": [ "power-source-configuration-server" ], - "POLL_CONTROL_CLUSTER": [], - "POWER_CONFIG_CLUSTER": [], - "POWER_PROFILE_CLUSTER": [], "PRESSURE_MEASUREMENT_CLUSTER": [], "PROXY_CONFIGURATION_CLUSTER": [], "PROXY_DISCOVERY_CLUSTER": [], @@ -81,7 +168,6 @@ "SWITCH_CLUSTER": ["switch-server"], "TARGET_NAVIGATOR_CLUSTER": ["target-navigator-server"], "TEMPERATURE_MEASUREMENT_CLUSTER": [], - "UNIT_TESTING_CLUSTER": ["test-cluster-server"], "THERMOSTAT_CLUSTER": ["thermostat-server"], "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [ "thermostat-user-interface-configuration-server" @@ -93,97 +179,11 @@ "TIME_FORMAT_LOCALIZATION_CLUSTER": ["time-format-localization-server"], "TIME_SYNCHRONIZATION_CLUSTER": [], "UNIT_LOCALIZATION_CLUSTER": [], + "UNIT_TESTING_CLUSTER": ["test-cluster-server"], "USER_LABEL_CLUSTER": ["user-label-server"], "WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"], "WINDOW_COVERING_CLUSTER": ["window-covering-server"], "ZLL_COMMISSIONING_CLUSTER": [] - }, - "ClientDirectories": { - "ACCESS_CONTROL_CLUSTER": [], - "ACCOUNT_LOGIN_CLUSTER": [], - "ADMINISTRATOR_COMMISSIONING_CLUSTER": [], - "ALARM_CLUSTER": [], - "APPLICATION_BASIC_CLUSTER": [], - "APPLICATION_LAUNCHER_CLUSTER": [], - "AUDIO_OUTPUT_CLUSTER": [], - "BALLAST_CONFIGURATION_CLUSTER": [], - "BARRIER_CONTROL_CLUSTER": [], - "BASIC_INFORMATION_CLUSTER": [], - "BINARY_INPUT_BASIC_CLUSTER": [], - "BINDING_CLUSTER": [], - "BOOLEAN_STATE_CLUSTER": [], - "ACTIONS_CLUSTER": [], - "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [], - "CHANNEL_CLUSTER": [], - "CLIENT_MONITORING_CLUSTER": [], - "COLOR_CONTROL_CLUSTER": [], - "COMMISSIONING_CLUSTER": [], - "CONTENT_LAUNCHER_CLUSTER": [], - "DESCRIPTOR_CLUSTER": [], - "DEVICE_TEMP_CLUSTER": [], - "DIAGNOSTIC_LOGS_CLUSTER": [], - "DOOR_LOCK_CLUSTER": [], - "ELECTRICAL_MEASUREMENT_CLUSTER": [], - "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER": [], - "FAULT_INJECTION_CLUSTER": [], - "FAN_CONTROL_CLUSTER": [], - "FIXED_LABEL_CLUSTER": [], - "FLOW_MEASUREMENT_CLUSTER": [], - "GENERAL_COMMISSIONING_CLUSTER": [], - "GENERAL_DIAGNOSTICS_CLUSTER": [], - "GROUP_KEY_MANAGEMENT_CLUSTER": [], - "GROUPS_CLUSTER": [], - "IAS_ZONE_CLUSTER": [], - "IDENTIFY_CLUSTER": [], - "ILLUMINANCE_MEASUREMENT_CLUSTER": [], - "KEYPAD_INPUT_CLUSTER": [], - "LEVEL_CONTROL_CLUSTER": [], - "LOCALIZATION_CONFIGURATION_CLUSTER": [], - "LOW_POWER_CLUSTER": [], - "MEDIA_INPUT_CLUSTER": [], - "MEDIA_PLAYBACK_CLUSTER": [], - "MODE_SELECT_CLUSTER": [], - "NETWORK_COMMISSIONING_CLUSTER": [], - "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], - "ON_OFF_CLUSTER": [], - "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], - "OPERATIONAL_CREDENTIALS_CLUSTER": [], - "OTA_BOOTLOAD_CLUSTER": [], - "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [], - "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [], - "POLL_CONTROL_CLUSTER": [], - "POWER_CONFIG_CLUSTER": [], - "POWER_PROFILE_CLUSTER": [], - "POWER_SOURCE_CLUSTER": [], - "POWER_SOURCE_CONFIGURATION_CLUSTER": [], - "PRESSURE_MEASUREMENT_CLUSTER": [], - "PROXY_CONFIGURATION_CLUSTER": [], - "PROXY_DISCOVERY_CLUSTER": [], - "PROXY_VALID_CLUSTER": [], - "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER": [ - "pump-configuration-and-control-client" - ], - "PWM_CLUSTER": [], - "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER": [], - "SCENES_CLUSTER": [], - "SOFTWARE_DIAGNOSTICS_CLUSTER": [], - "SWITCH_CLUSTER": [], - "TARGET_NAVIGATOR_CLUSTER": [], - "TEMPERATURE_MEASUREMENT_CLUSTER": [], - "UNIT_TESTING_CLUSTER": [], - "THERMOSTAT_CLUSTER": ["thermostat-client"], - "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER": [], - "THREAD_NETWORK_DIAGNOSTICS_CLUSTER": [], - "TIME_CLUSTER": [], - "TIME_FORMAT_LOCALIZATION_CLUSTER": [], - "TIME_SYNCHRONIZATION_CLUSTER": [], - "TRUSTED_ROOT_CERTIFICATES_CLUSTER": [], - "UNIT_LOCALIZATION_CLUSTER": [], - "USER_LABEL_CLUSTER": [], - "WAKE_ON_LAN_CLUSTER": [], - "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], - "WINDOW_COVERING_CLUSTER": [], - "ZLL_COMMISSIONING_CLUSTER": [] } } diff --git a/src/controller/README.md b/src/controller/README.md index 94b69b24bc3576..e46c191f55489b 100644 --- a/src/controller/README.md +++ b/src/controller/README.md @@ -11,7 +11,8 @@ The iOS chip-tool is located in [../darwin/CHIPTool](../darwin/CHIPTool). ### Android -The Android chip-tool is located in [../android/CHIPTool](../android/CHIPTool). +The Android chip-tool is located in +[../../examples/android/CHIPTool](../../examples/android/CHIPTool). ### POSIX CLI diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index d6fadc7926c19b..b1c8b02ff2e597 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -216,11 +216,16 @@ AndroidDeviceControllerWrapper * AndroidDeviceControllerWrapper::AllocateNew( } initParams.opCertStore = &wrapper->mOpCertStore; #ifdef JAVA_MATTER_CONTROLLER_TEST - opCredsIssuer->Initialize(wrapper->mExampleStorage); + err = opCredsIssuer->Initialize(wrapper->mExampleStorage); #else // TODO: Init IPK Epoch Key in opcreds issuer, so that commissionees get the right IPK - opCredsIssuer->Initialize(*wrapper.get(), &wrapper->mAutoCommissioner, wrapper.get()->mJavaObjectRef); + err = opCredsIssuer->Initialize(*wrapper.get(), &wrapper->mAutoCommissioner, wrapper.get()->mJavaObjectRef); #endif + if (err != CHIP_NO_ERROR) + { + *errInfoOnFailure = err; + return nullptr; + } Platform::ScopedMemoryBuffer noc; if (!noc.Alloc(kMaxCHIPDERCertLength)) diff --git a/src/controller/java/src/chip/tlv/TlvReader.kt b/src/controller/java/src/chip/tlv/TlvReader.kt index e281d0ff3d4a7b..cf23f3f2719d94 100644 --- a/src/controller/java/src/chip/tlv/TlvReader.kt +++ b/src/controller/java/src/chip/tlv/TlvReader.kt @@ -101,6 +101,19 @@ class TlvReader(bytes: ByteArray) : Iterable { return Element(tag, value) } + /** + * Reads the next element from the TLV. Unlike nextElement() this method leaves the TLV reader + * positioned at the same element and doesn't advance it to the next element. + * + * @throws TlvParsingException if the TLV data was invalid + */ + fun peekElement(): Element { + val currentIndex = index + val element = nextElement() + index = currentIndex + return element + } + /** * Reads the encoded Long value and advances to the next element. * diff --git a/src/controller/java/src/chip/tlv/TlvWriter.kt b/src/controller/java/src/chip/tlv/TlvWriter.kt index ace70593d6cfb8..1cf2a295653df3 100644 --- a/src/controller/java/src/chip/tlv/TlvWriter.kt +++ b/src/controller/java/src/chip/tlv/TlvWriter.kt @@ -47,12 +47,14 @@ class TlvWriter(initialCapacity: Int = 32) { "Invalid use of context tag at index ${bytes.size()}: can only be used within a " + "structure or a list" } - } - - if (containerDepth > 0 && containerType[containerDepth - 1] is ArrayType) { + } else if (containerType[containerDepth - 1] is ArrayType) { require(tag is AnonymousTag) { "Invalid element tag at index ${bytes.size()}: elements of an array SHALL be anonymous" } + } else if (containerType[containerDepth - 1] is StructureType && type !is EndOfContainerType) { + require(tag !is AnonymousTag) { + "Invalid element tag at index ${bytes.size()}: elements of a structure cannot be anonymous" + } } if (tag is ContextSpecificTag) { @@ -326,6 +328,62 @@ class TlvWriter(initialCapacity: Int = 32) { return put(Element(AnonymousTag, EndOfContainerValue)) } + /** + * Copies a TLV element from a reader object into the writer. + * + * This method encodes a new TLV element whose type, tag and value are taken from a TlvReader + * object. When the method is called, the supplied reader object is expected to be positioned on + * the source TLV element. The newly encoded element will have the same type, tag and contents as + * the input container. If the supplied element is a TLV container (structure, array or list), the + * entire contents of the container will be copied. + * + * @param reader a TlvReader object positioned at a Tlv element whose tag, type and value should + * be copied. If this method is executed successfully, the reader will be positioned at the end + * of the element that was copied. + */ + fun copyElement(reader: TlvReader): TlvWriter { + return copyElement(reader.peekElement().tag, reader) + } + + /** + * Copies a TLV element from a reader object into the writer. + * + * This method encodes a new TLV element whose type and value are taken from a TLVReader object. + * When the method is called, the supplied reader object is expected to be positioned on the + * source TLV element. The newly encoded element will have the same type and contents as the input + * container, however the tag will be set to the specified argument. If the supplied element is a + * TLV container (structure, array or list), the entire contents of the container will be copied. + * + * @param tag the TLV tag to be encoded with the element. + * @param reader a TlvReader object positioned at a Tlv element whose type and value should be + * copied. If this method is executed successfully, the reader will be positioned at the end of + * the element that was copied. + */ + fun copyElement(tag: Tag, reader: TlvReader): TlvWriter { + var depth = 0 + do { + val element = reader.nextElement() + val value = element.value + + when (depth) { + 0 -> { + require(value !is EndOfContainerValue) { + "The TlvReader is positioned at invalid element: EndOfContainer" + } + put(Element(tag, value)) + } + else -> put(element) + } + + if (value is EndOfContainerValue) { + depth-- + } else if (value is StructureValue || value is ArrayValue || value is ListValue) { + depth++ + } + } while (depth > 0) + return this + } + /** Returns the total number of bytes written since the writer was initialized. */ fun getLengthWritten(): Int { return bytes.size() @@ -334,9 +392,7 @@ class TlvWriter(initialCapacity: Int = 32) { /** Verifies that all open containers are closed. */ fun validateTlv(): TlvWriter { if (containerDepth > 0) { - throw TlvEncodingException( - "Invalid Tlv data at index ${bytes.size()}: $containerDepth containers are not closed" - ) + throw TlvEncodingException("Invalid Tlv data: $containerDepth containers are not closed") } return this } diff --git a/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt b/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt index fbf60827a278a4..1a2766eba76e95 100644 --- a/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt +++ b/src/controller/java/tests/chip/tlv/TlvReadWriteTest.kt @@ -63,8 +63,8 @@ private val testTlvSampleData: ByteArray = .map { it.toByte() } .toByteArray() -private val testVendorId: UShort = 0xAABBu -private val testProductId: UShort = 0xCCDDu +private const val TEST_VENDOR_ID: UShort = 0xAABBu +private const val TEST_PRODUCT_ID: UShort = 0xCCDDu private val testLargeString: String = """ @@ -86,8 +86,8 @@ class TlvReadWriteTest { @Test fun testTlvSampleData_write() { TlvWriter().apply { - startStructure(FullyQualifiedTag(6, testVendorId, testProductId, 1u)) - put(FullyQualifiedTag(6, testVendorId, testProductId, 2u), true) + startStructure(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 1u)) + put(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 2u), true) put(ImplicitProfileTag(2, 2u), false) startArray(ContextSpecificTag(0)) put(AnonymousTag, 42) @@ -97,7 +97,7 @@ class TlvReadWriteTest { startStructure(AnonymousTag) endStructure() startList(AnonymousTag) - putNull(FullyQualifiedTag(6, testVendorId, testProductId, 17u)) + putNull(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 17u)) putNull(ImplicitProfileTag(4, 900000u)) putNull(AnonymousTag) startStructure(ImplicitProfileTag(4, 4000000000u)) @@ -105,7 +105,7 @@ class TlvReadWriteTest { endStructure() endList() endArray() - put(FullyQualifiedTag(6, testVendorId, testProductId, 5u), "This is a test") + put(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 5u), "This is a test") put(ImplicitProfileTag(2, 65535u), 17.9f) put(ImplicitProfileTag(4, 65536u), 17.9) endStructure() @@ -117,8 +117,8 @@ class TlvReadWriteTest { @Test fun testTlvSampleData_read() { TlvReader(testTlvSampleData).apply { - enterStructure(FullyQualifiedTag(6, testVendorId, testProductId, 1u)) - assertThat(getBool(FullyQualifiedTag(6, testVendorId, testProductId, 2u))).isEqualTo(true) + enterStructure(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 1u)) + assertThat(getBool(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 2u))).isEqualTo(true) assertThat(getBool(ImplicitProfileTag(2, 2u))).isEqualTo(false) enterArray(ContextSpecificTag(0)) assertThat(getInt(AnonymousTag)).isEqualTo(42) @@ -128,7 +128,7 @@ class TlvReadWriteTest { enterStructure(AnonymousTag) exitContainer() enterList(AnonymousTag) - getNull(FullyQualifiedTag(6, testVendorId, testProductId, 17u)) + getNull(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 17u)) getNull(ImplicitProfileTag(4, 900000u)) getNull(AnonymousTag) enterStructure(ImplicitProfileTag(4, 4000000000u)) @@ -136,7 +136,7 @@ class TlvReadWriteTest { exitContainer() exitContainer() exitContainer() - assertThat(getUtf8String(FullyQualifiedTag(6, testVendorId, testProductId, 5u))) + assertThat(getUtf8String(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 5u))) .isEqualTo("This is a test") assertThat(getFloat(ImplicitProfileTag(2, 65535u))).isEqualTo(17.9f) assertThat(getDouble(ImplicitProfileTag(4, 65536u))).isEqualTo(17.9) @@ -149,13 +149,13 @@ class TlvReadWriteTest { @Test fun testTlvSampleData_read_useSkipElementAndExitContinerInTheMiddle() { TlvReader(testTlvSampleData).apply { - enterStructure(FullyQualifiedTag(6, testVendorId, testProductId, 1u)) + enterStructure(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 1u)) skipElement() assertThat(getBool(ImplicitProfileTag(2, 2u))).isEqualTo(false) enterArray(ContextSpecificTag(0)) assertThat(getInt(AnonymousTag)).isEqualTo(42) exitContainer() - assertThat(getUtf8String(FullyQualifiedTag(6, testVendorId, testProductId, 5u))) + assertThat(getUtf8String(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 5u))) .isEqualTo("This is a test") assertThat(getFloat(ImplicitProfileTag(2, 65535u))).isEqualTo(17.9f) assertThat(getDouble(ImplicitProfileTag(4, 65536u))).isEqualTo(17.9) @@ -165,6 +165,77 @@ class TlvReadWriteTest { } } + @Test + fun testTlvSampleData_copyElement() { + val reader = TlvReader(testTlvSampleData) + val encoding = TlvWriter().copyElement(reader).validateTlv().getEncoded() + assertThat(encoding).isEqualTo(testTlvSampleData) + } + + @Test + fun testTlvSampleData_copyElementWithTag() { + val reader = TlvReader(testTlvSampleData) + val encoding = + TlvWriter() + .copyElement(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 1u), reader) + .validateTlv() + .getEncoded() + assertThat(encoding).isEqualTo(testTlvSampleData) + } + + @Test + fun testCopyElement_throwsIllegalArgumentException() { + val encoding = + TlvWriter().startStructure(AnonymousTag).endStructure().validateTlv().getEncoded() + val reader = TlvReader(encoding) + reader.skipElement() + + // Throws exception because the reader is positioned at the end of container element + assertFailsWith { TlvWriter().copyElement(reader) } + } + + @Test + fun testCopyElement_replaceTag() { + val tag = CommonProfileTag(2, 1000u) + val encoding = + TlvWriter().startStructure(AnonymousTag).endStructure().validateTlv().getEncoded() + val expectedEncoding = TlvWriter().startStructure(tag).endStructure().validateTlv().getEncoded() + + assertThat(TlvWriter().copyElement(tag, TlvReader(encoding)).validateTlv().getEncoded()) + .isEqualTo(expectedEncoding) + } + + @Test + fun testCopyElementUInt_replaceTag() { + val value = 42U + val tag1 = CommonProfileTag(2, 1u) + val tag2 = CommonProfileTag(2, 2u) + val encoding = TlvWriter().put(tag1, value).validateTlv().getEncoded() + val expectedEncoding = TlvWriter().put(tag2, value).validateTlv().getEncoded() + + assertThat(TlvWriter().copyElement(tag2, TlvReader(encoding)).validateTlv().getEncoded()) + .isEqualTo(expectedEncoding) + } + + @Test + fun testTlvSampleData_copyElementsOneByOne() { + val reader = TlvReader(testTlvSampleData) + reader.skipElement() + val encoding = + TlvWriter() + .startStructure(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 1u)) + .copyElement(reader) + .copyElement(reader) + .copyElement(reader) + .copyElement(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 5u), reader) + .copyElement(reader) + .copyElement(reader) + .endStructure() + .validateTlv() + .getEncoded() + assertThat(encoding).isEqualTo(testTlvSampleData) + } + @Test fun testData_IntMinMax() { val encodedTlv = @@ -378,7 +449,7 @@ class TlvReadWriteTest { // Throws exception because the encoded value has AnonymousTag tag assertFailsWith { - TlvReader(encoding).getLong(FullyQualifiedTag(6, testVendorId, testProductId, 5u)) + TlvReader(encoding).getLong(FullyQualifiedTag(6, TEST_VENDOR_ID, TEST_PRODUCT_ID, 5u)) } } @@ -820,6 +891,16 @@ class TlvReadWriteTest { } } + @Test + fun encodeAnonymousTagInStructure_throwsIllegalArgumentException() { + // Anonymous tag 1, Unsigned Integer, 1-octet value, {1 = 42U} + TlvWriter().apply { + startStructure(AnonymousTag) + // anonymous tags are not allowed within structure elements + assertFailsWith { put(AnonymousTag, 42U) } + } + } + @Test fun encodeContextTag_withinList() { // Context tag 1, Unsigned Integer, 1-octet value, [[1 = 42U]] @@ -847,7 +928,7 @@ class TlvReadWriteTest { val value = 42U var tag = ContextSpecificTag(1) - // Array elements SHALL be of anonumous type + // Array elements SHALL be of anonymous type TlvWriter().apply { startArray(AnonymousTag) assertFailsWith { put(tag, value) } @@ -965,7 +1046,7 @@ class TlvReadWriteTest { @Test fun putSignedLongArray() { - // Anonumous Array of Signed Integers, [42, -17, -170000, 40000000000] + // Anonymous Array of Signed Integers, [42, -17, -170000, 40000000000] val values = longArrayOf(42, -17, -170000, 40000000000) val encoding = "16 00 2a 00 ef 02 f0 67 fd ff 03 00 90 2f 50 09 00 00 00 18".octetsToByteArray() @@ -986,7 +1067,7 @@ class TlvReadWriteTest { @Test fun putUnsignedLongArray() { - // Anonumous Array of Signed Integers, [42, 170000, 40000000000] + // Anonymous Array of Signed Integers, [42, 170000, 40000000000] val values = longArrayOf(42, 170000, 40000000000) val encoding = "16 04 2a 06 10 98 02 00 07 00 90 2f 50 09 00 00 00 18".octetsToByteArray() diff --git a/src/controller/python/chip/ble/library_handle.py b/src/controller/python/chip/ble/library_handle.py index 52f83d65b180b8..2dbb52f28bf429 100644 --- a/src/controller/python/chip/ble/library_handle.py +++ b/src/controller/python/chip/ble/library_handle.py @@ -18,7 +18,7 @@ from ctypes import c_bool, c_char_p, c_uint32, c_void_p, py_object import chip.native -from chip.ble.types import DeviceScannedCallback, ScanDoneCallback +from chip.ble.types import DeviceScannedCallback, ScanDoneCallback, ScanErrorCallback # This prevents python auto-casting c_void_p to integers and @@ -58,7 +58,7 @@ def _GetBleLibraryHandle() -> ctypes.CDLL: VoidPointer, [VoidPointer]) setter.Set('pychip_ble_start_scanning', VoidPointer, [ - py_object, VoidPointer, c_uint32, DeviceScannedCallback, ScanDoneCallback + py_object, VoidPointer, c_uint32, DeviceScannedCallback, ScanDoneCallback, ScanErrorCallback ]) return handle diff --git a/src/controller/python/chip/ble/scan_devices.py b/src/controller/python/chip/ble/scan_devices.py index 700f39b7e1de62..5422afb7cbb88b 100644 --- a/src/controller/python/chip/ble/scan_devices.py +++ b/src/controller/python/chip/ble/scan_devices.py @@ -20,7 +20,7 @@ from typing import Generator from chip.ble.library_handle import _GetBleLibraryHandle -from chip.ble.types import DeviceScannedCallback, ScanDoneCallback +from chip.ble.types import DeviceScannedCallback, ScanDoneCallback, ScanErrorCallback @DeviceScannedCallback @@ -34,7 +34,12 @@ def ScanDoneCallback(closure): closure.ScanCompleted() -def DiscoverAsync(timeoutMs: int, scanCallback, doneCallback, adapter=None): +@ScanErrorCallback +def ScanErrorCallback(closure, errorCode: int): + closure.ScanErrorCallback(errorCode) + + +def DiscoverAsync(timeoutMs: int, scanCallback, doneCallback, errorCallback, adapter=None): """Initiate a BLE discovery of devices with the given timeout. NOTE: devices are not guaranteed to be unique. New entries are returned @@ -44,6 +49,7 @@ def DiscoverAsync(timeoutMs: int, scanCallback, doneCallback, adapter=None): timeoutMs: scan will complete after this time scanCallback: callback when a device is found doneCallback: callback when the scan is complete + errorCallback: callback when error occurred during scan adapter: what adapter to choose. Either an AdapterInfo object or a string with the adapter address. If None, the first adapter on the system is used. @@ -72,6 +78,9 @@ def ScanCompleted(self, *args): doneCallback(*args) ctypes.pythonapi.Py_DecRef(ctypes.py_object(self)) + def ScanErrorCallback(self, *args): + errorCallback(*args) + closure = ScannerClosure() ctypes.pythonapi.Py_IncRef(ctypes.py_object(closure)) @@ -79,7 +88,7 @@ def ScanCompleted(self, *args): ctypes.py_object(closure), handle.pychip_ble_adapter_list_get_raw_adapter( nativeList), timeoutMs, - ScanFoundCallback, ScanDoneCallback) + ScanFoundCallback, ScanDoneCallback, ScanErrorCallback) if scanner == 0: raise Exception('Failed to initiate scan') @@ -113,6 +122,12 @@ def DeviceFound(self, address, discriminator, vendor, product): def ScanCompleted(self): self.queue.put(None) + def ScanError(self, errorCode): + # TODO need to determine what we do with this error. Most of the time this + # error is just a timeout introduced in PR #24873, right before we get a + # ScanCompleted. + pass + def DiscoverSync(timeoutMs: int, adapter=None) -> Generator[DeviceInfo, None, None]: """Discover BLE devices over the specified period of time. @@ -131,7 +146,7 @@ def DiscoverSync(timeoutMs: int, adapter=None) -> Generator[DeviceInfo, None, No receiver = _DeviceInfoReceiver() DiscoverAsync(timeoutMs, receiver.DeviceFound, - receiver.ScanCompleted, adapter) + receiver.ScanCompleted, receiver.ScanError, adapter) while True: data = receiver.queue.get() diff --git a/src/controller/python/chip/ble/types.py b/src/controller/python/chip/ble/types.py index b56a2e5670b012..94b1789e9c0673 100644 --- a/src/controller/python/chip/ble/types.py +++ b/src/controller/python/chip/ble/types.py @@ -20,3 +20,5 @@ c_uint16, c_uint16) ScanDoneCallback = CFUNCTYPE(None, py_object) + +ScanErrorCallback = CFUNCTYPE(None, py_object, c_uint16) diff --git a/src/controller/python/chip/clusters/ClusterObjects.py b/src/controller/python/chip/clusters/ClusterObjects.py index 13f35f240ae3cb..99893c4b186579 100644 --- a/src/controller/python/chip/clusters/ClusterObjects.py +++ b/src/controller/python/chip/clusters/ClusterObjects.py @@ -219,6 +219,12 @@ def must_use_timed_invoke(cls) -> bool: return False +# The below dictionaries will be filled dynamically +# and are used for quick lookup/mapping from cluster/attribute id to the correct class +ALL_CLUSTERS = {} +ALL_ATTRIBUTES = {} + + class Cluster(ClusterObject): ''' When send read requests with returnClusterObject=True, we will set the data_version property of the object. @@ -228,6 +234,18 @@ class Cluster(ClusterObject): especially the TLV decoding logic. Also ThreadNetworkDiagnostics has an attribute with the same name so we picked data_version as its name. ''' + + def __init_subclass__(cls, *args, **kwargs) -> None: + """Register a subclass.""" + super().__init_subclass__(*args, **kwargs) + # register this cluster in the ALL_CLUSTERS dict for quick lookups + try: + ALL_CLUSTERS[cls.id] = cls + except NotImplementedError: + # handle case where the Cluster class is not (fully) subclassed + # and accessing the id property throws a NotImplementedError. + pass + @property def data_version(self) -> int: return self._data_version @@ -254,6 +272,20 @@ class ClusterAttributeDescriptor: The implementation of this functions is quite tricky, it will create a cluster object on-the-fly, and use it for actual encode / decode routine to save lines of code. ''' + + def __init_subclass__(cls, *args, **kwargs) -> None: + """Register a subclass.""" + super().__init_subclass__(*args, **kwargs) + try: + if cls.cluster_id not in ALL_ATTRIBUTES: + ALL_ATTRIBUTES[cls.cluster_id] = {} + # register this clusterattribute in the ALL_ATTRIBUTES dict for quick lookups + ALL_ATTRIBUTES[cls.cluster_id][cls.attribute_id] = cls + except NotImplementedError: + # handle case where the ClusterAttribute class is not (fully) subclassed + # and accessing the id property throws a NotImplementedError. + pass + @classmethod def ToTLV(cls, tag: Union[int, None], value): writer = tlv.TLVWriter() diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index 3d6af3db842e8e..6c1c2012d32d6d 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -431,26 +431,7 @@ CHIP_ERROR ChipCertificateSet::ValidateCert(const ChipCertificateData * cert, Va } else { - switch (validityResult) - { - case CertificateValidityResult::kValid: - case CertificateValidityResult::kNotExpiredAtLastKnownGoodTime: - // By default, we do not enforce certificate validity based upon a Last - // Known Good Time source. However, implementations may always inject a - // policy that does enforce based upon this. - case CertificateValidityResult::kExpiredAtLastKnownGoodTime: - case CertificateValidityResult::kTimeUnknown: - break; - case CertificateValidityResult::kNotYetValid: - ExitNow(err = CHIP_ERROR_CERT_NOT_VALID_YET); - break; - case CertificateValidityResult::kExpired: - ExitNow(err = CHIP_ERROR_CERT_EXPIRED); - break; - default: - ExitNow(err = CHIP_ERROR_INTERNAL); - break; - } + SuccessOrExit(err = CertificateValidityPolicy::ApplyDefaultPolicy(cert, depth, validityResult)); } // If the certificate itself is trusted, then it is implicitly valid. Record this certificate as the trust @@ -1505,5 +1486,30 @@ CHIP_ERROR ExtractSubjectDNFromX509Cert(const ByteSpan & x509Cert, ChipDN & dn) return err; } +CHIP_ERROR CertificateValidityPolicy::ApplyDefaultPolicy(const ChipCertificateData * cert, uint8_t depth, + CertificateValidityResult result) +{ + switch (result) + { + case CertificateValidityResult::kValid: + case CertificateValidityResult::kNotExpiredAtLastKnownGoodTime: + // By default, we do not enforce certificate validity based upon a Last + // Known Good Time source. However, implementations may always inject a + // policy that does enforce based upon this. + case CertificateValidityResult::kExpiredAtLastKnownGoodTime: + case CertificateValidityResult::kTimeUnknown: + return CHIP_NO_ERROR; + + case CertificateValidityResult::kNotYetValid: + return CHIP_ERROR_CERT_NOT_VALID_YET; + + case CertificateValidityResult::kExpired: + return CHIP_ERROR_CERT_EXPIRED; + + default: + return CHIP_ERROR_INTERNAL; + } +} + } // namespace Credentials } // namespace chip diff --git a/src/credentials/CertificateValidityPolicy.h b/src/credentials/CertificateValidityPolicy.h index 0df351dff8390c..121647d1b94226 100644 --- a/src/credentials/CertificateValidityPolicy.h +++ b/src/credentials/CertificateValidityPolicy.h @@ -52,6 +52,12 @@ class CertificateValidityPolicy */ virtual CHIP_ERROR ApplyCertificateValidityPolicy(const ChipCertificateData * cert, uint8_t depth, CertificateValidityResult result) = 0; + + /** + * Default policy that will be used if no other policy is defined. This is + * exposed to allow other policies to explicitly delegate to it as needed. + */ + static CHIP_ERROR ApplyDefaultPolicy(const ChipCertificateData * cert, uint8_t depth, CertificateValidityResult result); }; } // namespace Credentials diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt index bece573dd988e0..04111e11cfbf2c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt @@ -38,8 +38,8 @@ MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID {{#zcl_attributes_server}} {{~#*inline "attribute"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}} {{#unless clusterRef}} -{{#if (isSupported "" globalAttribute=(asUpperCamelCase label) isForIds=true)}} -MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID {{availability "" globalAttribute=(asUpperCamelCase label) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}}, +{{#if (isSupported "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} +MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID {{availability "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}}, {{/if}} {{/unless}} {{/zcl_attributes_server}} @@ -86,7 +86,9 @@ MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID, // Cluster {{> cluster}} attributes {{/if}} {{/first}} -{{#if (isSupported (asUpperCamelCase ../clusterName preserveAcronyms=true) attribute=(asUpperCamelCase label preserveAcronyms=true) isForIds=true)}} +{{#if (and (isSupported (asUpperCamelCase ../clusterName preserveAcronyms=true) attribute=(asUpperCamelCase label preserveAcronyms=true) isForIds=true) + (or clusterRef + (isSupported "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true) isForIds=true)))}} MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID {{availability (asUpperCamelCase ../clusterName preserveAcronyms=true) attribute=(asUpperCamelCase label preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} = {{#if clusterRef}} {{asMEI manufacturerCode code}}, diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt index 75bb323bd542df..11ba013f232f8b 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters-src.zapt @@ -189,9 +189,12 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{#zcl_attributes_server}} {{! This is used as the implementation for both the new-name and old-name bits, so check for both here. }} -{{#if (or (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)) - (and (isSupported (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)) - (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name))))}} +{{#if (and + (or clusterRef + (isSupported "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true))) + (or (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)) + (and (isSupported (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)) + (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping parent.name) attribute=(compatAttributeNameRemapping parent.name name)))))}} {{#*inline "cluster"}}{{asUpperCamelCase parent.name preserveAcronyms=true}}{{/inline}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} - (NSDictionary *)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params { diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index d603d791ce190b..ef09d89f9e165f 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -40,7 +40,9 @@ NS_ASSUME_NONNULL_BEGIN {{/zcl_commands}} {{#zcl_attributes_server}} -{{#if (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true))}} +{{#if (and (or clusterRef + (isSupported "" globalAttribute=(asUpperCamelCase label preserveAcronyms=true))) + (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)))}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} {{#*inline "availability"}} {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)}} diff --git a/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework Tests.xcscheme b/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework Tests.xcscheme index 72d9cc7094a26a..e42193b39be4bb 100644 --- a/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework Tests.xcscheme +++ b/src/darwin/Framework/Matter.xcodeproj/xcshareddata/xcschemes/Matter Framework Tests.xcscheme @@ -26,7 +26,9 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + enableAddressSanitizer = "YES" + enableASanStackUseAfterReturn = "YES"> diff --git a/src/lwip/silabs/lwipopts-rs911x.h b/src/lwip/silabs/lwipopts-rs911x.h index f67cf862fb7cb0..f5d8e3d6b12129 100644 --- a/src/lwip/silabs/lwipopts-rs911x.h +++ b/src/lwip/silabs/lwipopts-rs911x.h @@ -112,12 +112,12 @@ #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 #define LWIP_IPV6_ROUTER_SUPPORT (LWIP_IPV6) #define LWIP_ND6_LISTEN_RA (LWIP_IPV6_ND) -#define LWIP_ND6_NUM_NEIGHBORS (2) -#define LWIP_ND6_NUM_DESTINATIONS (3) -#define LWIP_ND6_NUM_PREFIXES (2) -#define LWIP_ND6_NUM_ROUTERS (2) -#define LWIP_ND6_MAX_MULTICAST_SOLICIT (2) -#define LWIP_ND6_MAX_UNICAST_SOLICIT (2) +#define LWIP_ND6_NUM_NEIGHBORS (10) +#define LWIP_ND6_NUM_DESTINATIONS (10) +#define LWIP_ND6_NUM_PREFIXES (5) +#define LWIP_ND6_NUM_ROUTERS (3) +#define LWIP_ND6_MAX_MULTICAST_SOLICIT (3) +#define LWIP_ND6_MAX_UNICAST_SOLICIT (3) #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (3) #define LWIP_ND6_TCP_REACHABILITY_HINTS (0) #define LWIP_ND6_ALLOW_RA_UPDATES (LWIP_IPV6_ND) diff --git a/src/lwip/silabs/lwipopts-wf200.h b/src/lwip/silabs/lwipopts-wf200.h index 67a38eadef0265..681ef9accb32f8 100644 --- a/src/lwip/silabs/lwipopts-wf200.h +++ b/src/lwip/silabs/lwipopts-wf200.h @@ -113,12 +113,12 @@ #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 #define LWIP_IPV6_ROUTER_SUPPORT (LWIP_IPV6) #define LWIP_ND6_LISTEN_RA (LWIP_IPV6_ND) -#define LWIP_ND6_NUM_NEIGHBORS (2) -#define LWIP_ND6_NUM_DESTINATIONS (3) -#define LWIP_ND6_NUM_PREFIXES (2) -#define LWIP_ND6_NUM_ROUTERS (2) -#define LWIP_ND6_MAX_MULTICAST_SOLICIT (2) -#define LWIP_ND6_MAX_UNICAST_SOLICIT (2) +#define LWIP_ND6_NUM_NEIGHBORS (10) +#define LWIP_ND6_NUM_DESTINATIONS (10) +#define LWIP_ND6_NUM_PREFIXES (5) +#define LWIP_ND6_NUM_ROUTERS (3) +#define LWIP_ND6_MAX_MULTICAST_SOLICIT (3) +#define LWIP_ND6_MAX_UNICAST_SOLICIT (3) #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (3) #define LWIP_ND6_TCP_REACHABILITY_HINTS (0) #define LWIP_ND6_ALLOW_RA_UPDATES (LWIP_IPV6_ND) diff --git a/src/messaging/ExchangeContext.cpp b/src/messaging/ExchangeContext.cpp index daee580971b404..bcdd4ea643af72 100644 --- a/src/messaging/ExchangeContext.cpp +++ b/src/messaging/ExchangeContext.cpp @@ -156,6 +156,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp bool reliableTransmissionRequested = GetSessionHandle()->RequireMRP() && !sendFlags.Has(SendMessageFlags::kNoAutoRequestAck) && !IsGroupExchangeContext(); + bool startedResponseTimer = false; // If a response message is expected... if (sendFlags.Has(SendMessageFlags::kExpectResponse) && !IsGroupExchangeContext()) { @@ -177,6 +178,7 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp SetResponseExpected(false); return err; } + startedResponseTimer = true; } } @@ -217,8 +219,8 @@ CHIP_ERROR ExchangeContext::SendMessage(Protocols::Id protocolId, uint8_t msgTyp #if CONFIG_BUILD_FOR_HOST_UNIT_TEST } #endif - - if (err != CHIP_NO_ERROR && IsResponseExpected()) + // We should only cancel the response timer if the ExchangeContext fails to send the message that starts the response timer. + if (err != CHIP_NO_ERROR && startedResponseTimer) { CancelResponseTimer(); SetResponseExpected(false); @@ -267,8 +269,11 @@ void ExchangeContext::DoClose(bool clearRetransTable) mExchangeMgr->GetReliableMessageMgr()->ClearRetransTable(this); } - // Cancel the response timer. - CancelResponseTimer(); + if (IsResponseExpected()) + { + // Cancel the response timer. + CancelResponseTimer(); + } } /** @@ -590,12 +595,15 @@ CHIP_ERROR ExchangeContext::HandleMessage(uint32_t messageCounter, const Payload return CHIP_ERROR_INCORRECT_STATE; } - // Since we got the response, cancel the response timer. - CancelResponseTimer(); + if (IsResponseExpected()) + { + // Since we got the response, cancel the response timer. + CancelResponseTimer(); - // If the context was expecting a response to a previously sent message, this message - // is implicitly that response. - SetResponseExpected(false); + // If the context was expecting a response to a previously sent message, this message + // is implicitly that response. + SetResponseExpected(false); + } // Don't send messages on to our delegate if our dispatch does not allow // those messages. diff --git a/src/platform/ESP32/BLEManagerImpl.h b/src/platform/ESP32/BLEManagerImpl.h index 71766eaf0c7e8a..d47010e84d5afd 100644 --- a/src/platform/ESP32/BLEManagerImpl.h +++ b/src/platform/ESP32/BLEManagerImpl.h @@ -186,6 +186,7 @@ class BLEManagerImpl final : public BLEManager, #if CONFIG_ENABLE_ESP32_BLE_CONTROLLER void NewConnection(chip::Ble::BleLayer * bleLayer, void * appState, const SetupDiscriminator & connDiscriminator) override; + void NewConnection(chip::Ble::BleLayer * bleLayer, void * appState, BLE_CONNECTION_OBJECT connObj) override{}; CHIP_ERROR CancelConnection() override; // ===== Members that implement virtual methods on ChipDeviceScannerDelegate diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index 9718bebbc70edb..0e751e7f1455ae 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -27,6 +27,7 @@ declare_args() { chip_enable_chipoble = true chip_bt_nimble_enabled = false chip_bt_bluedroid_enabled = false + chip_enable_ble_controller = false chip_use_secure_cert_dac_provider = false } @@ -90,20 +91,22 @@ static_library("ESP32") { } if (chip_bt_nimble_enabled) { - sources += [ - "nimble/BLEManagerImpl.cpp", - "nimble/ChipDeviceScanner.cpp", - "nimble/blecent.h", - "nimble/misc.c", - "nimble/peer.c", - ] + sources += [ "nimble/BLEManagerImpl.cpp" ] + if (chip_enable_ble_controller) { + sources += [ + "nimble/ChipDeviceScanner.cpp", + "nimble/blecent.h", + "nimble/misc.c", + "nimble/peer.c", + ] + } } if (chip_bt_bluedroid_enabled) { - sources += [ - "bluedroid/BLEManagerImpl.cpp", - "bluedroid/ChipDeviceScanner.cpp", - ] + sources += [ "bluedroid/BLEManagerImpl.cpp" ] + if (chip_enable_ble_controller) { + sources += [ "bluedroid/ChipDeviceScanner.cpp" ] + } } if (chip_enable_wifi) { diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index 757af45869a7dd..5bee6b221919c2 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -97,4 +97,4 @@ #define CHIP_DEVICE_CONFIG_CHIP_KVS_NAMESPACE_PARTITION CONFIG_CHIP_KVS_NAMESPACE_PARTITION_LABEL #define CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS CONFIG_CHIP_DISCOVERY_TIMEOUT_SECS -#define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE +#define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE CONFIG_ENABLE_ESP32_BLE_CONTROLLER diff --git a/src/platform/ESP32/Logging.cpp b/src/platform/ESP32/Logging.cpp index b2fbaac3cfbd1a..a8270cbddf1412 100644 --- a/src/platform/ESP32/Logging.cpp +++ b/src/platform/ESP32/Logging.cpp @@ -26,21 +26,35 @@ void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char snprintf(tag, sizeof(tag), "chip[%s]", module); tag[sizeof(tag) - 1] = 0; - char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; - vsnprintf(formattedMsg, sizeof(formattedMsg), msg, v); - switch (category) { - case kLogCategory_Error: - ESP_LOGE(tag, "%s", formattedMsg); - break; + case kLogCategory_Error: { + { + printf(LOG_COLOR_E "E (%u) %s: ", esp_log_timestamp(), tag); + esp_log_writev(ESP_LOG_ERROR, tag, msg, v); + printf(LOG_RESET_COLOR "\n"); + } + } + break; + case kLogCategory_Progress: - default: - ESP_LOGI(tag, "%s", formattedMsg); - break; - case kLogCategory_Detail: - ESP_LOGD(tag, "%s", formattedMsg); - break; + default: { + { + printf(LOG_COLOR_I "I (%u) %s: ", esp_log_timestamp(), tag); + esp_log_writev(ESP_LOG_INFO, tag, msg, v); + printf(LOG_RESET_COLOR "\n"); + } + } + break; + + case kLogCategory_Detail: { + { + printf(LOG_COLOR_D "D (%u) %s: ", esp_log_timestamp(), tag); + esp_log_writev(ESP_LOG_DEBUG, tag, msg, v); + printf(LOG_RESET_COLOR "\n"); + } + } + break; } } diff --git a/src/platform/ESP32/ThreadStackManagerImpl.cpp b/src/platform/ESP32/ThreadStackManagerImpl.cpp index 5b4a311b48234a..eed07af6d68af1 100644 --- a/src/platform/ESP32/ThreadStackManagerImpl.cpp +++ b/src/platform/ESP32/ThreadStackManagerImpl.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include "driver/uart.h" #include "esp_err.h" diff --git a/src/platform/ESP32/nimble/ChipDeviceScanner.cpp b/src/platform/ESP32/nimble/ChipDeviceScanner.cpp index 5bf90bae136f60..4e01340558503f 100644 --- a/src/platform/ESP32/nimble/ChipDeviceScanner.cpp +++ b/src/platform/ESP32/nimble/ChipDeviceScanner.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER - #include "blecent.h" #include #include @@ -153,4 +151,3 @@ CHIP_ERROR ChipDeviceScanner::StopScan() } // namespace Internal } // namespace DeviceLayer } // namespace chip -#endif // CONFIG_ENABLE_ESP32_BLE_CONTROLLER diff --git a/src/platform/ESP32/nimble/blecent.h b/src/platform/ESP32/nimble/blecent.h index d61eb50bc0fc9d..8ff73e2c4ab919 100644 --- a/src/platform/ESP32/nimble/blecent.h +++ b/src/platform/ESP32/nimble/blecent.h @@ -34,7 +34,6 @@ * under the License. */ #pragma once -#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER #include #ifdef __cplusplus @@ -107,4 +106,3 @@ struct peer * peer_find(uint16_t conn_handle); #ifdef __cplusplus } #endif -#endif // CONFIG_ENABLE_ESP32_BLE_CONTROLLER diff --git a/src/platform/ESP32/nimble/misc.c b/src/platform/ESP32/nimble/misc.c index 2c887dc6918756..8fdd0d20528928 100644 --- a/src/platform/ESP32/nimble/misc.c +++ b/src/platform/ESP32/nimble/misc.c @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER #include "blecent.h" #include "host/ble_hs.h" #include "host/ble_uuid.h" @@ -216,4 +215,3 @@ void print_adv_fields(const struct ble_hs_adv_fields * fields) MODLOG_DFLT(DEBUG, "\n"); } } -#endif // CONFIG_ENABLE_ESP32_BLE_CONTROLLER diff --git a/src/platform/ESP32/nimble/peer.c b/src/platform/ESP32/nimble/peer.c index 0dbf54475019c6..154e0b23991b2d 100644 --- a/src/platform/ESP32/nimble/peer.c +++ b/src/platform/ESP32/nimble/peer.c @@ -17,8 +17,6 @@ * under the License. */ -#if CONFIG_ENABLE_ESP32_BLE_CONTROLLER - #include "blecent.h" #include "host/ble_hs.h" #include @@ -259,7 +257,8 @@ uint16_t chr_end_handle(const struct peer_svc * svc, const struct peer_chr * chr next_chr = SLIST_NEXT(chr, next); if (next_chr != NULL) { - return next_chr->chr.def_handle - 1; + int result = next_chr->chr.def_handle - 1; + return (uint16_t) result; } else { @@ -763,56 +762,56 @@ int peer_init(int max_peers, int max_svcs, int max_chrs, int max_dscs) /* Free memory first in case this function gets called more than once. */ peer_free_mem(); - peer_mem = malloc(OS_MEMPOOL_BYTES(max_peers, sizeof(struct peer))); + peer_mem = malloc(OS_MEMPOOL_BYTES((uint16_t) max_peers, sizeof(struct peer))); if (peer_mem == NULL) { rc = BLE_HS_ENOMEM; goto err; } - rc = os_mempool_init(&peer_pool, max_peers, sizeof(struct peer), peer_mem, "peer_pool"); + rc = os_mempool_init(&peer_pool, (uint16_t) max_peers, sizeof(struct peer), peer_mem, "peer_pool"); if (rc != 0) { rc = BLE_HS_EOS; goto err; } - peer_svc_mem = malloc(OS_MEMPOOL_BYTES(max_svcs, sizeof(struct peer_svc))); + peer_svc_mem = malloc(OS_MEMPOOL_BYTES((uint16_t) max_svcs, sizeof(struct peer_svc))); if (peer_svc_mem == NULL) { rc = BLE_HS_ENOMEM; goto err; } - rc = os_mempool_init(&peer_svc_pool, max_svcs, sizeof(struct peer_svc), peer_svc_mem, "peer_svc_pool"); + rc = os_mempool_init(&peer_svc_pool, (uint16_t) max_svcs, sizeof(struct peer_svc), peer_svc_mem, "peer_svc_pool"); if (rc != 0) { rc = BLE_HS_EOS; goto err; } - peer_chr_mem = malloc(OS_MEMPOOL_BYTES(max_chrs, sizeof(struct peer_chr))); + peer_chr_mem = malloc(OS_MEMPOOL_BYTES((uint16_t) max_chrs, sizeof(struct peer_chr))); if (peer_chr_mem == NULL) { rc = BLE_HS_ENOMEM; goto err; } - rc = os_mempool_init(&peer_chr_pool, max_chrs, sizeof(struct peer_chr), peer_chr_mem, "peer_chr_pool"); + rc = os_mempool_init(&peer_chr_pool, (uint16_t) max_chrs, sizeof(struct peer_chr), peer_chr_mem, "peer_chr_pool"); if (rc != 0) { rc = BLE_HS_EOS; goto err; } - peer_dsc_mem = malloc(OS_MEMPOOL_BYTES(max_dscs, sizeof(struct peer_dsc))); + peer_dsc_mem = malloc(OS_MEMPOOL_BYTES((uint16_t) max_dscs, sizeof(struct peer_dsc))); if (peer_dsc_mem == NULL) { rc = BLE_HS_ENOMEM; goto err; } - rc = os_mempool_init(&peer_dsc_pool, max_dscs, sizeof(struct peer_dsc), peer_dsc_mem, "peer_dsc_pool"); + rc = os_mempool_init(&peer_dsc_pool, (uint16_t) max_dscs, sizeof(struct peer_dsc), peer_dsc_mem, "peer_dsc_pool"); if (rc != 0) { rc = BLE_HS_EOS; @@ -825,4 +824,3 @@ int peer_init(int max_peers, int max_svcs, int max_chrs, int max_dscs) peer_free_mem(); return rc; } -#endif diff --git a/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp b/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.hpp similarity index 100% rename from src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp rename to src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.hpp diff --git a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp index 747c04990242ca..f0393a795ef63a 100644 --- a/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/ThreadStackManagerImpl.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.cpp b/src/platform/Linux/bluez/ChipDeviceScanner.cpp index 0172c820c5a0cc..7c47e735d5dfc1 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.cpp +++ b/src/platform/Linux/bluez/ChipDeviceScanner.cpp @@ -78,8 +78,16 @@ ChipDeviceScanner::~ChipDeviceScanner() { StopScan(); - // In case the timeout timer is still active - chip::DeviceLayer::SystemLayer().CancelTimer(TimerExpiredCallback, this); + // mTimerExpired should only be set to true in the TimerExpiredCallback, which means we are in that callback + // right now so there is no need to cancel the timer. Doing so would result in deadlock trying to aquire the + // chip stack lock which we already currently have. + if (!mTimerExpired) + { + // In case the timeout timer is still active + DeviceLayer::PlatformMgr().LockChipStack(); + chip::DeviceLayer::SystemLayer().CancelTimer(TimerExpiredCallback, this); + DeviceLayer::PlatformMgr().UnlockChipStack(); + } g_object_unref(mManager); g_object_unref(mCancellable); @@ -136,7 +144,9 @@ CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) return CHIP_ERROR_INTERNAL; } + DeviceLayer::PlatformMgr().LockChipStack(); CHIP_ERROR err = chip::DeviceLayer::SystemLayer().StartTimer(timeout, TimerExpiredCallback, static_cast(this)); + DeviceLayer::PlatformMgr().UnlockChipStack(); if (err != CHIP_NO_ERROR) { @@ -144,6 +154,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) StopScan(); return err; } + mTimerExpired = false; return CHIP_NO_ERROR; } @@ -151,6 +162,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan(System::Clock::Timeout timeout) void ChipDeviceScanner::TimerExpiredCallback(chip::System::Layer * layer, void * appState) { ChipDeviceScanner * chipDeviceScanner = static_cast(appState); + chipDeviceScanner->MarkTimerExpired(); chipDeviceScanner->mDelegate->OnScanError(CHIP_ERROR_TIMEOUT); chipDeviceScanner->StopScan(); } @@ -180,6 +192,11 @@ CHIP_ERROR ChipDeviceScanner::StopScan() return CHIP_ERROR_INTERNAL; } + ChipDeviceScannerDelegate * delegate = this->mDelegate; + // callback is explicitly allowed to delete the scanner (hence no more + // references to 'self' here) + delegate->OnScanComplete(); + return CHIP_NO_ERROR; } @@ -192,12 +209,7 @@ CHIP_ERROR ChipDeviceScanner::MainLoopStopScan(ChipDeviceScanner * self) ChipLogError(Ble, "Failed to stop discovery %s", error->message); g_error_free(error); } - ChipDeviceScannerDelegate * delegate = self->mDelegate; - self->mIsScanning = false; - - // callback is explicitly allowed to delete the scanner (hence no more - // references to 'self' here) - delegate->OnScanComplete(); + self->mIsScanning = false; return CHIP_NO_ERROR; } diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.h b/src/platform/Linux/bluez/ChipDeviceScanner.h index ad12ba9b31c8d8..4dbb244c8772da 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.h +++ b/src/platform/Linux/bluez/ChipDeviceScanner.h @@ -71,6 +71,9 @@ class ChipDeviceScanner /// Stop any currently running scan CHIP_ERROR StopScan(); + /// Should only be called by TimerExpiredCallback. + void MarkTimerExpired() { mTimerExpired = true; } + /// Create a new device scanner /// /// Convenience method to allocate any required variables. @@ -101,6 +104,8 @@ class ChipDeviceScanner gulong mInterfaceChangedSignal = 0; bool mIsScanning = false; bool mIsStopping = false; + /// Used to track if timer has alread expired and doesn't need to be canceled. + bool mTimerExpired = false; }; } // namespace Internal diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp similarity index 100% rename from src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp rename to src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index 6abc66e2898659..bdbcd624e71804 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -36,7 +36,7 @@ #include -#include +#include #include diff --git a/src/platform/Zephyr/ThreadStackManagerImpl.cpp b/src/platform/Zephyr/ThreadStackManagerImpl.cpp index e70135de586a07..3cfcfe3b7888b2 100644 --- a/src/platform/Zephyr/ThreadStackManagerImpl.cpp +++ b/src/platform/Zephyr/ThreadStackManagerImpl.cpp @@ -24,7 +24,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include diff --git a/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp b/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp index 469f96eb3dfed3..c4981afe84a656 100644 --- a/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp +++ b/src/platform/bouffalolab/BL702/ThreadStackManagerImpl.cpp @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp b/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp index ef2a433998bd55..c62fa61460f9fb 100644 --- a/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp @@ -27,7 +27,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp index 0130d432bfda69..e71e6e392c9edd 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp @@ -46,8 +46,12 @@ CHIP_ERROR DiagnosticDataProviderImplNrf::GetWiFiBssId(MutableByteSpan & value) { WiFiManager::WiFiInfo info; ReturnErrorOnFailure(WiFiManager::Instance().GetWiFiInfo(info)); + ReturnErrorCodeIf(sizeof(info.mBssId) >= value.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - return CopySpanToMutableSpan(info.mBssId, value); + memcpy(value.data(), info.mBssId, sizeof(info.mBssId)); + value.reduce_size(sizeof(info.mBssId)); + + return CHIP_NO_ERROR; } CHIP_ERROR diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index f8a8f63fdd166f..d8e60bada951ec 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -286,16 +286,13 @@ CHIP_ERROR WiFiManager::GetWiFiInfo(WiFiInfo & info) const if (status.state >= WIFI_STATE_ASSOCIATED) { - uint8_t mac_string_buf[sizeof("xx:xx:xx:xx:xx:xx")]; - net_sprint_ll_addr_buf(reinterpret_cast(status.bssid), WIFI_MAC_ADDR_LEN, - reinterpret_cast(mac_string_buf), sizeof(mac_string_buf)); - info.mBssId = ByteSpan(mac_string_buf, sizeof(mac_string_buf)); info.mSecurityType = MapToMatterSecurityType(status.security); info.mWiFiVersion = MapToMatterWiFiVersionCode(status.link_mode); info.mRssi = static_cast(status.rssi); info.mChannel = static_cast(status.channel); info.mSsidLen = status.ssid_len; memcpy(info.mSsid, status.ssid, status.ssid_len); + memcpy(info.mBssId, status.bssid, sizeof(status.bssid)); return CHIP_NO_ERROR; } diff --git a/src/platform/nrfconnect/wifi/WiFiManager.h b/src/platform/nrfconnect/wifi/WiFiManager.h index 2e1b86e94b0a8e..880ab4c4ba2a50 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.h +++ b/src/platform/nrfconnect/wifi/WiFiManager.h @@ -127,7 +127,7 @@ class WiFiManager struct WiFiInfo { - ByteSpan mBssId{}; + uint8_t mBssId[DeviceLayer::Internal::kWiFiBSSIDLength]; app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum mSecurityType{}; app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum mWiFiVersion{}; uint16_t mChannel{}; diff --git a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp index af2d7421646739..d525fc4a1e3ee7 100644 --- a/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ThreadStackManagerImpl.cpp @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/src/platform/qpg/ThreadStackManagerImpl.cpp b/src/platform/qpg/ThreadStackManagerImpl.cpp index aa7a05285db35e..cb6fd0e2ec1289 100644 --- a/src/platform/qpg/ThreadStackManagerImpl.cpp +++ b/src/platform/qpg/ThreadStackManagerImpl.cpp @@ -25,8 +25,8 @@ /* this file behaves like a config.h, comes first */ #include -#include -#include +#include +#include #include #include diff --git a/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp b/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp index aa4add21323c52..83767f9a0e1fb8 100644 --- a/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp +++ b/src/platform/silabs/efr32/ThreadStackManagerImpl.cpp @@ -26,8 +26,8 @@ /* this file behaves like a config.h, comes first */ #include -#include -#include +#include +#include #include #include diff --git a/src/platform/telink/ConnectivityManagerImpl.h b/src/platform/telink/ConnectivityManagerImpl.h index 549f2ca156f4a8..ce6ae49a4283e7 100644 --- a/src/platform/telink/ConnectivityManagerImpl.h +++ b/src/platform/telink/ConnectivityManagerImpl.h @@ -100,7 +100,7 @@ inline ConnectivityManager & ConnectivityMgr(void) * Returns the platform-specific implementation of the ConnectivityManager singleton object. * * chip applications can use this to gain access to features of the ConnectivityManager - * that are specific to the ESP32 platform. + * that are specific to the Telink platform. */ inline ConnectivityManagerImpl & ConnectivityMgrImpl(void) { diff --git a/src/platform/telink/ThreadStackManagerImpl.cpp b/src/platform/telink/ThreadStackManagerImpl.cpp index f4bc4fea5bdfa2..7b56409bba1727 100644 --- a/src/platform/telink/ThreadStackManagerImpl.cpp +++ b/src/platform/telink/ThreadStackManagerImpl.cpp @@ -24,7 +24,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include diff --git a/src/test_driver/tizen/README.md b/src/test_driver/tizen/README.md index b4e8ed39ad5312..85a91563183b42 100644 --- a/src/test_driver/tizen/README.md +++ b/src/test_driver/tizen/README.md @@ -47,7 +47,10 @@ argument of the `gn gen` command. # Generate test target gn gen --check --fail-on-unused-args \ --root="$PWD/src/test_driver/tizen" \ - --args="target_os=\"tizen\" target_cpu=\"arm\" chip_config_network_layer_ble=false" \ + --args="target_os=\"tizen\" target_cpu=\"arm\" \ + tizen_sdk_root=\"$TIZEN_SDK_ROOT\" \ + tizen_sdk_sysroot=\"$TIZEN_SDK_SYSROOT\" + chip_config_network_layer_ble=false" \ out/tizen-check # Run Tizen QEMU-based tests ninja -C out/tizen-check check diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index a31c6eb509fd67..a8b3d0c7a27592 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit a31c6eb509fd67b9c21721f0d0f38c1468f706c7 +Subproject commit a8b3d0c7a27592ba103981a6115367a2822761bf diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 34ecac8536f6a8..eaa2779047c3bf 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 34ecac8536f6a8e23391b7f25b7ec401bf1ae305 +Subproject commit eaa2779047c3bf781874954e82c716239460c5f7 diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 5c4ea8e31764a8..e72f0d5a6f9315 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 5c4ea8e31764a8ab1c55b7df4086fe610c4bf4af +Subproject commit e72f0d5a6f9315b995b9002b2af6c41190f91144 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 81be7ed1082963..f0cbc03189adf7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -27,7 +27,6 @@ #include #include #include -#include #include /*----------------------------------------------------------------------------*\ @@ -16199,5 +16198,4 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterClientMonitoring(commands, credsIssuerConfig); registerClusterUnitTesting(commands, credsIssuerConfig); registerClusterFaultInjection(commands, credsIssuerConfig); - registerClusterSubscriptions(commands, credsIssuerConfig); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 919fac2e092fd3..f56b3110884aae 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -68939,24 +68939,22 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 16)); VerifyOrReturn(CheckValue("attributeList[16]", iter_0.GetValue(), 16UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 17)); - VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 17UL)); + VerifyOrReturn(CheckValue("attributeList[17]", iter_0.GetValue(), 18UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 18)); - VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 18UL)); + VerifyOrReturn(CheckValue("attributeList[18]", iter_0.GetValue(), 19UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); - VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 19UL)); + VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 20UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); - VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 20UL)); + VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 21)); - VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 22)); - VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 23)); - VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 24)); - VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 25)); - VerifyOrReturn(CheckValue("attributeList[25]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 26)); + VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 25)); } } break; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index c1486e778f3489..a0495741bf95b9 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -101234,7 +101234,7 @@ class TestBasicInformation : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(26))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); @@ -101252,15 +101252,14 @@ class TestBasicInformation : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[14], 14UL)); VerifyOrReturn(CheckValue("", actualValue[15], 15UL)); VerifyOrReturn(CheckValue("", actualValue[16], 16UL)); - VerifyOrReturn(CheckValue("", actualValue[17], 17UL)); - VerifyOrReturn(CheckValue("", actualValue[18], 18UL)); - VerifyOrReturn(CheckValue("", actualValue[19], 19UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 20UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[25], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[17], 18UL)); + VerifyOrReturn(CheckValue("", actualValue[18], 19UL)); + VerifyOrReturn(CheckValue("", actualValue[19], 20UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); } NextTest();