diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 0a5684b2d9eb3d..3bb78f4ca03294 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -35,7 +35,8 @@ RUN apt-get -fy install git vim emacs sudo \
wget curl telnet \
docker.io \
iputils-ping net-tools \
- libncurses5
+ libncurses5 \
+ libpython2.7
RUN groupadd -g $USER_GID $USERNAME
RUN useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker -m $USERNAME
@@ -83,3 +84,5 @@ RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
&& echo TIZEN_SDK_DATA_PATH=/home/$USERNAME/tizen-sdk-data >> $TIZEN_SDK_ROOT/sdk.info \
&& ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
&& : # last line
+
+ENV TIZEN_ROOTFS /tizen_rootfs
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index ba21e5e4402d30..e80dfa78bded48 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -17,29 +17,30 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
- "BUILD_VERSION": "0.5.77"
+ "BUILD_VERSION": "0.5.79"
}
},
"remoteUser": "vscode",
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
- "ms-azuretools.vscode-docker",
- "xaver.clang-format",
- "github.vscode-pull-request-github",
- "maelvalais.autoconf",
- "yzhang.markdown-all-in-one",
- "eamodio.gitlens",
- "yuichinukiyama.vscode-preview-server",
"aaron-bond.better-comments",
- "foxundermoon.shell-format",
+ "augustocdias.tasks-shell-input",
+ "christian-kohler.path-intellisense",
+ "eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
- "redhat.vscode-yaml",
- "christian-kohler.path-intellisense",
+ "foxundermoon.shell-format",
+ "github.vscode-pull-request-github",
"knisterpeter.vscode-github",
- "npclaudiu.vscode-gn",
+ "maelvalais.autoconf",
"marus25.cortex-debug",
- "msedge-dev.gnls"
+ "ms-azuretools.vscode-docker",
+ "msedge-dev.gnls",
+ "npclaudiu.vscode-gn",
+ "redhat.vscode-yaml",
+ "xaver.clang-format",
+ "yuichinukiyama.vscode-preview-server",
+ "yzhang.markdown-all-in-one"
],
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt
index 624b6f22c74deb..9189db4df34508 100644
--- a/.github/.wordlist.txt
+++ b/.github/.wordlist.txt
@@ -626,7 +626,6 @@ IlluminanceMeasurement
IM
imager
imagetool
-ImageURI
imageUri
img
Impl
@@ -1278,6 +1277,7 @@ timedInteractionTimeoutMs
TimeFormatLocalization
timeoutMs
TimeSynchronization
+tinycrypt
Tizen
TKIP
tlsr
diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml
index 39efab85d61e66..f7a59c578317e5 100644
--- a/.github/workflows/bloat_check.yaml
+++ b/.github/workflows/bloat_check.yaml
@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
steps:
- uses: Wandalen/wretry.action@v1.0.15
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 7b1a88b1b3ee9a..19c5c6350dcfff 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -107,7 +107,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
@@ -237,7 +237,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
options: --sysctl "net.ipv6.conf.all.disable_ipv6=0
diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml
index 7f856d8e9f085c..249636e9b5f3c2 100644
--- a/.github/workflows/chef.yaml
+++ b/.github/workflows/chef.yaml
@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
options: --user root
steps:
- uses: Wandalen/wretry.action@v1.0.15
@@ -53,7 +53,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
options: --user root
steps:
@@ -77,7 +77,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-esp32:0.5.77
+ image: connectedhomeip/chip-build-esp32:0.5.79
options: --user root
steps:
@@ -101,7 +101,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-nrf-platform:0.5.77
+ image: connectedhomeip/chip-build-nrf-platform:0.5.79
options: --user root
steps:
diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml
index ca77207d322d94..914b5d6a8a34be 100644
--- a/.github/workflows/cirque.yaml
+++ b/.github/workflows/cirque.yaml
@@ -38,7 +38,7 @@ jobs:
# need to run with privilege, which isn't supported by job.XXX.contaner
# https://github.com/actions/container-action/issues/2
# container:
- # image: connectedhomeip/chip-build-cirque:0.5.77
+ # image: connectedhomeip/chip-build-cirque:0.5.79
# volumes:
# - "/tmp:/tmp"
# - "/dev/pts:/dev/pts"
diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml
index c6603eaac00f4e..0f0f57b57104a5 100644
--- a/.github/workflows/darwin-tests.yaml
+++ b/.github/workflows/darwin-tests.yaml
@@ -29,7 +29,7 @@ concurrency:
jobs:
test_suites_chip_tool_darwin:
name: Test Suites - Darwin
- timeout-minutes: 120
+ timeout-minutes: 135
strategy:
matrix:
@@ -96,7 +96,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
- timeout-minutes: 45
+ timeout-minutes: 60
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml
index a3ccea381f4060..a9b503ac0f4835 100644
--- a/.github/workflows/doxygen.yaml
+++ b/.github/workflows/doxygen.yaml
@@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-20.04
container:
- image: connectedhomeip/chip-build-doxygen:0.5.77
+ image: connectedhomeip/chip-build-doxygen:0.5.79
if: github.actor != 'restyled-io[bot]'
diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml
index fdfeae09cdefae..b52f0c998157e3 100644
--- a/.github/workflows/examples-ameba.yaml
+++ b/.github/workflows/examples-ameba.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-ameba:0.5.77
+ image: connectedhomeip/chip-build-ameba:0.5.79
options: --user root
steps:
diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml
index ab358c4e7721a9..885133547c3d54 100644
--- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml
+++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-ti:0.5.77
+ image: connectedhomeip/chip-build-ti:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml
index 548909c27aa7bb..8c2da30d946b36 100644
--- a/.github/workflows/examples-efr32.yaml
+++ b/.github/workflows/examples-efr32.yaml
@@ -35,7 +35,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-efr32:0.5.77
+ image: connectedhomeip/chip-build-efr32:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml
index f7f27572b4b35f..6d69ce40937e43 100644
--- a/.github/workflows/examples-esp32.yaml
+++ b/.github/workflows/examples-esp32.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-esp32:0.5.77
+ image: connectedhomeip/chip-build-esp32:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
@@ -118,7 +118,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-esp32:0.5.77
+ image: connectedhomeip/chip-build-esp32:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml
index 8604a3b6756326..5f381cc180cd5e 100644
--- a/.github/workflows/examples-infineon.yaml
+++ b/.github/workflows/examples-infineon.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-infineon:0.5.77
+ image: connectedhomeip/chip-build-infineon:0.5.79
steps:
- uses: Wandalen/wretry.action@v1.0.15
diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml
index 3342c4f5739884..e43db4cef5c77b 100644
--- a/.github/workflows/examples-k32w.yaml
+++ b/.github/workflows/examples-k32w.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-k32w:0.5.77
+ image: connectedhomeip/chip-build-k32w:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml
index 88ffe8491e48df..369500947303e5 100644
--- a/.github/workflows/examples-linux-arm.yaml
+++ b/.github/workflows/examples-linux-arm.yaml
@@ -31,7 +31,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-crosscompile:0.5.77
+ image: connectedhomeip/chip-build-crosscompile:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml
index c1c9971c9dd985..2236761bc264ea 100644
--- a/.github/workflows/examples-linux-imx.yaml
+++ b/.github/workflows/examples-linux-imx.yaml
@@ -31,7 +31,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-imx:0.5.77
+ image: connectedhomeip/chip-build-imx:0.5.79
steps:
- uses: Wandalen/wretry.action@v1.0.15
diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml
index f557aaeb597f9f..2e6e0edb3f40e4 100644
--- a/.github/workflows/examples-linux-standalone.yaml
+++ b/.github/workflows/examples-linux-standalone.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml
index 19d59ad4bad2a8..65bf46ebfcdf71 100644
--- a/.github/workflows/examples-mbed.yaml
+++ b/.github/workflows/examples-mbed.yaml
@@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-mbed-os:0.5.77
+ image: connectedhomeip/chip-build-mbed-os:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml
index 458bf7fa712c80..b15ad7d4aa1da0 100644
--- a/.github/workflows/examples-nrfconnect.yaml
+++ b/.github/workflows/examples-nrfconnect.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-nrf-platform:0.5.77
+ image: connectedhomeip/chip-build-nrf-platform:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml
index 278d535dbe0a55..e1e4b40b1f6d3c 100644
--- a/.github/workflows/examples-qpg.yaml
+++ b/.github/workflows/examples-qpg.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml
index 58fea93d501b9f..1089f0a31af578 100644
--- a/.github/workflows/examples-telink.yaml
+++ b/.github/workflows/examples-telink.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-telink:0.5.77
+ image: connectedhomeip/chip-build-telink:0.5.79
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml
index eeadfd200d916b..2e6b2ae48d2bad 100644
--- a/.github/workflows/examples-tizen.yaml
+++ b/.github/workflows/examples-tizen.yaml
@@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-tizen:0.5.77
+ image: connectedhomeip/chip-build-tizen:0.5.79
options: --user root
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml
index cd278c6c1e75b0..09960d78aaba1e 100644
--- a/.github/workflows/full-android.yaml
+++ b/.github/workflows/full-android.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-android:0.5.77
+ image: connectedhomeip/chip-build-android:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml
index c2ecc70cdecd91..dedc1b67b109c4 100644
--- a/.github/workflows/fuzzing-build.yaml
+++ b/.github/workflows/fuzzing-build.yaml
@@ -31,7 +31,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b5c296573021d7..ce0a12059f6916 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -85,6 +85,10 @@ jobs:
if: always()
run: scripts/tools/check_includes.sh
+ - name: Check for zcl.json and extension sync status
+ if: always()
+ run: scripts/tools/check_zcl_file_sync.py .
+
- name: Ensure all PICS are set for tests (to true or false)
if: always()
run: |
diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml
index c9e26c8cc97914..60f620195025d4 100644
--- a/.github/workflows/qemu.yaml
+++ b/.github/workflows/qemu.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-esp32-qemu:0.5.77
+ image: connectedhomeip/chip-build-esp32-qemu:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml
index 4ab6fcfbe0f6b3..de38d645157cd8 100644
--- a/.github/workflows/release_artifacts.yaml
+++ b/.github/workflows/release_artifacts.yaml
@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build-esp32:0.5.77
+ image: connectedhomeip/chip-build-esp32:0.5.79
steps:
- uses: Wandalen/wretry.action@v1.0.15
@@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build-efr32:0.5.77
+ image: connectedhomeip/chip-build-efr32:0.5.79
steps:
- uses: Wandalen/wretry.action@v1.0.15
name: Checkout
diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml
index bf59a586b67bde..dc800768554bd3 100644
--- a/.github/workflows/smoketest-android.yaml
+++ b/.github/workflows/smoketest-android.yaml
@@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'
container:
- image: connectedhomeip/chip-build-android:0.5.77
+ image: connectedhomeip/chip-build-android:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 771c4949340f04..753819af894e77 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -28,7 +28,7 @@ concurrency:
jobs:
test_suites_linux:
name: Test Suites - Linux
- timeout-minutes: 120
+ timeout-minutes: 140
strategy:
matrix:
@@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -76,7 +76,7 @@ jobs:
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Apps
- timeout-minutes: 30
+ timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
@@ -90,7 +90,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
- timeout-minutes: 40
+ timeout-minutes: 60
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
@@ -121,7 +121,7 @@ jobs:
retention-days: 5
test_suites_darwin:
name: Test Suites - Darwin
- timeout-minutes: 120
+ timeout-minutes: 140
strategy:
matrix:
@@ -190,7 +190,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
- timeout-minutes: 50
+ timeout-minutes: 70
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
@@ -237,7 +237,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
options:
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml
index 92c5db7a27a938..d13919cd245a64 100644
--- a/.github/workflows/unit_integration_test.yaml
+++ b/.github/workflows/unit_integration_test.yaml
@@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
container:
- image: connectedhomeip/chip-build:0.5.77
+ image: connectedhomeip/chip-build:0.5.79
volumes:
- "/tmp/log_output:/tmp/test_logs"
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml
index 0584c11887fd1d..ebd49b363048a6 100644
--- a/.github/workflows/zap_regeneration.yaml
+++ b/.github/workflows/zap_regeneration.yaml
@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-20.04
container:
- image: connectedhomeip/chip-build-zap:0.5.77
+ image: connectedhomeip/chip-build-zap:0.5.79
defaults:
run:
shell: sh
diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml
index f5a1d809540dfd..56355d7e351324 100644
--- a/.github/workflows/zap_templates.yaml
+++ b/.github/workflows/zap_templates.yaml
@@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-20.04
container:
- image: connectedhomeip/chip-build-zap:0.5.77
+ image: connectedhomeip/chip-build-zap:0.5.79
defaults:
run:
shell: sh
diff --git a/.gitmodules b/.gitmodules
index 8e6b6ad0545da7..0682becb54cfce 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -246,3 +246,8 @@
url = https://github.com/bouffalolab/bl_iot_sdk_matter.git
branch = bl602_release
platforms = bl602
+[submodule "third_party/nxp/libs/mbedtls/repo"]
+ path = third_party/nxp/libs/mbedtls/repo
+ url = https://github.com/NXPmicro/mbedtls.git
+ branch = tinycrypt-mbedtls-2.28
+ platforms = k32w0
diff --git a/.restyled.yaml b/.restyled.yaml
index eb9e0e6a92d8ea..937a8b4afa2a53 100644
--- a/.restyled.yaml
+++ b/.restyled.yaml
@@ -70,6 +70,7 @@ exclude:
- "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle
- "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle
- "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1
+ - "examples/chef/sample_app_util/test_files/*.yaml"
- "examples/chef/zzz_generated/**/*"
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index d92e0983873689..6ce0339c697719 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -3,7 +3,26 @@
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
- "recommendations": ["marus25.cortex-debug"],
+ "recommendations": [
+ "aaron-bond.better-comments",
+ "augustocdias.tasks-shell-input",
+ "christian-kohler.path-intellisense",
+ "eamodio.gitlens",
+ "editorconfig.editorconfig",
+ "esbenp.prettier-vscode",
+ "foxundermoon.shell-format",
+ "github.vscode-pull-request-github",
+ "knisterpeter.vscode-github",
+ "maelvalais.autoconf",
+ "marus25.cortex-debug",
+ "ms-azuretools.vscode-docker",
+ "msedge-dev.gnls",
+ "npclaudiu.vscode-gn",
+ "redhat.vscode-yaml",
+ "xaver.clang-format",
+ "yuichinukiyama.vscode-preview-server",
+ "yzhang.markdown-all-in-one"
+ ],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 3439327d84e5a2..77739937fc05a0 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -90,6 +90,39 @@
}
]
},
+ {
+ "name": "LightingApp (Tizen) [remote]",
+ "type": "cppdbg",
+ "request": "launch",
+ "cwd": "${workspaceFolder}/out/tizen-arm-light",
+ "program": "${workspaceFolder}/out/tizen-arm-light/chip-lighting-app",
+ "miDebuggerPath": "${env:TIZEN_SDK_ROOT}/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-gdb",
+ "additionalSOLibSearchPath": "${env:TIZEN_ROOTFS}",
+ "preLaunchTask": "Launch LightingApp with gdbserver attached (Tizen)",
+ "miDebuggerServerAddress": "localhost:9999",
+ "linux": {
+ "MIMode": "gdb"
+ },
+ "setupCommands": [
+ {
+ "description": "Enable pretty-printing for gdb",
+ "text": "-enable-pretty-printing",
+ "ignoreFailures": true
+ },
+ {
+ "text": "set solib-absolute-prefix ${env:TIZEN_ROOTFS}"
+ },
+ {
+ "text": "set sysroot ${env:TIZEN_SDK_SYSROOT}"
+ },
+ {
+ "text": "set debug-file-directory {env:TIZEN_SDK_SYSROOT}/usr/lib/debug"
+ },
+ {
+ "text": "set solib-search-path ${workspaceFolder}/out/tizen-arm-light"
+ }
+ ]
+ },
{
"name": "Debug Mbed examples",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 9f34c08e27a6af..20aff730a74613 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -192,6 +192,68 @@
"problemMatcher": {
"base": "$gcc"
}
+ },
+ {
+ "label": "Build LightingApp (Tizen)",
+ "type": "shell",
+ "command": "scripts/run_in_build_env.sh",
+ "args": [
+ "${workspaceFolder}/scripts/build/build_examples.py --target tizen-arm-light --enable-flashbundle build"
+ ],
+ "group": "build",
+ "problemMatcher": {
+ "base": "$gcc"
+ }
+ },
+ {
+ "label": "Connect to device (Tizen)",
+ "type": "shell",
+ "command": "sdb",
+ "args": ["connect", "${input:tizenTargetDeviceAddress}"],
+ "problemMatcher": [],
+ "runOptions": {
+ "reevaluateOnRerun": false
+ }
+ },
+ {
+ "label": "Install LightingApp (Tizen)",
+ "type": "shell",
+ "command": "sdb",
+ "args": [
+ "-s",
+ "${input:tizenTargetDeviceAddressSdb}",
+ "install",
+ "${workspaceFolder}/out/tizen-arm-light/package/out/org.tizen.matter.example.lighting-1.0.0.tpk"
+ ],
+ "problemMatcher": [],
+ "runOptions": {
+ "reevaluateOnRerun": false
+ }
+ },
+ {
+ "label": "Launch LightingApp with gdbserver attached (Tizen)",
+ "type": "shell",
+ "command": "bash",
+ "args": [
+ "${workspaceFolder}/scripts/helpers/tizen_gdbserver_run.sh",
+ "--app-name",
+ "org.tizen.matter.example.lighting",
+ "--target",
+ "${input:tizenTargetDeviceAddressSdb}"
+ ],
+ "problemMatcher": [],
+ "runOptions": {
+ "reevaluateOnRerun": false
+ },
+ "isBackground": false,
+ "presentation": {
+ "echo": true,
+ "reveal": "always",
+ "focus": false,
+ "panel": "dedicated",
+ "showReuseMessage": true,
+ "clear": true
+ }
}
],
"inputs": [
@@ -377,6 +439,21 @@
"telink-tlsr9518adk80d-light-switch",
"tizen-arm-light"
]
+ },
+ {
+ "type": "promptString",
+ "id": "tizenTargetDeviceAddress",
+ "description": "Enter the target device address and port in format
:"
+ },
+ {
+ "id": "tizenTargetDeviceAddressSdb",
+ "type": "command",
+ "command": "shellCommand.execute",
+ "args": {
+ "command": "sdb devices | grep -v 'List of devices attached' |awk '{print $1 \"|\" $1, $3, \"(\" $2 \")\"}'",
+ "fieldSeparator": "|",
+ "description": "Select target device"
+ }
}
]
}
diff --git a/build_overrides/mbedtls.gni b/build_overrides/mbedtls.gni
index 04f377ed99eabc..ac8a6f16203880 100644
--- a/build_overrides/mbedtls.gni
+++ b/build_overrides/mbedtls.gni
@@ -15,4 +15,5 @@
declare_args() {
# Root directory for mbedTLS.
mbedtls_root = "//third_party/mbedtls"
+ mbedtls_repo = "//third_party/mbedtls"
}
diff --git a/build_overrides/zephyr.gni b/build_overrides/zephyr.gni
new file mode 100644
index 00000000000000..9ad63cf8d53544
--- /dev/null
+++ b/build_overrides/zephyr.gni
@@ -0,0 +1,15 @@
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# place holder
diff --git a/config/ameba/chip.cmake b/config/ameba/chip.cmake
index 40dc11bd659711..0f5cd186367b0f 100644
--- a/config/ameba/chip.cmake
+++ b/config/ameba/chip.cmake
@@ -110,7 +110,7 @@ if (matter_enable_rpc)
#string(APPEND CHIP_GN_ARGS "remove_default_configs = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:cpp17\"]\n")
string(APPEND CHIP_GN_ARGS "chip_build_pw_rpc_lib = true\n")
string(APPEND CHIP_GN_ARGS "pw_log_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"\n")
-string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log\"\n")
+string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log:check_backend\"\n")
string(APPEND CHIP_GN_ARGS "pw_sys_io_BACKEND = \"//third_party/connectedhomeip/examples/platform/ameba/pw_sys_io:pw_sys_io_ameba\"\n")
string(APPEND CHIP_GN_ARGS "dir_pw_third_party_nanopb = \"//third_party/connectedhomeip/third_party/nanopb/repo\"\n")
string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert:impl\", \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log:impl\"]\n")
diff --git a/config/bouffalolab/bl602/lib/pw_rpc/pw_rpc.gni b/config/bouffalolab/bl602/lib/pw_rpc/pw_rpc.gni
index 29f549efd4b088..69bd1634363ebc 100644
--- a/config/bouffalolab/bl602/lib/pw_rpc/pw_rpc.gni
+++ b/config/bouffalolab/bl602/lib/pw_rpc/pw_rpc.gni
@@ -16,7 +16,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/bl602/pw_sys_io:pw_sys_io_bl602"
diff --git a/config/efr32/lib/pw_rpc/pw_rpc.gni b/config/efr32/lib/pw_rpc/pw_rpc.gni
index b0ef83d19dabd6..68f1c6154f4a91 100644
--- a/config/efr32/lib/pw_rpc/pw_rpc.gni
+++ b/config/efr32/lib/pw_rpc/pw_rpc.gni
@@ -16,7 +16,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32"
diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt
index 4f8c60e4af25d4..6744546453060f 100644
--- a/config/esp32/components/chip/CMakeLists.txt
+++ b/config/esp32/components/chip/CMakeLists.txt
@@ -81,11 +81,11 @@ endif()
if(CONFIG_ENABLE_PW_RPC)
string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n")
- chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:cpp17\"]")
+ chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]")
chip_gn_arg_append("chip_build_pw_rpc_lib" "true")
chip_gn_arg_append("chip_build_pw_trace_lib" "true")
chip_gn_arg_append("pw_log_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"")
- chip_gn_arg_append("pw_assert_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log\"")
+ chip_gn_arg_append("pw_assert_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log:check_backend\"")
chip_gn_arg_append("pw_sys_io_BACKEND" "\"//third_party/connectedhomeip/examples/platform/esp32/pw_sys_io:pw_sys_io_esp32\"")
chip_gn_arg_append("pw_trace_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_trace_tokenized\"")
chip_gn_arg_append("dir_pw_third_party_nanopb" "\"//third_party/connectedhomeip/third_party/nanopb/repo\"")
diff --git a/config/ios/CHIPProjectConfig.h b/config/ios/CHIPProjectConfig.h
index f9be4d998c7319..6a9d7eb3213836 100644
--- a/config/ios/CHIPProjectConfig.h
+++ b/config/ios/CHIPProjectConfig.h
@@ -40,6 +40,8 @@
#define CHIP_CONFIG_MAX_SOFTWARE_VERSION_LENGTH 128
+#ifndef CHIP_CONFIG_KVS_PATH
#define CHIP_CONFIG_KVS_PATH "chip.store"
+#endif
#endif /* CHIPPROJECTCONFIG_H */
diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt
index dbf7e91ba13708..337020b56c3d62 100644
--- a/config/mbed/CMakeLists.txt
+++ b/config/mbed/CMakeLists.txt
@@ -383,8 +383,9 @@ target_include_directories(${APP_TARGET} PRIVATE
${PIGWEED_ROOT}/pw_sys_io/public
${PIGWEED_ROOT}/pw_assert/public
${PIGWEED_ROOT}/pw_assert/assert_lite_public_overrides
+ ${PIGWEED_ROOT}/pw_assert_log/assert_backend_public_overrides
+ ${PIGWEED_ROOT}/pw_assert_log/check_backend_public_overrides
${PIGWEED_ROOT}/pw_assert_log/public
- ${PIGWEED_ROOT}/pw_assert_log/public_overrides
${PIGWEED_ROOT}/pw_bytes/public
${PIGWEED_ROOT}/pw_checksum/public
${PIGWEED_ROOT}/pw_containers/public
diff --git a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni
index f35741414952c5..2b03f6b4c9958c 100644
--- a/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni
+++ b/config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni
@@ -16,7 +16,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND =
"${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed"
pw_rpc_system_server_BACKEND =
diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt
index ac4a8f7e561aa1..13bb2e70c47305 100644
--- a/config/nrfconnect/chip-module/CMakeLists.txt
+++ b/config/nrfconnect/chip-module/CMakeLists.txt
@@ -257,7 +257,7 @@ if (CONFIG_CHIP_PW_RPC)
set(PIGWEED_DIR "//third_party/pigweed/repo")
chip_gn_arg_bool("chip_build_pw_trace_lib" "true")
chip_gn_arg_string("pw_trace_BACKEND" ${PIGWEED_DIR}/pw_trace_tokenized)
- chip_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log)
+ chip_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend)
chip_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic)
chip_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"])
endif()
diff --git a/config/qpg/lib/pw_rpc/pw_rpc.gni b/config/qpg/lib/pw_rpc/pw_rpc.gni
index 1f1a5012e803ea..60fb93e6b8fc44 100644
--- a/config/qpg/lib/pw_rpc/pw_rpc.gni
+++ b/config/qpg/lib/pw_rpc/pw_rpc.gni
@@ -16,7 +16,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
pw_log_BACKEND = "$dir_pw_log_basic"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND = "${chip_root}/examples/platform/qpg/pw_sys_io:pw_sys_io_qpg"
pw_build_LINK_DEPS = [
diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig
index 42055393de2a58..b197f0491a9689 100644
--- a/config/zephyr/Kconfig
+++ b/config/zephyr/Kconfig
@@ -139,6 +139,26 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
help
Enables Thread Sleepy End Device support in Matter.
+if CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
+
+config CHIP_SED_IDLE_INTERVAL
+ int "Sleepy End Device idle interval (ms)"
+ default 1000
+ help
+ SED wake interval in milliseconds while the device is idle, meaning that
+ there is no active exchange to or from the device, and its commissioning
+ window is closed.
+
+config CHIP_SED_ACTIVE_INTERVAL
+ int "Sleepy End Device active interval (ms)"
+ default 200
+ help
+ SED wake interval in milliseconds while the device is active, meaning that
+ there is an active exchange to or from the device, or its commissioning
+ window is open.
+
+endif # CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
+
config CHIP_THREAD_SSED
bool "Enable Thread Synchronized Sleepy End Device support"
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
diff --git a/config/zephyr/README.md b/config/zephyr/README.md
new file mode 100644
index 00000000000000..bb780288a34606
--- /dev/null
+++ b/config/zephyr/README.md
@@ -0,0 +1,10 @@
+# Zephyr build and configuration files
+
+This directory contains build scripts and common configuration files used by
+CHIP Zephyr applications. It is structured as follows:
+
+| File/Folder | Contents |
+| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
+| chip-gn | GN project used to build selected CHIP libraries with the _Zephyr_ platform integration layer |
+| chip-module | CMake wrapper for the GN project defined in `chip-gn` directory, and other components that allow one to use CHIP as a Zephyr module |
+| app | Common and optional Kconfig configuration files that can be used in Zephyr applications |
diff --git a/config/zephyr/app/copy-flashbundle-firmware.cmake b/config/zephyr/app/copy-flashbundle-firmware.cmake
new file mode 100644
index 00000000000000..93464f7aceb837
--- /dev/null
+++ b/config/zephyr/app/copy-flashbundle-firmware.cmake
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# Copy the merged.hex file if it exists, otherwise copy zephyr.hex
+
+set(HEX_NAME merged.hex)
+
+if(EXISTS "zephyr/${HEX_NAME}")
+ configure_file("zephyr/${HEX_NAME}" "${FLASHBUNDLE_FIRMWARE}" COPYONLY)
+else()
+ configure_file("zephyr/${KERNEL_HEX_NAME}" "${FLASHBUNDLE_FIRMWARE}" COPYONLY)
+endif()
diff --git a/config/zephyr/app/enable-gnu-std.cmake b/config/zephyr/app/enable-gnu-std.cmake
new file mode 100644
index 00000000000000..5f31e1a5c62ab8
--- /dev/null
+++ b/config/zephyr/app/enable-gnu-std.cmake
@@ -0,0 +1,6 @@
+add_library(gnu17 INTERFACE)
+target_compile_options(gnu17
+ INTERFACE
+ $<$:-std=gnu++17>
+ -D_SYS__PTHREADTYPES_H_)
+target_link_libraries(app PRIVATE gnu17)
diff --git a/config/zephyr/app/flashing.cmake b/config/zephyr/app/flashing.cmake
new file mode 100644
index 00000000000000..b70e166ff28cfe
--- /dev/null
+++ b/config/zephyr/app/flashing.cmake
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Adds rules to generate a flashing wrapper script for an nrfconnect firmware.
+
+set(FLASHBUNDLE_FLASHER_COMMON ${CMAKE_PROJECT_NAME}/firmware_utils.py)
+set(FLASHBUNDLE_FLASHER_PLATFORM ${CMAKE_PROJECT_NAME}/nrfconnect_firmware_utils.py)
+set(FLASHBUNDLE_FLASHER_WRAPPER ${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}.flash.py)
+set(FLASHBUNDLE_FIRMWARE ${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}.hex)
+set(FLASHBUNDLE_FILES ${FLASHBUNDLE_FLASHER_COMMON} ${FLASHBUNDLE_FLASHER_PLATFORM} ${FLASHBUNDLE_FLASHER_WRAPPER} ${FLASHBUNDLE_FIRMWARE})
+
+get_filename_component(FLASHBUNDLE_FIRMWARE_BASENAME ${FLASHBUNDLE_FIRMWARE} NAME)
+
+list(JOIN FLASHBUNDLE_FILES "\n" FLASHBUNDLE_MANIFEST)
+
+file(GENERATE
+ OUTPUT ${CMAKE_PROJECT_NAME}.flashbundle.txt
+ CONTENT "${FLASHBUNDLE_MANIFEST}\n"
+ )
+
+add_custom_command(OUTPUT "${FLASHBUNDLE_FLASHER_COMMON}"
+ COMMAND ${CMAKE_COMMAND} ARGS -E copy "${PROJECT_SOURCE_DIR}/third_party/connectedhomeip/scripts/flashing/firmware_utils.py" "${FLASHBUNDLE_FLASHER_COMMON}"
+ VERBATIM)
+
+add_custom_command(OUTPUT "${FLASHBUNDLE_FLASHER_PLATFORM}"
+ COMMAND ${CMAKE_COMMAND} ARGS -E copy "${PROJECT_SOURCE_DIR}/third_party/connectedhomeip/scripts/flashing/nrfconnect_firmware_utils.py" "${FLASHBUNDLE_FLASHER_PLATFORM}"
+ VERBATIM)
+
+add_custom_command(OUTPUT "${FLASHBUNDLE_FIRMWARE}"
+ DEPENDS zephyr/${KERNEL_HEX_NAME}
+ COMMAND ${CMAKE_COMMAND} ARGS -DFLASHBUNDLE_FIRMWARE=${FLASHBUNDLE_FIRMWARE} -DKERNEL_HEX_NAME=${KERNEL_HEX_NAME} -P "${CHIP_ROOT}/config/nrfconnect/app/copy-flashbundle-firmware.cmake"
+ VERBATIM)
+
+add_custom_command(OUTPUT "${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}.flash.py"
+ COMMAND ${python}
+ "${PROJECT_SOURCE_DIR}/third_party/connectedhomeip/scripts/flashing/gen_flashing_script.py" nrfconnect
+ --output "${FLASHBUNDLE_FLASHER_WRAPPER}"
+ --application "${FLASHBUNDLE_FIRMWARE_BASENAME}"
+ COMMENT "To flash ${FLASHBUNDLE_FIRMWARE_BASENAME} run ${FLASHBUNDLE_FLASHER_WRAPPER}"
+ VERBATIM)
+
+add_custom_target(flashing_script DEPENDS ${FLASHBUNDLE_FILES})
diff --git a/config/zephyr/app/overlay-usb_support.conf b/config/zephyr/app/overlay-usb_support.conf
new file mode 100644
index 00000000000000..1b4a2d56fe8490
--- /dev/null
+++ b/config/zephyr/app/overlay-usb_support.conf
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+CONFIG_GPIO=y
+
+CONFIG_USB=y
+CONFIG_USB_DEVICE_STACK=y
+CONFIG_USB_UART_CONSOLE=y
+
+CONFIG_UART_INTERRUPT_DRIVEN=y
+CONFIG_UART_LINE_CTRL=y
diff --git a/config/zephyr/chip-gn/.gn b/config/zephyr/chip-gn/.gn
new file mode 100644
index 00000000000000..2024e95fed6079
--- /dev/null
+++ b/config/zephyr/chip-gn/.gn
@@ -0,0 +1,29 @@
+# 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.
+
+import("//build_overrides/build.gni")
+import("//build_overrides/chip.gni")
+
+# The location of the build configuration file.
+buildconfig = "${build_root}/config/BUILDCONFIG.gn"
+
+# CHIP uses angle bracket includes.
+check_system_includes = true
+
+default_args = {
+ target_cpu = ""
+ target_os = "zephyr"
+
+ import("${chip_root}/config/zephyr/chip-gn/args.gni")
+}
diff --git a/config/zephyr/chip-gn/BUILD.gn b/config/zephyr/chip-gn/BUILD.gn
new file mode 100644
index 00000000000000..85288992c84812
--- /dev/null
+++ b/config/zephyr/chip-gn/BUILD.gn
@@ -0,0 +1,40 @@
+# 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.
+
+import("//build_overrides/build.gni")
+import("//build_overrides/chip.gni")
+
+import("${chip_root}/build/chip/tests.gni")
+
+assert(current_os == "zephyr")
+
+declare_args() {
+ chip_build_example_providers = false
+}
+
+group("zephyr") {
+ deps = [ "${chip_root}/src/lib" ]
+
+ if (chip_build_tests) {
+ deps += [ "${chip_root}/src:tests" ]
+ }
+
+ if (chip_build_example_providers) {
+ deps += [ "${chip_root}/examples/providers:device_info_provider" ]
+ }
+}
+
+group("default") {
+ deps = [ ":zephyr" ]
+}
diff --git a/config/zephyr/chip-gn/args.gni b/config/zephyr/chip-gn/args.gni
new file mode 100644
index 00000000000000..e5d5aedf5bc17d
--- /dev/null
+++ b/config/zephyr/chip-gn/args.gni
@@ -0,0 +1,27 @@
+# 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.
+
+import("//build_overrides/chip.gni")
+
+chip_device_platform = "zephyr"
+
+chip_build_tests = false
+
+chip_project_config_include = ""
+chip_system_project_config_include = ""
+chip_ble_project_config_include = ""
+
+custom_toolchain = "${chip_root}/config/zephyr/chip-gn/toolchain:zephyr"
+
+pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/constraints.txt" ]
diff --git a/config/zephyr/chip-gn/toolchain/BUILD.gn b/config/zephyr/chip-gn/toolchain/BUILD.gn
new file mode 100644
index 00000000000000..28fbe6d8e939b0
--- /dev/null
+++ b/config/zephyr/chip-gn/toolchain/BUILD.gn
@@ -0,0 +1,33 @@
+# 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.
+
+import("//build/toolchain/gcc_toolchain.gni")
+import("//build_overrides/build.gni")
+
+declare_args() {
+ zephyr_ar = ""
+ zephyr_cc = ""
+ zephyr_cxx = ""
+}
+
+gcc_toolchain("zephyr") {
+ ar = zephyr_ar
+ cc = zephyr_cc
+ cxx = zephyr_cxx
+
+ toolchain_args = {
+ current_os = "zephyr"
+ is_clang = false
+ }
+}
diff --git a/config/zephyr/chip-module/CMakeLists.txt b/config/zephyr/chip-module/CMakeLists.txt
new file mode 100644
index 00000000000000..ba25a316f57a2e
--- /dev/null
+++ b/config/zephyr/chip-module/CMakeLists.txt
@@ -0,0 +1,257 @@
+#
+# Copyright (c) 2022 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.
+#
+
+#
+# @file
+# CMake sub-project defining 'chip' target which represents CHIP library
+# Since CHIP doesn't provide native CMake support, ExternalProject
+# module is used to build the required artifacts with GN meta-build
+# system. It is assumed that find_package(Zephyr) has been called before
+# including this file.
+#
+
+if (CONFIG_CHIP)
+
+include(ExternalProject)
+include(../zephyr-util.cmake)
+
+# ==============================================================================
+# Declare configuration variables and define constants
+# ==============================================================================
+
+# C/C++ compiler flags passed to CHIP build system
+list(APPEND CHIP_CFLAGS)
+
+# C compiler flags passed to CHIP build system
+list(APPEND CHIP_CFLAGS_C)
+
+# C++ compiler flags passed to CHIP build system
+list(APPEND CHIP_CFLAGS_CC)
+
+# CHIP libraries that the application should be linked with
+list(APPEND CHIP_LIBRARIES)
+
+# GN meta-build system arguments in the form of 'key1 = value1\nkey2 = value2...' string
+string(APPEND CHIP_GN_ARGS)
+
+# C/C++ compiler flags which should not be forwarded to CHIP
+# build system (e.g. because CHIP configures them on its own)
+set(CHIP_CFLAG_EXCLUDES
+ "-fno-asynchronous-unwind-tables"
+ "-fno-common"
+ "-fno-defer-pop"
+ "-fno-reorder-functions"
+ "-ffunction-sections"
+ "-fdata-sections"
+ "-g*"
+ "-O*"
+ "-W*"
+)
+
+# ==============================================================================
+# Helper macros
+# ==============================================================================
+
+macro(chip_gn_arg_import FILE)
+ string(APPEND CHIP_GN_ARGS "import(\"${FILE}\")\n")
+endmacro()
+
+macro(chip_gn_arg_string ARG STRING)
+ string(APPEND CHIP_GN_ARGS "${ARG} = \"${STRING}\"\n")
+endmacro()
+
+macro(chip_gn_arg_bool ARG BOOLEAN)
+ if (${BOOLEAN})
+ string(APPEND CHIP_GN_ARGS "${ARG} = true\n")
+ else()
+ string(APPEND CHIP_GN_ARGS "${ARG} = false\n")
+ endif()
+endmacro()
+
+macro(chip_gn_arg_cflags ARG CFLAGS)
+ set(CFLAG_EXCLUDES "[")
+ foreach(cflag ${CHIP_CFLAG_EXCLUDES})
+ string(APPEND CFLAG_EXCLUDES "\"${cflag}\", ")
+ endforeach()
+ string(APPEND CFLAG_EXCLUDES "]")
+ string(APPEND CHIP_GN_ARGS "${ARG} = filter_exclude(string_split(\"${CFLAGS}\"), ${CFLAG_EXCLUDES})\n")
+endmacro()
+
+# ==============================================================================
+# Prepare CHIP configuration based on the project Kconfig configuration
+# ==============================================================================
+
+if (NOT CHIP_ROOT)
+ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
+endif()
+
+set(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn)
+
+if (CONFIG_POSIX_API)
+ list(APPEND CHIP_CFLAGS
+ -D_SYS__PTHREADTYPES_H_
+ -isystem${ZEPHYR_BASE}/include/zephyr/posix
+ )
+endif()
+
+list(APPEND CHIP_CFLAGS -isystem${ZEPHYR_BASE}/../modules/crypto/mbedtls/include/)
+
+zephyr_get_compile_flags(CHIP_CFLAGS_C C)
+zephyr_get_compile_flags(CHIP_CFLAGS_CC CXX)
+zephyr_get_gnu_cpp_standard(CHIP_CFLAGS_CC)
+
+convert_list_of_flags_to_string_of_flags(CHIP_CFLAGS CHIP_CFLAGS)
+convert_list_of_flags_to_string_of_flags(CHIP_CFLAGS_C CHIP_CFLAGS_C)
+convert_list_of_flags_to_string_of_flags(CHIP_CFLAGS_CC CHIP_CFLAGS_CC)
+
+# Prepare CHIP libraries that the application should be linked with
+
+if (NOT CHIP_LIBRARIES)
+ set(CHIP_LIBRARIES -lCHIP)
+endif()
+
+if (CONFIG_CHIP_LIB_SHELL)
+ list(APPEND CHIP_LIBRARIES -lCHIPShell)
+endif()
+
+if (CONFIG_CHIP_PW_RPC)
+ list(APPEND CHIP_LIBRARIES -lPwRpc)
+endif()
+
+
+# Set up CHIP project configuration file
+
+if (CONFIG_CHIP_PROJECT_CONFIG)
+ get_filename_component(CHIP_PROJECT_CONFIG
+ ${CONFIG_CHIP_PROJECT_CONFIG}
+ REALPATH
+ BASE_DIR ${CMAKE_SOURCE_DIR}
+ )
+ set(CHIP_PROJECT_CONFIG "<${CHIP_PROJECT_CONFIG}>")
+else()
+ set(CHIP_PROJECT_CONFIG "")
+endif()
+
+# Set up custom OpenThread configuration
+
+if (CONFIG_CHIP_OPENTHREAD_CONFIG)
+ get_filename_component(CHIP_OPENTHREAD_CONFIG
+ ${CONFIG_CHIP_OPENTHREAD_CONFIG}
+ REALPATH
+ BASE_DIR ${CMAKE_SOURCE_DIR}
+ )
+ zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG})
+endif()
+
+# Find required programs
+
+find_program(GN_EXECUTABLE gn)
+if (${GN_EXECUTABLE} STREQUAL GN_EXECUTABLE-NOTFOUND)
+ message(FATAL_ERROR "The 'gn' command was not found. Make sure you have GN installed.")
+else()
+ # Parse the 'gn --version' output to find the installed version.
+ set(MIN_GN_VERSION 1000)
+ execute_process(
+ COMMAND
+ ${GN_EXECUTABLE} --version
+ OUTPUT_VARIABLE gn_version_output
+ ERROR_VARIABLE gn_error_output
+ RESULT_VARIABLE gn_status
+ )
+
+ if(${gn_status} EQUAL 0)
+ if(gn_version_output VERSION_LESS ${MIN_GN_VERSION})
+ message(FATAL_ERROR "Found unsuitable version of 'gn'. Required is at least ${MIN_GN_VERSION}")
+ endif()
+ else()
+ message(FATAL_ERROR "Could NOT find working gn: Found gn (${GN_EXECUTABLE}), but failed to load with:\n ${gn_error_output}")
+ endif()
+endif()
+
+find_package(Python3 REQUIRED)
+
+# ==============================================================================
+# Generate configuration for CHIP GN build system
+# ==============================================================================
+chip_gn_arg_cflags("target_cflags" ${CHIP_CFLAGS})
+chip_gn_arg_cflags("target_cflags_c" ${CHIP_CFLAGS_C})
+chip_gn_arg_cflags("target_cflags_cc" ${CHIP_CFLAGS_CC})
+chip_gn_arg_string("zephyr_ar" ${CMAKE_AR})
+chip_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
+chip_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
+chip_gn_arg_string("chip_project_config_include" "${CHIP_PROJECT_CONFIG}")
+chip_gn_arg_string("chip_system_project_config_include" "${CHIP_PROJECT_CONFIG}")
+chip_gn_arg_bool ("is_debug" CONFIG_DEBUG)
+chip_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
+chip_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
+chip_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_NET_IPV4)
+chip_gn_arg_bool ("chip_build_tests" CONFIG_CHIP_BUILD_TESTS)
+chip_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
+chip_gn_arg_bool ("chip_build_libshell" CONFIG_CHIP_LIB_SHELL)
+
+if (CONFIG_CHIP_ENABLE_DNSSD_SRP)
+ chip_gn_arg_string("chip_mdns" "platform")
+endif()
+
+file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/args.gn CONTENT ${CHIP_GN_ARGS})
+
+# ==============================================================================
+# Define 'chip-gn' target that builds CHIP library(ies) with GN build system
+# ==============================================================================
+
+ExternalProject_Add(
+ chip-gn
+ PREFIX ${CMAKE_CURRENT_BINARY_DIR}
+ SOURCE_DIR ${CHIP_ROOT}
+ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
+ CONFIGURE_COMMAND ${GN_EXECUTABLE}
+ --root=${CHIP_ROOT}
+ --root-target=${GN_ROOT_TARGET}
+ --dotfile=${GN_ROOT_TARGET}/.gn
+ --script-executable=${Python3_EXECUTABLE}
+ gen --check --fail-on-unused-args ${CMAKE_CURRENT_BINARY_DIR}
+ BUILD_COMMAND ninja
+ INSTALL_COMMAND ""
+ BUILD_BYPRODUCTS ${CHIP_LIBRARIES}
+ BUILD_ALWAYS TRUE
+ USES_TERMINAL_CONFIGURE TRUE
+ USES_TERMINAL_BUILD TRUE
+)
+add_dependencies(chip-gn kernel)
+
+# ==============================================================================
+# Define 'chip' target that exposes CHIP headers & libraries to the application
+# ==============================================================================
+
+zephyr_interface_library_named(chip)
+target_compile_definitions(chip INTERFACE CHIP_HAVE_CONFIG_H)
+target_include_directories(chip INTERFACE
+ ${CHIP_ROOT}/src
+ ${CHIP_ROOT}/src/include
+ ${CHIP_ROOT}/src/lib
+ ${CHIP_ROOT}/third_party/nlassert/repo/include
+ ${CMAKE_CURRENT_BINARY_DIR}/gen/include
+)
+target_link_directories(chip INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/lib)
+
+if (CONFIG_CHIP_LIB_SHELL)
+ target_link_options(chip INTERFACE -Wl,--whole-archive -lCHIPShell -Wl,--no-whole-archive)
+endif()
+
+target_link_libraries(chip INTERFACE -Wl,--start-group ${CHIP_LIBRARIES} -Wl,--end-group)
+add_dependencies(chip chip-gn)
+
+endif() # CONFIG_CHIP
\ No newline at end of file
diff --git a/config/zephyr/chip-module/Kconfig b/config/zephyr/chip-module/Kconfig
new file mode 100644
index 00000000000000..90c7d73f470b8f
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+rsource "../Kconfig"
\ No newline at end of file
diff --git a/config/zephyr/chip-module/Kconfig.defaults b/config/zephyr/chip-module/Kconfig.defaults
new file mode 100644
index 00000000000000..4cf4edea17a939
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.defaults
@@ -0,0 +1,225 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to define new default values of settings used when building Matter samples.
+# This file only changes defaults and thus all symbols here must be promptless
+# and safeguarded so that they only are applied when building Matter.
+
+if CHIP
+
+config LOG
+ bool
+ default y
+
+if LOG
+
+choice LOG_MODE
+ default LOG_MODE_MINIMAL
+endchoice
+
+choice MATTER_LOG_LEVEL_CHOICE
+ default MATTER_LOG_LEVEL_DBG
+endchoice
+
+config LOG_DEFAULT_LEVEL
+ int
+ default 2
+
+endif
+
+config PRINTK_SYNC
+ bool
+ default y
+
+config ASSERT
+ bool
+ default y
+
+config HW_STACK_PROTECTION
+ bool
+ default y
+
+config FPU
+ bool
+ default y
+
+config SHELL
+ bool
+ default y
+
+# Enable getting reboot reasons information
+config HWINFO
+ bool
+ default y
+
+# Generic networking options
+config NET_SOCKETS_POSIX_NAMES
+ bool
+ default n
+
+# Application stack size
+config MAIN_STACK_SIZE
+ int
+ default 8192
+
+config INIT_STACKS
+ bool
+ default y
+
+config CHIP_DEVICE_VENDOR_ID
+ int
+ default 65521
+
+config CHIP_DEVICE_PRODUCT_ID
+ int
+ default 32768
+
+# Disable certain parts of Zephyr IPv6 stack
+config NET_IPV6_NBR_CACHE
+ bool
+ default n
+
+config NET_IPV6_MLD
+ bool
+ default y
+
+config NET_IF_MCAST_IPV6_ADDR_COUNT
+ int
+ default 14
+
+# Network buffers
+config NET_PKT_RX_COUNT
+ int
+ default 16
+
+config NET_PKT_TX_COUNT
+ int
+ default 16
+
+config NET_BUF_RX_COUNT
+ int
+ default 80
+
+config NET_BUF_TX_COUNT
+ int
+ default 80
+
+# Bluetooth Low Energy configs
+config BT
+ bool
+ default y
+
+config BT_PERIPHERAL
+ bool
+ default y
+
+config BT_PERIPHERAL_PREF_MIN_INT
+ int
+ default 36
+
+config BT_PERIPHERAL_PREF_MAX_INT
+ int
+ default 36
+
+config BT_GAP_AUTO_UPDATE_CONN_PARAMS
+ bool
+ default y
+
+config BT_GATT_DYNAMIC_DB
+ bool
+ default y
+
+config BT_DEVICE_NAME_DYNAMIC
+ bool
+ default y
+
+config BT_DEVICE_NAME_MAX
+ int
+ default 15
+
+config BT_MAX_CONN
+ int
+ default 1
+
+config BT_L2CAP_TX_MTU
+ int
+ default 247
+
+config BT_BUF_ACL_RX_SIZE
+ int
+ default 251
+
+config BT_BUF_ACL_TX_SIZE
+ int
+ default 251
+
+config BT_RX_STACK_SIZE
+ int
+ default 1200
+
+config CHIP_OTA_REQUESTOR
+ bool
+ default y
+
+# Enable extended discovery
+config CHIP_EXTENDED_DISCOVERY
+ bool
+ default y
+
+config NVS_LOOKUP_CACHE
+ bool
+ default y
+
+# Enable OpenThread
+config NET_L2_OPENTHREAD
+ bool
+ default y
+
+# Enable mbedTLS
+config MBEDTLS_ENABLE_HEAP
+ bool
+ default y
+
+config MBEDTLS_HEAP_SIZE
+ int
+ default 15360
+
+# Disable not used shell modules
+config SENSOR_SHELL
+ bool
+ default n
+
+config DEVICE_SHELL
+ bool
+ default n
+
+config DATE_SHELL
+ bool
+ default n
+
+config DEVMEM_SHELL
+ bool
+ default n
+
+config MCUBOOT_SHELL
+ bool
+ default n
+
+config FLASH_SHELL
+ bool
+ default n
+
+endif # CHIP
diff --git a/config/zephyr/chip-module/Kconfig.features b/config/zephyr/chip-module/Kconfig.features
new file mode 100644
index 00000000000000..bc800095dc7ce0
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.features
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to define Kconfig options enabling specific features.
+# Feature options will define defaults for settings that are related to the specific feature.
+
+if CHIP
+
+# MCU Manager and SMP configuration
+config MCUMGR
+ bool
+ default y
+
+config MCUMGR_CMD_IMG_MGMT
+ bool
+ default y
+
+config MCUMGR_CMD_OS_MGMT
+ bool
+ default y
+
+config MCUMGR_SMP_BT
+ bool
+ default y
+
+config MCUMGR_SMP_BT_AUTHEN
+ bool
+ default n
+
+config MCUMGR_BUF_COUNT
+ int
+ default 6
+
+# Increase BT MTU and RX buffer for big size DFU messages
+config BT_L2CAP_TX_MTU
+ int
+ default 498
+
+config BT_BUF_ACL_RX_SIZE
+ int
+ default 502
+
+# Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B
+config MCUMGR_BUF_SIZE
+ int
+ default 1024
+
+# Increase system workqueue size, as SMP is processed within it
+config SYSTEM_WORKQUEUE_STACK_SIZE
+ int
+ default 2800
+
+endif # CHIP_DFU_OVER_BT_SMP
+
+endif # CHIP
diff --git a/config/zephyr/chip-module/Kconfig.mcuboot.defaults b/config/zephyr/chip-module/Kconfig.mcuboot.defaults
new file mode 100644
index 00000000000000..4d5979330000f4
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.mcuboot.defaults
@@ -0,0 +1,89 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to define new default values of settings used when building mcuboot child image for Matter samples.
+
+config MAIN_STACK_SIZE
+ int
+ default 10240
+
+config BOOT_SWAP_SAVE_ENCTLV
+ bool
+ default n
+
+config BOOT_ENCRYPT_RSA
+ bool
+ default n
+
+config BOOT_ENCRYPT_EC256
+ bool
+ default n
+
+config BOOT_ENCRYPT_X25519
+ bool
+ default n
+
+config BOOT_BOOTSTRAP
+ bool
+ default n
+
+config PM
+ bool
+ default n
+
+config FLASH
+ bool
+ default y
+
+config FPROTECT
+ bool
+ default y
+
+config BOOT_MAX_IMG_SECTORS
+ int
+ default 256
+
+config LOG
+ bool
+ default n
+
+config CONSOLE_HANDLER
+ bool
+ default n
+
+config BOOT_BANNER
+ bool
+ default n
+
+config TIMESLICING
+ bool
+ default n
+
+config RESET_ON_FATAL_ERROR
+ bool
+ default n
+
+config MULTITHREADING
+ bool
+ default n
+
+config TICKLESS_KERNEL
+ bool
+ default n
+
+config TIMEOUT_64BIT
+ bool
+ default n
diff --git a/config/zephyr/chip-module/Kconfig.mcuboot.root b/config/zephyr/chip-module/Kconfig.mcuboot.root
new file mode 100644
index 00000000000000..e8756636dfd66d
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.mcuboot.root
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to create a wrapper Kconfig file that will be set as
+# mcuboot_KCONFIG_ROOT and processed before any other Kconfig for mcuboot child image.
+
+rsource "Kconfig.mcuboot.defaults"
+source "${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr/Kconfig"
diff --git a/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.defaults b/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.defaults
new file mode 100644
index 00000000000000..dea52bae56e2f4
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.defaults
@@ -0,0 +1,91 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to define new default values of settings used when building multiprotocol_rpmsg child image for Matter samples.
+
+config LOG
+ bool
+ default n
+
+config HEAP_MEM_POOL_SIZE
+ int
+ default 8192
+
+config MAIN_STACK_SIZE
+ int
+ default 2048
+
+config SYSTEM_WORKQUEUE_STACK_SIZE
+ int
+ default 2048
+
+config BT
+ bool
+ default y
+
+config BT_HCI_RAW
+ bool
+ default y
+
+config BT_MAX_CONN
+ int
+ default 1
+
+config BT_PERIPHERAL
+ bool
+ default y
+
+config BT_CENTRAL
+ bool
+ default n
+
+config BT_BUF_ACL_RX_SIZE
+ int
+ default 502
+
+config BT_BUF_ACL_TX_SIZE
+ int
+ default 251
+
+config BT_CTLR_DATA_LENGTH_MAX
+ int
+ default 251
+
+config BT_CTLR_ASSERT_HANDLER
+ bool
+ default y
+
+config BT_HCI_RAW_RESERVE
+ int
+ default 1
+
+# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
+# Host number of completed commands does not follow normal flow control.
+config BT_BUF_CMD_TX_COUNT
+ int
+ default 10
+
+config ASSERT
+ bool
+ default y
+
+config DEBUG_INFO
+ bool
+ default y
+
+config EXCEPTION_STACK_TRACE
+ bool
+ default y
diff --git a/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.root b/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.root
new file mode 100644
index 00000000000000..b34c82243585b4
--- /dev/null
+++ b/config/zephyr/chip-module/Kconfig.multiprotocol_rpmsg.root
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2022 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.
+#
+
+# The purpose of this file is to create a wrapper Kconfig file that will be set as
+# multiprotocol_rpmsg_KCONFIG_ROOT and processed before any other Kconfig for multiprotocol_rpmsg child image.
+
+rsource "Kconfig.multiprotocol_rpmsg.defaults"
+source "Kconfig.zephyr"
diff --git a/config/zephyr/chip-module/make_gn_args.py b/config/zephyr/chip-module/make_gn_args.py
new file mode 100644
index 00000000000000..f30cd459a6e7d4
--- /dev/null
+++ b/config/zephyr/chip-module/make_gn_args.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python3
+
+#
+# Copyright (c) 2021 Project CHIP Authors
+# All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import argparse
+import re
+import sys
+
+GN_SPECIAL_CHARACTERS = r'(["$\\])'
+GN_CFLAG_EXCLUDES = [
+ '-fno-asynchronous-unwind-tables',
+ '-fno-common',
+ '-fno-defer-pop',
+ '-fno-reorder-functions',
+ '-ffunction-sections',
+ '-fdata-sections',
+ '-g*',
+ '-O*',
+ '-W*',
+]
+
+
+def escape_strings(gn_args):
+ return [[key, re.sub(GN_SPECIAL_CHARACTERS, r'\\\1', value)] for key, value in gn_args]
+
+
+def write_gn_args(args):
+ if args.module:
+ sys.stdout.write('import("{}")\n'.format(args.module))
+
+ for key, value in args.arg:
+ sys.stdout.write('{} = {}\n'.format(key, value))
+
+ for key, value in args.arg_string:
+ sys.stdout.write('{} = "{}"\n'.format(key, value))
+
+ cflag_excludes = ', '.join(['"{}"'.format(exclude)
+ for exclude in GN_CFLAG_EXCLUDES])
+
+ for key, value in args.arg_cflags:
+ sys.stdout.write('{} = filter_exclude(string_split("{}"), [{}])\n'.format(
+ key, value, cflag_excludes))
+
+
+def main():
+ parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
+ parser.add_argument('--module', action='store')
+ parser.add_argument('--arg', action='append', nargs=2, default=[])
+ parser.add_argument('--arg-string', action='append', nargs=2, default=[])
+ parser.add_argument('--arg-cflags', action='append', nargs=2, default=[])
+ args = parser.parse_args()
+ args.arg_string = escape_strings(args.arg_string)
+ args.arg_cflags = escape_strings(args.arg_cflags)
+ write_gn_args(args)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/config/zephyr/chip-module/zephyr/module.yml b/config/zephyr/chip-module/zephyr/module.yml
new file mode 100644
index 00000000000000..c09c9ea59e218a
--- /dev/null
+++ b/config/zephyr/chip-module/zephyr/module.yml
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2021 Project CHIP Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: connectedhomeip
+build:
+ cmake: .
+ kconfig: Kconfig
+ depends:
+ - openthread
diff --git a/docs/guides/infineon_p6_software_update.md b/docs/guides/infineon_p6_software_update.md
new file mode 100644
index 00000000000000..ae88abc5701260
--- /dev/null
+++ b/docs/guides/infineon_p6_software_update.md
@@ -0,0 +1,76 @@
+# Matter Software Update with Infineon P6 example applications
+
+The Over The Air (OTA) Software Update functionality can be added to any of the
+Infineon P6 example applications by passing the `chip_enable_ota_requestor=true`
+option to the build script.
+
+## Running the OTA Download scenario
+
+- An OTA Provider is a node that can respond to the OTA Requestors' queries
+ about available software updates and share the update packages with them. An
+ OTA Requestor is any node that needs to be updated and can communicate with
+ the OTA Provider to fetch applicable software updates. In the procedure
+ described below, the OTA Provider will be a Linux application and the
+ example running on the Infineon P6 board will work as the OTA Requestor.
+
+- On a Linux or Darwin platform build the chip-tool and the ota-provider-app
+ as follows:
+
+ ```
+ scripts/examples/gn_build_example.sh examples/chip-tool out/
+ scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false
+ ```
+
+- Build the P6 OTA Requestor application from the chip root dir:
+
+ $ ./examples//p6/ota_base_build.sh
+
+- Build the P6 OTA Update application from the chip root dir:
+
+ $ ./examples//p6/ota_update_build.sh
+
+* Additionally a pre-compiled bootloader must be flashed to the board using
+ [Cypress Programmer](https://softwaretools.infineon.com/tools/com.ifx.tb.tool.cypressprogrammer).
+ This image can be found at:
+
+ $ ./third_party/p6/p6_sdk/ota/matter-psoc6-mcuboot-bootloader.hex
+
+* In a terminal start the Provider app passing to it the path to the Matter
+ OTA file created in the previous step:(output of ota_update_build step)
+
+ ```
+ rm -r /tmp/chip_*
+ ./out/debug/chip-ota-provider-app -f chip-p6-lighting-example.ota
+ ```
+
+* In a separate terminal run the chip-tool commands to provision the Provider:
+
+ ```
+ ./out/chip-tool pairing onnetwork 1 20202021
+ ./out/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0
+ ```
+
+* If the application device had been previously commissioned press USER Button
+ 2 to factory-reset the device.
+
+* In the chip-tool terminal enter:
+
+ ```
+ ./out/chip-tool pairing ble-wifi 2 20202021 3840
+ ```
+
+* Once the commissioning process completes enter:
+
+ ```
+ ./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0
+ ```
+
+* The application device will connect to the Provider and start the image
+ download. Status of the transfer can be monitored in the OTA Provider
+ terminal. Once the image is downloaded the device will reboot into the
+ downloaded image.
+
+In order for the Provider to successfully serve the image to a device during the
+OTA Software Update process the softwareVersion parameter in the Provider config
+file must be greater than the CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION
+parameter set in the application's CHIPProjectConfig.h file.
diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/guides/nrfconnect_examples_configuration.md
index 236008b740f6c4..119852b3929a89 100644
--- a/docs/guides/nrfconnect_examples_configuration.md
+++ b/docs/guides/nrfconnect_examples_configuration.md
@@ -179,6 +179,12 @@ following Kconfig options:
- `CONFIG_OPENTHREAD_MTD`
- `CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT`
+The following Kconfig options can be used to tune Thread Sleepy End Device wake
+intervals:
+
+- `CONFIG_CHIP_SED_IDLE_INTERVAL`
+- `CONFIG_CHIP_SED_ACTIVE_INTERVAL`
+
**Commissioning with NFC support**
You can configure the Matter protocol to use an NFC tag for commissioning,
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 feff6233251481..0c3584f915158f 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
@@ -1461,6 +1461,7 @@ server cluster GeneralCommissioning = 48 {
struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
+ int16u maxCumulativeFailsafeSeconds = 1;
}
attribute access(write: administer) int64u breadcrumb = 0;
@@ -1728,74 +1729,6 @@ server cluster Groups = 4 {
command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
}
-server cluster IasZone = 1280 {
- enum IasEnrollResponseCode : ENUM8 {
- kSuccess = 0;
- kNotSupported = 1;
- kNoEnrollPermit = 2;
- kTooManyZones = 3;
- }
-
- enum IasZoneType : ENUM16 {
- kStandardCie = 0;
- kMotionSensor = 13;
- kContactSwitch = 21;
- kFireSensor = 40;
- kWaterSensor = 42;
- kGasSensor = 43;
- kPersonalEmergencyDevice = 44;
- kVibrationMovementSensor = 45;
- kRemoteControl = 271;
- kKeyFob = 277;
- kKeypad = 541;
- kStandardWarningDevice = 549;
- kGlassBreakSensor = 550;
- kCarbonMonoxideSensor = 551;
- kSecurityRepeater = 553;
- kInvalidZoneType = 65535;
- }
-
- bitmap IasZoneStatus : BITMAP16 {
- kAlarm1 = 0x1;
- kAlarm2 = 0x2;
- kTamper = 0x4;
- kBattery = 0x8;
- kSupervisionReports = 0x10;
- kRestoreReports = 0x20;
- kTrouble = 0x40;
- kAc = 0x80;
- kTest = 0x100;
- kBatteryDefect = 0x200;
- }
-
- readonly attribute enum8 zoneState = 0;
- readonly attribute enum16 zoneType = 1;
- readonly attribute bitmap16 zoneStatus = 2;
- attribute node_id iasCieAddress = 16;
- readonly attribute int8u zoneId = 17;
- readonly attribute bitmap32 featureMap = 65532;
- readonly attribute int16u clusterRevision = 65533;
-
- request struct ZoneEnrollResponseRequest {
- IasEnrollResponseCode enrollResponseCode = 0;
- INT8U zoneId = 1;
- }
-
- response struct ZoneStatusChangeNotification = 0 {
- IasZoneStatus zoneStatus = 0;
- BITMAP8 extendedStatus = 1;
- INT8U zoneId = 2;
- INT16U delay = 3;
- }
-
- response struct ZoneEnrollRequest = 1 {
- IasZoneType zoneType = 0;
- INT16U manufacturerCode = 1;
- }
-
- command ZoneEnrollResponse(ZoneEnrollResponseRequest): DefaultSuccess = 0;
-}
-
server cluster Identify = 3 {
enum IdentifyEffectIdentifier : ENUM8 {
kBlink = 0;
@@ -2170,6 +2103,7 @@ server cluster ModeSelect = 80 {
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
+ readonly attribute int8u manufacturerExtension = 4293984257;
request struct ChangeToModeRequest {
INT8U newMode = 0;
@@ -3431,11 +3365,15 @@ server cluster Thermostat = 513 {
attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27;
attribute access(write: manage) enum8 systemMode = 28;
readonly attribute enum8 thermostatRunningMode = 30;
- readonly attribute enum8 startOfWeek = 32;
- readonly attribute int8u numberOfWeeklyTransitions = 33;
- readonly attribute int8u numberOfDailyTransitions = 34;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
+
+ request struct SetpointRaiseLowerRequest {
+ SetpointAdjustMode mode = 0;
+ INT8S amount = 1;
+ }
+
+ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0;
}
server cluster ThermostatUserInterfaceConfiguration = 516 {
@@ -3774,14 +3712,7 @@ server cluster WindowCovering = 258 {
kTiltEncoderControlled = 0x40;
}
- bitmap Mode : BITMAP8 {
- kMotorDirectionReversed = 0x1;
- kCalibrationMode = 0x2;
- kMaintenanceMode = 0x4;
- kLedFeedback = 0x8;
- }
-
- bitmap WcFeature : BITMAP32 {
+ bitmap Feature : BITMAP32 {
kLift = 0x1;
kTilt = 0x2;
kPositionAwareLift = 0x4;
@@ -3789,13 +3720,20 @@ server cluster WindowCovering = 258 {
kPositionAwareTilt = 0x10;
}
- bitmap WcOperationalStatus : BITMAP8 {
+ bitmap Mode : BITMAP8 {
+ kMotorDirectionReversed = 0x1;
+ kCalibrationMode = 0x2;
+ kMaintenanceMode = 0x4;
+ kLedFeedback = 0x8;
+ }
+
+ bitmap OperationalStatus : BITMAP8 {
kGlobal = 0x3;
kLift = 0xC;
kTilt = 0x30;
}
- bitmap WcSafetyStatus : BITMAP16 {
+ bitmap SafetyStatus : BITMAP16 {
kRemoteLockout = 0x1;
kTamperDetection = 0x2;
kFailedCommunication = 0x4;
@@ -3820,7 +3758,7 @@ server cluster WindowCovering = 258 {
readonly attribute ConfigStatus configStatus = 7;
readonly attribute nullable Percent currentPositionLiftPercentage = 8;
readonly attribute nullable Percent currentPositionTiltPercentage = 9;
- readonly attribute bitmap8 operationalStatus = 10;
+ readonly attribute OperationalStatus operationalStatus = 10;
readonly attribute nullable Percent100ths targetPositionLiftPercent100ths = 11;
readonly attribute nullable Percent100ths targetPositionTiltPercent100ths = 12;
readonly attribute EndProductType endProductType = 13;
@@ -3831,7 +3769,7 @@ server cluster WindowCovering = 258 {
readonly attribute int16u installedOpenLimitTilt = 18;
readonly attribute int16u installedClosedLimitTilt = 19;
attribute access(write: manage) Mode mode = 23;
- readonly attribute bitmap16 safetyStatus = 26;
+ readonly attribute SafetyStatus safetyStatus = 26;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
@@ -4290,7 +4228,7 @@ endpoint 1 {
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute multiPressMax default = 2;
- ram attribute featureMap;
+ ram attribute featureMap default = 1;
ram attribute clusterRevision default = 1;
}
@@ -4324,6 +4262,7 @@ endpoint 1 {
callback attribute attributeList;
ram attribute featureMap default = 1;
ram attribute clusterRevision default = 1;
+ ram attribute manufacturerExtension default = 255;
}
server cluster DoorLock {
@@ -4445,10 +4384,7 @@ endpoint 1 {
ram attribute controlSequenceOfOperation default = 0x04;
ram attribute systemMode default = 0x01;
ram attribute thermostatRunningMode;
- ram attribute startOfWeek;
- ram attribute numberOfWeeklyTransitions default = 7;
- ram attribute numberOfDailyTransitions default = 4;
- ram attribute featureMap default = 0x002b;
+ ram attribute featureMap default = 0x0023;
ram attribute clusterRevision default = 5;
}
@@ -4586,16 +4522,6 @@ endpoint 1 {
ram attribute clusterRevision default = 3;
}
- server cluster IasZone {
- ram attribute zoneState;
- ram attribute zoneType;
- ram attribute zoneStatus;
- ram attribute iasCieAddress;
- ram attribute zoneId default = 0xff;
- ram attribute featureMap;
- ram attribute clusterRevision default = 2;
- }
-
server cluster WakeOnLan {
ram attribute MACAddress;
ram attribute featureMap;
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 99d0476bad246e..933f095975a3c4 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
@@ -18,7 +18,7 @@
"package": [
{
"pathRelativity": "relativeToZap",
- "path": "../../../src/app/zap-templates/zcl/zcl.json",
+ "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json",
"version": "ZCL Test Data",
"type": "zcl-properties"
},
@@ -12093,7 +12093,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": "1",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
@@ -12664,6 +12664,22 @@
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
+ },
+ {
+ "name": "ManufacturerExtension",
+ "code": 4293984257,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "255",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
}
]
},
@@ -14628,7 +14644,7 @@
"code": 0,
"mfgCode": null,
"source": "client",
- "incoming": 0,
+ "incoming": 1,
"outgoing": 1
},
{
@@ -14971,7 +14987,7 @@
"mfgCode": null,
"side": "server",
"type": "enum8",
- "included": 1,
+ "included": 0,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
@@ -14987,7 +15003,7 @@
"mfgCode": null,
"side": "server",
"type": "int8u",
- "included": 1,
+ "included": 0,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
@@ -15003,7 +15019,7 @@
"mfgCode": null,
"side": "server",
"type": "int8u",
- "included": 1,
+ "included": 0,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
@@ -15039,7 +15055,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0x002b",
+ "defaultValue": "0x0023",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake
index 2e9a5f87f257d1..d15dc800ae26ff 100755
--- a/examples/all-clusters-app/ameba/chip_main.cmake
+++ b/examples/all-clusters-app/ameba/chip_main.cmake
@@ -18,7 +18,8 @@ set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING
pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.ameba)
pw_set_backend(pw_trace pw_trace_tokenized)
@@ -36,7 +37,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(button_service
@@ -47,7 +48,7 @@ pw_proto_library(button_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(device_service
@@ -60,7 +61,7 @@ pw_proto_library(device_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(lighting_service
@@ -71,7 +72,7 @@ pw_proto_library(lighting_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(locking_service
@@ -82,7 +83,7 @@ pw_proto_library(locking_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(wifi_service
@@ -93,7 +94,7 @@ pw_proto_library(wifi_service
PREFIX
wifi_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
)
@@ -141,6 +142,8 @@ list(
${chip_dir}/examples/all-clusters-app/ameba/main/Globals.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/LEDWidget.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/DsoHack.cpp
+
+ ${chip_dir}/examples/providers/DeviceInfoProviderImpl.cpp
)
add_library(
@@ -181,6 +184,7 @@ target_include_directories(
${chip_dir}/examples/all-clusters-app/all-clusters-common/include
${chip_dir}/examples/all-clusters-app/ameba/main/include
${chip_dir}/examples/platform/ameba
+ ${chip_dir}/examples/providers
${chip_dir_output}/gen/include
${chip_dir}/src/include/
${chip_dir}/src/lib/
diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp
index 8dc7e1e9edb1ea..673f4d5238ee23 100644
--- a/examples/all-clusters-app/ameba/main/chipinterface.cpp
+++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp
@@ -22,6 +22,7 @@
#include "Globals.h"
#include "LEDWidget.h"
#include "chip_porting.h"
+#include
#include
#include
@@ -89,6 +90,7 @@ Identify gIdentify1 = {
#endif
static DeviceCallbacks EchoCallbacks;
+chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
static void InitServer(intptr_t context)
{
@@ -96,6 +98,8 @@ static void InitServer(intptr_t context)
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
chip::Server::GetInstance().Init(initParams);
+ gExampleDeviceInfoProvider.SetStorageDelegate(&Server::GetInstance().GetPersistentStorage());
+ chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider);
// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/args.gni b/examples/all-clusters-app/cc13x2x7_26x2x7/args.gni
index e7438af247a9c2..bd6e49f7871b4f 100644
--- a/examples/all-clusters-app/cc13x2x7_26x2x7/args.gni
+++ b/examples/all-clusters-app/cc13x2x7_26x2x7/args.gni
@@ -32,7 +32,7 @@ chip_enable_ota_requestor = false
chip_openthread_ftd = false
# Disable CHIP Logging
-#chip_progress_logging = false
+chip_progress_logging = false
chip_detail_logging = false
chip_automation_logging = false
diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt
index d7907d6ba7762f..0cf459d3e725af 100644
--- a/examples/all-clusters-app/esp32/CMakeLists.txt
+++ b/examples/all-clusters-app/esp32/CMakeLists.txt
@@ -53,7 +53,8 @@ include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cm
pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.esp32)
pw_set_backend(pw_trace pw_trace_tokenized)
diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt
index df3431cd088b9d..4f8db9d121402d 100644
--- a/examples/all-clusters-app/esp32/main/CMakeLists.txt
+++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt
@@ -78,7 +78,6 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server"
- "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
@@ -88,7 +87,6 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src"
- #${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-client
)
if (CONFIG_ENABLE_PW_RPC)
@@ -153,7 +151,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(button_service
@@ -164,7 +162,7 @@ pw_proto_library(button_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(descriptor_service
@@ -175,7 +173,7 @@ pw_proto_library(descriptor_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(device_service
@@ -188,7 +186,7 @@ pw_proto_library(device_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(lighting_service
@@ -199,7 +197,7 @@ pw_proto_library(lighting_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(locking_service
@@ -210,7 +208,7 @@ pw_proto_library(locking_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(wifi_service
@@ -221,7 +219,7 @@ pw_proto_library(wifi_service
PREFIX
wifi_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
)
diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
index ef87982f8eb5eb..246825835638eb 100644
--- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
+++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp
@@ -301,7 +301,9 @@ class EditAttributeListModel : public TouchesMatterStackModel
{
// update the operational status here for hardcoded endpoint 1
ESP_LOGI(TAG, "Operational status changed to : %d", n);
- app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, static_cast(n));
+ chip::BitFlags opStatus =
+ static_cast>(n);
+ app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, opStatus);
}
else if (name == "Bat remaining")
{
@@ -676,7 +678,9 @@ void SetupPretendDevices()
AddAttribute("Current Tilt", "5");
app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Set(1, static_cast(5 * 100));
AddAttribute("Opr Status", "0");
- app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, static_cast(0));
+ chip::BitFlags opStatus =
+ static_cast>(0);
+ app::Clusters::WindowCovering::Attributes::OperationalStatus::Set(1, opStatus);
AddDevice("Battery");
AddEndpoint("1");
diff --git a/examples/all-clusters-app/linux/AppOptions.cpp b/examples/all-clusters-app/linux/AppOptions.cpp
index c3f80a2302a484..ef42660972f8d9 100644
--- a/examples/all-clusters-app/linux/AppOptions.cpp
+++ b/examples/all-clusters-app/linux/AppOptions.cpp
@@ -21,6 +21,8 @@
#include
#include
+using namespace chip::ArgParser;
+
using chip::ArgParser::OptionDef;
using chip::ArgParser::OptionSet;
using chip::ArgParser::PrintArgError;
@@ -55,8 +57,8 @@ bool AppOptions::HandleOptions(const char * program, OptionSet * options, int id
OptionSet * AppOptions::GetOptions()
{
static OptionDef optionsDef[] = {
- { "dac_provider", chip::ArgParser::kArgumentRequired, kOptionDacProviderFilePath },
- { "min_commissioning_timeout", chip::ArgParser::kArgumentRequired, kOptionMinCommissioningTimeout },
+ { "dac_provider", kArgumentRequired, kOptionDacProviderFilePath },
+ { "min_commissioning_timeout", kArgumentRequired, kOptionMinCommissioningTimeout },
{},
};
diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp
index 129180f7ac1be5..d4d12553df70e7 100644
--- a/examples/all-clusters-app/linux/main-common.cpp
+++ b/examples/all-clusters-app/linux/main-common.cpp
@@ -25,6 +25,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -147,6 +148,52 @@ void HandleGeneralFaultEvent(intptr_t arg)
}
}
+/**
+ * Should be called when a switch operation takes place on the Node.
+ */
+void HandleSwitchEvent(intptr_t arg)
+{
+ uint32_t eventId = static_cast(arg);
+
+ EndpointId endpoint = 1;
+ uint8_t newPosition = 20;
+ uint8_t previousPosition = 10;
+ uint8_t count = 3;
+
+ if (eventId == Clusters::Switch::Events::SwitchLatched::Id)
+ {
+ Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition);
+ }
+ else if (eventId == Clusters::Switch::Events::InitialPress::Id)
+ {
+ Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition);
+ }
+ else if (eventId == Clusters::Switch::Events::LongPress::Id)
+ {
+ Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition);
+ }
+ else if (eventId == Clusters::Switch::Events::ShortRelease::Id)
+ {
+ Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition);
+ }
+ else if (eventId == Clusters::Switch::Events::LongRelease::Id)
+ {
+ Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition);
+ }
+ else if (eventId == Clusters::Switch::Events::MultiPressOngoing::Id)
+ {
+ Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count);
+ }
+ else if (eventId == Clusters::Switch::Events::MultiPressComplete::Id)
+ {
+ Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, newPosition, count);
+ }
+ else
+ {
+ ChipLogError(DeviceLayer, "Unknow event ID:%d", eventId);
+ }
+}
+
// when the shell is enabled, don't intercept signals since it prevents the user from
// using expected commands like CTRL-C to quit the application. (see issue #17845)
// We should stop using signals for those faults, and move to a different notification
@@ -223,6 +270,42 @@ void OnGeneralFaultSignalHandler(int signum)
PlatformMgr().ScheduleWork(HandleGeneralFaultEvent, static_cast(eventId));
}
+void OnSwitchSignalHandler(int signum)
+{
+ ChipLogDetail(DeviceLayer, "Caught signal %d", signum);
+
+ uint32_t eventId;
+ switch (signum)
+ {
+ case SIGTSTP:
+ eventId = Clusters::Switch::Events::SwitchLatched::Id;
+ break;
+ case SIGSTOP:
+ eventId = Clusters::Switch::Events::InitialPress::Id;
+ break;
+ case SIGTTOU:
+ eventId = Clusters::Switch::Events::LongPress::Id;
+ break;
+ case SIGWINCH:
+ eventId = Clusters::Switch::Events::ShortRelease::Id;
+ break;
+ case SIGQUIT:
+ eventId = Clusters::Switch::Events::LongRelease::Id;
+ break;
+ case SIGFPE:
+ eventId = Clusters::Switch::Events::MultiPressOngoing::Id;
+ break;
+ case SIGPIPE:
+ eventId = Clusters::Switch::Events::MultiPressComplete::Id;
+ break;
+ default:
+ ChipLogError(NotSpecified, "Unhandled signal: Should never happens");
+ chipDie();
+ break;
+ }
+
+ PlatformMgr().ScheduleWork(HandleSwitchEvent, static_cast(eventId));
+}
void SetupSignalHandlers()
{
// sigaction is not used here because Tsan interceptors seems to
@@ -238,6 +321,13 @@ void SetupSignalHandlers()
signal(SIGUSR2, OnGeneralFaultSignalHandler);
signal(SIGHUP, OnGeneralFaultSignalHandler);
signal(SIGTTIN, OnGeneralFaultSignalHandler);
+ signal(SIGTSTP, OnSwitchSignalHandler);
+ signal(SIGSTOP, OnSwitchSignalHandler);
+ signal(SIGTTOU, OnSwitchSignalHandler);
+ signal(SIGWINCH, OnSwitchSignalHandler);
+ signal(SIGQUIT, OnSwitchSignalHandler);
+ signal(SIGFPE, OnSwitchSignalHandler);
+ signal(SIGPIPE, OnSwitchSignalHandler);
}
#endif // !defined(ENABLE_CHIP_SHELL)
diff --git a/examples/all-clusters-app/nrfconnect/README.md b/examples/all-clusters-app/nrfconnect/README.md
index 29ca4bcb7e4648..101c286e304088 100644
--- a/examples/all-clusters-app/nrfconnect/README.md
+++ b/examples/all-clusters-app/nrfconnect/README.md
@@ -14,7 +14,8 @@ certification of a Matter device communicating over a low-power, 802.15.4 Thread
network.
The example behaves as a Matter accessory, that is a device that can be paired
-into an existing Matter network and can be controlled by this network.
+into an existing Matter network and can be controlled by this network. The
+device works as a Thread Minimal End Device.
@@ -294,22 +295,6 @@ features like logs and command-line interface, run the following command:
Remember to replace _build-target_ with the build target name of the Nordic
Semiconductor's kit you own.
-### Building with low-power configuration
-
-You can build the example using the low-power configuration, which enables
-Thread's Sleepy End Device mode and disables debug features, such as the UART
-console or the **LED 1** usage.
-
-To build for the low-power configuration, run the following command with
-_build-target_ replaced with the build target name of the Nordic Semiconductor's
-kit you own (for example `nrf52840dk_nrf52840`):
-
- $ west build -b build-target -- -DOVERLAY_CONFIG=overlay-low_power.conf
-
-For example, use the following command for `nrf52840dk_nrf52840`:
-
- $ west build -b nrf52840dk_nrf52840 -- -DOVERLAY_CONFIG=overlay-low_power.conf
-
### Building with Device Firmware Upgrade support
Support for DFU using Matter OTA is disabled by default.
diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp
index 29391063b1eebb..106c3957f4c5af 100644
--- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp
+++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp
@@ -29,6 +29,7 @@
#include
#include
#include
+#include
#include
#include
@@ -63,6 +64,40 @@ k_timer sFunctionTimer;
chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider;
+constexpr EndpointId kIdentifyEndpointId = 1;
+
+void OnIdentifyTriggerEffect(Identify * identify)
+{
+ ChipLogProgress(Zcl, "OnIdentifyTriggerEffect");
+ switch (identify->mCurrentEffectIdentifier)
+ {
+ case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK:
+ ChipLogProgress(Zcl, "Effect: EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK");
+ break;
+ case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE:
+ ChipLogProgress(Zcl, "Effect: EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE");
+ break;
+ case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY:
+ ChipLogProgress(Zcl, "Effect: EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY");
+ break;
+ case EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE:
+ ChipLogProgress(Zcl, "Effect: EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_CHANNEL_CHANGE");
+ break;
+ default:
+ ChipLogProgress(Zcl, "Effect: No identifier effect");
+ break;
+ }
+ return;
+}
+
+Identify sIdentify = {
+ chip::EndpointId{ kIdentifyEndpointId },
+ [](Identify *) { ChipLogProgress(Zcl, "OnIdentifyStart"); },
+ [](Identify *) { ChipLogProgress(Zcl, "OnIdentifyStop"); },
+ EMBER_ZCL_IDENTIFY_IDENTIFY_TYPE_NONE,
+ OnIdentifyTriggerEffect,
+};
+
} // namespace
constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE;
diff --git a/examples/all-clusters-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/nrfconnect/main/include/CHIPProjectConfig.h
index 7a2941f28621df..9fea28ec9fde12 100644
--- a/examples/all-clusters-app/nrfconnect/main/include/CHIPProjectConfig.h
+++ b/examples/all-clusters-app/nrfconnect/main/include/CHIPProjectConfig.h
@@ -29,5 +29,3 @@
// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
-
-#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL 2000_ms32
diff --git a/examples/all-clusters-app/nrfconnect/overlay-low_power.conf b/examples/all-clusters-app/nrfconnect/overlay-low_power.conf
deleted file mode 100644
index c962425f6ef937..00000000000000
--- a/examples/all-clusters-app/nrfconnect/overlay-low_power.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2022 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.
-#
-
-# Enable MTD Sleepy End Device
-CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y
-
-# Disable UART console
-CONFIG_SHELL=n
-CONFIG_LOG=n
-CONFIG_UART_CONSOLE=n
-CONFIG_SERIAL=n
-
-# Suspend devices when the CPU goes to sleep
-CONFIG_PM_DEVICE=y
-
-# Disable auxiliary state LEDs
-CONFIG_STATE_LEDS=n
diff --git a/examples/all-clusters-app/p6/BUILD.gn b/examples/all-clusters-app/p6/BUILD.gn
index 5b99c3f3b3b6f6..59ae7f12293bac 100644
--- a/examples/all-clusters-app/p6/BUILD.gn
+++ b/examples/all-clusters-app/p6/BUILD.gn
@@ -17,6 +17,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/p6.gni")
import("${build_root}/config/defaults.gni")
+import("${chip_root}/src/platform/device.gni")
import("${p6_sdk_build_root}/p6_executable.gni")
import("${p6_sdk_build_root}/p6_sdk.gni")
@@ -34,6 +35,50 @@ declare_args() {
# Monitor & log memory usage at runtime.
enable_heap_monitoring = false
+
+ # Build update app
+ build_update_image = false
+}
+
+config("p6_ota_config") {
+ ldflags = [ "-T/" + rebase_path(
+ "${chip_root}/third_party/p6/p6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld",
+ "/",
+ "${p6_project_dir}") ]
+
+ ldflags += [ "-Wl,--defsym,MCUBOOT_HEADER_SIZE=0x400,--defsym,MCUBOOT_BOOTLOADER_SIZE=0x18000,--defsym,CY_BOOT_PRIMARY_1_SIZE=0x1C0000" ]
+
+ defines = [
+ "P6_OTA",
+ "OTA_SUPPORT ",
+ "OTA_USE_EXTERNAL_FLASH",
+ "CY_BOOT_USE_EXTERNAL_FLASH",
+ "MCUBOOT_HEADER_SIZE=0x400",
+ "MCUBOOT_MAX_IMG_SECTORS=3584",
+ "CY_BOOT_SCRATCH_SIZE=0x00004000",
+ "MCUBOOT_BOOTLOADER_SIZE=0x00018000",
+ "CY_BOOT_BOOTLOADER_SIZE=0x00018000",
+ "CY_BOOT_PRIMARY_1_START=0x00018000",
+ "CY_BOOT_PRIMARY_1_SIZE=0x1C0000",
+ "CY_BOOT_SECONDARY_1_START=0x00000000",
+ "CY_BOOT_SECONDARY_1_SIZE=0x001C0000",
+ "CY_FLASH_ERASE_VALUE=0xFF",
+ "MCUBOOT_IMAGE_NUMBER=1",
+ "MCUBOOT_SLOT_SIZE=0x1C0000",
+ "MCUBOOT_SCRATCH_SIZE=0x4000",
+ "MCUBOOT_SECTOR_SIZE = 512",
+ "APP_VERSION_MAJOR=1",
+ "APP_VERSION_MINOR=0",
+ "APP_VERSION_BUILD=0",
+ "MCUBOOT_OVERWRITE_ONLY",
+ "CY_ENABLE_XIP_PROGRAM",
+ ]
+
+ if (build_update_image) {
+ defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=2" ]
+ } else {
+ defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=1" ]
+ }
}
p6_sdk_sources("all_clusters_app_sdk_sources") {
@@ -52,6 +97,27 @@ p6_sdk_sources("all_clusters_app_sdk_sources") {
sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ]
public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ]
+
+ if (chip_enable_ota_requestor) {
+ sources += [
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/bootutil/src/bootutil_misc.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_flash_map.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_flash_psoc6.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_smif_psoc6.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/mem_config/mem_config_sfdp.c",
+ ]
+ include_dirs += [
+ "${chip_root}/third_party/p6/p6_sdk/ota/config",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/mem_config/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/include/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/include/flash_map_backend/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/sysflash/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/bootutil/include",
+ ]
+ public_configs += [ ":p6_ota_config" ]
+ }
}
p6_executable("clusters_app") {
diff --git a/examples/all-clusters-app/p6/README.md b/examples/all-clusters-app/p6/README.md
index 25b8e53b04d697..1a859b7944dd79 100644
--- a/examples/all-clusters-app/p6/README.md
+++ b/examples/all-clusters-app/p6/README.md
@@ -12,6 +12,7 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- [Setting up chip-tool](#setting-up-chip-tool)
- [Commissioning over BLE](#commissioning-over-ble)
- [Notes](#notes)
+ - [OTA Software Update](#ota-software-update)
@@ -134,3 +135,9 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode.
sudo btmgmt -i hci0 bredr off
sudo btmgmt -i hci0 power on
```
+
+## OTA Software Update
+
+For the description of Software Update process with infineon P6 example
+applications see
+[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md)
diff --git a/examples/all-clusters-app/p6/include/AppTask.h b/examples/all-clusters-app/p6/include/AppTask.h
index a5f606cc451b85..5bb9a9163225bf 100644
--- a/examples/all-clusters-app/p6/include/AppTask.h
+++ b/examples/all-clusters-app/p6/include/AppTask.h
@@ -46,6 +46,7 @@ class AppTask
static void LightActionEventHandler(AppEvent * aEvent);
void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction);
void PostEvent(const AppEvent * event);
+ void InitOTARequestor();
private:
friend AppTask & GetAppTask(void);
diff --git a/examples/all-clusters-app/p6/ota_base_build.sh b/examples/all-clusters-app/p6/ota_base_build.sh
new file mode 100755
index 00000000000000..61bb808e3c1412
--- /dev/null
+++ b/examples/all-clusters-app/p6/ota_base_build.sh
@@ -0,0 +1,8 @@
+OUT_DIR=out/all-clusters-app/
+ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
+
+scripts/examples/gn_p6_example.sh examples/all-clusters-app/p6 "$OUT_DIR" chip_enable_ota_requestor=true
+
+mv "$OUT_DIR"/chip-p6-clusters-example.hex "$OUT_DIR"/chip-p6-clusters-example.unsigned.hex
+
+./"$ANYCLOUD_DIR"/scripts/sign_script.bash "$OUT_DIR"/ chip-p6-clusters-example python3 arm-none-eabi-objcopy "-O ihex" "" "$ANYCLOUD_DIR"/source/mcuboot/scripts/ imgtool_v1.7.0/imgtool.py create 0xFF 0x400 3584 1.0.0 0x00018000 0x001C0000 arm-none-eabi-objcopy ""
diff --git a/examples/all-clusters-app/p6/ota_update_build.sh b/examples/all-clusters-app/p6/ota_update_build.sh
new file mode 100755
index 00000000000000..58f870977fd97b
--- /dev/null
+++ b/examples/all-clusters-app/p6/ota_update_build.sh
@@ -0,0 +1,14 @@
+OUT_DIR=out/all-clusters-app-ota
+ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
+
+./scripts/examples/gn_p6_example.sh examples/all-clusters-app/p6 "$OUT_DIR" chip_enable_ota_requestor=true build_update_image=true
+
+mv "$OUT_DIR"/chip-p6-clusters-example.hex "$OUT_DIR"/chip-p6-clusters-example.unsigned.hex
+
+./"$ANYCLOUD_DIR"/scripts/sign_script.bash "$OUT_DIR"/ chip-p6-clusters-example python3 arm-none-eabi-objcopy "-O ihex" "" "$ANYCLOUD_DIR"/source/mcuboot/scripts/ imgtool_v1.7.0/imgtool.py sign 0xFF 0x400 3584 1.0.0 0x00018000 0x001C0000 arm-none-eabi-objcopy "-k $ANYCLOUD_DIR/source/mcuboot/keys/cypress-test-ec-p256.pem"
+
+if [ -f "$OUT_DIR"/chip-p6-clusters-example.ota ]; then
+ rm "$OUT_DIR"/chip-p6-clusters-example.ota
+fi
+
+src/app/ota_image_tool.py create -v 0xFFF1 -p 0x8000 -vn 2 -vs "2.0" -da sha256 "$OUT_DIR"/chip-p6-clusters-example.bin "$OUT_DIR"/chip-p6-clusters-example.ota
diff --git a/examples/all-clusters-app/p6/src/AppTask.cpp b/examples/all-clusters-app/p6/src/AppTask.cpp
index d58c7a3f108c56..c8717c30740357 100644
--- a/examples/all-clusters-app/p6/src/AppTask.cpp
+++ b/examples/all-clusters-app/p6/src/AppTask.cpp
@@ -43,6 +43,33 @@
#include
#include
+/* OTA related includes */
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+#include
+#include
+#include
+#include
+#include
+extern "C" {
+#include "cy_smif_psoc6.h"
+}
+using chip::BDXDownloader;
+using chip::CharSpan;
+using chip::DefaultOTARequestor;
+using chip::FabricIndex;
+using chip::GetRequestorInstance;
+using chip::NodeId;
+using chip::OTADownloader;
+using chip::OTAImageProcessorImpl;
+using chip::System::Layer;
+
+using namespace ::chip;
+using namespace chip::TLV;
+using namespace ::chip::Credentials;
+using namespace ::chip::DeviceLayer;
+using namespace ::chip::System;
+
+#endif
#define APP_EVENT_QUEUE_SIZE 10
#define APP_TASK_STACK_SIZE (4096)
#define APP_WAIT_LOOP 1000
@@ -61,6 +88,15 @@ StaticQueue_t sAppEventQueueStruct;
StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)];
StaticTask_t appTaskStruct;
+
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+DefaultOTARequestor gRequestorCore;
+DefaultOTARequestorStorage gRequestorStorage;
+DefaultOTARequestorDriver gRequestorUser;
+BDXDownloader gDownloader;
+OTAImageProcessorImpl gImageProcessor;
+#endif
+
} // namespace
using namespace ::chip;
@@ -96,6 +132,9 @@ static void InitServer(intptr_t context)
// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ GetAppTask().InitOTARequestor();
+#endif
}
CHIP_ERROR AppTask::StartAppTask()
@@ -114,7 +153,14 @@ CHIP_ERROR AppTask::StartAppTask()
CHIP_ERROR AppTask::Init()
{
CHIP_ERROR err = CHIP_NO_ERROR;
-
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ int rc = boot_set_confirmed();
+ if (rc != 0)
+ {
+ P6_LOG("boot_set_confirmed failed");
+ appError(CHIP_ERROR_WELL_UNINITIALIZED);
+ }
+#endif
// Register the callback to init the MDNS server when connectivity is available
PlatformMgr().AddEventHandler(
[](const ChipDeviceEvent * event, intptr_t arg) {
@@ -264,3 +310,39 @@ bool lowPowerClusterSleep()
{
return true;
}
+
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+void AppTask::InitOTARequestor()
+{
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ SetRequestorInstance(&gRequestorCore);
+ gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
+ gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader);
+ gImageProcessor.SetOTADownloader(&gDownloader);
+ gDownloader.SetImageProcessorDelegate(&gImageProcessor);
+ gRequestorUser.Init(&gRequestorCore, &gImageProcessor);
+
+ uint32_t savedSoftwareVersion;
+ err = ConfigurationMgr().GetSoftwareVersion(savedSoftwareVersion);
+ if (err != CHIP_NO_ERROR)
+ {
+ P6_LOG("Can't get saved software version");
+ appError(err);
+ }
+
+ if (savedSoftwareVersion != CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION)
+ {
+ ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+
+ P6_LOG("Confirming update to version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+ chip::OTARequestorInterface * requestor = chip::GetRequestorInstance();
+ if (requestor != nullptr)
+ {
+ requestor->NotifyUpdateApplied();
+ }
+ }
+
+ P6_LOG("Current Software Version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+ P6_LOG("Current Firmware Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
+}
+#endif
diff --git a/examples/all-clusters-app/p6/src/main.cpp b/examples/all-clusters-app/p6/src/main.cpp
index a8f415ffa3744d..d365f9ff8220d4 100644
--- a/examples/all-clusters-app/p6/src/main.cpp
+++ b/examples/all-clusters-app/p6/src/main.cpp
@@ -35,6 +35,7 @@
#include
#include "AppConfig.h"
+#include "cyhal_wdt.h"
#include "init_p6Platform.h"
#include
@@ -131,7 +132,12 @@ static void main_task(void * pvParameters)
int main(void)
{
init_p6Platform();
-
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ // Clear watchdog timer (started by bootloader) so that it doesn't trigger a reset
+ cyhal_wdt_t wdt_obj;
+ cyhal_wdt_init(&wdt_obj, cyhal_wdt_get_max_timeout_ms());
+ cyhal_wdt_free(&wdt_obj);
+#endif
#ifdef HEAP_MONITORING
MemMonitoring::startHeapMonitoring();
#endif
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index de169f34582b4d..98c16da49266e7 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -1090,6 +1090,7 @@ server cluster GeneralCommissioning = 48 {
struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
+ int16u maxCumulativeFailsafeSeconds = 1;
}
attribute access(write: administer) int64u breadcrumb = 0;
@@ -3174,14 +3175,7 @@ server cluster WindowCovering = 258 {
kTiltEncoderControlled = 0x40;
}
- bitmap Mode : BITMAP8 {
- kMotorDirectionReversed = 0x1;
- kCalibrationMode = 0x2;
- kMaintenanceMode = 0x4;
- kLedFeedback = 0x8;
- }
-
- bitmap WcFeature : BITMAP32 {
+ bitmap Feature : BITMAP32 {
kLift = 0x1;
kTilt = 0x2;
kPositionAwareLift = 0x4;
@@ -3189,13 +3183,20 @@ server cluster WindowCovering = 258 {
kPositionAwareTilt = 0x10;
}
- bitmap WcOperationalStatus : BITMAP8 {
+ bitmap Mode : BITMAP8 {
+ kMotorDirectionReversed = 0x1;
+ kCalibrationMode = 0x2;
+ kMaintenanceMode = 0x4;
+ kLedFeedback = 0x8;
+ }
+
+ bitmap OperationalStatus : BITMAP8 {
kGlobal = 0x3;
kLift = 0xC;
kTilt = 0x30;
}
- bitmap WcSafetyStatus : BITMAP16 {
+ bitmap SafetyStatus : BITMAP16 {
kRemoteLockout = 0x1;
kTamperDetection = 0x2;
kFailedCommunication = 0x4;
@@ -3212,7 +3213,7 @@ server cluster WindowCovering = 258 {
readonly attribute Type type = 0;
readonly attribute ConfigStatus configStatus = 7;
- readonly attribute bitmap8 operationalStatus = 10;
+ readonly attribute OperationalStatus operationalStatus = 10;
readonly attribute EndProductType endProductType = 13;
attribute access(write: manage) Mode mode = 23;
readonly attribute bitmap32 featureMap = 65532;
diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake
index 6d40ce5fe09e7c..97884c6d92335f 100755
--- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake
+++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake
@@ -17,7 +17,8 @@ include(${pigweed_dir}/pw_protobuf_compiler/proto.cmake)
set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING "" FORCE)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.ameba)
pw_set_backend(pw_trace pw_trace_tokenized)
@@ -35,7 +36,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(button_service
@@ -46,7 +47,7 @@ pw_proto_library(button_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(device_service
@@ -59,7 +60,7 @@ pw_proto_library(device_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(lighting_service
@@ -70,7 +71,7 @@ pw_proto_library(lighting_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(locking_service
@@ -81,7 +82,7 @@ pw_proto_library(locking_service
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(wifi_service
@@ -92,7 +93,7 @@ pw_proto_library(wifi_service
PREFIX
wifi_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
STRIP_PREFIX
${chip_dir}/examples/common/pigweed/protos
)
diff --git a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt
index d6fd8adda8185f..6587b7e6fd7535 100644
--- a/examples/all-clusters-minimal-app/esp32/CMakeLists.txt
+++ b/examples/all-clusters-minimal-app/esp32/CMakeLists.txt
@@ -51,7 +51,8 @@ get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH)
include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cmake)
pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.esp32)
pw_set_backend(pw_trace pw_trace_tokenized)
diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt
index 1559ea3d1d60a8..19108d27dab518 100644
--- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt
+++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt
@@ -87,7 +87,6 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src"
- #${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-client
)
if (CONFIG_ENABLE_PW_RPC)
@@ -152,7 +151,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(button_service
@@ -163,7 +162,7 @@ pw_proto_library(button_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(descriptor_service
@@ -174,7 +173,7 @@ pw_proto_library(descriptor_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(device_service
@@ -187,7 +186,7 @@ pw_proto_library(device_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(lighting_service
@@ -198,7 +197,7 @@ pw_proto_library(lighting_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(locking_service
@@ -209,7 +208,7 @@ pw_proto_library(locking_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(wifi_service
@@ -220,7 +219,7 @@ pw_proto_library(wifi_service
PREFIX
wifi_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
)
diff --git a/examples/all-clusters-minimal-app/nrfconnect/README.md b/examples/all-clusters-minimal-app/nrfconnect/README.md
index 919fb768d5fd51..909b3d5b8861cd 100644
--- a/examples/all-clusters-minimal-app/nrfconnect/README.md
+++ b/examples/all-clusters-minimal-app/nrfconnect/README.md
@@ -14,7 +14,8 @@ certification of a Matter device communicating over a low-power, 802.15.4 Thread
network.
The example behaves as a Matter accessory, that is a device that can be paired
-into an existing Matter network and can be controlled by this network.
+into an existing Matter network and can be controlled by this network. The
+device works as a Thread Minimal End Device.
@@ -294,22 +295,6 @@ features like logs and command-line interface, run the following command:
Remember to replace _build-target_ with the build target name of the Nordic
Semiconductor's kit you own.
-### Building with low-power configuration
-
-You can build the example using the low-power configuration, which enables
-Thread's Sleepy End Device mode and disables debug features, such as the UART
-console or the **LED 1** usage.
-
-To build for the low-power configuration, run the following command with
-_build-target_ replaced with the build target name of the Nordic Semiconductor's
-kit you own (for example `nrf52840dk_nrf52840`):
-
- $ west build -b build-target -- -DOVERLAY_CONFIG=overlay-low_power.conf
-
-For example, use the following command for `nrf52840dk_nrf52840`:
-
- $ west build -b nrf52840dk_nrf52840 -- -DOVERLAY_CONFIG=overlay-low_power.conf
-
### Building with Device Firmware Upgrade support
Support for DFU using Matter OTA is disabled by default.
diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/nrfconnect/main/include/CHIPProjectConfig.h
index 7a2941f28621df..9fea28ec9fde12 100644
--- a/examples/all-clusters-minimal-app/nrfconnect/main/include/CHIPProjectConfig.h
+++ b/examples/all-clusters-minimal-app/nrfconnect/main/include/CHIPProjectConfig.h
@@ -29,5 +29,3 @@
// Use a default pairing code if one hasn't been provisioned in flash.
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
-
-#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL 2000_ms32
diff --git a/examples/all-clusters-minimal-app/nrfconnect/overlay-low_power.conf b/examples/all-clusters-minimal-app/nrfconnect/overlay-low_power.conf
deleted file mode 100644
index c962425f6ef937..00000000000000
--- a/examples/all-clusters-minimal-app/nrfconnect/overlay-low_power.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 2022 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.
-#
-
-# Enable MTD Sleepy End Device
-CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y
-
-# Disable UART console
-CONFIG_SHELL=n
-CONFIG_LOG=n
-CONFIG_UART_CONSOLE=n
-CONFIG_SERIAL=n
-
-# Suspend devices when the CPU goes to sleep
-CONFIG_PM_DEVICE=y
-
-# Disable auxiliary state LEDs
-CONFIG_STATE_LEDS=n
diff --git a/examples/all-clusters-minimal-app/p6/BUILD.gn b/examples/all-clusters-minimal-app/p6/BUILD.gn
index dabbb1d5bf7a25..a9b88c2125b219 100644
--- a/examples/all-clusters-minimal-app/p6/BUILD.gn
+++ b/examples/all-clusters-minimal-app/p6/BUILD.gn
@@ -17,6 +17,7 @@ import("//build_overrides/chip.gni")
import("//build_overrides/p6.gni")
import("${build_root}/config/defaults.gni")
+import("${chip_root}/src/platform/device.gni")
import("${p6_sdk_build_root}/p6_executable.gni")
import("${p6_sdk_build_root}/p6_sdk.gni")
@@ -34,6 +35,50 @@ declare_args() {
# Monitor & log memory usage at runtime.
enable_heap_monitoring = false
+
+ # Build update app
+ build_update_image = false
+}
+
+config("p6_ota_config") {
+ ldflags = [ "-T/" + rebase_path(
+ "${chip_root}/third_party/p6/p6_sdk/ota/cy8c6xxa_cm4_dual_ota_int.ld",
+ "/",
+ "${p6_project_dir}") ]
+
+ ldflags += [ "-Wl,--defsym,MCUBOOT_HEADER_SIZE=0x400,--defsym,MCUBOOT_BOOTLOADER_SIZE=0x18000,--defsym,CY_BOOT_PRIMARY_1_SIZE=0x1C0000" ]
+
+ defines = [
+ "P6_OTA",
+ "OTA_SUPPORT ",
+ "OTA_USE_EXTERNAL_FLASH",
+ "CY_BOOT_USE_EXTERNAL_FLASH",
+ "MCUBOOT_HEADER_SIZE=0x400",
+ "MCUBOOT_MAX_IMG_SECTORS=3584",
+ "CY_BOOT_SCRATCH_SIZE=0x00004000",
+ "MCUBOOT_BOOTLOADER_SIZE=0x00018000",
+ "CY_BOOT_BOOTLOADER_SIZE=0x00018000",
+ "CY_BOOT_PRIMARY_1_START=0x00018000",
+ "CY_BOOT_PRIMARY_1_SIZE=0x1C0000",
+ "CY_BOOT_SECONDARY_1_START=0x00000000",
+ "CY_BOOT_SECONDARY_1_SIZE=0x001C0000",
+ "CY_FLASH_ERASE_VALUE=0xFF",
+ "MCUBOOT_IMAGE_NUMBER=1",
+ "MCUBOOT_SLOT_SIZE=0x1C0000",
+ "MCUBOOT_SCRATCH_SIZE=0x4000",
+ "MCUBOOT_SECTOR_SIZE = 512",
+ "APP_VERSION_MAJOR=1",
+ "APP_VERSION_MINOR=0",
+ "APP_VERSION_BUILD=0",
+ "MCUBOOT_OVERWRITE_ONLY",
+ "CY_ENABLE_XIP_PROGRAM",
+ ]
+
+ if (build_update_image) {
+ defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=2" ]
+ } else {
+ defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=1" ]
+ }
}
p6_sdk_sources("all_clusters_app_sdk_sources") {
@@ -52,6 +97,27 @@ p6_sdk_sources("all_clusters_app_sdk_sources") {
sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ]
public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ]
+
+ if (chip_enable_ota_requestor) {
+ sources += [
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/bootutil/src/bootutil_misc.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_flash_map.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_flash_psoc6.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/cy_smif_psoc6.c",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/mem_config/mem_config_sfdp.c",
+ ]
+ include_dirs += [
+ "${chip_root}/third_party/p6/p6_sdk/ota/config",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/mem_config/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/include/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/cy_flash_pal/include/flash_map_backend/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/sysflash/",
+ "${chip_root}/third_party/p6/p6_sdk/libs/anycloud-ota/source/mcuboot/bootutil/include",
+ ]
+ public_configs += [ ":p6_ota_config" ]
+ }
}
p6_executable("clusters_minimal_app") {
diff --git a/examples/all-clusters-minimal-app/p6/README.md b/examples/all-clusters-minimal-app/p6/README.md
index a3d673a6f8d615..c6b752d209a6ca 100644
--- a/examples/all-clusters-minimal-app/p6/README.md
+++ b/examples/all-clusters-minimal-app/p6/README.md
@@ -12,6 +12,7 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- [Setting up chip-tool](#setting-up-chip-tool)
- [Commissioning over BLE](#commissioning-over-ble)
- [Notes](#notes)
+ - [OTA Software Update](#ota-software-update)
@@ -134,3 +135,9 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode.
sudo btmgmt -i hci0 bredr off
sudo btmgmt -i hci0 power on
```
+
+## OTA Software Update
+
+For the description of Software Update process with infineon P6 example
+applications see
+[Infineon P6 OTA Software Update](../../../docs/guides/infineon_p6_software_update.md)
diff --git a/examples/all-clusters-minimal-app/p6/include/AppTask.h b/examples/all-clusters-minimal-app/p6/include/AppTask.h
index a5f606cc451b85..5bb9a9163225bf 100644
--- a/examples/all-clusters-minimal-app/p6/include/AppTask.h
+++ b/examples/all-clusters-minimal-app/p6/include/AppTask.h
@@ -46,6 +46,7 @@ class AppTask
static void LightActionEventHandler(AppEvent * aEvent);
void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction);
void PostEvent(const AppEvent * event);
+ void InitOTARequestor();
private:
friend AppTask & GetAppTask(void);
diff --git a/examples/all-clusters-minimal-app/p6/ota_base_build.sh b/examples/all-clusters-minimal-app/p6/ota_base_build.sh
new file mode 100755
index 00000000000000..c49fad50303fdf
--- /dev/null
+++ b/examples/all-clusters-minimal-app/p6/ota_base_build.sh
@@ -0,0 +1,8 @@
+OUT_DIR=out/all-clusters-minimal-app/
+ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
+
+scripts/examples/gn_p6_example.sh examples/all-clusters-minimal-app/p6 "$OUT_DIR" chip_enable_ota_requestor=true
+
+mv "$OUT_DIR"/chip-p6-clusters-minimal-example.hex "$OUT_DIR"/chip-p6-clusters-minimal-example.unsigned.hex
+
+./"$ANYCLOUD_DIR"/scripts/sign_script.bash "$OUT_DIR"/ chip-p6-clusters-minimal-example python3 arm-none-eabi-objcopy "-O ihex" "" "$ANYCLOUD_DIR"/source/mcuboot/scripts/ imgtool_v1.7.0/imgtool.py create 0xFF 0x400 3584 1.0.0 0x00018000 0x001C0000 arm-none-eabi-objcopy ""
diff --git a/examples/all-clusters-minimal-app/p6/ota_update_build.sh b/examples/all-clusters-minimal-app/p6/ota_update_build.sh
new file mode 100755
index 00000000000000..2aa7902556bd62
--- /dev/null
+++ b/examples/all-clusters-minimal-app/p6/ota_update_build.sh
@@ -0,0 +1,13 @@
+OUT_DIR=out/all-clusters-minimal-app-ota
+ANYCLOUD_DIR=third_party/p6/p6_sdk/libs/anycloud-ota/
+
+./scripts/examples/gn_p6_example.sh examples/all-clusters-minimal-app/p6 "$OUT_DIR" chip_enable_ota_requestor=true build_update_image=true
+
+mv "$OUT_DIR"/chip-p6-clusters-minimal-example.hex "$OUT_DIR"/chip-p6-clusters-minimal-example.unsigned.hex
+
+./"$ANYCLOUD_DIR"/scripts/sign_script.bash "$OUT_DIR"/ chip-p6-clusters-minimal-example python3 arm-none-eabi-objcopy "-O ihex" "" "$ANYCLOUD_DIR"/source/mcuboot/scripts/ imgtool_v1.7.0/imgtool.py sign 0xFF 0x400 3584 1.0.0 0x00018000 0x001C0000 arm-none-eabi-objcopy "-k $ANYCLOUD_DIR/source/mcuboot/keys/cypress-test-ec-p256.pem"
+
+if [ -f "$OUT_DIR"/chip-p6-clusters-minimal-example.ota ]; then
+ rm "$OUT_DIR"/chip-p6-clusters-minimal-example.ota
+fi
+src/app/ota_image_tool.py create -v 0xFFF1 -p 0x8000 -vn 2 -vs "2.0" -da sha256 "$OUT_DIR"/chip-p6-clusters-minimal-example.bin "$OUT_DIR"/chip-p6-clusters-minimal-example.ota
diff --git a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp b/examples/all-clusters-minimal-app/p6/src/AppTask.cpp
index d58c7a3f108c56..c8717c30740357 100644
--- a/examples/all-clusters-minimal-app/p6/src/AppTask.cpp
+++ b/examples/all-clusters-minimal-app/p6/src/AppTask.cpp
@@ -43,6 +43,33 @@
#include
#include
+/* OTA related includes */
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+#include
+#include
+#include
+#include
+#include
+extern "C" {
+#include "cy_smif_psoc6.h"
+}
+using chip::BDXDownloader;
+using chip::CharSpan;
+using chip::DefaultOTARequestor;
+using chip::FabricIndex;
+using chip::GetRequestorInstance;
+using chip::NodeId;
+using chip::OTADownloader;
+using chip::OTAImageProcessorImpl;
+using chip::System::Layer;
+
+using namespace ::chip;
+using namespace chip::TLV;
+using namespace ::chip::Credentials;
+using namespace ::chip::DeviceLayer;
+using namespace ::chip::System;
+
+#endif
#define APP_EVENT_QUEUE_SIZE 10
#define APP_TASK_STACK_SIZE (4096)
#define APP_WAIT_LOOP 1000
@@ -61,6 +88,15 @@ StaticQueue_t sAppEventQueueStruct;
StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)];
StaticTask_t appTaskStruct;
+
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+DefaultOTARequestor gRequestorCore;
+DefaultOTARequestorStorage gRequestorStorage;
+DefaultOTARequestorDriver gRequestorUser;
+BDXDownloader gDownloader;
+OTAImageProcessorImpl gImageProcessor;
+#endif
+
} // namespace
using namespace ::chip;
@@ -96,6 +132,9 @@ static void InitServer(intptr_t context)
// Initialize device attestation config
SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider());
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ GetAppTask().InitOTARequestor();
+#endif
}
CHIP_ERROR AppTask::StartAppTask()
@@ -114,7 +153,14 @@ CHIP_ERROR AppTask::StartAppTask()
CHIP_ERROR AppTask::Init()
{
CHIP_ERROR err = CHIP_NO_ERROR;
-
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ int rc = boot_set_confirmed();
+ if (rc != 0)
+ {
+ P6_LOG("boot_set_confirmed failed");
+ appError(CHIP_ERROR_WELL_UNINITIALIZED);
+ }
+#endif
// Register the callback to init the MDNS server when connectivity is available
PlatformMgr().AddEventHandler(
[](const ChipDeviceEvent * event, intptr_t arg) {
@@ -264,3 +310,39 @@ bool lowPowerClusterSleep()
{
return true;
}
+
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+void AppTask::InitOTARequestor()
+{
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ SetRequestorInstance(&gRequestorCore);
+ gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
+ gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader);
+ gImageProcessor.SetOTADownloader(&gDownloader);
+ gDownloader.SetImageProcessorDelegate(&gImageProcessor);
+ gRequestorUser.Init(&gRequestorCore, &gImageProcessor);
+
+ uint32_t savedSoftwareVersion;
+ err = ConfigurationMgr().GetSoftwareVersion(savedSoftwareVersion);
+ if (err != CHIP_NO_ERROR)
+ {
+ P6_LOG("Can't get saved software version");
+ appError(err);
+ }
+
+ if (savedSoftwareVersion != CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION)
+ {
+ ConfigurationMgr().StoreSoftwareVersion(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+
+ P6_LOG("Confirming update to version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+ chip::OTARequestorInterface * requestor = chip::GetRequestorInstance();
+ if (requestor != nullptr)
+ {
+ requestor->NotifyUpdateApplied();
+ }
+ }
+
+ P6_LOG("Current Software Version: %u", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION);
+ P6_LOG("Current Firmware Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING);
+}
+#endif
diff --git a/examples/all-clusters-minimal-app/p6/src/main.cpp b/examples/all-clusters-minimal-app/p6/src/main.cpp
index a8f415ffa3744d..d365f9ff8220d4 100644
--- a/examples/all-clusters-minimal-app/p6/src/main.cpp
+++ b/examples/all-clusters-minimal-app/p6/src/main.cpp
@@ -35,6 +35,7 @@
#include
#include "AppConfig.h"
+#include "cyhal_wdt.h"
#include "init_p6Platform.h"
#include
@@ -131,7 +132,12 @@ static void main_task(void * pvParameters)
int main(void)
{
init_p6Platform();
-
+#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
+ // Clear watchdog timer (started by bootloader) so that it doesn't trigger a reset
+ cyhal_wdt_t wdt_obj;
+ cyhal_wdt_init(&wdt_obj, cyhal_wdt_get_max_timeout_ms());
+ cyhal_wdt_free(&wdt_obj);
+#endif
#ifdef HEAP_MONITORING
MemMonitoring::startHeapMonitoring();
#endif
diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter
index 64b03dc44a04ff..f4572fce80c57a 100644
--- a/examples/bridge-app/bridge-common/bridge-app.matter
+++ b/examples/bridge-app/bridge-common/bridge-app.matter
@@ -415,6 +415,7 @@ server cluster GeneralCommissioning = 48 {
struct BasicCommissioningInfo {
int16u failSafeExpiryLengthSeconds = 0;
+ int16u maxCumulativeFailsafeSeconds = 1;
}
attribute access(write: administer) int64u breadcrumb = 0;
diff --git a/examples/bridge-app/linux/BUILD.gn b/examples/bridge-app/linux/BUILD.gn
index 6860566c5bdba5..3912e887a846be 100644
--- a/examples/bridge-app/linux/BUILD.gn
+++ b/examples/bridge-app/linux/BUILD.gn
@@ -24,6 +24,7 @@ executable("chip-bridge-app") {
"${chip_root}/examples/tv-app/tv-common/include/CHIPProjectAppConfig.h",
"Device.cpp",
"include/Device.h",
+ "include/main.h",
"main.cpp",
]
diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp
index f726baf06c21c2..e2d2122a49ce25 100644
--- a/examples/bridge-app/linux/Device.cpp
+++ b/examples/bridge-app/linux/Device.cpp
@@ -22,12 +22,14 @@
#include
#include
+using namespace chip::app::Clusters::BridgedActions;
+
// LightingManager LightingManager::sLight;
-Device::Device(const char * szDeviceName, const char * szLocation)
+Device::Device(const char * szDeviceName, std::string szLocation)
{
strncpy(mName, szDeviceName, sizeof(mName));
- strncpy(mLocation, szLocation, sizeof(mLocation));
+ mLocation = szLocation;
mReachable = false;
mEndpointId = 0;
}
@@ -72,13 +74,13 @@ void Device::SetName(const char * szName)
}
}
-void Device::SetLocation(const char * szLocation)
+void Device::SetLocation(std::string szLocation)
{
- bool changed = (strncmp(mLocation, szLocation, sizeof(mLocation)) != 0);
+ bool changed = (mLocation.compare(szLocation) != 0);
- strncpy(mLocation, szLocation, sizeof(mLocation));
+ mLocation = szLocation;
- ChipLogProgress(DeviceLayer, "Device[%s]: Location=\"%s\"", mName, mLocation);
+ ChipLogProgress(DeviceLayer, "Device[%s]: Location=\"%s\"", mName, mLocation.c_str());
if (changed)
{
@@ -86,7 +88,7 @@ void Device::SetLocation(const char * szLocation)
}
}
-DeviceOnOff::DeviceOnOff(const char * szDeviceName, const char * szLocation) : Device(szDeviceName, szLocation)
+DeviceOnOff::DeviceOnOff(const char * szDeviceName, std::string szLocation) : Device(szDeviceName, szLocation)
{
mOn = false;
}
@@ -129,7 +131,7 @@ void DeviceOnOff::HandleDeviceChange(Device * device, Device::Changed_t changeMa
}
}
-DeviceSwitch::DeviceSwitch(const char * szDeviceName, const char * szLocation, uint32_t aFeatureMap) :
+DeviceSwitch::DeviceSwitch(const char * szDeviceName, std::string szLocation, uint32_t aFeatureMap) :
Device(szDeviceName, szLocation)
{
mNumberOfPositions = 2;
@@ -231,3 +233,32 @@ void DevicePowerSource::SetDescription(std::string aDescription)
mChanged_CB(this, kChanged_Description);
}
}
+
+EndpointListInfo::EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type)
+{
+ mEndpointListId = endpointListId;
+ mName = name;
+ mType = type;
+}
+
+EndpointListInfo::EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type,
+ chip::EndpointId endpointId)
+{
+ mEndpointListId = endpointListId;
+ mName = name;
+ mType = type;
+ mEndpoints.push_back(endpointId);
+}
+
+void EndpointListInfo::AddEndpointId(chip::EndpointId endpointId)
+{
+ mEndpoints.push_back(endpointId);
+}
+
+Room::Room(std::string name, uint16_t endpointListId, EndpointListTypeEnum type, bool isVisible)
+{
+ mName = name;
+ mEndpointListId = endpointListId;
+ mType = type;
+ mIsVisible = isVisible;
+}
diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp
index bade30c1c102cb..21712982dea9f7 100644
--- a/examples/bridge-app/linux/bridged-actions-stub.cpp
+++ b/examples/bridge-app/linux/bridged-actions-stub.cpp
@@ -24,6 +24,11 @@
#include
#include
+#include
+
+#include "Device.h"
+#include "main.h"
+
using namespace chip;
using namespace chip::app;
using namespace chip::app::Clusters;
@@ -58,8 +63,20 @@ CHIP_ERROR BridgedActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint
CHIP_ERROR BridgedActionsAttrAccess::ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder)
{
- // Just return an empty list
- return aEncoder.EncodeEmptyList();
+ std::vector infoList = GetEndpointListInfo(endpoint);
+
+ CHIP_ERROR err = aEncoder.EncodeList([&infoList](const auto & encoder) -> CHIP_ERROR {
+ for (auto info : infoList)
+ {
+ BridgedActions::Structs::EndpointListStruct::Type endpointListStruct = {
+ info.GetEndpointListId(), CharSpan::fromCharString(info.GetName().c_str()), info.GetType(),
+ DataModel::List(info.GetEndpointListData(), info.GetEndpointListSize())
+ };
+ ReturnErrorOnFailure(encoder.Encode(endpointListStruct));
+ }
+ return CHIP_NO_ERROR;
+ });
+ return err;
}
CHIP_ERROR BridgedActionsAttrAccess::ReadSetupUrlAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder)
diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h
index 3bc7a88a47b6ae..b959454e7a8498 100644
--- a/examples/bridge-app/linux/include/Device.h
+++ b/examples/bridge-app/linux/include/Device.h
@@ -24,12 +24,15 @@
#include
#include
+#include
+
+using namespace chip::app::Clusters;
+using namespace chip::app::Clusters::BridgedActions;
class Device
{
public:
- static const int kDeviceNameSize = 32;
- static const int kDeviceLocationSize = 32;
+ static const int kDeviceNameSize = 32;
enum Changed_t
{
@@ -39,17 +42,21 @@ class Device
kChanged_Last = kChanged_Name,
} Changed;
- Device(const char * szDeviceName, const char * szLocation);
+ Device(const char * szDeviceName, std::string szLocation);
virtual ~Device() {}
bool IsReachable();
void SetReachable(bool aReachable);
void SetName(const char * szDeviceName);
- void SetLocation(const char * szLocation);
+ void SetLocation(std::string szLocation);
inline void SetEndpointId(chip::EndpointId id) { mEndpointId = id; };
inline chip::EndpointId GetEndpointId() { return mEndpointId; };
+ inline void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; };
+ inline chip::EndpointId GetParentEndpointId() { return mParentEndpointId; };
inline char * GetName() { return mName; };
- inline char * GetLocation() { return mLocation; };
+ inline std::string GetLocation() { return mLocation; };
+ inline std::string GetZone() { return mZone; };
+ inline void SetZone(std::string zone) { mZone = zone; };
private:
virtual void HandleDeviceChange(Device * device, Device::Changed_t changeMask) = 0;
@@ -57,8 +64,10 @@ class Device
protected:
bool mReachable;
char mName[kDeviceNameSize];
- char mLocation[kDeviceLocationSize];
+ std::string mLocation;
chip::EndpointId mEndpointId;
+ chip::EndpointId mParentEndpointId;
+ std::string mZone;
};
class DeviceOnOff : public Device
@@ -69,7 +78,7 @@ class DeviceOnOff : public Device
kChanged_OnOff = kChanged_Last << 1,
} Changed;
- DeviceOnOff(const char * szDeviceName, const char * szLocation);
+ DeviceOnOff(const char * szDeviceName, std::string szLocation);
bool IsOn();
void SetOnOff(bool aOn);
@@ -96,7 +105,7 @@ class DeviceSwitch : public Device
kChanged_MultiPressMax = kChanged_Last << 3,
} Changed;
- DeviceSwitch(const char * szDeviceName, const char * szLocation, uint32_t aFeatureMap);
+ DeviceSwitch(const char * szDeviceName, std::string szLocation, uint32_t aFeatureMap);
void SetNumberOfPositions(uint8_t aNumberOfPositions);
void SetCurrentPosition(uint8_t aCurrentPosition);
@@ -124,7 +133,7 @@ class DeviceSwitch : public Device
class ComposedDevice : public Device
{
public:
- ComposedDevice(const char * szDeviceName, const char * szLocation) : Device(szDeviceName, szLocation){};
+ ComposedDevice(const char * szDeviceName, std::string szLocation) : Device(szDeviceName, szLocation){};
using DeviceCallback_fn = std::function;
@@ -146,7 +155,7 @@ class DevicePowerSource : public Device
kChanged_Description = kChanged_Last << 2,
} Changed;
- DevicePowerSource(const char * szDeviceName, const char * szLocation, uint32_t aFeatureMap) :
+ DevicePowerSource(const char * szDeviceName, std::string szLocation, uint32_t aFeatureMap) :
Device(szDeviceName, szLocation), mFeatureMap(aFeatureMap){};
using DeviceCallback_fn = std::function;
@@ -172,3 +181,40 @@ class DevicePowerSource : public Device
uint32_t mFeatureMap;
DeviceCallback_fn mChanged_CB;
};
+
+class EndpointListInfo
+{
+public:
+ EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type);
+ EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type, chip::EndpointId endpointId);
+ void AddEndpointId(chip::EndpointId endpointId);
+ inline uint16_t GetEndpointListId() { return mEndpointListId; };
+ std::string GetName() { return mName; };
+ inline EndpointListTypeEnum GetType() { return mType; };
+ inline chip::EndpointId * GetEndpointListData() { return mEndpoints.data(); };
+ inline size_t GetEndpointListSize() { return mEndpoints.size(); };
+
+private:
+ uint16_t mEndpointListId = static_cast(0);
+ std::string mName;
+ EndpointListTypeEnum mType = static_cast(0);
+ std::vector mEndpoints;
+};
+
+class Room
+{
+public:
+ Room(std::string name, uint16_t endpointListId, EndpointListTypeEnum type, bool isVisible);
+ inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; };
+ inline bool getIsVisible() { return mIsVisible; };
+ inline void setName(std::string name) { mName = name; };
+ inline std::string getName() { return mName; };
+ inline EndpointListTypeEnum getType() { return mType; };
+ inline uint16_t getEndpointListId() { return mEndpointListId; };
+
+private:
+ bool mIsVisible;
+ std::string mName;
+ uint16_t mEndpointListId;
+ EndpointListTypeEnum mType;
+};
diff --git a/src/lib/shell/tests/TestStreamerStdio.h b/examples/bridge-app/linux/include/main.h
similarity index 67%
rename from src/lib/shell/tests/TestStreamerStdio.h
rename to examples/bridge-app/linux/include/main.h
index 64e1904edde935..fe81d30685f7ec 100644
--- a/src/lib/shell/tests/TestStreamerStdio.h
+++ b/examples/bridge-app/linux/include/main.h
@@ -1,6 +1,7 @@
/*
*
- * Copyright (c) 2020 Project CHIP Authors
+ * Copyright (c) 2022 Project CHIP Authors
+ * All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,23 +16,6 @@
* limitations under the License.
*/
-/**
- * @file
- * This file declares test entry points for CHIP system layer
- * library unit tests.
- *
- */
-
#pragma once
-#include
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int TestStreamerStdio(void);
-
-#ifdef __cplusplus
-}
-#endif
+std::vector GetEndpointListInfo(chip::EndpointId parentId);
diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp
index 5709352d28b21e..d069d8ce7a0caf 100644
--- a/examples/bridge-app/linux/main.cpp
+++ b/examples/bridge-app/linux/main.cpp
@@ -44,16 +44,19 @@
#include "CommissionableInit.h"
#include "Device.h"
+#include "main.h"
#include
#include
#include
+#include
using namespace chip;
using namespace chip::Credentials;
using namespace chip::Inet;
using namespace chip::Transport;
using namespace chip::DeviceLayer;
+using namespace chip::app::Clusters;
namespace {
@@ -64,6 +67,7 @@ const int kDescriptorAttributeArraySize = 254;
EndpointId gCurrentEndpointId;
EndpointId gFirstDynamicEndpointId;
Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT];
+std::vector gRooms;
// ENDPOINT DEFINITIONS:
// =================================================================================
@@ -149,6 +153,21 @@ DeviceSwitch Switch2("Switch 2", "Office",
EMBER_AF_SWITCH_FEATURE_MOMENTARY_SWITCH_LONG_PRESS |
EMBER_AF_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS);
+// Declare Bridged endpoints used for Action clusters
+DataVersion gActionLight1DataVersions[ArraySize(bridgedLightClusters)];
+DataVersion gActionLight2DataVersions[ArraySize(bridgedLightClusters)];
+DataVersion gActionLight3DataVersions[ArraySize(bridgedLightClusters)];
+DataVersion gActionLight4DataVersions[ArraySize(bridgedLightClusters)];
+
+DeviceOnOff ActionLight1("Action Light 1", "Room 1");
+DeviceOnOff ActionLight2("Action Light 2", "Room 1");
+DeviceOnOff ActionLight3("Action Light 3", "Room 2");
+DeviceOnOff ActionLight4("Action Light 4", "Room 2");
+
+Room room1("Room 1", 0xE001, BridgedActions::EndpointListTypeEnum::kRoom, true);
+Room room2("Room 2", 0xE002, BridgedActions::EndpointListTypeEnum::kRoom, true);
+Room room3("Zone 3", 0xE003, BridgedActions::EndpointListTypeEnum::kZone, false);
+
// ---------------------------------------------------------------------------
//
// SWITCH ENDPOINT: contains the following clusters:
@@ -255,6 +274,7 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const SpanSetEndpointId(gCurrentEndpointId);
+ dev->SetParentEndpointId(parentEndpointId);
ret =
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
if (ret == EMBER_ZCL_STATUS_SUCCESS)
@@ -300,6 +320,46 @@ int RemoveDeviceEndpoint(Device * dev)
return -1;
}
+std::vector GetEndpointListInfo(chip::EndpointId parentId)
+{
+ std::vector infoList;
+
+ for (auto room : gRooms)
+ {
+ if (room->getIsVisible())
+ {
+ EndpointListInfo info(room->getEndpointListId(), room->getName(), room->getType());
+ int index = 0;
+ while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
+ {
+ if ((gDevices[index] != nullptr) && (gDevices[index]->GetParentEndpointId() == parentId))
+ {
+ std::string location;
+ if (room->getType() == BridgedActions::EndpointListTypeEnum::kZone)
+ {
+ location = gDevices[index]->GetZone();
+ }
+ else
+ {
+ location = gDevices[index]->GetLocation();
+ }
+ if (room->getName().compare(location) == 0)
+ {
+ info.AddEndpointId(gDevices[index]->GetEndpointId());
+ }
+ }
+ index++;
+ }
+ if (info.GetEndpointListSize() > 0)
+ {
+ infoList.push_back(info);
+ }
+ }
+ }
+
+ return infoList;
+}
+
void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask)
{
if (itemChangedMask & Device::kChanged_Reachable)
@@ -614,25 +674,31 @@ void * bridge_polling_thread(void * context)
if (kbhit())
{
int ch = getchar();
+
+ // Commands used for the actions bridge test plan.
if (ch == '2' && light2_added == false)
{
+ // TC-BR-2 step 2, Add Light2
AddDeviceEndpoint(&Light2, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
Span(gLight2DataVersions), 1);
light2_added = true;
}
else if (ch == '4' && light1_added == true)
{
+ // TC-BR-2 step 4, Remove Light 1
RemoveDeviceEndpoint(&Light1);
light1_added = false;
}
if (ch == '5' && light1_added == false)
{
+ // TC-BR-2 step 5, Add Light 1 back
AddDeviceEndpoint(&Light1, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
Span(gLight1DataVersions), 1);
light1_added = true;
}
if (ch == 'b')
{
+ // TC-BR-3 step 1b, rename lights
if (light1_added)
{
Light1.SetName("Light 1b");
@@ -644,6 +710,7 @@ void * bridge_polling_thread(void * context)
}
if (ch == 'c')
{
+ // TC-BR-3 step 2c, change the state of the lights
if (light1_added)
{
Light1.Toggle();
@@ -653,6 +720,31 @@ void * bridge_polling_thread(void * context)
Light2.Toggle();
}
}
+
+ // Commands used for the actions cluster test plan.
+ if (ch == 'r')
+ {
+ // TC-ACT-2.2 step 2c, rename "Room 1"
+ room1.setName("Room 1 renamed");
+ ActionLight1.SetLocation(room1.getName());
+ ActionLight2.SetLocation(room1.getName());
+ }
+ if (ch == 'f')
+ {
+ // TC-ACT-2.2 step 2f, move "Action Light 3" from "Room 2" to "Room 1"
+ ActionLight3.SetLocation(room1.getName());
+ }
+ if (ch == 'i')
+ {
+ // TC-ACT-2.2 step 2i, remove "Room 2" (make it not visible in the endpoint list), do not remove the lights
+ room2.setIsVisible(false);
+ }
+ if (ch == 'l')
+ {
+ // TC-ACT-2.2 step 2l, add a new "Zone 3" and add "Action Light 2" to the new zone
+ room3.setIsVisible(true);
+ ActionLight2.SetZone("Zone 3");
+ }
continue;
}
@@ -669,7 +761,6 @@ int main(int argc, char * argv[])
memset(gDevices, 0, sizeof(gDevices));
// Setup Mock Devices
-
Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
@@ -682,6 +773,17 @@ int main(int argc, char * argv[])
Switch1.SetReachable(true);
Switch2.SetReachable(true);
+ // Setup devices for action cluster tests
+ ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
+ ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
+ ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
+ ActionLight4.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
+
+ ActionLight1.SetReachable(true);
+ ActionLight2.SetReachable(true);
+ ActionLight3.SetReachable(true);
+ ActionLight4.SetReachable(true);
+
// Define composed device with two switches
ComposedDevice ComposedDevice("Composed Switcher", "Bedroom");
DeviceSwitch ComposedSwitch1("Composed Switch 1", "Bedroom", EMBER_AF_SWITCH_FEATURE_LATCHING_SWITCH);
@@ -752,6 +854,19 @@ int main(int argc, char * argv[])
Span(gComposedPowerSourceDeviceTypes),
Span(gComposedPowerSourceDataVersions), ComposedDevice.GetEndpointId());
+ // Add 4 lights for the Action Clusters tests
+ AddDeviceEndpoint(&ActionLight1, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
+ Span(gActionLight1DataVersions), 1);
+ AddDeviceEndpoint(&ActionLight2, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
+ Span(gActionLight2DataVersions), 1);
+ AddDeviceEndpoint(&ActionLight3, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
+ Span(gActionLight3DataVersions), 1);
+ AddDeviceEndpoint(&ActionLight4, &bridgedLightEndpoint, Span(gBridgedOnOffDeviceTypes),
+ Span(gActionLight4DataVersions), 1);
+ gRooms.push_back(&room1);
+ gRooms.push_back(&room2);
+ gRooms.push_back(&room3);
+
{
pthread_t poll_thread;
int res = pthread_create(&poll_thread, nullptr, bridge_polling_thread, nullptr);
diff --git a/examples/build_overrides/mbedtls.gni b/examples/build_overrides/mbedtls.gni
index fff24c4f29f01f..7b7bb7346759b4 100644
--- a/examples/build_overrides/mbedtls.gni
+++ b/examples/build_overrides/mbedtls.gni
@@ -15,4 +15,5 @@
declare_args() {
# Root directory for mbedTLS.
mbedtls_root = "//third_party/connectedhomeip/third_party/mbedtls"
+ mbedtls_repo = "//third_party/connectedhomeip/third_party/mbedtls"
}
diff --git a/examples/chef/BUILD.gn b/examples/chef/BUILD.gn
index 5ba346ebe2417a..5c3280c903c485 100644
--- a/examples/chef/BUILD.gn
+++ b/examples/chef/BUILD.gn
@@ -21,12 +21,23 @@ import("$dir_pw_build/python.gni")
pw_python_package("chef") {
setup = [ "setup.py" ]
+ inputs = [
+ "sample_app_util/test_files/sample_zap_file.zap",
+ "sample_app_util/test_files/sample_zap_file_hashmeta.yaml",
+ ]
+
sources = [
"__init__.py",
"chef.py",
"constants.py",
+ "sample_app_util/__init__.py",
+ "sample_app_util/sample_app_util.py",
+ "sample_app_util/zap_file_parser.py",
"stateful_shell.py",
]
- tests = [ "test_stateful_shell.py" ]
+ tests = [
+ "test_stateful_shell.py",
+ "sample_app_util/test_zap_file_parser.py",
+ ]
}
diff --git a/examples/chef/chef.py b/examples/chef/chef.py
index 8b0e56a6145ba4..fcdd5e4f37a777 100755
--- a/examples/chef/chef.py
+++ b/examples/chef/chef.py
@@ -461,8 +461,8 @@ def main(argv: Sequence[str]) -> None:
if options.do_run_zap:
flush_print("Running ZAP script to generate artifacts")
- shell.run_cmd(f"mkdir -p {gen_dir}/")
- shell.run_cmd(f"rm {gen_dir}/*")
+ shell.run_cmd(f"rm -rf {gen_dir}")
+ shell.run_cmd(f"mkdir -p {gen_dir}")
shell.run_cmd(
f"{_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{options.sample_device_type_name}.zap -o {gen_dir}")
# af-gen-event.h is not generated
@@ -543,6 +543,11 @@ def main(argv: Sequence[str]) -> None:
shell.run_cmd(f"rm -rf {_CHEF_SCRIPT_PATH}/esp32/build")
shell.run_cmd("idf.py fullclean")
shell.run_cmd("idf.py build")
+ shell.run_cmd("idf.py build flashing_script")
+ shell.run_cmd(
+ f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz --files-from=chip-shell.flashbundle.txt)")
+ shell.run_cmd(
+ f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}")
elif options.build_target == "nrfconnect":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect")
nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"]
@@ -567,6 +572,8 @@ def main(argv: Sequence[str]) -> None:
import("//build_overrides/chip.gni")
import("${{chip_root}}/config/standalone/args.gni")
chip_shell_cmd_server = false
+ chip_build_libshell = true
+ chip_config_network_layer_ble = false
target_defines = ["CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID={options.vid}", "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID={options.pid}", "CONFIG_ENABLE_PW_RPC={'1' if options.do_rpc else '0'}"]
"""))
with open(f"{_CHEF_SCRIPT_PATH}/linux/sample.gni", "w") as f:
@@ -577,7 +584,8 @@ def main(argv: Sequence[str]) -> None:
if options.do_clean:
shell.run_cmd(f"rm -rf out")
if options.do_rpc:
- shell.run_cmd("gn gen out --args='import(\"//with_pw_rpc.gni\")'")
+ shell.run_cmd(
+ "gn gen out --args='import(\"//with_pw_rpc.gni\")'")
else:
shell.run_cmd("gn gen out --args=''")
shell.run_cmd("ninja -C out")
diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp
new file mode 100644
index 00000000000000..ecc3ef52766d55
--- /dev/null
+++ b/examples/chef/common/stubs.cpp
@@ -0,0 +1,16 @@
+#include
+#include
+#include
+#include
+#include
+#include
+
+bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, chip::Optional pinCode)
+{
+ return true;
+}
+
+bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, chip::Optional pinCode)
+{
+ return true;
+}
diff --git a/examples/chef/efr32/args.gni b/examples/chef/efr32/args.gni
index 96b6262f50b93e..0b7ef403df72cd 100644
--- a/examples/chef/efr32/args.gni
+++ b/examples/chef/efr32/args.gni
@@ -21,5 +21,5 @@ efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain")
chip_enable_ota_requestor = true
pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
chip_enable_openthread = true
diff --git a/examples/chef/efr32/build_for_wifi_args.gni b/examples/chef/efr32/build_for_wifi_args.gni
index bf21912871e59d..4a3bdfd804ae19 100644
--- a/examples/chef/efr32/build_for_wifi_args.gni
+++ b/examples/chef/efr32/build_for_wifi_args.gni
@@ -21,4 +21,4 @@ import("${chip_root}/src/platform/EFR32/wifi_args.gni")
chip_enable_ota_requestor = true
pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
diff --git a/examples/chef/esp32/CMakeLists.txt b/examples/chef/esp32/CMakeLists.txt
index 086f2eed23a846..b03f1e123b88b2 100644
--- a/examples/chef/esp32/CMakeLists.txt
+++ b/examples/chef/esp32/CMakeLists.txt
@@ -61,7 +61,8 @@ if (CONFIG_ENABLE_PW_RPC)
get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH)
include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cmake)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.esp32)
pw_set_backend(pw_trace pw_trace_tokenized)
diff --git a/examples/chef/esp32/main/CMakeLists.txt b/examples/chef/esp32/main/CMakeLists.txt
index f242768177544e..68f43aece32ea8 100644
--- a/examples/chef/esp32/main/CMakeLists.txt
+++ b/examples/chef/esp32/main/CMakeLists.txt
@@ -67,6 +67,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes"
+ "${CMAKE_SOURCE_DIR}/../common"
)
if (CONFIG_ENABLE_CHIP_SHELL)
@@ -131,7 +132,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(button_service
@@ -141,6 +142,17 @@ pw_proto_library(button_service
button_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
+ DEPS
+ pw_protobuf.common_proto
+)
+
+pw_proto_library(descriptor_service
+ SOURCES
+ ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto
+ PREFIX
+ descriptor_service
+ STRIP_PREFIX
+ ${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
pw_protobuf.common_protos
)
@@ -154,13 +166,27 @@ pw_proto_library(device_service
device_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
+ DEPS
+ pw_protobuf.common_proto
+)
+
+pw_proto_library(wifi_service
+ SOURCES
+ ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.proto
+ INPUTS
+ ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.options
+ PREFIX
+ wifi_service
DEPS
pw_protobuf.common_protos
+ STRIP_PREFIX
+ ${CHIP_ROOT}/examples/common/pigweed/protos
)
target_link_libraries(${COMPONENT_LIB} PUBLIC
attributes_service.nanopb_rpc
button_service.nanopb_rpc
+ descriptor_service.nanopb_rpc
device_service.nanopb_rpc
pw_checksum
pw_hdlc
@@ -170,6 +196,7 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_trace_tokenized.trace_buffer
pw_trace_tokenized.rpc_service
pw_trace_tokenized.protos.nanopb_rpc
+ wifi_service.nanopb_rpc
)
target_link_options(${COMPONENT_LIB}
@@ -181,6 +208,8 @@ target_compile_options(${COMPONENT_LIB} PRIVATE
"-DPW_RPC_ATTRIBUTE_SERVICE=1"
"-DPW_RPC_BUTTON_SERVICE=1"
"-DPW_RPC_DEVICE_SERVICE=1"
+ "-DPW_RPC_DESCRIPTOR_SERVICE=1"
+ "-DPW_RPC_WIFI_SERVICE=1"
"-DPW_RPC_TRACING_SERVICE=1")
endif (CONFIG_ENABLE_PW_RPC)
diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp
index 5fd864313caa8a..92a3af0bd25854 100644
--- a/examples/chef/esp32/main/main.cpp
+++ b/examples/chef/esp32/main/main.cpp
@@ -29,11 +29,13 @@
#include
#include
+#include
#include
#include
#include
#include
+#include
#include
#include
@@ -161,6 +163,9 @@ void printQRCode()
}
#endif // CONFIG_HAVE_DISPLAY
+app::Clusters::NetworkCommissioning::Instance
+ sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance()));
+
void InitServer(intptr_t)
{
// Start IM server
@@ -170,6 +175,7 @@ void InitServer(intptr_t)
// Device Attestation & Onboarding codes
chip::Credentials::SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider());
+ sWiFiNetworkCommissioningInstance.Init();
chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig();
if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR)
diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn
index 9bd88e4b53c03d..769bcef34d5777 100644
--- a/examples/chef/linux/BUILD.gn
+++ b/examples/chef/linux/BUILD.gn
@@ -33,14 +33,16 @@ project_dir = "./.."
chip_data_model("chef-data-model") {
zap_file = "${project_dir}/devices/${sample_zap_file}"
-
zap_pregenerated_dir =
"${chip_root}/examples/chef/out/${sample_name}/zap-generated/"
is_server = true
}
executable("${sample_name}") {
- sources = [ "${project_dir}/linux/main.cpp" ]
+ sources = [
+ "${project_dir}/common/stubs.cpp",
+ "${project_dir}/linux/main.cpp",
+ ]
deps = [
":chef-data-model",
diff --git a/examples/chef/linux/with_pw_rpc.gni b/examples/chef/linux/with_pw_rpc.gni
index 969b2b88c9b75b..9533565ecf4ce8 100644
--- a/examples/chef/linux/with_pw_rpc.gni
+++ b/examples/chef/linux/with_pw_rpc.gni
@@ -24,7 +24,7 @@ import("//build_overrides/pigweed.gni")
cpp_standard = "gnu++17"
pw_log_BACKEND = "$dir_pw_log_basic"
-pw_assert_BACKEND = "$dir_pw_assert_log"
+pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
pw_trace_BACKEND = "$dir_pw_trace_tokenized"
pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main"
diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt
index 483f275bbdf2c8..1a3483c1bb9a23 100644
--- a/examples/chef/nrfconnect/CMakeLists.txt
+++ b/examples/chef/nrfconnect/CMakeLists.txt
@@ -83,6 +83,7 @@ endif (CONFIG_ENABLE_CHIP_SHELL)
target_sources(app PRIVATE
${CHEF}/nrfconnect/main.cpp
+ ${CHEF}/common/stubs.cpp
${GEN_DIR}/callback-stub.cpp
${GEN_DIR}/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
@@ -124,7 +125,8 @@ include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake)
pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)
pw_set_backend(pw_log pw_log_basic)
-pw_set_backend(pw_assert pw_assert_log)
+pw_set_backend(pw_assert.check pw_assert_log.check_backend)
+pw_set_backend(pw_assert.assert pw_assert.assert_compatibility_backend)
pw_set_backend(pw_sys_io pw_sys_io.nrfconnect)
pw_set_backend(pw_trace pw_trace_tokenized)
set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE)
@@ -143,7 +145,7 @@ pw_proto_library(attributes_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(descriptor_service
@@ -154,7 +156,7 @@ pw_proto_library(descriptor_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(device_service
@@ -167,7 +169,7 @@ pw_proto_library(device_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(ot_cli_service
@@ -180,7 +182,7 @@ pw_proto_library(ot_cli_service
PREFIX
ot_cli_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
pw_proto_library(thread_service
@@ -193,7 +195,7 @@ pw_proto_library(thread_service
PREFIX
thread_service
DEPS
- pw_protobuf.common_protos
+ pw_protobuf.common_proto
)
target_sources(app PRIVATE
diff --git a/examples/chef/sample_app_util/README.md b/examples/chef/sample_app_util/README.md
new file mode 100644
index 00000000000000..041f9462c4232c
--- /dev/null
+++ b/examples/chef/sample_app_util/README.md
@@ -0,0 +1,195 @@
+# Chef Build Conventions
+
+## Overview
+
+---
+
+It is convenient to follow some naming and build conventions for Chef tool due
+to the large volume of sample apps that may be created and the ambiguity that
+may result from arbitrary names.
+
+There are three components to the convention proposed here:
+
+1. The naming convention for the sample matter device and clusters (referred to
+ here as the `sample app`).
+2. The naming convention to use for the build files which will be flashed on the
+ devices.
+3. The usage of metadata files that shall accompany build files to provide more
+ detailed information about builds.
+
+The convention proposed here should be adopted by the zap files provided in
+`examples/chef/devices` and the builds generated from Chef tool in CI.
+
+## Limitations
+
+---
+
+The largest filename that can be used on MacOS and Linux is 255 characters. If a
+sample app name would exceed this limit by following this convention, then the
+sample app should be given an arbitrary name.
+
+This limitation is called out, but, with the given naming conventions, this
+should rarely happen.
+
+## Convention
+
+---
+
+### Sample App Naming Convention
+
+Sample apps should be named by concatenating the name of all endpoints in the
+order of their index. Endpoint names are separated by underscores (`_`) and a 10
+character hash[^hash_note] of the sample app metadata is appended to the end.
+
+Valid sample app names conform to the following format:
+
+```
+__
+```
+
+For example, here are some valid names:
+
+```
+rootnode_extendedcolorlight_H1l9gnQDYl
+rootnode_speaker_8qRQaEj0Hy
+rootnode_lightsensor_L6dEbmVDah
+rootnode_dimmablelight_rWsDiwzw2t
+rootnode_pressuresensor_03quf7tPOL
+rootnode_flowsensor_ixbAboycie
+rootnode_windowcovering_b9QoiScjOq
+rootnode_doorlock_d5wtU7sjFR
+rootnode_thermostat_KuQYArmwl7
+rootnode_dimmablelight_7pNE3GVarn
+rootnode_temperaturesensor_i0wGnDVUAc
+rootnode_occupancysensor_wyGeQSokNp
+rootnode_humiditysensor_pv0comNKyT
+bridgednode_temperaturesensor_onofflight_onoffpluginunit_MI9DSdkH8H
+```
+
+[^hash_note]:
+
+ The 10 character hash is a base64 encoding of the md5 hash generated by
+ digesting the JSON string encoding of the metadata information. The code for
+ generating the hash can be found in `generate_hash` in
+ [zap_file_parser](zap_file_parser.py) There are some notable details
+ here: 1) The full base64 encoded hash is 16 characters, but only 10 are
+ used. This still gives us a sufficiently low probability of collision (~1.2
+ x 10^-8). 2) `_` and `-` are replaced in the base64 encoding because they
+ have other uses in the naming. 3) Platform specific information is omitted
+ from the hash. E.g. the networking_commissioning cluster is excluded. This
+ is to make the hashes platform agnostic.
+
+### Sample App Build Naming Convention
+
+The sample app builds formats will be named by pre-pending the zap file name
+(described above) with the platform and appending connectivity info.
+
+Valid build names conform to the following format:
+
+```
+_
+```
+
+Note that `` follows the convention:
+`__`.
+
+Together that is:
+
+```
+___
+```
+
+The list of platforms supported here (as of writing this) are:
+
+```
+m5stack
+brd4161a
+nrf52840dk
+linux_x86
+```
+
+For example, here are some valid names:
+
+```
+m5stack_rootnode_humiditysensor_pv0comNKyT
+brd4161a_rootnode_humiditysensor_pv0comNKyT
+nrf52840dk_rootnode_humiditysensor_pv0comNKyT
+linux_x86_rootnode_humiditysensor_pv0comNKyT
+```
+
+### Metadata file convention
+
+Metadata files are `yaml` files that should accompany build files.
+
+The metadata files have a structure as follows:
+
+```
+- :
+ client_clusters:
+ :
+ attributes:
+ :
+ ...
+ commands:
+ -
+ - ...
+ server_clusters:
+ :
+ attributes:
+ :
+ ...
+ commands:
+ -
+ - ...
+- : ...
+```
+
+For an example, see [sample_zap_file.yaml](test_files/sample_zap_file.yaml)
+which was generated from [sample_zap_file.zap](test_files/sample_zap_file.zap).
+
+Note that it is more readable in `yaml` format. Since hashes are generated from
+the metadata info, additional conventions are needed to ensure consistency for
+the metadata structure.
+
+The following conventions are used:
+
+- All lists are sorted alphabetically.
+- If a list contains dictionaries, it will be sorted by the "name" key. If it
+ does not contain "name" key, it will be sorted by the first key common to
+ all dictionaries that comes first alphabetically.
+- The list of endpoints is excluded from the above conventions. Endpoints are
+ ordered according to their endpoint number; here, the endpoint number is the
+ same as the order they are read from the zap file.
+
+As an example, take a look at
+[sample_zap_file.yaml](test_files/sample_zap_file.yaml)
+
+## Utility Usage
+
+---
+
+There are a few primary usage cases for the utility
+[sample_app_util.py](sample_app_util.py). Details are provided by using
+`python sample_app_util.py zap --help`. Below is a summary.
+
+| Command | Description |
+| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `python sample_app_util.py zap --generate-name` | Generates the name for a zap file per the specified convention |
+| `python sample_app_util.py zap --rename-file` | Renames the zap file per specified convention |
+| `python sample_app_util.py zap --generate-metadata [output_path]` | Generates the metadata file adjacent to the zap file with `.yaml` extension. If `[output_path]` is provided then the metadata file will be stored at the location specified. |
+
+## Running Tests
+
+---
+
+Navigate to the base directory of this README.
+
+```
+cd /examples/chef/sample_app_util
+```
+
+Run unit tests.
+
+```
+python -m unittest
+```
diff --git a/examples/chef/sample_app_util/__init__.py b/examples/chef/sample_app_util/__init__.py
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json
new file mode 100644
index 00000000000000..a5dd0745b1e312
--- /dev/null
+++ b/examples/chef/sample_app_util/matter_device_types.json
@@ -0,0 +1,43 @@
+{
+ "Root Node": 22,
+ "Power Source": 17,
+ "OTA Requestor": 18,
+ "OTA Provider": 20,
+ "Aggregator": 14,
+ "Bridged Node": 19,
+ "On/Off Light": 256,
+ "Dimmable Light": 257,
+ "Color Temperature Light": 268,
+ "Extended Color Light": 269,
+ "On/Off Plug-in Unit": 266,
+ "Dimmable Plug-In Unit": 267,
+ "Pump": 771,
+ "On/Off Light Switch": 259,
+ "Dimmer Switch": 260,
+ "Color Dimmer Switch": 261,
+ "Control Bridge": 2112,
+ "Pump Controller": 772,
+ "Generic Switch": 15,
+ "Contact Sensor": 21,
+ "Light Sensor": 262,
+ "Occupancy Sensor": 263,
+ "Temperature Sensor": 770,
+ "Pressure Sensor": 773,
+ "Flow Sensor": 774,
+ "Humidity Sensor": 775,
+ "On/Off Sensor": 2128,
+ "Door Lock": 10,
+ "Door Lock Controller": 11,
+ "Window Covering": 514,
+ "Window Covering Controller": 515,
+ "Heating/Cooling Unit": 768,
+ "Thermostat": 769,
+ "Fan": 43,
+ "Casting Video Player": 35,
+ "Speaker": 34,
+ "Content App": 36,
+ "Basic Video Player": 40,
+ "Casting Video Client": 41,
+ "Video Remote Control": 42,
+ "Mode Select": 39
+}
diff --git a/examples/chef/sample_app_util/sample_app_util.py b/examples/chef/sample_app_util/sample_app_util.py
new file mode 100644
index 00000000000000..08cfc87de62eda
--- /dev/null
+++ b/examples/chef/sample_app_util/sample_app_util.py
@@ -0,0 +1,71 @@
+"""Utility to work with sample app device files.
+
+This utility helps with the following:
+- Parsing sample app device files.
+- Producing metadata files from sample app device files.
+- Generating names for sample app device files.
+
+Usage:
+ python sample_app_util.py zap [options]
+
+ python sample_app_util.py zap test_files/sample_zap_file.zap --generate-name
+ python sample_app_util.py zap test_files/sample_zap_file.zap --generate-metadata
+"""
+
+import argparse
+import os
+import shutil
+
+import zap_file_parser
+
+
+def zap_cmd_handler(args: argparse.Namespace) -> None:
+ """Handles args for zap_cmd_parser."""
+ zap_file_path = args.zap_file
+ if args.generate_name:
+ print(zap_file_parser.generate_name(zap_file_path))
+ elif args.rename_file:
+ name = zap_file_parser.generate_name(zap_file_path)
+ dirpath = os.path.dirname(zap_file_path)
+ hash_string = zap_file_parser.generate_hash(zap_file_path)
+ output_path = os.path.join(dirpath, f"{name}-{hash_string}.zap")
+ shutil.move(zap_file_path, output_path)
+ print(f"Renamed from: {zap_file_path} to {output_path}")
+ elif args.generate_hash_metadata:
+ created_file = zap_file_parser.generate_hash_metadata_file(zap_file_path)
+ print(f"Created {created_file}")
+
+
+parser = argparse.ArgumentParser()
+subparsers = parser.add_subparsers(dest="command")
+subparsers.required = True
+
+zap_cmd_parser = subparsers.add_parser("zap", help="Command to operate on zap files.")
+zap_cmd_parser.add_argument(
+ "zap_file", metavar="ZAP_FILE", type=str, help="Zap file to generate name for.")
+
+zap_cmd_group = zap_cmd_parser.add_mutually_exclusive_group()
+
+zap_cmd_group.add_argument(
+ "--generate-name", action="store_true",
+ help="Print the name file name according to the name convention"
+)
+
+zap_cmd_parser.add_argument(
+ "--generate-hash-metadata", action="store_true",
+ help=(
+ "Generate the hash metadata file which provide information about what was included in "
+ "the hash digest.")
+)
+
+zap_cmd_group.add_argument(
+ "--rename-file", action='store_true',
+ help="Rename the target zap file according to name convention."
+)
+
+zap_cmd_parser.set_defaults(func=zap_cmd_handler)
+
+
+if __name__ == "__main__":
+ args = parser.parse_args()
+ args.func(args)
diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap
new file mode 100644
index 00000000000000..2868176f0c6b6d
--- /dev/null
+++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap
@@ -0,0 +1,7698 @@
+{
+ "featureLevel": 71,
+ "creator": "zap",
+ "keyValuePairs": [
+ {
+ "key": "commandDiscovery",
+ "value": "1"
+ },
+ {
+ "key": "defaultResponsePolicy",
+ "value": "always"
+ },
+ {
+ "key": "manufacturerCodes",
+ "value": "0x1002"
+ }
+ ],
+ "package": [
+ {
+ "pathRelativity": "relativeToZap",
+ "path": "../../../src/app/zap-templates/zcl/zcl.json",
+ "version": "ZCL Test Data",
+ "type": "zcl-properties"
+ },
+ {
+ "pathRelativity": "relativeToZap",
+ "path": "../../../src/app/zap-templates/app-templates.json",
+ "version": "chip-v1",
+ "type": "gen-templates-json"
+ }
+ ],
+ "endpointTypes": [
+ {
+ "name": "MA-rootdevice",
+ "deviceTypeName": "MA-rootdevice",
+ "deviceTypeCode": 22,
+ "deviceTypeProfileId": 259,
+ "clusters": [
+ {
+ "name": "Identify",
+ "code": 3,
+ "mfgCode": null,
+ "define": "IDENTIFY_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "Identify",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Identify",
+ "code": 3,
+ "mfgCode": null,
+ "define": "IDENTIFY_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "identify time",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Groups",
+ "code": 4,
+ "mfgCode": null,
+ "define": "GROUPS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddGroup",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ViewGroup",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "GetGroupMembership",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveGroup",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveAllGroups",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "AddGroupIfIdentifying",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Groups",
+ "code": 4,
+ "mfgCode": null,
+ "define": "GROUPS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AddGroupResponse",
+ "code": 0,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ViewGroupResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "GetGroupMembershipResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveGroupResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "name support",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Scenes",
+ "code": 5,
+ "mfgCode": null,
+ "define": "SCENES_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddScene",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ViewScene",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveScene",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveAllScenes",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StoreScene",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RecallScene",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "GetSceneMembership",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Scenes",
+ "code": 5,
+ "mfgCode": null,
+ "define": "SCENES_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddSceneResponse",
+ "code": 0,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ViewSceneResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveSceneResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveAllScenesResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "StoreSceneResponse",
+ "code": 4,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "GetSceneMembershipResponse",
+ "code": 6,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "SceneCount",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentScene",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentGroup",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "group_id",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SceneValid",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NameSupport",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/Off",
+ "code": 6,
+ "mfgCode": null,
+ "define": "ON_OFF_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "Off",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "On",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Toggle",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/Off",
+ "code": 6,
+ "mfgCode": null,
+ "define": "ON_OFF_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "OnOff",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/off Switch Configuration",
+ "code": 7,
+ "mfgCode": null,
+ "define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/off Switch Configuration",
+ "code": 7,
+ "mfgCode": null,
+ "define": "ON_OFF_SWITCH_CONFIG_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "switch type",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "switch actions",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Level Control",
+ "code": 8,
+ "mfgCode": null,
+ "define": "LEVEL_CONTROL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "MoveToLevel",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Move",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Step",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Stop",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveToLevelWithOnOff",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveWithOnOff",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StepWithOnOff",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StopWithOnOff",
+ "code": 7,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Level Control",
+ "code": 8,
+ "mfgCode": null,
+ "define": "LEVEL_CONTROL_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "current level",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "device list",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "server list",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "client list",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "parts list",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Access Control",
+ "code": 31,
+ "mfgCode": null,
+ "define": "ACCESS_CONTROL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Access Control",
+ "code": 31,
+ "mfgCode": null,
+ "define": "ACCESS_CONTROL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ACL",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "Extension",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SubjectsPerAccessControlEntry",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "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": "3",
+ "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": "3",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Basic",
+ "code": 40,
+ "mfgCode": null,
+ "define": "BASIC_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Basic",
+ "code": 40,
+ "mfgCode": null,
+ "define": "BASIC_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "DataModelRevision",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorName",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorID",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "vendor_id",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductName",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductID",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NodeLabel",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Location",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "XX",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersion",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersionString",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersion",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersionString",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ManufacturingDate",
+ "code": 11,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "20210614123456ZZ",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartNumber",
+ "code": 12,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductURL",
+ "code": 13,
+ "mfgCode": null,
+ "side": "server",
+ "type": "long_char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductLabel",
+ "code": 14,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SerialNumber",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LocalConfigDisabled",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Reachable",
+ "code": 17,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UniqueID",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CapabilityMinima",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "CapabilityMinimaStruct",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Provider",
+ "code": 41,
+ "mfgCode": null,
+ "define": "OTA_PROVIDER_CLUSTER",
+ "side": "client",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "QueryImage",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ApplyUpdateRequest",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "NotifyUpdateApplied",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Provider",
+ "code": 41,
+ "mfgCode": null,
+ "define": "OTA_PROVIDER_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "QueryImageResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ApplyUpdateResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 0,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 0,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Requestor",
+ "code": 42,
+ "mfgCode": null,
+ "define": "OTA_REQUESTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AnnounceOtaProvider",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "OTA Software Update Requestor",
+ "code": 42,
+ "mfgCode": null,
+ "define": "OTA_REQUESTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "DefaultOtaProviders",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdatePossible",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateState",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "OTAUpdateStateEnum",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpdateStateProgress",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 0,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Localization Configuration",
+ "code": 43,
+ "mfgCode": null,
+ "define": "LOCALIZATION_CONFIGURATION_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "Localization Configuration",
+ "code": 43,
+ "mfgCode": null,
+ "define": "LOCALIZATION_CONFIGURATION_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ActiveLocale",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "en-US",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportedLocales",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Time Format Localization",
+ "code": 44,
+ "mfgCode": null,
+ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "Time Format Localization",
+ "code": 44,
+ "mfgCode": null,
+ "define": "TIME_FORMAT_LOCALIZATION_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "HourFormat",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "HourFormat",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveCalendarType",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "CalendarType",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportedCalendarTypes",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Unit Localization",
+ "code": 45,
+ "mfgCode": null,
+ "define": "UNIT_LOCALIZATION_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "Unit Localization",
+ "code": 45,
+ "mfgCode": null,
+ "define": "UNIT_LOCALIZATION_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "TemperatureUnit",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "TempUnit",
+ "included": 0,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "General Commissioning",
+ "code": 48,
+ "mfgCode": null,
+ "define": "GENERAL_COMMISSIONING_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ArmFailSafe",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "SetRegulatoryConfig",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "CommissioningComplete",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "General Commissioning",
+ "code": 48,
+ "mfgCode": null,
+ "define": "GENERAL_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ArmFailSafeResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "SetRegulatoryConfigResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "CommissioningCompleteResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "Breadcrumb",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "BasicCommissioningInfo",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "BasicCommissioningInfo",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RegulatoryConfig",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "RegulatoryLocationType",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LocationCapability",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "RegulatoryLocationType",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "6",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Network Commissioning",
+ "code": 49,
+ "mfgCode": null,
+ "define": "NETWORK_COMMISSIONING_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ScanNetworks",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "AddOrUpdateWiFiNetwork",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "AddOrUpdateThreadNetwork",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveNetwork",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ConnectNetwork",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ReorderNetwork",
+ "code": 8,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Network Commissioning",
+ "code": 49,
+ "mfgCode": null,
+ "define": "NETWORK_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "ScanNetworksResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "NetworkConfigResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ConnectNetworkResponse",
+ "code": 7,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "MaxNetworks",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "Networks",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ScanMaxTimeSeconds",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ConnectMaxTimeSeconds",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "InterfaceEnabled",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastNetworkingStatus",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "NetworkCommissioningStatus",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastNetworkID",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "LastConnectErrorValue",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32s",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "2",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Diagnostic Logs",
+ "code": 50,
+ "mfgCode": null,
+ "define": "DIAGNOSTIC_LOGS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "RetrieveLogsRequest",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "General Diagnostics",
+ "code": 51,
+ "mfgCode": null,
+ "define": "GENERAL_DIAGNOSTICS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "General Diagnostics",
+ "code": 51,
+ "mfgCode": null,
+ "define": "GENERAL_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "NetworkInterfaces",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RebootCount",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UpTime",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "TotalOperationalHours",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "BootReasons",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveHardwareFaults",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveRadioFaults",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveNetworkFaults",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Software Diagnostics",
+ "code": 52,
+ "mfgCode": null,
+ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ResetWatermarks",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Software Diagnostics",
+ "code": 52,
+ "mfgCode": null,
+ "define": "SOFTWARE_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ThreadMetrics",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapFree",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapUsed",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentHeapHighWatermark",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Thread Network Diagnostics",
+ "code": 53,
+ "mfgCode": null,
+ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ResetCounts",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Thread Network Diagnostics",
+ "code": 53,
+ "mfgCode": null,
+ "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "channel",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RoutingRole",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NetworkName",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PanId",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ExtendedPanId",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "MeshLocalPrefix",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OverrunCount",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NeighborTableList",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RouteTableList",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartitionId",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "weighting",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "DataVersion",
+ "code": 11,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "StableDataVersion",
+ "code": 12,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LeaderRouterId",
+ "code": 13,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "DetachedRoleCount",
+ "code": 14,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ChildRoleCount",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RouterRoleCount",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LeaderRoleCount",
+ "code": 17,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttachAttemptCount",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartitionIdChangeCount",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "BetterPartitionAttachAttemptCount",
+ "code": 20,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ParentChangeCount",
+ "code": 21,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxTotalCount",
+ "code": 22,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxUnicastCount",
+ "code": 23,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBroadcastCount",
+ "code": 24,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxAckRequestedCount",
+ "code": 25,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxAckedCount",
+ "code": 26,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxNoAckRequestedCount",
+ "code": 27,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDataCount",
+ "code": 28,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDataPollCount",
+ "code": 29,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBeaconCount",
+ "code": 30,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxBeaconRequestCount",
+ "code": 31,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxOtherCount",
+ "code": 32,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxRetryCount",
+ "code": 33,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxDirectMaxRetryExpiryCount",
+ "code": 34,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxIndirectMaxRetryExpiryCount",
+ "code": 35,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrCcaCount",
+ "code": 36,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrAbortCount",
+ "code": 37,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrBusyChannelCount",
+ "code": 38,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxTotalCount",
+ "code": 39,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxUnicastCount",
+ "code": 40,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBroadcastCount",
+ "code": 41,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDataCount",
+ "code": 42,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDataPollCount",
+ "code": 43,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBeaconCount",
+ "code": 44,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxBeaconRequestCount",
+ "code": 45,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxOtherCount",
+ "code": 46,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxAddressFilteredCount",
+ "code": 47,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDestAddrFilteredCount",
+ "code": 48,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxDuplicatedCount",
+ "code": 49,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrNoFrameCount",
+ "code": 50,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrUnknownNeighborCount",
+ "code": 51,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrInvalidSrcAddrCount",
+ "code": 52,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrSecCount",
+ "code": 53,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrFcsCount",
+ "code": 54,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RxErrOtherCount",
+ "code": 55,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveTimestamp",
+ "code": 56,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PendingTimestamp",
+ "code": 57,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "delay",
+ "code": 58,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "SecurityPolicy",
+ "code": 59,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ChannelMask",
+ "code": 60,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OperationalDatasetComponents",
+ "code": 61,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ActiveNetworkFaultsList",
+ "code": 62,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x000F",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "WiFi Network Diagnostics",
+ "code": 54,
+ "mfgCode": null,
+ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ResetCounts",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "WiFi Network Diagnostics",
+ "code": 54,
+ "mfgCode": null,
+ "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "bssid",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "octet_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SecurityType",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "SecurityType",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "WiFiVersion",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "WiFiVersionType",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ChannelNumber",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Rssi",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8s",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "BeaconLostCount",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "BeaconRxCount",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketMulticastRxCount",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketMulticastTxCount",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketUnicastRxCount",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketUnicastTxCount",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentMaxRate",
+ "code": 11,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "OverrunCount",
+ "code": 12,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Ethernet Network Diagnostics",
+ "code": 55,
+ "mfgCode": null,
+ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "ResetCounts",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Ethernet Network Diagnostics",
+ "code": 55,
+ "mfgCode": null,
+ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "PHYRate",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "PHYRateType",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FullDuplex",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketRxCount",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PacketTxCount",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TxErrCount",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CollisionCount",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OverrunCount",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CarrierDetect",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "TimeSinceReset",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int64u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000000000000000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Switch",
+ "code": 59,
+ "mfgCode": null,
+ "define": "SWITCH_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "Switch",
+ "code": 59,
+ "mfgCode": null,
+ "define": "SWITCH_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "AdministratorCommissioning",
+ "code": 60,
+ "mfgCode": null,
+ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "OpenCommissioningWindow",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "OpenBasicCommissioningWindow",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "RevokeCommissioning",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "AdministratorCommissioning",
+ "code": 60,
+ "mfgCode": null,
+ "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "WindowStatus",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AdminFabricIndex",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "fabric_idx",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AdminVendorId",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Operational Credentials",
+ "code": 62,
+ "mfgCode": null,
+ "define": "OPERATIONAL_CREDENTIALS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AttestationRequest",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "CertificateChainRequest",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "CSRRequest",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "AddNOC",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "UpdateNOC",
+ "code": 7,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "UpdateFabricLabel",
+ "code": 9,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveFabric",
+ "code": 10,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "AddTrustedRootCertificate",
+ "code": 11,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveTrustedRootCertificate",
+ "code": 12,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Operational Credentials",
+ "code": 62,
+ "mfgCode": null,
+ "define": "OPERATIONAL_CREDENTIALS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AttestationResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "CertificateChainResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "CSRResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "NOCResponse",
+ "code": 8,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 1,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "NOCs",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "Fabrics",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SupportedFabrics",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CommissionedFabrics",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "TrustedRootCertificates",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentFabricIndex",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "fabric_idx",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Group Key Management",
+ "code": 63,
+ "mfgCode": null,
+ "define": "GROUP_KEY_MANAGEMENT_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "KeySetWrite",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "KeySetRead",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "KeySetRemove",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "KeySetReadAllIndices",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": []
+ },
+ {
+ "name": "Group Key Management",
+ "code": 63,
+ "mfgCode": null,
+ "define": "GROUP_KEY_MANAGEMENT_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "KeySetReadResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "KeySetReadAllIndicesResponse",
+ "code": 5,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "GroupKeyMap",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "GroupTable",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxGroupsPerFabric",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "MaxGroupKeysPerFabric",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Fixed Label",
+ "code": 64,
+ "mfgCode": null,
+ "define": "FIXED_LABEL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "Fixed Label",
+ "code": 64,
+ "mfgCode": null,
+ "define": "FIXED_LABEL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "label list",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "User Label",
+ "code": 65,
+ "mfgCode": null,
+ "define": "USER_LABEL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": []
+ },
+ {
+ "name": "User Label",
+ "code": 65,
+ "mfgCode": null,
+ "define": "USER_LABEL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "label list",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "MA-dimmablelight",
+ "deviceTypeName": "MA-dimmablelight",
+ "deviceTypeCode": 257,
+ "deviceTypeProfileId": 259,
+ "clusters": [
+ {
+ "name": "Identify",
+ "code": 3,
+ "mfgCode": null,
+ "define": "IDENTIFY_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "Identify",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "TriggerEffect",
+ "code": 64,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Identify",
+ "code": 3,
+ "mfgCode": null,
+ "define": "IDENTIFY_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "identify time",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "identify type",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Groups",
+ "code": 4,
+ "mfgCode": null,
+ "define": "GROUPS_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddGroup",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ViewGroup",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "GetGroupMembership",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveGroup",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveAllGroups",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "AddGroupIfIdentifying",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Groups",
+ "code": 4,
+ "mfgCode": null,
+ "define": "GROUPS_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [
+ {
+ "name": "AddGroupResponse",
+ "code": 0,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ViewGroupResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "GetGroupMembershipResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveGroupResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "name support",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Scenes",
+ "code": 5,
+ "mfgCode": null,
+ "define": "SCENES_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddScene",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ViewScene",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveScene",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RemoveAllScenes",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StoreScene",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "RecallScene",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "GetSceneMembership",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedAddScene",
+ "code": 64,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedViewScene",
+ "code": 65,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "CopyScene",
+ "code": 66,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Scenes",
+ "code": 5,
+ "mfgCode": null,
+ "define": "SCENES_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "AddSceneResponse",
+ "code": 0,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "ViewSceneResponse",
+ "code": 1,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveSceneResponse",
+ "code": 2,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "RemoveAllScenesResponse",
+ "code": 3,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "StoreSceneResponse",
+ "code": 4,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ },
+ {
+ "name": "GetSceneMembershipResponse",
+ "code": 6,
+ "mfgCode": null,
+ "source": "server",
+ "incoming": 0,
+ "outgoing": 1
+ }
+ ],
+ "attributes": [
+ {
+ "name": "SceneCount",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentScene",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentGroup",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "group_id",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SceneValid",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NameSupport",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/Off",
+ "code": 6,
+ "mfgCode": null,
+ "define": "ON_OFF_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "Off",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "On",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Toggle",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "OffWithEffect",
+ "code": 64,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "OnWithRecallGlobalScene",
+ "code": 65,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "OnWithTimedOff",
+ "code": 66,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "On/Off",
+ "code": 6,
+ "mfgCode": null,
+ "define": "ON_OFF_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "OnOff",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "GlobalSceneControl",
+ "code": 16384,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x01",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OnTime",
+ "code": 16385,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "OffWaitTime",
+ "code": 16386,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "StartUpOnOff",
+ "code": 16387,
+ "mfgCode": null,
+ "side": "server",
+ "type": "OnOffStartUpOnOff",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0xFF",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "4",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Level Control",
+ "code": 8,
+ "mfgCode": null,
+ "define": "LEVEL_CONTROL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "MoveToLevel",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Move",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Step",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "Stop",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveToLevelWithOnOff",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveWithOnOff",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StepWithOnOff",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StopWithOnOff",
+ "code": 7,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Level Control",
+ "code": 8,
+ "mfgCode": null,
+ "define": "LEVEL_CONTROL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "current level",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x01",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "remaining time",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "min level",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "max level",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0xFE",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "current frequency",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "min frequency",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "max frequency",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "options",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "on off transition time",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "on level",
+ "code": 17,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0xFF",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "on transition time",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "off transition time",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "default move rate",
+ "code": 20,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "start up current level",
+ "code": 16384,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "255",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "GeneratedCommandList",
+ "code": 65528,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 0,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AcceptedCommandList",
+ "code": 65529,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 0,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "AttributeList",
+ "code": 65531,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 0,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Descriptor",
+ "code": 29,
+ "mfgCode": null,
+ "define": "DESCRIPTOR_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "device list",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "server list",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "client list",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "parts list",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "array",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Basic",
+ "code": 40,
+ "mfgCode": null,
+ "define": "BASIC_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Basic",
+ "code": 40,
+ "mfgCode": null,
+ "define": "BASIC_CLUSTER",
+ "side": "server",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "DataModelRevision",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "10",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorName",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "VendorID",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "vendor_id",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductName",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductID",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NodeLabel",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Location",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "XX",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersion",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "HardwareVersionString",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersion",
+ "code": 9,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int32u",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SoftwareVersionString",
+ "code": 10,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ManufacturingDate",
+ "code": 11,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "20210614123456ZZ",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "PartNumber",
+ "code": 12,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductURL",
+ "code": 13,
+ "mfgCode": null,
+ "side": "server",
+ "type": "long_char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ProductLabel",
+ "code": 14,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "SerialNumber",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "LocalConfigDisabled",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "NVM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Reachable",
+ "code": 17,
+ "mfgCode": null,
+ "side": "server",
+ "type": "boolean",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "UniqueID",
+ "code": 18,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CapabilityMinima",
+ "code": 19,
+ "mfgCode": null,
+ "side": "server",
+ "type": "CapabilityMinimaStruct",
+ "included": 1,
+ "storageOption": "External",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 1,
+ "bounded": 0,
+ "defaultValue": "1",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Color Control",
+ "code": 768,
+ "mfgCode": null,
+ "define": "COLOR_CONTROL_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [
+ {
+ "name": "MoveToHue",
+ "code": 0,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveHue",
+ "code": 1,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StepHue",
+ "code": 2,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveToSaturation",
+ "code": 3,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveSaturation",
+ "code": 4,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StepSaturation",
+ "code": 5,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveToHueAndSaturation",
+ "code": 6,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveToColor",
+ "code": 7,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "MoveColor",
+ "code": 8,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "StepColor",
+ "code": 9,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 1
+ },
+ {
+ "name": "MoveToColorTemperature",
+ "code": 10,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedMoveToHue",
+ "code": 64,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedMoveHue",
+ "code": 65,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedStepHue",
+ "code": 66,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "EnhancedMoveToHueAndSaturation",
+ "code": 67,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "ColorLoopSet",
+ "code": 68,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StopMoveStep",
+ "code": 71,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "MoveColorTemperature",
+ "code": 75,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ },
+ {
+ "name": "StepColorTemperature",
+ "code": 76,
+ "mfgCode": null,
+ "source": "client",
+ "incoming": 1,
+ "outgoing": 0
+ }
+ ],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Color Control",
+ "code": 768,
+ "mfgCode": null,
+ "define": "COLOR_CONTROL_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "CurrentHue",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentSaturation",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "RemainingTime",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentX",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x616B",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CurrentY",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x607D",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "DriftCompensation",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 0,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CompensationText",
+ "code": 6,
+ "mfgCode": null,
+ "side": "server",
+ "type": "char_string",
+ "included": 0,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorTemperature",
+ "code": 7,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00FA",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorMode",
+ "code": 8,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x01",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "Options",
+ "code": 15,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "NumberOfPrimaries",
+ "code": 16,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "EnhancedCurrentHue",
+ "code": 16384,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "EnhancedColorMode",
+ "code": 16385,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x01",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorLoopActive",
+ "code": 16386,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorLoopDirection",
+ "code": 16387,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int8u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x00",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorLoopTime",
+ "code": 16388,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0019",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorLoopStartEnhancedHue",
+ "code": 16389,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x2300",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorLoopStoredEnhancedHue",
+ "code": 16390,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorCapabilities",
+ "code": 16394,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap16",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorTempPhysicalMinMireds",
+ "code": 16395,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0x0000",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "ColorTempPhysicalMaxMireds",
+ "code": 16396,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0xFEFF",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "CoupleColorTempToLevelMinMireds",
+ "code": 16397,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "StartUpColorTemperatureMireds",
+ "code": 16400,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "5",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Occupancy Sensing",
+ "code": 1030,
+ "mfgCode": null,
+ "define": "OCCUPANCY_SENSING_CLUSTER",
+ "side": "client",
+ "enabled": 0,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "client",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ },
+ {
+ "name": "Occupancy Sensing",
+ "code": 1030,
+ "mfgCode": null,
+ "define": "OCCUPANCY_SENSING_CLUSTER",
+ "side": "server",
+ "enabled": 1,
+ "commands": [],
+ "attributes": [
+ {
+ "name": "occupancy",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "occupancy sensor type",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "type": "enum8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "occupancy sensor type bitmap",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap8",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ },
+ {
+ "name": "FeatureMap",
+ "code": 65532,
+ "mfgCode": null,
+ "side": "server",
+ "type": "bitmap32",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "0",
+ "reportable": 1,
+ "minInterval": 1,
+ "maxInterval": 65534,
+ "reportableChange": 0
+ },
+ {
+ "name": "ClusterRevision",
+ "code": 65533,
+ "mfgCode": null,
+ "side": "server",
+ "type": "int16u",
+ "included": 1,
+ "storageOption": "RAM",
+ "singleton": 0,
+ "bounded": 0,
+ "defaultValue": "3",
+ "reportable": 1,
+ "minInterval": 0,
+ "maxInterval": 65344,
+ "reportableChange": 0
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "endpoints": [
+ {
+ "endpointTypeName": "MA-rootdevice",
+ "endpointTypeIndex": 0,
+ "profileId": 259,
+ "endpointId": 0,
+ "networkId": 0,
+ "endpointVersion": 1,
+ "deviceIdentifier": 22
+ },
+ {
+ "endpointTypeName": "MA-dimmablelight",
+ "endpointTypeIndex": 1,
+ "profileId": 259,
+ "endpointId": 1,
+ "networkId": 0,
+ "endpointVersion": 1,
+ "deviceIdentifier": 257
+ }
+ ]
+}
\ No newline at end of file
diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file_hashmeta.yaml b/examples/chef/sample_app_util/test_files/sample_zap_file_hashmeta.yaml
new file mode 100644
index 00000000000000..b42a98e0d8943a
--- /dev/null
+++ b/examples/chef/sample_app_util/test_files/sample_zap_file_hashmeta.yaml
@@ -0,0 +1,90 @@
+- RootNode/22:
+ client_clusters:
+ OtaSoftwareUpdateProvider/41:
+ attributes:
+ FeatureMap/65532: '0'
+ server_clusters:
+ AccessControl/31:
+ attributes:
+ FeatureMap/65532: '0'
+ AdministratorCommissioning/60:
+ attributes:
+ FeatureMap/65532: '0'
+ Basic/40:
+ attributes:
+ FeatureMap/65532: '0'
+ Descriptor/29:
+ attributes:
+ FeatureMap/65532: '0'
+ DiagnosticLogs/50:
+ attributes:
+ FeatureMap/65532: '0'
+ EthernetNetworkDiagnostics/55:
+ attributes:
+ FeatureMap/65532: '3'
+ FixedLabel/64:
+ attributes:
+ FeatureMap/65532: '0'
+ GeneralCommissioning/48:
+ attributes:
+ FeatureMap/65532: '6'
+ GeneralDiagnostics/51:
+ attributes:
+ FeatureMap/65532: '0'
+ GroupKeyManagement/63:
+ attributes:
+ FeatureMap/65532: '0'
+ Groups/4:
+ attributes:
+ FeatureMap/65532: '0'
+ LocalizationConfiguration/43:
+ attributes:
+ FeatureMap/65532: '0'
+ OperationalCredentials/62:
+ attributes:
+ FeatureMap/65532: '0'
+ OtaSoftwareUpdateRequestor/42:
+ attributes:
+ FeatureMap/65532: '0'
+ SoftwareDiagnostics/52:
+ attributes:
+ FeatureMap/65532: '1'
+ Switch/59:
+ attributes:
+ FeatureMap/65532: '0'
+ ThreadNetworkDiagnostics/53:
+ attributes:
+ FeatureMap/65532: '15'
+ TimeFormatLocalization/44:
+ attributes:
+ FeatureMap/65532: '0'
+ UserLabel/65:
+ attributes:
+ FeatureMap/65532: '0'
+ WiFiNetworkDiagnostics/54:
+ attributes:
+ FeatureMap/65532: '3'
+- DimmableLight/257:
+ client_clusters: {}
+ server_clusters:
+ ColorControl/768:
+ attributes:
+ FeatureMap/65532: '0'
+ Descriptor/29:
+ attributes:
+ FeatureMap/65532: '0'
+ Groups/4:
+ attributes:
+ FeatureMap/65532: '0'
+ Identify/3:
+ attributes:
+ FeatureMap/65532: '0'
+ LevelControl/8:
+ attributes:
+ FeatureMap/65532: '3'
+ OccupancySensing/1030:
+ attributes:
+ FeatureMap/65532: '0'
+ OnOff/6:
+ attributes:
+ FeatureMap/65532: '1'
diff --git a/examples/chef/sample_app_util/test_zap_file_parser.py b/examples/chef/sample_app_util/test_zap_file_parser.py
new file mode 100644
index 00000000000000..a49345ad128eb1
--- /dev/null
+++ b/examples/chef/sample_app_util/test_zap_file_parser.py
@@ -0,0 +1,63 @@
+"""Tests for zap_file_parser.py
+
+Usage:
+python -m unittest
+"""
+
+import os
+import shutil
+import tempfile
+import unittest
+
+try:
+ import yaml
+except ImportError:
+ print("Missing yaml library. Install with:\npip install pyyaml")
+ exit(1)
+
+import zap_file_parser
+
+
+_HERE = os.path.abspath(os.path.dirname(__file__))
+_TEST_FILE = os.path.join(_HERE, "test_files", "sample_zap_file.zap")
+_TEST_METADATA = os.path.join(_HERE, "test_files", "sample_zap_file_hashmeta.yaml")
+
+
+class TestZapFileParser(unittest.TestCase):
+ """Testcases for zap_file_parser.py."""
+
+ def test_generate_hash(self):
+ """Tests generate_hash function."""
+ hash_string = zap_file_parser.generate_hash(_TEST_FILE)
+ self.assertEqual(hash_string, "Xir1gEfjij", "Hash is incorrectly generated.")
+
+ def test_generate_metadata(self):
+ """Tests generate_metadata."""
+ generated_metadata = zap_file_parser.generate_hash_metadata(_TEST_FILE)
+ with open(_TEST_METADATA) as f:
+ expected_metadata = yaml.load(f.read(), Loader=yaml.FullLoader)
+ self.assertEqual(
+ generated_metadata, expected_metadata, "Metadata not generated correctly.")
+
+ def test_generate_metadata_file(self):
+ """Tests generate_metadata_file."""
+ with tempfile.TemporaryDirectory(dir=os.path.dirname(_HERE)) as dir:
+ zap_file = os.path.join(dir, "test_file.zap")
+ hashmeta_file = os.path.join(dir, "test_file_hashmeta.yaml")
+ shutil.copy(_TEST_FILE, zap_file)
+ zap_file_parser.generate_hash_metadata_file(zap_file)
+ with open(hashmeta_file) as f:
+ generated_metadata = yaml.load(f.read(), Loader=yaml.FullLoader)
+ with open(_TEST_METADATA) as f:
+ expected_metadata = yaml.load(f.read(), Loader=yaml.FullLoader)
+ self.assertEqual(
+ generated_metadata, expected_metadata, "Metadata file not generated correctly.")
+
+ def test_generate_name(self):
+ """Tests generate_name."""
+ name = zap_file_parser.generate_name(_TEST_FILE)
+ self.assertEqual(name, "rootnode_dimmablelight_Xir1gEfjij", "Name incorrectly generated.")
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/examples/chef/sample_app_util/zap_file_parser.py b/examples/chef/sample_app_util/zap_file_parser.py
new file mode 100644
index 00000000000000..66a09c0c70e27a
--- /dev/null
+++ b/examples/chef/sample_app_util/zap_file_parser.py
@@ -0,0 +1,353 @@
+"""Module for parsing zap files for use in sample_app_util.py.
+
+
+Note on generating the hash:
+ Care must be taken to produce a hash value which is not affected by updates to the zap file.
+ For this reason, it is necessary to ensure a consistent order for all lists. It is also
+ necessary to generate a minimum set of parameters that can be used to uniquely identify a
+ particular build. In this case, the hash is generated from the metadata file data.
+
+ The actual hash is generated by digesting the output from json.dumps() with `sort_keys=True`.
+ The json lib is a good choice here because it is a Python standard lib and the output is
+ unlikely to change. Additionally, using `sort_keys=True` provides us with a guaranteed output
+ for the ordering of dict keys.
+
+ After generating the hash, the hash is converted to base64 and the first 10 characters are used.
+ The probability of a collision (with 100,000 items) is 1-exp(-100000^2/62^10) ~= 1.2 x 10^-8.
+
+Conventions used for constructing the metadata file:
+ - All lists are sorted alphabetically.
+ - If a list contains dicts, it will be sorted by the "name" key. If it does not contain "name"
+ key, it will be sorted by the first key common to all dicts that comes first alphabetically.
+ - The list of endpoints is excluded from the above conventions. Endpoints are ordered according
+ to their endpoint number; here, the endpoint number is the same as the order they are read
+ from the zap file.
+
+Future work:
+ - _load_matter_device_types should be updated to get the mapping for device type ID and device
+ name from the matter spec directly. This should be done once the matter spec becomes publicly
+ available.
+ - Add support for .matter files.
+"""
+import copy
+import base64
+import hashlib
+import json
+import os
+import re
+
+from typing import Dict, List, Literal, Optional, Sequence, TypedDict, Union
+
+try:
+ import yaml
+except ImportError:
+ print("Missing yaml library. Install with:\npip install pyyaml")
+ exit(1)
+
+_NETWORK_COMMISSIONING_CODE = "49"
+_FEATURE_MAP_CODE = "65532"
+
+_ATTRIBUTE_ALLOW_LIST = (
+ _FEATURE_MAP_CODE, # Feature Map
+)
+
+_HERE = os.path.abspath(os.path.dirname(__file__))
+_MATTER_DEVICE_LIST = os.path.join(_HERE, "matter_device_types.json")
+
+
+class ClusterType(TypedDict):
+ commands: List[str]
+ attributes: Dict[str, str]
+
+
+class EndpointType(TypedDict):
+ client_clusters: Dict[str, ClusterType]
+ server_clusters: Dict[str, ClusterType]
+
+
+def _b64encode(input_data: bytes) -> bytes:
+ """Returns urlsafe base64 encoded with padding removed."""
+ return base64.urlsafe_b64encode(input_data).strip(b"=")
+
+
+def _b64decode(input_data: bytes) -> bytes:
+ """Returns urlsafe base64 decoded with padding added."""
+ # "=" is padding character that doesn't carry info.
+ # Adding 2x "=" will handle all edge cases where there may be
+ # incorrect number of bytes.
+ return base64.urlsafe_b64decode(input_data + b"==")
+
+
+def _convert_metadata_name(name: str, code: Union[int, str]) -> str:
+ """Converts a name for use in a metadata file - CamelCaseName/ID."""
+ # Preserve camel case if it's already there
+ name = re.sub(r"([A-Z]+)", r" \1", name).title()
+ # Convert to camel case and append ID
+ return re.sub(r"[^a-zA-Z]+", "", name.title()) + f"/{int(code)}"
+
+
+def _convert_filename(name: str) -> str:
+ """Converts a pretty name into a file friendly one."""
+ return re.sub(r"[^a-zA-Z]+", "", name).lower()
+
+
+def _load_matter_device_types() -> Dict[Union[int, str], Union[int, str]]:
+ """Load matter device type reversible mapping.
+
+ This function should be updated to pull from the Matter spec once it is available publicly.
+
+ Returns:
+ A dictionary mapping Matter device type IDs to their proper name and vice versa.
+ """
+ with open(_MATTER_DEVICE_LIST) as f:
+ mapping = json.loads(f.read())
+ reverse_mapping = {}
+ for key, val in mapping.items():
+ reverse_mapping[val] = key
+ mapping.update(reverse_mapping)
+ return mapping
+
+
+def _read_value(input_string: str) -> str:
+ """Convert various numeric forms to regular decimal format if possible."""
+ ret_val = ""
+ if not input_string:
+ ret_val = ""
+ if "0x" in input_string:
+ ret_val = int(input_string, 16)
+ elif "." in input_string:
+ try:
+ ret_val = float(input_string)
+ except ValueError:
+ pass
+ else:
+ try:
+ ret_val = int(input_string)
+ except ValueError:
+ pass
+ return str(ret_val)
+
+
+def _convert_metadata_to_hashable_digest(metadata_input: Sequence[Dict[str, EndpointType]]) -> str:
+ """Converts metadata input into a hashable digest.
+
+ Note that the output produced here is consistent across runs. Lists are sorted and dictionaries
+ are sorted by their keys.
+
+ Args:
+ metadata_input: Metadata input produced from a zap file or read in from the hashable file.
+
+ Returns:
+ Hashable string for digest into a hash algorithm.
+ """
+ metadata = copy.deepcopy(metadata_input)
+
+ # Replace endpoint, cluster, attribute, and commands names with IDs
+
+ # Replace endpoint names
+ for endpoint in metadata:
+ endpoint_key = list(endpoint.keys())[0]
+ endpoint_id = _get_id(endpoint_key)
+ endpoint[endpoint_id] = endpoint.pop(endpoint_key)
+ endpoint_obj = endpoint[endpoint_id]
+
+ # Replace cluster names
+ for cluster_type in ["client_clusters", "server_clusters"]:
+ for cluster_key in list(endpoint_obj[cluster_type].keys()):
+ cluster_id = _get_id(cluster_key)
+ endpoint_obj[cluster_type][cluster_id] = endpoint_obj[cluster_type].pop(cluster_key)
+ cluster_obj = endpoint_obj[cluster_type][cluster_id]
+
+ # Replace attribute names
+ attribute_obj = cluster_obj["attributes"]
+ attribute_keys = list(cluster_obj["attributes"])
+ for attribute_key in attribute_keys:
+ attribute_id = _get_id(attribute_key)
+ attribute_obj[attribute_id] = attribute_obj.pop(attribute_key)
+
+ # Replace command names
+ if "commands" in cluster_obj:
+ command_keys = cluster_obj["commands"]
+ cluster_obj["commands"] = [_get_id(x) for x in command_keys]
+ cluster_obj["commands"].sort()
+
+ return json.dumps(metadata, sort_keys=True)
+
+
+def _get_id(name):
+ """Gets id from a condensed name which is formatted like: name/id."""
+ return name.split("/")[-1]
+
+
+def generate_hash(zap_file_path: str) -> str:
+ """Generates a hash for a zap file.
+
+ Args:
+ zap_file_path: Path to the zap file.
+
+ Returns:
+ MD5 hash of the metadata generated from the zap file.
+ This is converted to base64 and then the first 10 characters are used.
+ """
+ parsed = generate_hash_metadata(zap_file_path)
+ # Use json.dumps to produce a consistent output for the object passed into it.
+ digestible_content = _convert_metadata_to_hashable_digest(parsed)
+ md5_hash = hashlib.md5(digestible_content.encode("utf-8")).digest()
+ output = str(_b64encode(md5_hash), encoding="utf-8")[:10]
+ # Replace "-" and "_" with "a" and "b".
+ # The reason for doing this is to allow the generated name to be parsed by splitting on "_".
+ # Replacing "-" makes the name easier to parse visually.
+ # This increases likelihood of hash collisions, but minimally so. See module docstring.
+ return output.replace("-", "a").replace("_", "b")
+
+
+def generate_hash_metadata(zap_file_path: str) -> List[Dict[str, EndpointType]]:
+ """Generates metadata for hash digest consumption."""
+ return generate_metadata(
+ zap_file_path=zap_file_path,
+ attribute_allow_list=_ATTRIBUTE_ALLOW_LIST,
+ include_commands=False,
+ include_platform_specific_info=False)
+
+
+def generate_metadata(
+ zap_file_path: str,
+ attribute_allow_list: Optional[Sequence[str]] = _ATTRIBUTE_ALLOW_LIST,
+ include_commands: bool = False,
+ include_platform_specific_info: bool = False) -> List[Dict[str, EndpointType]]:
+ """Parses a zap_file and returns structure containing minimal content.
+
+ The lists provided in the returned objects are sorted except for the top level list of endpoints.
+ Lists containing dicts will be sorted by the "name" key of the individual dicts.
+
+ Args:
+ zap_file_path: Path to the zap file.
+ attribute_allow_list: List of attribute IDs which are included in the metadata.
+ If set to None then all attributes will be included.
+ include_commands: Whether to include commands in the metadata.
+ include_platform_specific_info: Whether to include platform specific information.
+ Omitting this allows us to generate a hash that is agnostic of the platform.
+
+ Returns:
+ Dictionary containing information about endpoints and clusters. Format will be as follows:
+ [
+ {
+ /: {
+ "server_clusters": {
+ /: {
+ "commands": [
+ /
+ ],
+ "attributes": {
+ /: ,
+ }
+ }
+ }
+ "client_clusters": { ... }
+ }
+ /: { ... }
+ }
+ ]
+ """
+ endpoint_names = _load_matter_device_types()
+ with open(zap_file_path) as f:
+ app_data = json.loads(f.read())
+
+ return_obj: List[Dict[str, EndpointType]] = []
+
+ for endpoint in app_data["endpointTypes"]:
+ device_type_id = endpoint["deviceTypeCode"]
+ device_type_name = endpoint_names[device_type_id]
+
+ endpoint_ref = _convert_metadata_name(device_type_name, device_type_id)
+ endpoint_obj: Dict[str, EndpointType] = {endpoint_ref: {}}
+ return_obj.append(endpoint_obj)
+
+ client_clusters: Dict[str, ClusterType] = {}
+ server_clusters: Dict[str, ClusterType] = {}
+
+ endpoint_obj[endpoint_ref]["client_clusters"] = client_clusters
+ endpoint_obj[endpoint_ref]["server_clusters"] = server_clusters
+
+ for cluster in endpoint["clusters"]:
+ # The network commissioning cluster contains platform specific details
+ # such as how the platform will be commissioned to the matter fabric.
+ if (not include_platform_specific_info and
+ str(cluster["code"]) == _NETWORK_COMMISSIONING_CODE):
+ continue
+ if not cluster["enabled"]:
+ continue
+
+ cluster_ref = _convert_metadata_name(cluster["name"], cluster["code"])
+
+ if include_commands:
+ cluster_obj: ClusterType = {"attributes": {}, "commands": []}
+ else:
+ cluster_obj: ClusterType = {"attributes": {}}
+
+ for attribute in cluster["attributes"]:
+ attribute_allowed = (
+ attribute_allow_list is None or str(attribute["code"]) in attribute_allow_list)
+ if attribute["included"] and attribute_allowed:
+ attribute_ref = _convert_metadata_name(attribute["name"], attribute["code"])
+ value = _read_value(attribute["defaultValue"])
+ cluster_obj["attributes"][attribute_ref] = value
+
+ # Add a default feature map if none is provided
+ if "FeatureMap/65532" not in cluster_obj["attributes"]:
+ cluster_obj["attributes"]["FeatureMap/65532"] = "0"
+
+ if include_commands:
+ for command in cluster["commands"]:
+ command_ref = _convert_metadata_name(command["name"], command["code"])
+ if cluster["side"] == "client" and command["outgoing"] == 1:
+ cluster_obj["commands"].append(command_ref)
+ elif cluster["side"] == "server" and command["incoming"] == 1:
+ cluster_obj["commands"].append(command_ref)
+
+ cluster_obj["commands"] = sorted(cluster_obj["commands"])
+
+ if cluster["side"] == "client":
+ client_clusters[cluster_ref] = cluster_obj
+ else:
+ server_clusters[cluster_ref] = cluster_obj
+
+ return return_obj
+
+
+def generate_hash_metadata_file(zap_file_path: str) -> str:
+ """Generates hash metadata file for a zap file input.
+
+ The purpose of this file is to inform the user what data was included in the hash digest.
+
+ Args:
+ zap_file_path: Path to the zap file to parse for generating the metadata file.
+ """
+ parsed = generate_hash_metadata(zap_file_path)
+ output = yaml.dump(parsed, indent=4, sort_keys=True)
+
+ dirname, filename = os.path.split(zap_file_path)
+
+ filename = os.path.splitext(filename)[0]
+ output_file_path = os.path.join(dirname, f"{filename}_hashmeta.yaml")
+ with open(output_file_path, "w") as f:
+ f.write(output)
+ return output_file_path
+
+
+def generate_name(zap_file_path: str) -> str:
+ """Generates the name for a zap file following convention.
+
+ Args:
+ zap_file_path: Path to the zap file to parse for generating the metadata file.
+
+ Returns:
+ Name of the file generated by following convention.
+ """
+ parsed = generate_metadata(zap_file_path)
+ names = []
+ for endpoint in parsed:
+ name = next(iter(endpoint))
+ names.append(_convert_filename(name))
+ hash_string = generate_hash(zap_file_path)
+ return "_".join(names) + f"_{hash_string}"
diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn
index 2da0372fef7458..694d88a7ceadd0 100644
--- a/examples/chip-tool/BUILD.gn
+++ b/examples/chip-tool/BUILD.gn
@@ -30,6 +30,7 @@ config("config") {
]
defines = [
+ "CONFIG_USE_LOCAL_STORAGE=${config_use_local_storage}",
"CONFIG_USE_SEPARATE_EVENTLOOP=${config_use_separate_eventloop}",
"CONFIG_USE_INTERACTIVE_MODE=${config_use_interactive_mode}",
"CONFIG_ENABLE_YAML_TESTS=${config_enable_yaml_tests}",
@@ -49,10 +50,13 @@ static_library("chip-tool-utils") {
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp",
"commands/clusters/ModelCommand.cpp",
+ "commands/clusters/ModelCommand.h",
"commands/common/CHIPCommand.cpp",
"commands/common/CHIPCommand.h",
"commands/common/Command.cpp",
+ "commands/common/Command.h",
"commands/common/Commands.cpp",
+ "commands/common/Commands.h",
"commands/common/CredentialIssuerCommands.h",
"commands/discover/DiscoverCommand.cpp",
"commands/discover/DiscoverCommissionablesCommand.cpp",
@@ -61,6 +65,8 @@ static_library("chip-tool-utils") {
# TODO - enable CommissionedListCommand once DNS Cache is implemented
# "commands/pairing/CommissionedListCommand.cpp",
# "commands/pairing/CommissionedListCommand.h",
+ "commands/pairing/CloseSessionCommand.cpp",
+ "commands/pairing/CloseSessionCommand.h",
"commands/pairing/OpenCommissioningWindowCommand.cpp",
"commands/pairing/OpenCommissioningWindowCommand.h",
"commands/pairing/PairingCommand.cpp",
diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md
index 4b266923782653..3385e7c7c36cdc 100644
--- a/examples/chip-tool/README.md
+++ b/examples/chip-tool/README.md
@@ -67,9 +67,9 @@ remote device, as well as the network credentials to use.
The command below uses the default values hard-coded into the debug versions of
the ESP32 all-clusters-app to commission it onto a Wi-Fi network:
- ```
- $ chip-tool pairing ble-wifi ${NODE_ID_TO_ASSIGN} ${SSID} ${PASSWORD} 20202021 3840
- ```
+```
+chip-tool pairing ble-wifi ${NODE_ID_TO_ASSIGN} ${SSID} ${PASSWORD} 20202021 3840
+```
where:
@@ -81,38 +81,38 @@ where:
For example:
- ```
- $ chip-tool pairing ble-wifi 0x11 xyz secret 20202021 3840
- ```
+```
+chip-tool pairing ble-wifi 0x11 xyz secret 20202021 3840
+```
or equivalently:
- ```
- $ chip-tool pairing ble-wifi 17 hex:787980 hex:736563726574 20202021 3840
- ```
+```
+chip-tool pairing ble-wifi 17 hex:787980 hex:736563726574 20202021 3840
+```
#### Pair a device over IP
The command below will discover devices and try to pair with the first one it
discovers using the provided setup code.
- ```
- $ chip-tool pairing onnetwork ${NODE_ID_TO_ASSIGN} 20202021
- ```
+```
+chip-tool pairing onnetwork ${NODE_ID_TO_ASSIGN} 20202021
+```
The command below will discover devices with long discriminator 3840 and try to
pair with the first one it discovers using the provided setup code.
- ```
- $ chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840
- ```
+```
+chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840
+```
The command below will discover devices based on the given QR code (which
devices log when they start up) and try to pair with the first one it discovers.
- ```
- $ chip-tool pairing code ${NODE_ID_TO_ASSIGN} MT:#######
- ```
+```
+chip-tool pairing code ${NODE_ID_TO_ASSIGN} MT:#######
+```
In all these cases, the device will be assigned node id `${NODE_ID_TO_ASSIGN}`
(which must be a decimal number or a 0x-prefixed hex number).
@@ -129,15 +129,15 @@ Attestation Verification. It will also discover devices with long discriminator
3840 and try to pair with the first one it discovers using the provided setup
code.
- ```
- $ chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840 --paa-trust-store-path path/to/PAAs
- ```
+```
+chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840 --paa-trust-store-path path/to/PAAs
+```
### Forget the currently-commissioned device
- ```
- $ chip-tool pairing unpair
- ```
+```
+chip-tool pairing unpair
+```
## Using the Client to Send Matter Commands
@@ -146,9 +146,9 @@ the target cluster name, the target command name as well as an endpoint id.
The endpoint id must be between 1 and 240.
- ```
- $ chip-tool onoff on 1
- ```
+```
+chip-tool onoff on 1
+```
The client will send a single command packet and then exit.
@@ -158,27 +158,28 @@ The client will send a single command packet and then exit.
2. Add Group to device
- ```
- $ chip-tool groups add-group GroupId GroupName node-id endpoint-id
- $ chip-tool groups add-group 0x4141 Light 1234 1
- ```
+```
+chip-tool groups add-group GroupId GroupName node-id endpoint-id
+chip-tool groups add-group 0x4141 Light 1234 1
+```
3. Add group Keyset to device
- ```
- $ chip-tool groupkeymanagement key-set-write GroupKeySet node-id endpoint-id
- $ chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42,
- "groupKeySecurityPolicy": 0, "epochKey0":
- "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":
- "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":
+```
+chip-tool groupkeymanagement key-set-write GroupKeySet node-id endpoint-id
+chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, \
+ "groupKeySecurityPolicy": 0, "epochKey0": \
+ "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": \
+ "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": \
"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1234 0
- ```
+```
4. Bind Key to group
- ```
- $ chip-tool groupkeymanagement write group-key-map attr-value node-id endpoint-id
- $ chip-tool groupkeymanagement write group-key-map '[{"groupId": 16705, "groupKeySetID": 42}]' 1234 0
- ```
+
+```
+chip-tool groupkeymanagement write group-key-map attr-value node-id endpoint-id
+chip-tool groupkeymanagement write group-key-map '[{"groupId": 16705, "groupKeySetID": 42}]' 1234 0
+```
## Configuring the client for Group Commands
@@ -187,35 +188,35 @@ must be configured appropriately.
To configure the client please use the groupsettings option
- ```
- $ chip-tool groupsettings
- ```
+```
+chip-tool groupsettings
+```
A group with a valid encryption key needs to be set. The groupid and the
encryption key must match the one configured on the end device.
To add a group
- ```
- $ chip-tool groupsettings add-group groupName groupId
- $ chip-tool groupsettings add-group TestName 0x4141
- ```
+```
+chip-tool groupsettings add-group groupName groupId
+chip-tool groupsettings add-group TestName 0x4141
+```
To add a keyset
- ```
- $ chip-tool groupsettings add-keysets keysetId keyPolicy validityTime EpochKey
- $ chip-tool groupsettings add-keysets 0xAAAA 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf
- ```
+```
+chip-tool groupsettings add-keysets keysetId keyPolicy validityTime EpochKey
+chip-tool groupsettings add-keysets 0xAAAA 0 0x000000000021dfe0 hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf
+```
Take note that the epoch key must be in hex form with the 'hex:' prefix
Finally to bind the keyset to the group
- ```
- $ chip-tool groupsettings bind-keyset groupId keysetId
- $ chip-tool groupsettings bind-keyset 0x4141 0xAAAA
- ```
+```
+chip-tool groupsettings bind-keyset groupId keysetId
+chip-tool groupsettings bind-keyset 0x4141 0xAAAA
+```
## Using the Client to Send Group (Multicast) Matter Commands
@@ -226,9 +227,9 @@ and attributes write can be send with Group Id.
E.G. sending to group Id 0x4141
- ```
- $ chip-tool onoff on 0xffffffffffff4141 1
- ```
+```
+chip-tool onoff on 0xffffffffffff4141 1
+```
The client will send a single multicast command packet and then exit.
@@ -237,9 +238,9 @@ The client will send a single multicast command packet and then exit.
To get the list of supported clusters, run the built executable without any
arguments.
- ```
- $ chip-tool
- ```
+```
+chip-tool
+```
Example output:
@@ -271,33 +272,33 @@ Usage:
To get the list of commands for a specific cluster, run the built executable
with the target cluster name.
- ```
- $ chip-tool onoff
- ```
+```
+chip-tool onoff
+```
### How to get the list of supported attributes for a specific cluster
To the the list of attributes for a specific cluster, run the built executable
with the target cluster name and the `read` command name.
- ```
- $ chip-tool onoff read
- ```
+```
+chip-tool onoff read
+```
### How to get the list of parameters for a command
To get the list of parameters for a specific command, run the built executable
with the target cluster name and the target command name
- ```
- $ chip-tool onoff on
- ```
+```
+chip-tool onoff on
+```
### Run a test suite against a paired peer device
- ```
- $ chip-tool tests Test_TC_OO_1_1
- ```
+```
+chip-tool tests Test_TC_OO_1_1
+```
## Using the Client for Setup Payload
@@ -306,36 +307,36 @@ with the target cluster name and the target command name
To parse a setup code, run the built executable with the `payload` cluster name
and the `parse-setup-payload` command
- ```
- $ chip-tool payload parse-setup-payload code
- ```
+```
+chip-tool payload parse-setup-payload code
+```
#### QR Code
- ```
- $ chip-tool payload parse-setup-payload "MT:#####"
- ```
+```
+chip-tool payload parse-setup-payload "MT:#####"
+```
#### QR Code with optional Vendor Info
- ```
- $ chip-tool payload parse-setup-payload "MT:#####"
- ```
+```
+chip-tool payload parse-setup-payload "MT:#####"
+```
#### Manual Setup Code
- ```
- $ chip-tool payload parse-setup-payload "#####"
- ```
+```
+chip-tool payload parse-setup-payload "#####"
+```
# Using the Client for Additional Data Payload
To parse an additional data payload, run the built executable with the `payload`
cluster name and the `parse-additional-data-payload` command
- ```
- $ chip-tool payload parse-additional-data-payload "#####"
- ```
+```
+chip-tool payload parse-additional-data-payload "#####"
+```
# Command Reference
diff --git a/examples/chip-tool/chip-tool.gni b/examples/chip-tool/chip-tool.gni
index 4e607dcdd7d6a0..b85f1f32340ed5 100644
--- a/examples/chip-tool/chip-tool.gni
+++ b/examples/chip-tool/chip-tool.gni
@@ -20,4 +20,5 @@ declare_args() {
config_use_separate_eventloop = true
config_use_interactive_mode = true
config_enable_yaml_tests = true
+ config_use_local_storage = true
}
diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h
index 689b2e6f9a217e..4a033870e6c4b3 100644
--- a/examples/chip-tool/commands/clusters/ComplexArgument.h
+++ b/examples/chip-tool/commands/clusters/ComplexArgument.h
@@ -26,6 +26,8 @@
#include
#include
+#include "JsonParser.h"
+
constexpr uint8_t kMaxLabelLength = 100;
class ComplexArgumentParser
@@ -308,63 +310,23 @@ template
class TypedComplexArgument : public ComplexArgument
{
public:
+ TypedComplexArgument() {}
TypedComplexArgument(T * request) : mRequest(request) {}
- ~TypedComplexArgument() { ComplexArgumentParser::Finalize(*mRequest); }
+ ~TypedComplexArgument()
+ {
+ if (mRequest != nullptr)
+ {
+ ComplexArgumentParser::Finalize(*mRequest);
+ }
+ }
+
+ void SetArgument(T * request) { mRequest = request; };
CHIP_ERROR Parse(const char * label, const char * json)
{
Json::Value value;
- Json::Reader reader;
- if (!reader.parse(json, value))
+ if (!JsonParser::ParseComplexArgument(label, json, value))
{
- std::vector errors = reader.getStructuredErrors();
- ChipLogError(chipTool, "Error parsing JSON for %s:", label);
- for (auto & error : errors)
- {
- ChipLogError(chipTool, " %s", error.message.c_str());
- ptrdiff_t error_start = error.offset_start;
- ptrdiff_t error_end = error.offset_limit;
- const char * sourceText = json;
- // The whole JSON string might be too long to fit in our log
- // messages. Just include 30 chars before the error.
- constexpr ptrdiff_t kMaxContext = 30;
- std::string errorMsg;
- if (error_start > kMaxContext)
- {
- sourceText += (error_start - kMaxContext);
- error_end = kMaxContext + (error_end - error_start);
- error_start = kMaxContext;
- ChipLogError(chipTool, "... %s", sourceText);
- // Add markers corresponding to the "... " above.
- errorMsg += "----";
- }
- else
- {
- ChipLogError(chipTool, "%s", sourceText);
- }
- for (ptrdiff_t i = 0; i < error_start; ++i)
- {
- errorMsg += "-";
- }
- errorMsg += "^";
- if (error_start + 1 < error_end)
- {
- for (ptrdiff_t i = error_start + 1; i < error_end; ++i)
- {
- errorMsg += "-";
- }
- errorMsg += "^";
- }
- ChipLogError(chipTool, "%s", errorMsg.c_str());
-
- if (error.message == "Missing ',' or '}' in object declaration" && error.offset_start > 0 &&
- json[error.offset_start - 1] == '0' && (json[error.offset_start] == 'x' || json[error.offset_start] == 'X'))
- {
- ChipLogError(chipTool,
- "NOTE: JSON does not allow hex syntax beginning with 0x for numbers. Try putting the hex number "
- "in quotes (like {\"name\": \"0x100\"}).");
- }
- }
return CHIP_ERROR_INVALID_ARGUMENT;
}
diff --git a/examples/chip-tool/commands/clusters/CustomArgument.h b/examples/chip-tool/commands/clusters/CustomArgument.h
index 2362171aa06da9..6755703fa0b7d5 100644
--- a/examples/chip-tool/commands/clusters/CustomArgument.h
+++ b/examples/chip-tool/commands/clusters/CustomArgument.h
@@ -22,6 +22,8 @@
#include
#include
+#include "JsonParser.h"
+
namespace {
static constexpr char kPayloadHexPrefix[] = "hex:";
static constexpr char kPayloadSignedPrefix[] = "s:";
@@ -230,9 +232,30 @@ class CustomArgument
CHIP_ERROR Parse(const char * label, const char * json)
{
- Json::Reader reader;
Json::Value value;
- reader.parse(json, value);
+ constexpr const char kHexNumPrefix[] = "0x";
+ constexpr size_t kHexNumPrefixLen = ArraySize(kHexNumPrefix) - 1;
+ if (strncmp(json, kPayloadHexPrefix, kPayloadHexPrefixLen) == 0 ||
+ strncmp(json, kPayloadSignedPrefix, kPayloadSignedPrefixLen) == 0 ||
+ strncmp(json, kPayloadUnsignedPrefix, kPayloadUnsignedPrefixLen) == 0 ||
+ strncmp(json, kPayloadFloatPrefix, kPayloadFloatPrefixLen) == 0 ||
+ strncmp(json, kPayloadDoublePrefix, kPayloadDoublePrefixLen) == 0)
+ {
+ value = Json::Value(json);
+ }
+ else if (strncmp(json, kHexNumPrefix, kHexNumPrefixLen) == 0)
+ {
+ // Assume that hex numbers are unsigned. Prepend
+ // kPayloadUnsignedPrefix and then let the rest of the logic handle
+ // things.
+ std::string str(kPayloadUnsignedPrefix);
+ str += json;
+ value = Json::Value(str);
+ }
+ else if (!JsonParser::ParseCustomArgument(label, json, value))
+ {
+ return CHIP_ERROR_INVALID_ARGUMENT;
+ }
mData = static_cast(chip::Platform::MemoryCalloc(sizeof(uint8_t), mDataMaxLen));
VerifyOrReturnError(mData != nullptr, CHIP_ERROR_NO_MEMORY);
diff --git a/examples/chip-tool/commands/clusters/JsonParser.h b/examples/chip-tool/commands/clusters/JsonParser.h
new file mode 100644
index 00000000000000..2b74aee6fffb7c
--- /dev/null
+++ b/examples/chip-tool/commands/clusters/JsonParser.h
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2022 Project CHIP Authors
+ * All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#pragma once
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+class JsonParser
+{
+public:
+ // Returns whether the parse succeeded.
+ static bool ParseComplexArgument(const char * label, const char * json, Json::Value & value)
+ {
+ return Parse(label, json, /* strictRoot = */ true, value);
+ }
+
+ // Returns whether the parse succeeded.
+ static bool ParseCustomArgument(const char * label, const char * json, Json::Value & value)
+ {
+ return Parse(label, json, /* strictRoot = */ false, value);
+ }
+
+private:
+ static bool Parse(const char * label, const char * json, bool strictRoot, Json::Value & value)
+ {
+ Json::CharReaderBuilder readerBuilder;
+ readerBuilder.settings_["strictRoot"] = strictRoot;
+ readerBuilder.settings_["allowSingleQuotes"] = true;
+ readerBuilder.settings_["failIfExtra"] = true;
+ readerBuilder.settings_["rejectDupKeys"] = true;
+
+ auto reader = std::unique_ptr(readerBuilder.newCharReader());
+ std::string errors;
+ if (reader->parse(json, json + strlen(json), &value, &errors))
+ {
+ return true;
+ }
+
+ // The CharReader API allows us to set failIfExtra, unlike Reader, but does
+ // not allow us to get structured errors. We get to try to manually undo
+ // the work it did to create a string from the structured errors it had.
+ ChipLogError(chipTool, "Error parsing JSON for %s:", label);
+
+ // For each error "errors" has the following:
+ //
+ // 1) A line starting with "* " that has line/column info
+ // 2) A line with the error message.
+ // 3) An optional line with some extra info.
+ //
+ // We keep track of the last error column, in case the error message
+ // reporting needs it.
+ std::istringstream stream(errors);
+ std::string error;
+ chip::Optional errorColumn;
+ while (getline(stream, error))
+ {
+ if (error.rfind("* ", 0) == 0)
+ {
+ // Flush out any pending error location.
+ LogErrorLocation(errorColumn, json);
+
+ // The format of this line is:
+ //
+ // * Line N, Column M
+ //
+ // Unfortunately it does not indicate end of error, so we can only
+ // show its start.
+ unsigned errorLine; // ignored in practice
+ if (sscanf(error.c_str(), "* Line %u, Column %u", &errorLine, &errorColumn.Emplace()) != 2)
+ {
+ ChipLogError(chipTool, "Unexpected location string: %s\n", error.c_str());
+ // We don't know how to make sense of this thing anymore.
+ break;
+ }
+ if (errorColumn.Value() == 0)
+ {
+ ChipLogError(chipTool, "Expected error column to be at least 1");
+ // We don't know how to make sense of this thing anymore.
+ break;
+ }
+ // We are using our column numbers as offsets, so want them to be
+ // 0-based.
+ --errorColumn.Value();
+ }
+ else
+ {
+ ChipLogError(chipTool, " %s", error.c_str());
+ if (error == " Missing ',' or '}' in object declaration" && errorColumn.HasValue() && errorColumn.Value() > 0 &&
+ json[errorColumn.Value() - 1] == '0' && (json[errorColumn.Value()] == 'x' || json[errorColumn.Value()] == 'X'))
+ {
+ // Log the error location marker before showing the NOTE
+ // message.
+ LogErrorLocation(errorColumn, json);
+ ChipLogError(chipTool,
+ "NOTE: JSON does not allow hex syntax beginning with 0x for numbers. Try putting the hex number "
+ "in quotes (like {\"name\": \"0x100\"}).");
+ }
+ }
+ }
+
+ // Write out the marker for our last error.
+ LogErrorLocation(errorColumn, json);
+
+ return false;
+ }
+
+private:
+ static void LogErrorLocation(chip::Optional & errorColumn, const char * json)
+ {
+ if (!errorColumn.HasValue())
+ {
+ return;
+ }
+
+ const char * sourceText = json;
+ unsigned error_start = errorColumn.Value();
+ // The whole JSON string might be too long to fit in our log
+ // messages. Just include 30 chars before the error.
+ constexpr ptrdiff_t kMaxContext = 30;
+ std::string errorMarker;
+ if (error_start > kMaxContext)
+ {
+ sourceText += (error_start - kMaxContext);
+ error_start = kMaxContext;
+ ChipLogError(chipTool, "... %s", sourceText);
+ // Add markers corresponding to the "... " above.
+ errorMarker += "----";
+ }
+ else
+ {
+ ChipLogError(chipTool, "%s", sourceText);
+ }
+ for (unsigned i = 0; i < error_start; ++i)
+ {
+ errorMarker += "-";
+ }
+ errorMarker += "^";
+ ChipLogError(chipTool, "%s", errorMarker.c_str());
+ errorColumn.ClearValue();
+ }
+};
diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h
index b6fa961bff756d..4a0c2c08f5d469 100644
--- a/examples/chip-tool/commands/clusters/ModelCommand.h
+++ b/examples/chip-tool/commands/clusters/ModelCommand.h
@@ -18,7 +18,10 @@
#pragma once
+#ifdef CONFIG_USE_LOCAL_STORAGE
#include "../../config/PersistentStorage.h"
+#endif // CONFIG_USE_LOCAL_STORAGE
+
#include "../common/CHIPCommand.h"
#include
diff --git a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h
index effc9f4edca2b6..207127a39b1031 100644
--- a/examples/chip-tool/commands/clusters/SubscriptionsCommands.h
+++ b/examples/chip-tool/commands/clusters/SubscriptionsCommands.h
@@ -18,6 +18,11 @@
#pragma once
+#include
+
+#include
+#include
+
class ShutdownSubscription : public CHIPCommand
{
public:
diff --git a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h
index 93ca6d167fc41b..57cad5cbf7f0cc 100644
--- a/examples/chip-tool/commands/clusters/WriteAttributeCommand.h
+++ b/examples/chip-tool/commands/clusters/WriteAttributeCommand.h
@@ -23,23 +23,70 @@
#include "DataModelLogger.h"
#include "ModelCommand.h"
+template >
class WriteAttribute : public InteractionModelWriter, public ModelCommand, public chip::app::WriteClient::Callback
{
public:
WriteAttribute(CredentialIssuerCommands * credsIssuerConfig) :
InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig)
{
- AddArgument("cluster-id", 0, UINT32_MAX, &mClusterId);
- AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId);
- AddArgument("attribute-value", &mAttributeValue);
+ AddArgumentClusterIds();
+ AddArgumentAttributeIds();
+ AddArgumentAttributeValues();
AddArguments();
}
WriteAttribute(chip::ClusterId clusterId, CredentialIssuerCommands * credsIssuerConfig) :
- InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig), mClusterId(clusterId)
+ InteractionModelWriter(this), ModelCommand("write-by-id", credsIssuerConfig), mClusterIds(1, clusterId)
{
- AddArgument("attribute-id", 0, UINT32_MAX, &mAttributeId);
- AddArgument("attribute-value", &mAttributeValue);
+ AddArgumentAttributeIds();
+ AddArgumentAttributeValues();
+ AddArguments();
+ }
+
+ template
+ WriteAttribute(chip::ClusterId clusterId, const char * attributeName, minType minValue, maxType maxValue,
+ chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeId, credsIssuerConfig)
+ {
+ AddArgumentAttributeName(attributeName);
+ AddArgumentAttributeValues(static_cast(minValue), static_cast(maxValue));
+ AddArguments();
+ }
+
+ WriteAttribute(chip::ClusterId clusterId, const char * attributeName, float minValue, float maxValue,
+ chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeId, credsIssuerConfig)
+ {
+ AddArgumentAttributeName(attributeName);
+ AddArgumentAttributeValues(minValue, maxValue);
+ AddArguments();
+ }
+
+ WriteAttribute(chip::ClusterId clusterId, const char * attributeName, double minValue, double maxValue,
+ chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeId, credsIssuerConfig)
+ {
+ AddArgumentAttributeName(attributeName);
+ AddArgumentAttributeValues(minValue, maxValue);
+ AddArguments();
+ }
+
+ WriteAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId,
+ CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeId, credsIssuerConfig)
+ {
+ AddArgumentAttributeName(attributeName);
+ AddArgumentAttributeValues();
+ AddArguments();
+ }
+
+ WriteAttribute(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId,
+ TypedComplexArgument & attributeParser, CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeId, credsIssuerConfig)
+ {
+ AddArgumentAttributeName(attributeName);
+ AddArgumentAttributeValues(attributeParser);
AddArguments();
}
@@ -47,12 +94,12 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi
CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override
{
- return WriteAttribute::SendCommand(device, endpointIds.at(0), mClusterId, mAttributeId, mAttributeValue);
+ return WriteAttribute::SendCommand(device, endpointIds, mClusterIds, mAttributeIds, mAttributeValues);
}
CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
{
- return WriteAttribute::SendGroupCommand(groupId, fabricIndex, mClusterId, mAttributeId, mAttributeValue);
+ return WriteAttribute::SendGroupCommand(groupId, fabricIndex, mClusterIds, mAttributeIds, mAttributeValues);
}
/////////// WriteClient Callback Interface /////////
@@ -79,23 +126,27 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi
SetCommandExitStatus(mError);
}
- template
- CHIP_ERROR SendCommand(chip::DeviceProxy * device, chip::EndpointId endpointId, chip::ClusterId clusterId,
- chip::AttributeId attributeId, const T & value)
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds,
+ std::vector clusterIds, std::vector attributeIds, const T & values)
{
- ChipLogProgress(chipTool, "Sending WriteAttribute to cluster " ChipLogFormatMEI " on endpoint %u",
- ChipLogValueMEI(clusterId), endpointId);
- return InteractionModelWriter::WriteAttribute(device, endpointId, clusterId, attributeId, value, mTimedInteractionTimeoutMs,
- mSuppressResponse, mDataVersion, mRepeatCount, mRepeatDelayInMs);
+ return InteractionModelWriter::WriteAttribute(device, endpointIds, clusterIds, attributeIds, values,
+ mTimedInteractionTimeoutMs, mSuppressResponse, mDataVersions, mRepeatCount,
+ mRepeatDelayInMs);
}
- template
- CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, chip::ClusterId clusterId,
- chip::AttributeId attributeId, const T & value)
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex, std::vector clusterIds,
+ std::vector attributeIds, const T & value)
{
ChipLogDetail(chipTool, "Sending Write Attribute to Group %u, on Fabric %x, for cluster %u with attributeId %u", groupId,
- fabricIndex, clusterId, attributeId);
- return InteractionModelWriter::WriteGroupAttribute(groupId, fabricIndex, clusterId, attributeId, value, mDataVersion);
+ fabricIndex, clusterIds.at(0), attributeIds.at(0));
+ chip::Optional dataVersion = chip::NullOptional;
+ if (mDataVersions.HasValue())
+ {
+ dataVersion.SetValue(mDataVersions.Value().at(0));
+ }
+
+ return InteractionModelWriter::WriteGroupAttribute(groupId, fabricIndex, clusterIds.at(0), attributeIds.at(0), value,
+ dataVersion);
}
protected:
@@ -105,11 +156,47 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi
// Subclasses are responsible for calling AddArguments.
}
+ void AddArgumentClusterIds()
+ {
+ AddArgument("cluster-ids", 0, UINT32_MAX, &mClusterIds,
+ "Comma-separated list of cluster ids to write to (e.g. \"6\" or \"6,0x201\").");
+ }
+
+ void AddArgumentAttributeIds()
+ {
+ AddArgument("attribute-ids", 0, UINT32_MAX, &mAttributeIds,
+ "Comma-separated list of attribute ids to write (e.g. \"16385\" or \"16385,0x4002\").");
+ }
+
+ void AddArgumentAttributeName(const char * attributeName)
+ {
+ AddArgument("attribute-name", attributeName, "The attribute name to write.");
+ }
+
+ template
+ void AddArgumentAttributeValues(minType minValue, maxType maxValue)
+ {
+ AddArgument("attribute-values", minValue, maxValue, &mAttributeValues,
+ "Comma-separated list of attribute values to write.");
+ }
+
+ void AddArgumentAttributeValues()
+ {
+ AddArgument("attribute-values", &mAttributeValues, "Comma-separated list of attribute values to write.");
+ }
+
+ void AddArgumentAttributeValues(TypedComplexArgument & attributeParser)
+ {
+ attributeParser.SetArgument(&mAttributeValues);
+ AddArgument("attribute-values", &attributeParser, "Comma-separated list of attribute values to write.");
+ }
+
void AddArguments()
{
AddArgument("timedInteractionTimeoutMs", 0, UINT16_MAX, &mTimedInteractionTimeoutMs,
"If provided, do a timed write with the given timed interaction timeout.");
- AddArgument("data-version", 0, UINT32_MAX, &mDataVersion);
+ AddArgument("data-version", 0, UINT32_MAX, &mDataVersions,
+ "Comma-separated list of data versions for the clusters being written.");
AddArgument("suppressResponse", 0, 1, &mSuppressResponse);
AddArgument("repeat-count", 1, UINT16_MAX, &mRepeatCount);
AddArgument("repeat-delay-ms", 0, UINT16_MAX, &mRepeatDelayInMs);
@@ -117,13 +204,34 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi
}
private:
- chip::ClusterId mClusterId;
- chip::AttributeId mAttributeId;
+ // This constructor is private as it is not intended to be used from outside the class.
+ WriteAttribute(chip::ClusterId clusterId, chip::AttributeId attributeId, CredentialIssuerCommands * credsIssuerConfig) :
+ InteractionModelWriter(this), ModelCommand("write", credsIssuerConfig), mClusterIds(1, clusterId),
+ mAttributeIds(1, attributeId)
+ {}
+
+ std::vector mClusterIds;
+ std::vector mAttributeIds;
+
CHIP_ERROR mError = CHIP_NO_ERROR;
chip::Optional mTimedInteractionTimeoutMs;
- chip::Optional mDataVersion = chip::NullOptional;
+ chip::Optional> mDataVersions;
chip::Optional mSuppressResponse;
- CustomArgument mAttributeValue;
chip::Optional mRepeatCount;
chip::Optional mRepeatDelayInMs;
+
+ T mAttributeValues;
+};
+
+template
+class WriteAttributeAsComplex : public WriteAttribute
+{
+public:
+ WriteAttributeAsComplex(chip::ClusterId clusterId, const char * attributeName, chip::AttributeId attributeId,
+ CredentialIssuerCommands * credsIssuerConfig) :
+ WriteAttribute(clusterId, attributeName, attributeId, mAttributeParser, credsIssuerConfig)
+ {}
+
+private:
+ TypedComplexArgument mAttributeParser;
};
diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp
index 02194ed59b4096..4e10e67e74b2e8 100644
--- a/examples/chip-tool/commands/common/CHIPCommand.cpp
+++ b/examples/chip-tool/commands/common/CHIPCommand.cpp
@@ -71,10 +71,12 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
#endif
ReturnLogErrorOnFailure(mDefaultStorage.Init());
+ ReturnLogErrorOnFailure(mOperationalKeystore.Init(&mDefaultStorage));
chip::Controller::FactoryInitParams factoryInitParams;
factoryInitParams.fabricIndependentStorage = &mDefaultStorage;
+ factoryInitParams.operationalKeystore = &mOperationalKeystore;
// Init group data provider that will be used for all group keys and IPKs for the
// chip-tool-configured fabrics. This is OK to do once since the fabric tables
diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h
index 3fbe81781a15f8..e484260a3a4fb1 100644
--- a/examples/chip-tool/commands/common/CHIPCommand.h
+++ b/examples/chip-tool/commands/common/CHIPCommand.h
@@ -18,16 +18,19 @@
#pragma once
+#ifdef CONFIG_USE_LOCAL_STORAGE
#include "../../config/PersistentStorage.h"
+#endif // CONFIG_USE_LOCAL_STORAGE
+
#include "Command.h"
+
#include
#include
#include
+#include
#pragma once
-class PersistentStorage;
-
constexpr const char kIdentityAlpha[] = "alpha";
constexpr const char kIdentityBeta[] = "beta";
constexpr const char kIdentityGamma[] = "gamma";
@@ -113,8 +116,12 @@ class CHIPCommand : public Command
// Execute any deferred cleanups. Used when exiting interactive mode.
void ExecuteDeferredCleanups();
+#ifdef CONFIG_USE_LOCAL_STORAGE
PersistentStorage mDefaultStorage;
PersistentStorage mCommissionerStorage;
+#endif // CONFIG_USE_LOCAL_STORAGE
+ chip::PersistentStorageOperationalKeystore mOperationalKeystore;
+
chip::Credentials::GroupDataProviderImpl mGroupDataProvider{ kMaxGroupsPerFabric, kMaxGroupKeysPerFabric };
CredentialIssuerCommands * mCredIssuerCmds;
diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp
index f5828f2b138326..1931d88e39752f 100644
--- a/examples/chip-tool/commands/common/Command.cpp
+++ b/examples/chip-tool/commands/common/Command.cpp
@@ -305,6 +305,23 @@ bool Command::InitArgument(size_t argIndex, char * argValue)
return true;
}
+ case ArgumentType::VectorCustom: {
+ auto vectorArgument = static_cast *>(arg.value);
+
+ std::stringstream ss(argValue);
+ while (ss.good())
+ {
+ std::string valueAsString;
+ getline(ss, valueAsString, ',');
+
+ CustomArgument * customArgument = new CustomArgument();
+ vectorArgument->push_back(customArgument);
+ VerifyOrReturnError(CHIP_NO_ERROR == vectorArgument->back()->Parse(arg.name, valueAsString.c_str()), false);
+ }
+
+ return true;
+ }
+
case ArgumentType::Attribute: {
if (arg.isOptional() || arg.isNullable())
{
@@ -695,6 +712,18 @@ size_t Command::AddArgument(const char * name, CustomArgument * value, const cha
return AddArgumentToList(std::move(arg));
}
+size_t Command::AddArgument(const char * name, std::vector * value, const char * desc)
+{
+ Argument arg;
+ arg.type = ArgumentType::VectorCustom;
+ arg.name = name;
+ arg.value = static_cast(value);
+ arg.flags = 0;
+ arg.desc = desc;
+
+ return AddArgumentToList(std::move(arg));
+}
+
size_t Command::AddArgument(const char * name, float min, float max, float * out, const char * desc, uint8_t flags)
{
Argument arg;
@@ -855,5 +884,14 @@ void Command::ResetArguments()
optionalArgument->Value().clear();
}
}
+ else if (type == ArgumentType::VectorCustom && flags != Argument::kOptional)
+ {
+ auto vectorArgument = static_cast *>(arg.value);
+ for (auto & customArgument : *vectorArgument)
+ {
+ delete customArgument;
+ }
+ vectorArgument->clear();
+ }
}
}
diff --git a/examples/chip-tool/commands/common/Command.h b/examples/chip-tool/commands/common/Command.h
index b9a1c2bc1cb972..2a7411cf506854 100644
--- a/examples/chip-tool/commands/common/Command.h
+++ b/examples/chip-tool/commands/common/Command.h
@@ -73,6 +73,7 @@ enum ArgumentType
VectorBool,
Vector16,
Vector32,
+ VectorCustom,
};
struct Argument
@@ -179,6 +180,7 @@ class Command
size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value, const char * desc = "");
size_t AddArgument(const char * name, int64_t min, uint64_t max, std::vector * value, const char * desc = "");
+ size_t AddArgument(const char * name, std::vector * value, const char * desc = "");
size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value,
const char * desc = "");
size_t AddArgument(const char * name, int64_t min, uint64_t max, chip::Optional> * value,
diff --git a/examples/chip-tool/commands/common/Commands.cpp b/examples/chip-tool/commands/common/Commands.cpp
index 131e66f1c8aa3e..16e188c1dee2ca 100644
--- a/examples/chip-tool/commands/common/Commands.cpp
+++ b/examples/chip-tool/commands/common/Commands.cpp
@@ -41,10 +41,12 @@ int Commands::Run(int argc, char ** argv)
err = chip::Platform::MemoryInit();
VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Memory failure: %s", chip::ErrorStr(err)));
+#ifdef CONFIG_USE_LOCAL_STORAGE
err = mStorage.Init();
VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(Controller, "Init Storage failure: %s", chip::ErrorStr(err)));
chip::Logging::SetLogFilter(mStorage.GetLoggingLevel());
+#endif // CONFIG_USE_LOCAL_STORAGE
err = RunCommand(argc, argv);
VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Run command failure: %s", chip::ErrorStr(err)));
@@ -56,7 +58,12 @@ int Commands::Run(int argc, char ** argv)
int Commands::RunInteractive(int argc, char ** argv)
{
CHIP_ERROR err = RunCommand(argc, argv, true);
- return (err == CHIP_NO_ERROR) ? EXIT_SUCCESS : EXIT_FAILURE;
+ if (err == CHIP_NO_ERROR)
+ {
+ return EXIT_SUCCESS;
+ }
+ ChipLogError(chipTool, "Run command failure: %s", chip::ErrorStr(err));
+ return EXIT_FAILURE;
}
CHIP_ERROR Commands::RunCommand(int argc, char ** argv, bool interactive)
diff --git a/examples/chip-tool/commands/common/Commands.h b/examples/chip-tool/commands/common/Commands.h
index e70a942779c9e1..a39c984954777e 100644
--- a/examples/chip-tool/commands/common/Commands.h
+++ b/examples/chip-tool/commands/common/Commands.h
@@ -18,7 +18,10 @@
#pragma once
+#ifdef CONFIG_USE_LOCAL_STORAGE
#include "../../config/PersistentStorage.h"
+#endif // CONFIG_USE_LOCAL_STORAGE
+
#include "Command.h"
#include