diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5ddef22276ed10..aecc5372bcc41c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.6.27" + "BUILD_VERSION": "0.6.30" } }, "remoteUser": "vscode", diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index ba734f22758ca9..da6bc36782823f 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.6.27 + image: connectedhomeip/chip-build:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 00ab192750e13f..88c8d1f93b38b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -308,7 +308,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 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 eca0463b31931a..2e109de498da9b 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 options: --user root steps: @@ -85,8 +85,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - # TODO: update this to connectedhomeip/chip-build-vscode:0.6.27 once we can compile with latest NRF - image: connectedhomeip/chip-build-nrf-platform:0.6.18 + image: connectedhomeip/chip-build-nrf-platform:0.6.30 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 58fc8091a224df..47aa37c7fbf43c 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 90 env: - DOCKER_RUN_VERSION: 0.6.27 + DOCKER_RUN_VERSION: 0.6.30 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -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.6.27 + # image: connectedhomeip/chip-build-cirque:0.6.30 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/docbuild.yaml b/.github/workflows/docbuild.yaml new file mode 100644 index 00000000000000..4e2d9bc22325e3 --- /dev/null +++ b/.github/workflows/docbuild.yaml @@ -0,0 +1,49 @@ +name: Documentation Build + +on: + push: + branches: + - master + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v2 + with: + path: matter + fetch-depth: 0 + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: cache-pip + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-doc-pip + - name: Install base dependencies + working-directory: matter + run: | + sudo pip3 install -U pip + pip3 install -r docs/requirements.txt + - name: Build documentation + working-directory: matter/docs + run: | + mkdir -p _build/src + make html + touch _build/html/.nojekyll + - name: Deploy to gh-pages + if: github.repository == 'project-chip/connectedhomeip' + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} + external_repository: project-chip/connectedhomeip-doc + publish_dir: matter/docs/_build/html + # Keep only the latest version of the documentation + force_orphan: true diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 669efca5f6d4c7..a0d90fb6dd7bf8 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.6.27 + image: connectedhomeip/chip-build-doxygen:0.6.30 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 3b568a270aa0ae..fe6ec75bc1d053 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.6.27 + image: connectedhomeip/chip-build-ameba:0.6.30 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 04331435bc6e14..450dda1c5e19e9 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-bouffalolab:0.6.27 + image: connectedhomeip/chip-build-bouffalolab:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 99baf383bbaf3f..4d25db0057f90a 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.27 + image: connectedhomeip/chip-build-ti:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 90e0e397c82517..0e0f47a7190235 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.6.27 + image: connectedhomeip/chip-build-efr32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 13a025fe229767..0dcf9ab1146b3f 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -140,7 +140,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index bb629fa999fcf2..337812324e99df 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.6.27 + image: connectedhomeip/chip-build-infineon:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 53b1aa46701771..f061bd6a3790e3 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.6.27 + image: connectedhomeip/chip-build-k32w:0.6.30 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 159960bef927a4..070caf359cff5e 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.6.27 + image: connectedhomeip/chip-build-crosscompile:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 42f426bfa959b0..40df5727eba7e4 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-imx:0.6.27 + image: connectedhomeip/chip-build-imx:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 11c913cfee488c..5dc4b9e66f756f 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.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 91f9f6f82a2097..72d23e7deab915 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.6.27 + image: connectedhomeip/chip-build-mbed-os:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 7fc6238cc81034..8ca61ab37b4a96 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 1fa32d751037e8..12de9d4424a633 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.6.27 + image: connectedhomeip/chip-build-nrf-platform:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -83,9 +83,9 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - - name: Update nRF Connect SDK revision to the currently recommended. + - name: Check nRF Connect SDK revision. timeout-minutes: 15 - run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --update --shallow" + run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" - name: Run unit tests of factory data generation script timeout-minutes: 15 run: scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" @@ -231,7 +231,7 @@ jobs: examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Run unit tests for Zephyr native_posix_64 platform - if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' + if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' timeout-minutes: 15 run: | scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 7e043d58d98ee5..70ca00b83bcb2c 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-openiotsdk:0.6.27 + image: connectedhomeip/chip-build-openiotsdk:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 35bc2987a4d10a..b9d79b20c24d44 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 28d5c7faf03f4f..06c7a149b240fa 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.6.27 + image: connectedhomeip/chip-build-telink:0.6.30 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 8f892c8c712f13..bf6ce9029e4e37 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.6.27 + image: connectedhomeip/chip-build-tizen:0.6.30 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 8f87a48a9e6043..ed8532ee765314 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.27 + image: connectedhomeip/chip-build-android:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index bfb1eac538a138..a6712c966022b5 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3bfcc32bd9da4c..11bccad5b80828 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.18 + image: connectedhomeip/chip-build:0.6.27 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 965e69ae1f3576..3ad312ac5ea939 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.6.27 + image: connectedhomeip/chip-build-esp32-qemu:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 5a6c13f85f8f14..b0fedd8c3a07eb 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.6.27 + image: connectedhomeip/chip-build-esp32:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.6.27 + image: connectedhomeip/chip-build-efr32:0.6.30 steps: - uses: Wandalen/wretry.action@v1.0.36 name: Checkout diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index dc8ee425c28fca..749d90e9522863 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.27 + image: connectedhomeip/chip-build-android:0.6.30 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e492cba4c6b360..e5d5d28a7952d9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -352,7 +352,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -426,7 +426,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.27 + image: connectedhomeip/chip-build:0.6.30 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index a6cb192b058a99..04e3ee8578a206 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.6.27 + image: connectedhomeip/chip-build:0.6.30 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/.gitignore b/.gitignore index 5baec0fd0ed020..8d4ea014d762c6 100644 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,12 @@ __pycache__ # Doxygen outputs docs/html +# Python venv +.venv + +# Documentation +docs/_build + # VSCode java extensions .project diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000000000..38bd3dafddc409 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +line_length = 132 diff --git a/.restyled.yaml b/.restyled.yaml index 75b649d9e4242d..247249683cca2d 100644 --- a/.restyled.yaml +++ b/.restyled.yaml @@ -213,7 +213,7 @@ restylers: - "**/*.sh" - "**/*.bash" - name: autopep8 - image: 'restyled/restyler-autopep8:v1.5.7' + image: 'restyled/restyler-autopep8:v2.0.0' command: - autopep8 - '--in-place' @@ -222,3 +222,12 @@ restylers: - '**/*.py' interpreters: - python + - name: isort + image: 'restyled/restyler-isort:v5.11.2' + command: + - isort + arguments: [] + include: + - '**/*.py' + interpreters: + - python diff --git a/.spellcheck.yml b/.spellcheck.yml index 09fc2794be1c94..28915deea38167 100644 --- a/.spellcheck.yml +++ b/.spellcheck.yml @@ -46,7 +46,11 @@ matrix: # ```python # content # ``` - - open: '(?s)^(?P *`{3,})[a-z]*$' + # + # Allow MyST extended syntax like: + # ```{include} my/file.md + # ``` + - open: '(?s)^(?P *`{3,})([a-z]*$|{[a-z]*?}\s*[^\n]*?$)' close: '^(?P=open)$' # Ignore text between inline back ticks - open: '(?P`+)' diff --git a/build/chip/java/tests/test.py b/build/chip/java/tests/test.py index 68ca31c5c3c9c3..a67c40079b1a59 100755 --- a/build/chip/java/tests/test.py +++ b/build/chip/java/tests/test.py @@ -18,9 +18,9 @@ import json import os -from os import path import subprocess import unittest +from os import path class JavaBuildTest(unittest.TestCase): diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 9c63bd63b31466..13a13f804c3248 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -69,7 +69,9 @@ if (_chip_defaults.custom_toolchain != "") { } _default_toolchain = "${_build_overrides.build_root}/toolchain/linux:linux_${target_cpu}_${_target_compiler}" -} else if (target_os == host_os && target_cpu == host_cpu) { +} else if (target_os == host_os && + (target_cpu == host_cpu || + (target_cpu == "arm64e" && host_cpu == "arm64"))) { _default_toolchain = host_toolchain } else if (target_os == "freertos") { if (_chip_defaults.is_clang) { diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py index 510a0827054262..664deb766597c1 100755 --- a/build/config/linux/pkg-config.py +++ b/build/config/linux/pkg-config.py @@ -32,9 +32,9 @@ import json import os +import re import subprocess import sys -import re from optparse import OptionParser # This script runs pkg-config, optionally filtering out some results, and diff --git a/config/esp32/components/chip/create_args_gn.py b/config/esp32/components/chip/create_args_gn.py index ddde6aaaba5732..1cb95fb12e761d 100644 --- a/config/esp32/components/chip/create_args_gn.py +++ b/config/esp32/components/chip/create_args_gn.py @@ -19,9 +19,9 @@ # Component makefile for building CHIP within the ESP32 ESP-IDF environment. # +import argparse import json import os -import argparse # Parse the build's compile_commands.json to generate # final args file for CHIP build. diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index 826e1424638453..a4b6ac3ded6d12 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.1.1 +v2.2.0 diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index cef54d4bd014f6..0ca4a816f5f1d2 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -92,6 +92,8 @@ set(CHIP_GN_ROOT_TARGET ${CHIP_ROOT}/config/nrfconnect/chip-gn) # Prepare compiler flags +list(APPEND CHIP_CFLAGS -D_DEFAULT_SOURCE) + if (CONFIG_ARM) list(APPEND CHIP_CFLAGS_C --specs=nosys.specs @@ -309,6 +311,7 @@ add_dependencies(chip-gn kernel) zephyr_interface_library_named(chip) target_compile_definitions(chip INTERFACE CHIP_HAVE_CONFIG_H) +target_compile_definitions(chip INTERFACE _DEFAULT_SOURCE) target_include_directories(chip INTERFACE ${CHIP_ROOT}/src ${CHIP_ROOT}/src/include diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index 88519293b67d77..f6010168f4b3da 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -71,10 +71,6 @@ config MAIN_STACK_SIZE config INIT_STACKS default y -# Disable certain parts of Zephyr IPv6 stack -config NET_IPV6_NBR_CACHE - default n - config NET_IPV6_MLD default y @@ -121,7 +117,9 @@ config BT_DEVICE_NAME_MAX default 15 config BT_MAX_CONN - default 1 + default 2 # a workaround for non-unreferenced BLE connection object + # when restaring the BLE advertising in disconnect callback + # TODO: analyze and revert to 1 if proper fix exists config BT_L2CAP_TX_MTU default 247 @@ -189,6 +187,11 @@ config NET_L2_OPENTHREAD if NET_L2_OPENTHREAD +# Disable certain parts of Zephyr IPv6 stack +config NET_IPV6_NBR_CACHE + bool + default n + # Increase the default RX stack size config IEEE802154_NRF5_RX_STACK_SIZE default 1024 @@ -204,7 +207,7 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG default n config SYSTEM_WORKQUEUE_STACK_SIZE - default 1120 + default 2048 # align these numbers to match the OpenThread config config NET_IF_UNICAST_IPV6_ADDR_COUNT @@ -319,9 +322,6 @@ config MBEDTLS_GCM_C config MBEDTLS_RSA_C default n -config PSA_WANT_KEY_TYPE_ARIA - default n - config PSA_WANT_KEY_TYPE_CHACHA20 default n diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 4fd9b7ec36d17c..45b04b9a1e2216 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -20,6 +20,7 @@ menuconfig CHIP select CPLUSPLUS imply LIB_CPLUSPLUS imply REQUIRES_FULL_LIBC + imply NEWLIB_LIBC_NANO imply CBPRINTF_LIBC_SUBSTS imply POSIX_API if !ARCH_POSIX imply EVENTFD if !ARCH_POSIX diff --git a/credentials/fetch-paa-certs-from-dcl.py b/credentials/fetch-paa-certs-from-dcl.py index 6b49460efdfae4..6499f0e9d21ab5 100644 --- a/credentials/fetch-paa-certs-from-dcl.py +++ b/credentials/fetch-paa-certs-from-dcl.py @@ -21,17 +21,18 @@ # For usage please run:. # python ./credentials/fetch-paa-certs-from-dcl.py --help -from contextlib import nullcontext -import os -import sys -import subprocess import copy +import os import re -from cryptography.hazmat.primitives import serialization -from cryptography import x509 +import subprocess +import sys +from contextlib import nullcontext + import click -from click_option_group import optgroup, RequiredMutuallyExclusiveOptionGroup import requests +from click_option_group import RequiredMutuallyExclusiveOptionGroup, optgroup +from cryptography import x509 +from cryptography.hazmat.primitives import serialization PRODUCTION_NODE_URL = "https://on.dcl.csa-iot.org:26657" PRODUCTION_NODE_URL_REST = "https://on.dcl.csa-iot.org" diff --git a/docs/Doxyfile b/docs/Doxyfile index cafa736248e40b..76645f9caaf110 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -830,7 +830,7 @@ INPUT = README.md \ docs/guides/BUILDING.md \ docs/VSCODE_DEVELOPMENT.md \ docs/PROJECT_FLOW.md \ - docs/STYLE_GUIDE.md \ + docs/style/style_guide.md \ src/ble \ src/controller \ src/crypto \ diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 4f07058f43c2bb..4026219328fa2f 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -8,7 +8,7 @@ This file was **AUTOMATICALLY** generated by - [SDK Core errors: range `0x000..0x0FF`](#sdk-core-errors) - [SDK Inet Layer errors: range `0x100..0x1FF`](#sdk-inet-layer-errors) - [SDK Device Layer errors: range `0x200..0x2FF`](#sdk-device-layer-errors) -- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn-1-layer-errors) +- [ASN.1 Layer errors: range `0x300..0x3FF`](#asn.1-layer-errors) - [BLE Layer errors: range `0x400..0x4FF`](#ble-layer-errors) - [IM Global errors errors: range `0x500..0x5FF`](#im-global-errors-errors) diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000000000..30826e465ad549 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,21 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= -W -c . -d _build/doctrees +SPHINXBUILD ?= sphinx-build +SOURCEDIR = _build/src +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + mkdir -p "$(SOURCEDIR)" + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/README.md b/docs/README.md index dcb17c3552e56c..e4ec9c8f3a5523 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,7 +24,7 @@ ## Style Guide - Documentation about style is documented in - [the style guide](./STYLE_GUIDE.md) + [the style guide](./style/style_guide.md) - Additional documentation about more specific files are in the [style folder](./style/) diff --git a/docs/_extensions/external_content.py b/docs/_extensions/external_content.py new file mode 100644 index 00000000000000..f8c2f48a2207ba --- /dev/null +++ b/docs/_extensions/external_content.py @@ -0,0 +1,251 @@ +""" +External content +################ + +Copyright (c) 2021 Nordic Semiconductor ASA +SPDX-License-Identifier: Apache-2.0 + +Introduction +============ + +This extension allows to import sources from directories out of the Sphinx +source directory. They are copied to the source directory before starting the +build. Note that the copy is *smart*, that is, only updated files are actually +copied. Therefore, incremental builds detect changes correctly and behave as +expected. + +Links to external content not included in the generated documentation are +transformed to external links as needed. + +Configuration options +===================== + +- ``external_content_contents``: A list of external contents. Each entry is + a tuple with two fields: the external base directory and a file glob pattern. +- ``external_content_link_prefixes``: A list of link prefixes out of scope. + All links to content with these prefixes are made external. +- ``external_content_link_extensions``: A list of file extensions in scope of + the documentation. All links to content without these file extensions are + made external. +- ``external_content_keep``: A list of file globs (relative to the destination + directory) that should be kept even if they do not exist in the source + directory. This option can be useful for auto-generated files in the + destination directory. +""" + +import filecmp +import os +from pathlib import Path +import re +import shutil +import tempfile +from typing import Dict, Any, List, Optional + +from sphinx.application import Sphinx + +__version__ = "0.1.0" + +DIRECTIVES = ("figure", "image", "include", "literalinclude") +"""Default directives for included content.""" + +EXTERNAL_LINK_URL_PREFIX = ( + "https://github.com/project-chip/connectedhomeip/blob/master/" +) + + +def adjust_includes( + fname: Path, + basepath: Path, + encoding: str, + link_prefixes: List[str], + extensions: List[str], + targets: List[Path], + dstpath: Optional[Path] = None, +) -> None: + """Adjust included content paths. + + Args: + fname: File to be processed. + basepath: Base path to be used to resolve content location. + encoding: Sources encoding. + link_prefixes: Prefixes of links that are made external. + extensions: Filename extensions links to which are not made external. + targets: List of all files that are being copied. + dstpath: Destination path for fname if its path is not the actual destination. + """ + + if fname.suffix != ".md": + return + + dstpath = dstpath or fname.parent + + def _adjust_path(path): + # ignore absolute paths, section links, hyperlinks and same folder + if path.startswith(("/", "#", "http", "www")) or not "/" in path: + return path + + # for files that are being copied modify reference to and out of /docs + filepath = path.split("#")[0] + absolute = (basepath / filepath).resolve() + if absolute in targets: + if "docs/" in path: + path = path.replace("docs/", "") + elif "../examples" in path: + path = path.replace("../", "", 1) + return path + + # otherwise change links to point to their targets' original location + return Path(os.path.relpath(basepath / path, dstpath)).as_posix() + + def _adjust_links(m): + displayed, fpath = m.groups() + fpath_adj = _adjust_path(fpath) + return f"[{displayed}]({fpath_adj})" + + def _adjust_external(m): + displayed, target = m.groups() + return f"[{displayed}]({EXTERNAL_LINK_URL_PREFIX}{target})" + + def _adjust_filetype(m): + displayed, target, extension = m.groups() + if extension.lower() in extensions or target.startswith("http"): + return m.group(0) + + return f"[{displayed}]({EXTERNAL_LINK_URL_PREFIX}{target})" + + def _adjust_image_link(m): + prefix, fpath, postfix = m.groups() + fpath_adj = _adjust_path(fpath) + return f"{prefix}{fpath_adj}{postfix}" + + rules = [ + # Find any links and adjust the path + (r"\[([^\[\]]*)\]\s*\((.*)\)", _adjust_links), + + # Find links that lead to an external folder and transform it + # into an external link. + ( + r"\[([^\[\]]*)\]\s*\((?:\.\./)*((?:" + "|".join(link_prefixes) + r")[^)]*)\)", + _adjust_external, + ), + + # Find links that lead to a non-presentable filetype and transform + # it into an external link. + ( + r"\[([^\[\]]*)\]\s*\((?:\.\./)*((?:[^()]+?/)*[^.()]+?(\.[^)/#]+))(?:#[^)]+)?\)", + _adjust_filetype, + ), + + # Find links that lead to a folder and transform it into an external link. + ( + r"\[([^\[\]]*)\]\s*\((?:\.\./)*((?:[^()]+?/)+[^).#/]+)(\))", + _adjust_filetype, + ), + + # Find image links in img tags and adjust them + (r"(]*src=[\"'])([^ >]+)([\"'][^>]*>)", _adjust_image_link) + ] + + with open(fname, "r+", encoding=encoding) as f: + content = f.read() + modified = False + + for pattern, sub_func in rules: + content, changes_made = re.subn(pattern, sub_func, content) + modified = modified or changes_made + + if modified: + f.seek(0) + f.write(content) + f.truncate() + + +def sync_contents(app: Sphinx) -> None: + """Synhronize external contents. + + Args: + app: Sphinx application instance. + """ + + srcdir = Path(app.srcdir).resolve() + to_copy = [] + to_delete = set(f for f in srcdir.glob("**/*") if not f.is_dir()) + to_keep = set( + f + for k in app.config.external_content_keep + for f in srcdir.glob(k) + if not f.is_dir() + ) + + for content in app.config.external_content_contents: + prefix_src, glob = content + for src in prefix_src.glob(glob): + if src.is_dir(): + to_copy.extend( + [(f, prefix_src) for f in src.glob("**/*") if not f.is_dir()] + ) + else: + to_copy.append((src, prefix_src)) + + list_of_destinations = [f for f, _ in to_copy] + + for entry in to_copy: + src, prefix_src = entry + dst = (srcdir / src.relative_to(prefix_src)).resolve() + + if dst in to_delete: + to_delete.remove(dst) + + if not dst.parent.exists(): + dst.parent.mkdir(parents=True) + + # just copy if it does not exist + if not dst.exists(): + shutil.copy(src, dst) + adjust_includes( + dst, + src.parent, + app.config.source_encoding, + app.config.external_content_link_prefixes, + app.config.external_content_link_extensions, + list_of_destinations, + ) + # if origin file is modified only copy if different + elif src.stat().st_mtime > dst.stat().st_mtime: + with tempfile.TemporaryDirectory() as td: + # adjust origin includes before comparing + src_adjusted = Path(td) / src.name + shutil.copy(src, src_adjusted) + adjust_includes( + src_adjusted, + src.parent, + app.config.source_encoding, + app.config.external_content_link_prefixes, + app.config.external_content_link_extensions, + list_of_destinations, + dstpath=dst.parent, + ) + + if not filecmp.cmp(src_adjusted, dst): + dst.unlink() + shutil.move(os.fspath(src_adjusted), os.fspath(dst)) + + # remove any previously copied file not present in the origin folder, + # excepting those marked to be kept. + for file in to_delete - to_keep: + file.unlink() + + +def setup(app: Sphinx) -> Dict[str, Any]: + app.add_config_value("external_content_contents", [], "env") + app.add_config_value("external_content_keep", [], "") + app.add_config_value("external_content_link_prefixes", [], "env") + app.add_config_value("external_content_link_extensions", [], "env") + + app.connect("builder-inited", sync_contents) + + return { + "version": __version__, + "parallel_read_safe": True, + "parallel_write_safe": True, + } diff --git a/docs/_static/images/favicon.ico b/docs/_static/images/favicon.ico new file mode 100644 index 00000000000000..16f3d88dcc98c7 Binary files /dev/null and b/docs/_static/images/favicon.ico differ diff --git a/docs/_static/images/logo.png b/docs/_static/images/logo.png new file mode 100644 index 00000000000000..88bcee2d157f8f Binary files /dev/null and b/docs/_static/images/logo.png differ diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 00000000000000..c139642dc4ed68 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,7 @@ +# API + +```{toctree} +:glob: + +* +``` diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000000000..3625b2bca32e60 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,78 @@ +# Configuration file for the Sphinx documentation builder. + +from pathlib import Path +import sys + +# -- Paths ------------------------------------------------------------------- + +MATTER_BASE = Path(__file__).resolve().parents[1] + +sys.path.insert(0, str(MATTER_BASE / "docs" / "_extensions")) + +# -- Project information ----------------------------------------------------- + +project = "Matter" +copyright = "2022, Matter Contributors" +author = "Matter Contributors" +version = "1.0.0" + +# -- General configuration --------------------------------------------------- + +extensions = [ + "myst_parser", + "external_content", +] +exclude_patterns = [ + "_build", + "examples/android/*", + "**/nxp/linux-imx/imx8m/README.md", + "examples/ota-requestor-app/efr32/README.md", + "**/android/App/app/libs*", + "examples/providers/README.md", + "examples/platform/nxp/doc/manufacturing_flow.md", + "examples/thermostat/nxp/linux-se05x/README.md", +] + + +# -- Options for HTML output ------------------------------------------------- + +html_theme = "sphinx_book_theme" +html_logo = "_static/images/logo.png" +html_favicon = "_static/images/favicon.ico" +html_static_path = ["_static"] +html_theme_options = { + "logo_only": True, + "github_url": "https://github.com/project-chip/connectedhomeip", + "repository_url": "https://github.com/project-chip/connectedhomeip", + "use_edit_page_button": True, + "repository_branch": "master", + "path_to_docs": "docs", +} + +# -- Options for MyST -------------------------------------------------------- + +myst_heading_anchors = 6 +suppress_warnings = ["myst.header", "myst.anchor"] +myst_enable_extensions = ["html_image"] + + +# -- Options for external_content -------------------------------------------- + +external_content_contents = [ + (MATTER_BASE / "docs", "[!_R]*"), + (MATTER_BASE, "README.md"), + (MATTER_BASE, "examples/**/*.md"), + (MATTER_BASE, "examples/**/*.png"), + (MATTER_BASE, "examples/**/*.jpg"), + (MATTER_BASE, "examples/**/*.JPG"), +] +external_content_link_prefixes = [ + "src/", + r"\.vscode/", + "CONTRIBUTING", + "scripts/", + "examples/android/", + "examples/platform/", + "platform", +] +external_content_link_extensions = [".md", ".png", ".jpg", ".svg"] diff --git a/docs/discussion/index.md b/docs/discussion/index.md new file mode 100644 index 00000000000000..fac1ccb91498eb --- /dev/null +++ b/docs/discussion/index.md @@ -0,0 +1,7 @@ +# Discussion + +```{toctree} +:glob: + +* +``` diff --git a/docs/examples/discussion/PID_allocation_for_example_apps.md b/docs/examples/discussion/PID_allocation_for_example_apps.md index 18e71a20698964..2ebb169e60f099 100644 --- a/docs/examples/discussion/PID_allocation_for_example_apps.md +++ b/docs/examples/discussion/PID_allocation_for_example_apps.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # PID allocation for example apps Unless specifically overridden by the platform, example apps in this SDK use the diff --git a/docs/examples/index.md b/docs/examples/index.md new file mode 100644 index 00000000000000..6890ff955ec866 --- /dev/null +++ b/docs/examples/index.md @@ -0,0 +1,258 @@ +# Examples + +The Matter SDK provides examples of Matter devices for different development +platforms. + +## All clusters example + +```{toctree} +:glob: +:maxdepth: 1 + +all-clusters-app/**/README +all-clusters-app/**/Readme +``` + +## All clusters minimal example + +```{toctree} +:glob: +:maxdepth: 1 + +all-clusters-minimal-app/**/README +all-clusters-minimal-app/**/Readme +``` + +## Bridge example + +```{toctree} +:glob: +:maxdepth: 1 + +bridge-app/**/README +``` + +## Contact Sensor Example + +```{toctree} +:glob: +:maxdepth: 1 + +contact-sensor-app/**/README +``` + +## CHEF example + +```{toctree} +:glob: +:maxdepth: 1 + +chef/README* +chef/**/README +``` + +## CHIP Tool example + +```{toctree} +:glob: +:maxdepth: 1 + +chip-tool/README +``` + +## CHIP Tool Darwin example + +```{toctree} +:glob: +:maxdepth: 1 + +darwin-framework-tool/README +``` + +## Dynamic bridge example + +```{toctree} +:glob: +:maxdepth: 1 + +dynamic-bridge-app/**/README +``` + +## Java matter controller example + +```{toctree} +:glob: +:maxdepth: 1 + +java-matter-controller/README +``` + +## Lighting example + +```{toctree} +:glob: +:maxdepth: 1 + +lighting-app/**/README +lighting-app/qpg/APPLICATION +``` + +## Light switch example + +```{toctree} +:glob: +:maxdepth: 1 + +light-switch-app/**/README +``` + +## Lock example + +```{toctree} +:glob: +:maxdepth: 1 + +lock-app/**/README +lock-app/qpg/APPLICATION +``` + +## Log source example + +```{toctree} +:glob: +:maxdepth: 1 + +log-source-app/**/README +``` + +## Minimal MDNS example + +```{toctree} +:glob: +:maxdepth: 1 + +minimal-mdns/README +``` + +## Open IoT SDK examples + +```{toctree} +:glob: +:maxdepth: 1 + +openiotsdk_examples +``` + +## OTA Provider example + +```{toctree} +:glob: +:maxdepth: 1 + +ota-provider-app/**/README +``` + +## OTA Requestor example + +```{toctree} +:glob: +:maxdepth: 1 + +ota-requestor-app/**/README +ota-requestor-app/**/Readme +``` + +## Persistent storage example + +```{toctree} +:glob: +:maxdepth: 1 + +persistent-storage/**/README +persistent-storage/**/APPLICATION +``` + +## Pigweed example + +```{toctree} +:glob: +:maxdepth: 1 + +pigweed-app/**/README +``` + +## Pump example + +```{toctree} +:glob: +:maxdepth: 1 + +pump-app/**/README +pump-app/cc13x2x7_26x2x7/doc/programming* +``` + +## Pump controller example + +```{toctree} +:glob: +:maxdepth: 1 + +pump-controller-app/**/README +pump-controller-app/cc13x2x7_26x2x7/doc/programming* +``` + +## Shell example + +```{toctree} +:glob: +:maxdepth: 1 + +shell/README* +shell/**/README +``` + +## Temperature measurement example + +```{toctree} +:glob: +:maxdepth: 1 + +temperature-measurement-app/**/README +``` + +## Thermostat example + +```{toctree} +:glob: +:maxdepth: 1 + +thermostat/**/README +thermostat/**/Readme +``` + +## TV example + +```{toctree} +:glob: +:maxdepth: 1 + +tv-app/**/README +``` + +## TV casting example + +```{toctree} +:glob: +:maxdepth: 1 + +tv-casting-app/**/README +``` + +## Window example + +```{toctree} +:glob: +:maxdepth: 1 + +window-app/**/README +``` diff --git a/docs/examples/openiotsdk_examples.md b/docs/examples/openiotsdk_examples.md index 41e8c88152b7e8..36e12236c62172 100644 --- a/docs/examples/openiotsdk_examples.md +++ b/docs/examples/openiotsdk_examples.md @@ -18,8 +18,8 @@ $ git submodule update --init The VSCode devcontainer has all dependencies pre-installed. Using the VSCode devcontainer is the recommended way to interact with Open IoT SDK port of the -Matter Project. Please read this -[README.md](../../..//docs/VSCODE_DEVELOPMENT.md) for more information. +Matter Project. Please read this [README.md](../VSCODE_DEVELOPMENT.md) for more +information. ### Networking setup diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index fa5c8817416979..852367ae18df94 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -140,7 +140,7 @@ system. You can install it from the zap project You should install a compatible release version, generally checking against the release set in -[integrations/docker/images/chip-build/Dockerfile](../../../integrations/docker/images/chip-build/Dockerfile). +[integrations/docker/images/chip-build/Dockerfile](../../integrations/docker/images/chip-build/Dockerfile). On linux, installation from `zap-linux.zip` is recommended as it pulls fewer dependencies than the `.deb` package. diff --git a/docs/guides/android_building.md b/docs/guides/android_building.md index 840f65110e0ae1..02a3653f298186 100644 --- a/docs/guides/android_building.md +++ b/docs/guides/android_building.md @@ -203,7 +203,7 @@ or ## Building Android CHIPTest from scripts Currently, the CHIPTest can only be built from scripts. The steps are similar to -[building CHIPTool from scripts](#building-scripts). +[building CHIPTool from scripts](#building-android-chiptool-from-scripts). ```shell ./scripts/build/build_examples.py --target android-arm64-chip-test build diff --git a/docs/guides/chip_tool_guide.md b/docs/guides/chip_tool_guide.md index 499b2b6cd4f9c9..6ab37147b62099 100644 --- a/docs/guides/chip_tool_guide.md +++ b/docs/guides/chip_tool_guide.md @@ -8,15 +8,13 @@ the setup payload or performing discovery actions.
-- [Source files](#source) -- [Building and running the CHIP Tool](#building) -- [Using the CHIP Tool for Matter device testing](#using) -- [Supported commands and options](#commands) +- [Source files](#source-files) +- [Building and running the CHIP Tool](#building-and-running-the-chip-tool) +- [Using the CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +- [Supported commands and options](#supported-commands-and-options)
- - ## Source files You can find source files of the CHIP Tool in the `examples/chip-tool` @@ -28,8 +26,6 @@ directory.
- - ## Building and running the CHIP Tool Before you can use the CHIP Tool, you must compile it from source on Linux @@ -69,12 +65,11 @@ _clusters_ in this context, but not all listed commands correspond to the _clusters_ in the Data Model (for example, pairing or discover commands). Each listed command can however become the root of the new more complex command by appending it with sub-commands. Examples of specific commands and their use -cases are described in the [Supported commands and options](#commands) section. +cases are described in the +[Supported commands and options](#supported-commands-and-options) section.
- - ## Using CHIP Tool for Matter device testing This section describes how to use CHIP Tool to test the Matter device. The @@ -385,8 +380,6 @@ $ ./chip-tool basic
- - ## Supported commands and options This section contains a general list of various CHIP Tool commands and options, @@ -770,7 +763,8 @@ The `pairing` command supports different means regarding Matter device commissioning procedure. Thread and Wi-Fi commissioning use cases are described in the -[Using the CHIP Tool for Matter device testing](#using) section. +[Using the CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +section. To list all `pairing` sub-commands, run the following command: @@ -780,7 +774,8 @@ $ ./chip-tool pairing ### Interacting with Data Model clusters -As mentioned in the [Using the CHIP Tool for Matter device testing](#using) +As mentioned in the +[Using the CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) section, executing the `chip-tool` command with a particular cluster name lists all operations supported for this cluster, as in the following command pattern: @@ -874,7 +869,8 @@ In this command: Multi-admin feature allows you to join Matter device to several Matter fabrics and administer it by several different Matter administrators. First you need to commission the Matter device to first fabric following the -[Using CHIP Tool for Matter device testing](#using) section. +[Using CHIP Tool for Matter device testing](#using-chip-tool-for-matter-device-testing) +section. Before it is possible to commission a Matter device to a new fabric, the administrator from first fabric must open the commissioning window for a new diff --git a/docs/guides/darwin.md b/docs/guides/darwin.md index f9d430e9f683e7..361eeebc18825c 100644 --- a/docs/guides/darwin.md +++ b/docs/guides/darwin.md @@ -216,8 +216,7 @@ Example: 1. Checkout and setup [Matter repo](https://github.com/project-chip/connectedhomeip.git) as per the - instructions - [above](#ensuring-your-matter-accessory-works-with-iosipadostvos) + instructions above. 2. Follow [these](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32) instructions to initialize your development environment, compile the firmware @@ -229,8 +228,7 @@ Example: 1. Checkout and setup [Matter repo](https://github.com/project-chip/connectedhomeip.git) as per the - instructions - [above](#ensuring-your-matter-accessory-works-with-iosipadostvos) + instructions above. 2. Follow [these instructions](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect#readme) @@ -245,18 +243,16 @@ Example: 1. Checkout and setup [Matter repo](https://github.com/project-chip/connectedhomeip.git) as per the - instructions - [above](#ensuring-your-matter-accessory-works-with-iosipadostvos) + instructions above. 2. Find and edit one of the platform [examples](https://github.com/project-chip/connectedhomeip/tree/master/examples) - to support the fixed device types - [above](#ensuring-your-matter-accessory-works-with-iosipadostvos) -3. Read the [platform guides](.) on how set up the hardware + to support the fixed device types above. +3. Read the [platform guides](README.md) on how set up the hardware ##### Guides -- [Bouffalo Lab](/examples/lighting-app/bouffalolab/bl602/README.md) -- [EFR32 Window Covering](/examples/window-app/efr32/README.md) +- [Bouffalo Lab](/examples/lighting-app/bouffalolab/README.md) +- [EFR32 Window Covering](/examples/window-app/silabs/efr32/README.md) - [ESP32 All Clusters](/examples/all-clusters-app/esp32/README.md) - [ESP32 Lighting](/examples/lighting-app/esp32/README.md) - [ESP32 Temperature Sensor](/examples/temperature-measurement-app/esp32/README.md) diff --git a/docs/guides/esp32/README.md b/docs/guides/esp32/README.md index 0cdead51a8c289..ebdfaac513209d 100644 --- a/docs/guides/esp32/README.md +++ b/docs/guides/esp32/README.md @@ -1,6 +1,11 @@ ## Espressif (ESP32) Getting Started Guide ---- +```{toctree} +:glob: +:maxdepth: 1 + +* +``` Please follow the steps below to create and test a fully functional Matter example on ESP32 series of SoCs @@ -11,5 +16,3 @@ example on ESP32 series of SoCs - [Flash and NVS encryption for securing factory data](flash_nvs_encryption.md) - [RPC Console and Device Tracing](rpc_console.md) - [Matter OTA](ota.md) - ---- diff --git a/docs/guides/index.md b/docs/guides/index.md new file mode 100644 index 00000000000000..9b2d1b249d47e9 --- /dev/null +++ b/docs/guides/index.md @@ -0,0 +1,12 @@ +# Guides + +Read the following guides for general information about Matter SDK configuration +and features. + +```{toctree} +:glob: +:maxdepth: 1 + +* +esp32/README +``` diff --git a/docs/guides/matter-repl.md b/docs/guides/matter-repl.md index f5c9214d2c652b..bf05be63ddb9a5 100644 --- a/docs/guides/matter-repl.md +++ b/docs/guides/matter-repl.md @@ -28,8 +28,8 @@ The tool uses the generic CHIP Device Controller library, available in the ## Building Please follow the instructions -[here](./python_chip_controller_building.md#building) to build the Python -virtual environment. +[here](./python_chip_controller_building.md#building-and-installing) to build +the Python virtual environment. ## Launching the REPL diff --git a/docs/guides/mbedos_add_new_target.md b/docs/guides/mbedos_add_new_target.md index 07d34bb3705690..8ea7c35c7049d2 100644 --- a/docs/guides/mbedos_add_new_target.md +++ b/docs/guides/mbedos_add_new_target.md @@ -1,8 +1,8 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Mbed-OS add new hardware target

+# Mbed-OS add new hardware target -# Overview +## Overview This document shows how to add the new Mbed OS hardware target to Matter project. @@ -23,7 +23,7 @@ remember about the following requirements: Additional target component requirements are different for each of example application. Check the **Device UI** paragraph in example description. -# Example Application +## Example Application The first step to add the new target to each of example application is to modify the `examples/example_name/mbed/mbed_app.json` file. It contains the common @@ -33,7 +33,7 @@ should add the necessary components and parameters for the target there. If the new target uses the external libraries, it will be required to link it in the CMakeLists.txt file. -# Building +## Building To add the new hardware target to the build system the `scripts/examples/mbed_example.sh` script should be modify. Extend @@ -56,7 +56,7 @@ Example: "default": "CY8CPROTO_062_4343W" } -# Flashing +## Flashing Mbed OS example application flashing process uses the [Open On-Chip Debugger](http://openocd.org/). The first step is to create the @@ -83,7 +83,7 @@ Example: "default": "CY8CPROTO_062_4343W" } -# Debugging +## Debugging Debugging process of Mbed OS applications is also based on VSCode launch task. Adding the new target to it required `.vscode/launch.json` modification. Extend @@ -99,7 +99,7 @@ Example: "default": "CY8CPROTO_062_4343W" } -# CI +## CI The Matter project continue integration process is based on Github Actions tool. It uses workflow configuration files to execute actions on CI server. diff --git a/docs/guides/mbedos_commissioning.md b/docs/guides/mbedos_commissioning.md index 46853913d297ac..16a047f8d8b394 100644 --- a/docs/guides/mbedos_commissioning.md +++ b/docs/guides/mbedos_commissioning.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS provisioning guide

+# Matter Arm Mbed OS provisioning guide - [Overview](#overview) - [Prerequisites](#prerequisites) @@ -21,7 +21,7 @@
-# Overview +## Overview This document provides a step-by-step guide how to commission any Matter application. For demonstration purposes the Lighting app is used. @@ -37,7 +37,7 @@ The provisioning process is composed of the following stages: BLE is only used during first phase. Afterwards, only the IP connectivity between the smartphone and the accessory device is needed to send messages. -# Prerequisites +## Prerequisites To complete all the steps in the tutorial, you need: @@ -50,9 +50,9 @@ To complete all the steps in the tutorial, you need: - Any currently supported target device (for example, a Cypress PSoC6 CY8CPROTO-062-4343W board) -# CHIPTool for Android +## CHIPTool for Android -## Building and installing +### Building and installing To make provisioning possible and to control the Matter device from your Android based smartphone, you must first build and install the CHIPTool application. @@ -85,7 +85,7 @@ After building, install the application by completing the following steps: Android CHIPTool is now ready to be used for commissioning. -## Accessory Matter device setup +### Accessory Matter device setup To prepare the accessory Matter device for commissioning (called rendezvous), complete the following steps: @@ -113,7 +113,7 @@ to the UART console. - Open URL from the console to display the QR in a web browser. -## Device commissioning for Android +### Device commissioning for Android To commission Matter device onto the network created complete the following steps: @@ -137,7 +137,7 @@ steps: - After successful completion of the process, the application returns to the main screen. -## Sending ZCL commands +### Sending ZCL commands After the accessory device has been successfully commissioned to the network, it is possible to communicate with it using IP. Matter uses Zigbee Cluster Library @@ -156,9 +156,9 @@ If **Lighting LED** is available then brightness change can be observed. > For more details about Android CHIPTool please visit > [CHIPTool](../../examples/android/CHIPTool/README.md) -# POSIX CLI CHIPTool +## POSIX CLI CHIPTool -## Building +### Building To make provisioning possible and to control the Matter device from Linux-based device, you can build and run the Matter Client example application on it. @@ -166,7 +166,7 @@ device, you can build and run the Matter Client example application on it. To build the POSIX CLI CHIPTool application check the guide [POSIX CLI guide](../../examples/chip-tool/README.md). -## Device commissioning for CLI +### Device commissioning for CLI In order to send commands to a device, it must be paired with the client and connected to the network. @@ -179,7 +179,7 @@ Example: $ chip-tool pairing ble-wifi node_id_to_assign network_ssid network_password 20202021 3840 -## Sending ZCL commands +### Sending ZCL commands If the commissioning process was successful, it is possible to send a ZCL command to the device which initiate a certain action. @@ -198,9 +198,9 @@ The client will send a single command packet and then exit. > For more details about POSIX CLI CHIPTool please visit > [POSIX CLI CHIPTool](../../examples/chip-tool/README.md) -# Python Device Controller +## Python Device Controller -## Building and installing +### Building and installing To make provisioning possible and to control the Matter device with Python application, you can build and run the Python CHIP controller. @@ -208,7 +208,7 @@ application, you can build and run the Python CHIP controller. To build and install the Python Device Controller application check the guide [Python Device Controller guide](python_chip_controller_building.md). -## Device commissioning for Python Device Controller +### Device commissioning for Python Device Controller In order to send commands to a device, it must be paired with the client and connected to the network. @@ -232,7 +232,7 @@ To run the auto commissioning process via BLE: chip-device-ctrl > connect -ble 3840 20202021 1234 -## Sending ZCL commands +### Sending ZCL commands If the commissioning process was successful, it is possible to send a ZCL command to the device which initiates a certain action. @@ -243,7 +243,7 @@ Example: chip-device-ctrl > zcl LevelControl MoveWithOnOff 12344321 1 0 moveMode=1 rate=2 -### ZCL commands details +#### ZCL commands details To get the list of supported clusters run: diff --git a/docs/guides/mbedos_platform_overview.md b/docs/guides/mbedos_platform_overview.md index 95a1a3ee67f0c7..b70d5ed89cc1ba 100644 --- a/docs/guides/mbedos_platform_overview.md +++ b/docs/guides/mbedos_platform_overview.md @@ -11,7 +11,7 @@ runs on the top of the Mbed-OS. ![matter_mbedos_overview_simplified](images/matter_mbedos_overview_simplified.png) -# ARM Mbed-OS +## ARM Mbed-OS Arm Mbed OS is an open source embedded operating system designed specifically for the "things" in the Internet of Things. It includes all the features you @@ -47,7 +47,7 @@ Finally, Mbed OS implements the retargeting layer and boot process integration of each supported toolchain, so application development feels similar to C or C++ development for any other operating system. -# Bluetooth and IP stacks +## Bluetooth and IP stacks In the Mbed-oS platform applications, the Bluetooth LE interface is used to perform pairing and Wi-Fi network provisioning operations between the Matter @@ -70,7 +70,7 @@ network layer, special glue socket layer has been introduced to take care of adapting the Mbed socket to BSD interface which is used inside the Matter endpoints implementation. -## Matter integration +### Matter integration The Bluetooth LE and Wi-Fi used stacks provided by the Mbed-OS have been integrated with the Matter stack using a special intermediate layer. @@ -80,30 +80,30 @@ interfaces defined in the Matter stack. The application is able to use Matter's platform agnostic interfaces and no additional platform-related actions are needed to perform communication through the Matter stack. -# Matter example applications +## Matter example applications Sample Matter applications are provided for the Mbed OS platform. They can be used to speed up development: -- [shell](../../examples/shell/mbed) -- [all-clusters-app](../../examples/all-clusters-app/mbed) +- [shell](../../examples/shell/mbed/README.md) +- [all-clusters-app](../../examples/all-clusters-app/mbed/README.md) - [lock-app](../../examples/lock-app/mbed/README.md) - [lighting-app](../../examples/lighting-app/mbed/README.md) - [pigweed-app](../../examples/pigweed-app/mbed/README.md) -## Example configuration +### Example configuration Each of the supporting examples contains the `config.in` file which allows you to configure the application in a proper way. You can define/disable/enable application settings. Then they are propagated through Mbed-OS and Matter stack build systems. -## Matter stack configuration +### Matter stack configuration In each of supported examples, the Matter stack can be configured by modifying `CHIPProjectConfig.h` file which is placed inside the project directory. -## Mbed-OS configuration +### Mbed-OS configuration Mbed-OS gives possibility to tweak its parameters by using the [Mbed-OS configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html). @@ -113,7 +113,7 @@ support of the new hardware target support into the application. Mbed-OS configuration system can be accessed by modifying the `mbed_app.json` file which exists in each sample project directory. -## Build system +### Build system The Mbed-OS platform makes use of the following build systems to generate ninja build scripts: @@ -126,7 +126,7 @@ Matter's stack and platform modules are built with GN and output a library file. The application, Mbed-OS and target specific libraries are built with CMake and the Matter library file is imported during the compilation process. -## Build profiles +### Build profiles Arm Mbed OS defines three collections of toolchain flags used during the build: diff --git a/docs/guides/nrfconnect_android_commissioning.md b/docs/guides/nrfconnect_android_commissioning.md index 21096da4d2bab6..0c93f4579298e5 100644 --- a/docs/guides/nrfconnect_android_commissioning.md +++ b/docs/guides/nrfconnect_android_commissioning.md @@ -15,16 +15,14 @@ adapted from the original Thread-based procedure. - [Overview](#overview) - [Requirements](#requirements) - [Setting up Thread Border Router](#setting-up-thread-border-router) -- [Building and programming nRF Connect Example Application](#building-example) -- [Building and installing Android CHIPTool](#building-chiptool) -- [Preparing accessory device](#preparing-accessory) -- [Commissioning accessory device](#commissioning-accessory) -- [Sending Matter commands](#sending-chip-commands) +- [Building and programming nRF Connect Example Application](#building-and-programming-nrf-connect-example-application) +- [Building and installing Android CHIPTool](#building-and-installing-android-chiptool) +- [Preparing accessory device](#preparing-accessory-device) +- [Commissioning accessory device](#commissioning-accessory-device) +- [Sending Matter commands](#sending-matter-commands)
- - ## Overview The commissioning process is composed of the following main stages: @@ -54,8 +52,6 @@ Lighting Example Application:
- - ## Requirements You need the following hardware and software for commissioning the nRF Connect @@ -85,8 +81,6 @@ accessory using Android CHIPTool:
- - ## Setting up Thread Border Router > _Note:_ This step is only needed if you're testing a Thread device. Skip it if @@ -101,8 +95,6 @@ Access Point.
- - ## Building and programming nRF Connect Example Application Build and program the example application onto your compatible device. @@ -112,8 +104,6 @@ Application to learn how to build and program the example onto an nRF52840 DK.
- - ## Building and installing Android CHIPTool To build the CHIPTool application for your smartphone, read the @@ -148,8 +138,6 @@ CHIPTool is now ready to be used for commissioning.
- - ## Preparing accessory device To prepare the accessory device for commissioning, complete the following steps: @@ -173,8 +161,6 @@ To prepare the accessory device for commissioning, complete the following steps:
- - ## Commissioning accessory device To commission the accessory device into the Matter fabric, complete the @@ -198,8 +184,6 @@ following steps:
- - ## Sending Matter commands Once the device is commissioned, the main application screen appears. diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/guides/nrfconnect_examples_configuration.md index 0254d8bb390644..5a31f3357da74a 100644 --- a/docs/guides/nrfconnect_examples_configuration.md +++ b/docs/guides/nrfconnect_examples_configuration.md @@ -103,8 +103,6 @@ target name of the kit, for example _nrf52840dk_nrf52840_:
- - ## Configuration structure overview Zephyr RTOS and related software components, like drivers and libraries, provide diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index 7826fd6b9d15a8..c0152276f00737 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -28,15 +28,13 @@ data secure by applying hardware write protection. > is the hardware flash protection driver, and we used it to ensure write > protection of the factory data partition in internal flash memory. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK
- [Overview](#overview) - - [Factory data components](#factory-data-components) + - [Factory data components](#factory-data-component-table) - [Factory data format](#factory-data-format) - [Enabling factory data support](#enabling-factory-data-support) - [Generating factory data](#generating-factory-data) @@ -48,7 +46,7 @@ data secure by applying hardware write protection. - [Option 2: Using a website validator](#option-2-using-a-website-validator) - [Option 3: Using the nRF Connect Python script](#option-3-using-the-nrf-connect-python-script) - [Preparing factory data partition on a device](#preparing-factory-data-partition-on-a-device) - - [Creating the factory data partition with the second script](#creating-the-factory-data-partition-with-the-second-script) + - [Creating the factory data partition with the second script](#creating-a-factory-data-partition-with-the-second-script) - [Building an example with factory data](#building-an-example-with-factory-data) - [Providing factory data parameters as a build argument list](#providing-factory-data-parameters-as-a-build-argument-list) - [Setting factory data parameters using interactive Kconfig interfaces](#setting-factory-data-parameters-using-interactive-kconfig-interfaces) @@ -57,8 +55,6 @@ data secure by applying hardware write protection.
- - ## Overview You can implement the factory data set described in the @@ -156,7 +152,6 @@ In the factory data set, the following formats are used: [X.509](https://www.itu.int/rec/T-REC-X.509-201910-I/en) format.
- ## Enabling factory data support @@ -187,7 +182,7 @@ partition into the device's flash memory. You can use the second script without invoking the first one by providing a JSON file written in another way. To make sure that the JSON file is correct and the device is able to read out parameters, verify the file using the -[JSON schema](#verifying-using-a-json-schema). +[JSON schema](#verifying-using-the-json-schema-tool). ### Creating factory data JSON file with the first script @@ -329,7 +324,7 @@ JSON file is verified using the prepared JSON Schema. If the script finishes successfully, go to the location you provided with the `-o` argument. Use the JSON file you find there when -[generating the factory data partition](#generating_factory_data_partition). +[generating the factory data partition](#generating-factory-data). > Note: Generating new certificates is optional if default vendor and product > IDs are used and requires providing a path to the `chip-cert` executable. To @@ -625,7 +620,6 @@ reason, it can be programmed directly to the device using a programmer (for example, `nrfjprog`).
- ## Building an example with factory data @@ -705,7 +699,6 @@ snippet: > [Kconfig docummentation](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/menuconfig.html).
- ## Programming factory data @@ -757,7 +750,7 @@ $ west build -b nrf52840dk_nrf52840 -- \ > Note: To generate new certificates using the nRF Connect platform build > system, you need the `chip-cert` executable in your system variable PATH. To > learn how to get `chip-cert`, go to the note at the end of -> [creating the factory data partition with the second script](#creating-the-factory-data-partition-with-the-second-script) +> [creating the factory data partition with the second script](#creating-a-factory-data-partition-with-the-second-script) > section, and then add the newly built executable to the system variable PATH. > The Cmake build system will find this executable automatically. @@ -769,15 +762,14 @@ $ west flash ```
- ## Using own factory data implementation The [factory data generation process](#generating-factory-data) described above is only an example valid for the nRF Connect platform. You can well create a HEX -file containing all [factory data components](#factory-data-components) in any -format and then implement a parser to read out all parameters and pass them to a -provider. Each manufacturer can implement a factory data set on its own by +file containing all [factory data components](#factory-data-component-table) in +any format and then implement a parser to read out all parameters and pass them +to a provider. Each manufacturer can implement a factory data set on its own by implementing a parser and a factory data accessor inside the Matter stack. Use the [nRF Connect Provider](../../src/platform/nrfconnect/FactoryDataProvider.h) and [FactoryDataParser](../../src/platform/nrfconnect/FactoryDataParser.h) as diff --git a/docs/guides/nxp_imx8m_linux_examples.md b/docs/guides/nxp_imx8m_linux_examples.md index c1eabd3819910b..6b1ad2b8f6c4bd 100644 --- a/docs/guides/nxp_imx8m_linux_examples.md +++ b/docs/guides/nxp_imx8m_linux_examples.md @@ -4,11 +4,11 @@ This document describes how to build below Linux examples with the NXP embedded Linux Yocto SDK and then run the output executable files on the **NXP i.MX 8M** **Mini EVK** development board. -- [CHIP Linux All-clusters Example](../../examples/all-clusters-app/linux) -- [CHIP Linux Lighting Example](../../examples/lighting-app/linux) -- [CHIP Linux Thermostat Example](../../examples/thermostat/linux) -- [CHIP Linux CHIP-tool Example](../../examples/chip-tool) -- [CHIP Linux OTA-provider Example](../../examples/ota-provider-app/linux) +- [CHIP Linux All-clusters Example](../../examples/all-clusters-app/linux/README.md) +- [CHIP Linux Lighting Example](../../examples/lighting-app/linux/README.md) +- [CHIP Linux Thermostat Example](https://github.com/project-chip/connectedhomeip/tree/master/examples/thermostat/linux) +- [CHIP Linux CHIP-tool Example](../../examples/chip-tool/README.md) +- [CHIP Linux OTA-provider Example](../../examples/ota-provider-app/linux/README.md) This document has been tested on: @@ -30,8 +30,6 @@ Linux OS development. For more information about this project, see the
- - ## Building Before building the CHIP Linux Examples, the Yocto source code released by NXP @@ -73,7 +71,7 @@ to be generated. More information about the downloaded Yocto release can be found in the corresponding i.MX Yocto Project User’s Guide which can be found at - [NXP official website](www.nxp.com/imxlinux). + [NXP official website](https://www.nxp.com/imxlinux). Change the current directory to the top directory of the Yocto source code and execute the commands below to generate the Yocto SDK: @@ -181,8 +179,6 @@ to be generated. running the Yocto image previously generated as described in the sections above. - - ## Commandline arguments The generated executable files supports to work with below commandline argument: @@ -205,8 +201,6 @@ The generated executable files supports to work with below commandline argument: The BLE device on **i.MX 8M Mini EVK** is a module based on the NXP 88W8987 Wi-Fi/Bluetooth SoC. - - ## Running the Examples on i.MX 8M Mini EVK The steps and commands to run any of the examples are quite similar. diff --git a/docs/guides/nxp_k32w_android_commissioning.md b/docs/guides/nxp_k32w_android_commissioning.md index 773419a0f447ce..bc4076ebef3e4c 100644 --- a/docs/guides/nxp_k32w_android_commissioning.md +++ b/docs/guides/nxp_k32w_android_commissioning.md @@ -3,26 +3,24 @@ This article describes how to use [CHIPTool](../../examples/android/CHIPTool/README.md) for Android smartphones to commission an NXP K32W061 DK6 running -[NXP K32W Lock/Light Example Application](../../examples/lock-light-app/k32w/README.md) +[NXP K32W Lock/Light Example Application](#building-and-programming-nxp-k32w-locklight-example-application) onto a CHIP-enabled Thread network.
- [Overview](#overview) - [Requirements](#requirements) -- [Building and programming OpenThread RCP firmware](#building-rcp-firmware) -- [Configuring PC as Thread Border Router](#configuring-pc) -- [Building and programming NXP K32W Lock/Light Example Application](#building-example) -- [Building and installing Android CHIPTool](#building-chiptool) -- [Forming a Thread network on the Border Router](#form-thread) -- [Preparing accessory device](#preparing-accessory) -- [Commissioning accessory device](#commissioning-accessory) +- [Building and programming OpenThread RCP firmware](#building-and-programming-openthread-rcp-firmware) +- [Configuring PC as Thread Border Router](#configuring-pc-as-a-thread-border-router) +- [Building and programming NXP K32W Lock/Light Example Application](#building-and-programming-nxp-k32w-locklight-example-application) +- [Building and installing Android CHIPTool](#building-and-installing-android-chiptool) +- [Forming a Thread network on the Border Router](#forming-a-thread-network-on-the-border-router) +- [Preparing accessory device](#preparing-accessory-device) +- [Commissioning accessory device](#commissioning-accessory-device) - [Sending CHIP commands](#sending-chip-commands)
- - ## Overview The commissioning process is composed of the following main stages: @@ -49,12 +47,10 @@ The following diagram shows the connectivity between network components required to allow communication between devices running the CHIPTool and Lock/Light applications: -![nxp_hw_connectivity](../../examples/platform/k32w/doc/images/nxp_hw_connectivity.JPG) +![nxp_hw_connectivity](../../examples/platform/nxp/k32w/k32w0/doc/images/nxp_hw_connectivity.JPG)
- - ## Requirements You need the following hardware and software to build a Thread Border Router: @@ -77,8 +73,6 @@ using other popular operating systems.
- - ## Building and programming OpenThread RCP firmware OpenThread RCP firmware is required to allow the PC to communicate with Thread @@ -123,8 +117,6 @@ the RCP firmware onto an K32W061 DK6:
- - ## Configuring PC as a Thread Border Router To make your PC work as a Thread Border Router, complete the following tasks: @@ -353,8 +345,6 @@ To make your PC work as a Thread Border Router, complete the following tasks:
- - ## Building and programming NXP K32W Lock/Light Example Application See @@ -367,8 +357,6 @@ to learn how to build and program the light example onto an K32W061 DK6.
- - ## Building and installing Android CHIPTool To build the CHIPTool application for your smartphone, read @@ -403,8 +391,6 @@ CHIPTool is now ready to be used for commissioning.
- - ## Forming a Thread network on the Border Router 1. On the mobile phone connect to the _OT-BR_ Wi-Fi network. @@ -414,7 +400,7 @@ CHIPTool is now ready to be used for commissioning. 3. Navigate to the _Form_ tab then push the _Form_ button using the default parameters: - ![nxp_form_nwk](../../examples/platform/k32w/doc/images/form_web.JPG) + ![nxp_form_nwk](../../examples/platform/nxp/k32w/k32w0/doc/images/form_web.JPG) 4. The message _Form operation is successful_ should be display after a few seconds. @@ -448,7 +434,7 @@ To prepare the accessory device for commissioning, complete the following steps: 1. Make sure that JP4 and JP7 jumpers are in leftmost position and a mini-USB cable is connected between the LPC connector and PC - ![nxp_connectors](../../examples/platform/k32w/doc/images/k32w-dk6-connectors.jpg) + ![nxp_connectors](../../examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6-connectors.jpg) 2. Use a terminal emulator (e.g.: Putty) to connect to the UART console of the accessory device. Use a baudrate of 115200. @@ -468,13 +454,11 @@ To prepare the accessory device for commissioning, complete the following steps:
- - ## Commissioning accessory device To commission the accessory device onto the Thread network created in the -[Forming Thread network](#Forming-a-Thread-network) section, complete the -following steps: +[Forming Thread network](#forming-a-thread-network-on-the-border-router) +section, complete the following steps: 1. Enable _Bluetooth_ and _Location_ services on your smartphone; 2. Connect the smartphone to _OT-BR_ WiFi network; @@ -486,26 +470,24 @@ following steps: progress with scanning, connection, and pairing. At the end of this process, the Thread network settings screen appears. - ![chiptool_main_screen](../../examples/platform/k32w/doc/images/chiptool_main_screen.png) + ![chiptool_main_screen](../../examples/platform/nxp/k32w/k32w0/doc/images/chiptool_main_screen.png) 6. In the Thread network settings screen, use the default settings and tap the _SAVE NETWORK_ button to send a Thread provisioning message to the accessory device. You will see the "Network provisioning completed" message when the accessory device successfully joins the Thread network. - ![chiptool_credentials](../../examples/platform/k32w/doc/images/thread_credentials.png) + ![chiptool_credentials](../../examples/platform/nxp/k32w/k32w0/doc/images/thread_credentials.png)
- - ## Sending CHIP commands 1. Once the device is commissioned, the below screen appears. This means that the provisioning is completed successfully and you are connected to the device. - ![on_off_cluster.png](../../examples/platform/k32w/doc/images/on_off_cluster.png) + ![on_off_cluster.png](../../examples/platform/nxp/k32w/k32w0/doc/images/on_off_cluster.png) 2. Verify that the text box on the screen is not empty and contains the IPv6 address of the accessory device. diff --git a/docs/guides/python_chip_controller_advanced_usage.md b/docs/guides/python_chip_controller_advanced_usage.md index ca17d8ca297829..c3d3f55ddc5095 100644 --- a/docs/guides/python_chip_controller_advanced_usage.md +++ b/docs/guides/python_chip_controller_advanced_usage.md @@ -7,13 +7,11 @@ tool or Matter accessories on Linux.
-- [Bluetooth LE virtualization on Linux](#virtualization) -- [Debugging with gdb](#gdb) +- [Bluetooth LE virtualization on Linux](#bluetooth-le-virtualization-on-linux) +- [Debugging with gdb](#debugging-with-gdb)
- - ## Bluetooth LE virtualization on Linux Commissioning over Bluetooth LE can be tested even if the controller and the @@ -76,8 +74,6 @@ interfaces working as Bluetooth LE central and peripheral, respectively.
- - ## Debugging with gdb You can run the chip-device-ctrl under GDB for debugging, however, since the diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index 661072fb87fdc5..9bd6a4a095d612 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -15,16 +15,14 @@ into the network and to communicate with it using the Zigbee Cluster Library
-- [Source files](#source) -- [Building Android CHIPTool](#building) -- [Running the tool](#running) -- [Using Python CHIP Controller for Matter accessory testing](#using) -- [List of commands](#commands) +- [Source files](#source-files) +- [Building Android CHIPTool](#building-and-installing) +- [Running the tool](#running-the-tool) +- [Using Python CHIP Controller for Matter accessory testing](#using-python-chip-controller-for-matter-accessory-testing) +- [List of commands](#list-of-commands)
- - ## Source files You can find source files of the Python CHIP Controller tool in the @@ -35,8 +33,6 @@ The tool uses the generic CHIP Device Controller library, available in the
- - ## Building and installing Before you can use the Python controller, you must compile it from the source on @@ -94,8 +90,6 @@ To build and run the Python CHIP controller:
- - ## Running the tool 1. Activate the Python virtual environment: @@ -119,8 +113,6 @@ To build and run the Python CHIP controller:
- - ## Using Python CHIP Controller for Matter accessory testing This section describes how to use Python CHIP controller to test the Matter @@ -309,8 +301,6 @@ chip-device-ctrl > zclread BasicInformation SoftwareVersion 1234 1 0
- - ## List of commands ### `ble-adapter-print` diff --git a/docs/guides/simulated_device_linux.md b/docs/guides/simulated_device_linux.md index 4f184dc9582c29..639cf915bc3bae 100644 --- a/docs/guides/simulated_device_linux.md +++ b/docs/guides/simulated_device_linux.md @@ -2,7 +2,7 @@ This document contains instructions on how to build, run, and interact with a simulated device. All virtual accessories live in -[examples/placeholder/linux/apps](../../examples/placeholder/linux/apps). +[examples/placeholder/linux/apps](https://github.com/project-chip/connectedhomeip/tree/master/examples/placeholder/linux/apps). Each accessory needs to be hosted into a subfolder. It will be the name of the application. For example `app1` will create a binary named `chip-app1`. @@ -86,7 +86,7 @@ Now that the building the app and starting it is complete, you will be able to interact with it using chip-tool 1. Follow the instruction to build chip-tool in the - [chip-tool readme](../../examples/chip-tool). + [chip-tool readme](../../examples/chip-tool/README.md). 2. Run this command to commission. ``` @@ -102,7 +102,8 @@ interact with it using chip-tool ./out/debug/standalone/chip-tool onoff write on-time 1 0x654321 1 ``` - See [chip-tool readme](../../examples/chip-tool) for additional commands. + See [chip-tool readme](../../examples/chip-tool/README.md) for additional + commands. ## Adding simulated Tests via YAML diff --git a/docs/guides/ti_platform_overview.md b/docs/guides/ti_platform_overview.md index 50d96f361963ee..cc0a05280cbc22 100644 --- a/docs/guides/ti_platform_overview.md +++ b/docs/guides/ti_platform_overview.md @@ -91,7 +91,7 @@ handled by the platform implementation files.
-# Matter example applications +## Matter example applications Sample Matter applications are provided for the TI platform. These can be used as reference for your own application. @@ -102,7 +102,7 @@ as reference for your own application.
-## Build system +### Build system The TI platform uses GN to generate ninja build scripts. Build files have already been written to build and link the TI specific code within the @@ -110,7 +110,7 @@ SimpleLink SDK.
-## TI Support +### TI Support For technical support, please consider creating a post on TI's [E2E forum][e2e]. Additionally, we welcome any feedback. diff --git a/docs/images/logo.svg b/docs/images/logo.svg deleted file mode 100644 index 7dcae9ffa48fa8..00000000000000 --- a/docs/images/logo.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - Zigbee-Alliance-logo-black - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000000000..690386ab19c636 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,31 @@ +# Welcome to Matter's documentation! + +```{toctree} +:maxdepth: 2 +:caption: Contents +:hidden: + +QUICK_START +PROJECT_FLOW +VSCODE_DEVELOPMENT +api/index +discussion/index +guides/index +style/index +examples/index +BUG_REPORT +code_generation +ERROR_CODES +``` + +```{include} README.md +:start-after: About +:end-before: Building and Developing in Matter +``` + +# Matter build status + +```{include} README.md +:start-after: Matter +:end-before: About +``` diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 00000000000000..18f214815d661a --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,37 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SPHINXOPTS=-W -c . -d _build\doctrees +set SOURCEDIR=_build\src +set BUILDDIR=_build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +mkdir %SOURCEDIR% +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000000000..988f0b3f668058 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,5 @@ +docutils==0.17.1 +Sphinx>=4.5 +sphinx-book-theme +myst-parser +breathe>=4.34 diff --git a/docs/style/README.md b/docs/style/README.md deleted file mode 100644 index 7fa304cd800577..00000000000000 --- a/docs/style/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Style - -When necessary to drive into more detail about styles about specific types of -files this is where CHIP collects them - -## Specific Types - -- [Makefiles](./STYLE_MAKEFILES.md) diff --git a/docs/style/index.md b/docs/style/index.md new file mode 100644 index 00000000000000..a09df953ca522e --- /dev/null +++ b/docs/style/index.md @@ -0,0 +1,7 @@ +# Style Guides + +```{toctree} +:glob: + +* +``` diff --git a/docs/STYLE_GUIDE.md b/docs/style/style_guide.md similarity index 95% rename from docs/STYLE_GUIDE.md rename to docs/style/style_guide.md index b5ff308297b611..5f195ed49f8076 100644 --- a/docs/STYLE_GUIDE.md +++ b/docs/style/style_guide.md @@ -11,9 +11,9 @@ for general information on contributing to this project. ## Location -Place all documentation contributions in the appropriate location in the -[`/docs`](../docs) directory. Most contributions should go into the -`/docs/guides` subdirectory, which covers conceptual and usage content. +Place all documentation contributions in the appropriate location in the `docs` +directory. Most contributions should go into the `/docs/guides` subdirectory, +which covers conceptual and usage content. Current documentation structure: @@ -43,8 +43,6 @@ For consistency, all document links should point to the content on GitHub. The text of a link should be descriptive, so it's clear what the link is for: -> For more information, see the [Matter Style Guide](./STYLE_GUIDE.md). - ## Markdown guidelines Use standard Markdown when authoring Matter documentation. While HTML may be 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 81cf25fc84a2b6..e47d6c41fef035 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 @@ -1113,7 +1113,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -1123,7 +1123,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -1152,7 +1152,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -1162,7 +1162,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -1174,13 +1174,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -1189,17 +1189,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -3548,6 +3548,37 @@ server cluster ElectricalMeasurement = 2820 { readonly attribute int16u clusterRevision = 65533; } +server cluster ClientMonitoring = 4166 { + fabric_scoped struct MonitoringRegistration { + node_id clientNodeId = 1; + int64u ICid = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeInterval = 0; + readonly attribute int32u activeModeInterval = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute MonitoringRegistration expectedClients[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientMonitoringRequest { + node_id clientNodeId = 0; + INT64U ICid = 1; + } + + request struct UnregisterClientMonitoringRequest { + node_id clientNodeId = 0; + INT64U ICid = 1; + } + + command access(invoke: manage) RegisterClientMonitoring(RegisterClientMonitoringRequest): DefaultSuccess = 0; + command access(invoke: manage) UnregisterClientMonitoring(UnregisterClientMonitoringRequest): DefaultSuccess = 1; +} + server cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { kUnspecified = 0; @@ -4044,7 +4075,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; @@ -4213,6 +4244,18 @@ endpoint 0 { ram attribute clusterRevision default = 3; } + server cluster ClientMonitoring { + ram attribute idleModeInterval default = 0x12C; + ram attribute activeModeInterval default = 0x12C; + ram attribute activeModeThreshold default = 0xFA0; + callback attribute expectedClients; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster FaultInjection { callback attribute generatedCommandList; callback attribute acceptedCommandList; 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 385bbdba5e28a8..8efd7b77f1b467 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 @@ -3415,11 +3415,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5329,7 +5329,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -5345,7 +5345,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -5361,7 +5361,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -8054,6 +8054,220 @@ } ] }, + { + "name": "Client Monitoring", + "code": 4166, + "mfgCode": null, + "define": "CLIENT_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RegisterClientMonitoring", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnregisterClientMonitoring", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Client Monitoring", + "code": 4166, + "mfgCode": null, + "define": "CLIENT_MONITORING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x12C", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x12C", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFA0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpectedClients", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Unit Testing", "code": 4294048773, @@ -11953,7 +12167,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -11969,7 +12183,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -11985,7 +12199,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -24740,5 +24954,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/README.md b/examples/all-clusters-app/cc13x2x7_26x2x7/README.md index 8513b32723fabc..d34c57c36d6587 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/README.md +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/README.md @@ -19,14 +19,13 @@ Instruments CC13XX_26XX family of Wireless MCUs. - [Provisioning](#provisioning) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [Matter Remote Commands](#matter-remote-commands) - [TI Support](#ti-support) --- ## Introduction -![CC1352R1_LAUNCHXL](doc/images/cc1352r1_launchxl.jpg) +![CC1352R1_LAUNCHXL](../../pump-app/cc13x2x7_26x2x7/doc/images/cc1352r1_launchxl.jpg) The CC13XX_26XX all clusters example application provides the basis to query and run commands for all currently implemented Matter clusters. This uses the diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index ee4b0639094d63..2e1988e4d88672 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -80,6 +80,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/client-monitoring-server" "${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" diff --git a/examples/all-clusters-app/infineon/psoc6/README.md b/examples/all-clusters-app/infineon/psoc6/README.md index 68f9e041250d78..75a01995d8c9e4 100644 --- a/examples/all-clusters-app/infineon/psoc6/README.md +++ b/examples/all-clusters-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP PSoC6 All Clusters Example +# CHIP PSoC6 All Clusters Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter PSoC6 All Clusters Example](#chip-psoc6-clusters-example) +- [Matter PSoC6 All Clusters Example](#chip-psoc6-all-clusters-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -17,8 +17,6 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- - ## Introduction The PSoC6 clusters example provides a baseline demonstration of a Cluster @@ -30,8 +28,6 @@ and the Matter controller will exchange security information with the Rendezvous procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. - - ## Building - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) @@ -62,8 +58,6 @@ will then join the network. $ cd ~/connectedhomeip $ rm -rf out/ - - ## Flashing the Application - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the @@ -75,14 +69,10 @@ will then join the network. $ cd ~/connectedhomeip $ python3 out/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.flash.py - - ## Commissioning and cluster control Commissioning can be carried out using BLE. - - ### Setting up Chip tool Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to @@ -97,8 +87,6 @@ perform commissioning and cluster control. $ ./out/debug/chip-tool - - ### Commissioning over BLE Run the built executable and pass it the discriminator and pairing code of the @@ -113,8 +101,6 @@ remote device, as well as the network credentials to use. 4. SSID : Wi-Fi SSID 5. PASSWORD : Wi-Fi Password - - #### Notes Raspberry Pi 4 BLE connection issues can be avoided by running the following diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 408b73ed6c8ac8..d7bebc065904f4 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -183,13 +183,13 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) #if CHIP_CONFIG_TEST // On Linux Simulation, set following hardware faults statically. - ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO)); - ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE)); + ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_RADIO)); + ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_POWER_SOURCE)); - ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_RADIO)); - ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_SENSOR)); - ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_POWER_SOURCE)); - ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_TYPE_USER_INTERFACE_FAULT)); + ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_RADIO)); + ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_SENSOR)); + ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_POWER_SOURCE)); + ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_USER_INTERFACE_FAULT)); #endif Clusters::GeneralDiagnosticsServer::Instance().OnHardwareFaultsDetect(previous, current); } @@ -200,13 +200,13 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId) #if CHIP_CONFIG_TEST // On Linux Simulation, set following radio faults statically. - ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT)); - ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT)); + ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_WI_FI_FAULT)); + ReturnOnFailure(previous.add(EMBER_ZCL_RADIO_FAULT_THREAD_FAULT)); - ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_TYPE_WI_FI_FAULT)); - ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_TYPE_CELLULAR_FAULT)); - ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_TYPE_THREAD_FAULT)); - ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_TYPE_NFC_FAULT)); + ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_WI_FI_FAULT)); + ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_CELLULAR_FAULT)); + ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_THREAD_FAULT)); + ReturnOnFailure(current.add(EMBER_ZCL_RADIO_FAULT_NFC_FAULT)); #endif Clusters::GeneralDiagnosticsServer::Instance().OnRadioFaultsDetect(previous, current); } diff --git a/examples/all-clusters-app/linux/entitlements/codesign.py b/examples/all-clusters-app/linux/entitlements/codesign.py index 2cf51a1cfa5b9e..86a820fcd9884e 100644 --- a/examples/all-clusters-app/linux/entitlements/codesign.py +++ b/examples/all-clusters-app/linux/entitlements/codesign.py @@ -15,8 +15,8 @@ # limitations under the License. import argparse -import subprocess import re +import subprocess def run_command(command): diff --git a/examples/all-clusters-app/mbed/README.md b/examples/all-clusters-app/mbed/README.md index a08a96a9af6433..0952e18914bf16 100644 --- a/examples/all-clusters-app/mbed/README.md +++ b/examples/all-clusters-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS All Clusters Example Application

+# Matter Arm Mbed OS All Clusters Example Application The Arm Mbed OS All Clusters Example demonstrates device commissioning process and all available clusters control. @@ -35,7 +35,7 @@ paired into an existing Matter network and can be controlled by this network.
-# Overview +## Overview The Matter device that runs the All Clusters application is controlled by the Matter controller device over WiFi. By default, the Matter device is @@ -43,12 +43,12 @@ disconnected, and it should be paired with Matter controller and get configuration from it. Actions required before establishing full communication are described below. -## Bluetooth Low Energy advertising +### Bluetooth Low Energy advertising To commission the device onto a Matter network, the device must be discoverable over BLE. The BLE advertising starts automatically after device boot-up. -## Bluetooth Low Energy rendezvous +### Bluetooth Low Energy rendezvous In Matter, the commissioning procedure (called rendezvous) is done over BLE between a Matter device and the Matter controller, where the controller has the @@ -58,16 +58,16 @@ To start the rendezvous, the controller must get the commissioning information from the Matter device. The data payload is encoded within a QR code, printed to the UART console. -## WiFi provisioning +### WiFi provisioning The last part of the rendezvous procedure, provisioning involves sending the network credentials from the Matter controller to the Matter device. As a result, device is able to join the network and communicate with other devices in the network. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -95,7 +95,7 @@ its requirements. > devcontainer is the recommended way to interact with Arm Mbed-OS port of the > Matter Project.** > -> **Please read this [README.md](../../..//docs/VSCODE_DEVELOPMENT.md) for more +> **Please read this [README.md](../../../docs/VSCODE_DEVELOPMENT.md) for more > information about using VSCode in container.** To initialize the development environment, download all registered sub-modules @@ -113,7 +113,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The All Clusters application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -131,7 +131,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=all-clusters-app -b= ``` Both approaches are limited to supported evaluation boards which are listed in -[Supported devices](#supported_devices) paragraph. +[Supported devices](#supported-devices) paragraph. Mbed OS defines three building profiles: _develop, debug_ and _release_. For more details please visit @@ -150,7 +150,7 @@ There are also three types of built application: _simple, boot_ and _upgrade_: When using the building script, it is possible expand the list of acceptable targets; this may be useful for rapid testing of a new mbed-targets. -## Flashing +### Flashing The All Clusters application can be flashed in the same way as any other Matter example ported to mbed-os platform. @@ -183,7 +183,7 @@ device. It is possible to connect to an external gdb-server session by using a specific **'Flash Mbed examples [remote]'** task. -## Debugging +### Debugging Debugging can be performed in the same was as with any other Matter example ported to mbed-os platform. @@ -199,9 +199,9 @@ Run and Debug (Ctrl+Shift+D) => Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing -### Serial port terminal +#### Serial port terminal The application traces are streaming to serial output. To start communication open a terminal session and connect to the serial port of the device. You can @@ -223,30 +223,29 @@ After device reset these lines should be visible: The all-clusters-app application launched correctly and you can follow traces in the terminal. -### CHIP Tools +#### CHIP Tools Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. -## Supported devices +### Supported devices -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------ | :----------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` | ![CY8CPROTO-062-4343W](https://os.mbed.com/media/cache/platforms/p6_wifi-bt_proto.png.250x250_q85.jpg) | :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------ | :----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` | ![CY8CPROTO-062-4343W](https://os.mbed.com/media/cache/platforms/p6_wifi-bt_proto.png.250x250_q85.jpg) | ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `all-clusters-app/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `all-clusters-app/mbed/mbed_app.json`. Information about this file syntax + and its meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -# Device UI +## Device UI This section lists the User Interface elements that you can use to control and monitor the state of the device. These correspond to PCB components on the @@ -269,9 +268,9 @@ following states are possible: - _Solid On_ — The device is fully provisioned and has full network and service connectivity. -### Notes +#### Notes Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform -components' column for additional information about the limitation. +[Supported devices](#supported-devices) section and check board's 'Platform +components' column f-r additional information about the limitation. diff --git a/examples/all-clusters-app/nrfconnect/README.md b/examples/all-clusters-app/nrfconnect/README.md index 4805d754820175..b82ba085fe0bbc 100644 --- a/examples/all-clusters-app/nrfconnect/README.md +++ b/examples/all-clusters-app/nrfconnect/README.md @@ -25,7 +25,7 @@ platform, so only one protocol can be supported for a specific device. - [Bluetooth LE advertising](#bluetooth-le-advertising) - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [IPv6 network support](#ipv6-network-support) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) @@ -38,16 +38,14 @@ platform, so only one protocol can be supported for a specific device. - [Configuring the example](#configuring-the-example) - [Example build types](#example-build-types) - [Flashing and debugging](#flashing-and-debugging) - - [Flashing on the development kits](#nrfdks_flashing) - - [Flashing on the nRF52840 Dongle](#nrf52840dongle_flashing) + - [Flashing on the development kits](#flashing-on-the-development-kits) + - [Flashing on the nRF52840 Dongle](#flashing-on-the-nrf52840-dongle) - [Testing the example](#testing-the-example) - [Testing using Linux CHIPTool](#testing-using-linux-chiptool) - [Testing using Android CHIPTool](#testing-using-android-chiptool)
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -100,16 +98,12 @@ can communicate with other devices in the network.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -132,8 +126,6 @@ for Matter: `nrf5340dk_nrf5340_cpuapp`. - Matter over Wi-Fi is supported for `nrf7002dk_nrf5340_cpuapp`. - - ## Device UI This section lists the User Interface elements that you can use to control and @@ -218,7 +210,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -301,8 +293,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -382,8 +372,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -434,15 +422,11 @@ page.
- - ## Flashing and debugging The flashing and debugging procedure is different for the development kits and the nRF52840 Dongle. - - ### Flashing on the development kits To flash the application to the device, use the west tool and run the following @@ -458,8 +442,6 @@ directory: $ west debug - - ### Flashing on the nRF52840 Dongle Visit diff --git a/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 4b2eca8e4cd66b..3fa8dace395131 100644 --- a/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,11 +14,16 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; /* Disable unused peripherals to reduce power consumption */ diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index b42b7b41ccd8ad..5e3dc0adc48163 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -45,8 +45,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/all-clusters-app/nxp/mw320/README.md b/examples/all-clusters-app/nxp/mw320/README.md index aad56b2fd17645..e8bb15b1e3b17a 100755 --- a/examples/all-clusters-app/nxp/mw320/README.md +++ b/examples/all-clusters-app/nxp/mw320/README.md @@ -11,12 +11,9 @@ to demonstrates device commissioning and cluster control over a low-power, WiFi - [Introduction](#introduction) - [Building](#building) - [Flashing](#flashing) -- [Testing the example](#testing-the-example)
- - ## Introduction ![MW320](../../../platform/nxp/mw320/doc/images/mw320.jpg) @@ -25,8 +22,6 @@ The example targets the [NXP MW320 WiFi Micro controller Soc](https://www.nxp.com/products/wireless/wi-fi-plus-bluetooth/88mw32x-802-11n-wi-fi-microcontroller-soc:88MW32X) development kit. - - ## Building Building the example application is quite straightforward. It can be done via @@ -60,8 +55,6 @@ In order to use the tinycrypt ecc operations, use the following build arguments: $ gn gen out/debug --args='treat_warnings_as_errors=false mbedtls_repo="//third_party/connectedhomeip/third_party/nxp/libs/mbedtls" chip_crypto="tinycrypt"' ``` - - ## Flashing Connect MW320 to Ubuntu USB port and open Linux text-based serial port 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 03701fc1b20c53..b8051b249c47f4 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 @@ -1042,7 +1042,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -1052,7 +1052,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -1081,7 +1081,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -1091,7 +1091,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -1103,13 +1103,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -1118,10 +1118,10 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 47702fc123b3d5..3a9c073791d489 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -3415,11 +3415,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 0, "storageOption": "External", "singleton": 0, @@ -5329,7 +5329,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -5345,7 +5345,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -5361,7 +5361,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -11803,7 +11803,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -11819,7 +11819,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -11835,7 +11835,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/README.md b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/README.md index 102a48b67bdf46..6f67dfa903ff0f 100644 --- a/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/README.md +++ b/examples/all-clusters-minimal-app/cc13x2x7_26x2x7/README.md @@ -19,14 +19,13 @@ Instruments CC13XX_26XX family of Wireless MCUs. - [Provisioning](#provisioning) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [Matter Remote Commands](#matter-remote-commands) - [TI Support](#ti-support) --- ## Introduction -![CC1352R1_LAUNCHXL](doc/images/cc1352r1_launchxl.jpg) +![CC1352R1_LAUNCHXL](../../pump-app/cc13x2x7_26x2x7/doc/images/cc1352r1_launchxl.jpg) The CC13XX_26XX all clusters example application provides the basis to query and run commands for all currently implemented Matter clusters. This uses the diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/README.md b/examples/all-clusters-minimal-app/infineon/psoc6/README.md index 929f9581a063f7..4ebd3832f43de6 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/README.md +++ b/examples/all-clusters-minimal-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP PSoC6 All Clusters Example +# CHIP PSoC6 All Clusters Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter PSoC6 All Clusters Example](#chip-psoc6-clusters-example) +- [Matter PSoC6 All Clusters Example](#chip-psoc6-all-clusters-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -17,8 +17,6 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- - ## Introduction The PSoC6 clusters example provides a baseline demonstration of a Cluster @@ -30,8 +28,6 @@ and the Matter controller will exchange security information with the Rendezvous procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. - - ## Building - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) @@ -62,8 +58,6 @@ will then join the network. $ cd ~/connectedhomeip $ rm -rf out/ - - ## Flashing the Application - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the @@ -75,14 +69,10 @@ will then join the network. $ cd ~/connectedhomeip $ python3 out/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.flash.py - - ## Commissioning and cluster control Commissioning can be carried out using BLE. - - ### Setting up Chip tool Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to @@ -97,8 +87,6 @@ perform commissioning and cluster control. $ ./out/debug/chip-tool - - ### Commissioning over BLE Run the built executable and pass it the discriminator and pairing code of the @@ -113,8 +101,6 @@ remote device, as well as the network credentials to use. 4. SSID : Wi-Fi SSID 5. PASSWORD : Wi-Fi Password - - #### Notes Raspberry Pi 4 BLE connection issues can be avoided by running the following diff --git a/examples/all-clusters-minimal-app/linux/entitlements/codesign.py b/examples/all-clusters-minimal-app/linux/entitlements/codesign.py index 2cf51a1cfa5b9e..86a820fcd9884e 100644 --- a/examples/all-clusters-minimal-app/linux/entitlements/codesign.py +++ b/examples/all-clusters-minimal-app/linux/entitlements/codesign.py @@ -15,8 +15,8 @@ # limitations under the License. import argparse -import subprocess import re +import subprocess def run_command(command): diff --git a/examples/all-clusters-minimal-app/mbed/README.md b/examples/all-clusters-minimal-app/mbed/README.md index e5f0ef2233eb3c..d4096cbde2f466 100644 --- a/examples/all-clusters-minimal-app/mbed/README.md +++ b/examples/all-clusters-minimal-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS All Clusters Example Application

+# Matter Arm Mbed OS All Clusters Example Application The Arm Mbed OS All Clusters Example demonstrates device commissioning process and all available clusters control. @@ -95,7 +95,7 @@ its requirements. > devcontainer is the recommended way to interact with Arm Mbed-OS port of the > Matter Project.** > -> **Please read this [README.md](../../..//docs/VSCODE_DEVELOPMENT.md) for more +> **Please read this [README.md](../../../docs/VSCODE_DEVELOPMENT.md) for more > information about using VSCode in container.** To initialize the development environment, download all registered sub-modules @@ -131,7 +131,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=all-clusters-minimal ``` Both approaches are limited to supported evaluation boards which are listed in -[Supported devices](#supported_devices) paragraph. +[Supported devices](#supported-devices) paragraph. Mbed OS defines three building profiles: _develop, debug_ and _release_. For more details please visit @@ -231,9 +231,9 @@ within a WiFi network. ## Supported devices -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------ | :----------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` | ![CY8CPROTO-062-4343W](https://os.mbed.com/media/cache/platforms/p6_wifi-bt_proto.png.250x250_q85.jpg) | :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------ | :----: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` | ![CY8CPROTO-062-4343W](https://os.mbed.com/media/cache/platforms/p6_wifi-bt_proto.png.250x250_q85.jpg) | ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| #### Notes @@ -273,5 +273,5 @@ following states are possible: Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform +[Supported devices](#supported-devices) section and check board's 'Platform components' column for additional information about the limitation. diff --git a/examples/all-clusters-minimal-app/nrfconnect/README.md b/examples/all-clusters-minimal-app/nrfconnect/README.md index 4dcd2827fa4a31..70ac0f9551a78d 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/README.md +++ b/examples/all-clusters-minimal-app/nrfconnect/README.md @@ -23,7 +23,7 @@ device works as a Thread Minimal End Device. - [Bluetooth LE advertising](#bluetooth-le-advertising) - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) - [Using Docker container for setup](#using-docker-container-for-setup) @@ -35,16 +35,14 @@ device works as a Thread Minimal End Device. - [Configuring the example](#configuring-the-example) - [Example build types](#example-build-types) - [Flashing and debugging](#flashing-and-debugging) - - [Flashing on the development kits](#nrfdks_flashing) - - [Flashing on the nRF52840 Dongle](#nrf52840dongle_flashing) + - [Flashing on the development kits](#flashing-on-the-development-kits) + - [Flashing on the nRF52840 Dongle](#flashing-on-the-nrf52840-dongle) - [Testing the example](#testing-the-example) - [Testing using Linux CHIPTool](#testing-using-linux-chiptool) - [Testing using Android CHIPTool](#testing-using-android-chiptool)
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -91,16 +89,12 @@ with other Thread devices in the network.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -113,8 +107,6 @@ The example supports building and running on the following devices:
- - ## Device UI This section lists the User Interface elements that you can use to control and @@ -178,7 +170,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -261,8 +253,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -342,8 +332,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -394,15 +382,11 @@ page.
- - ## Flashing and debugging The flashing and debugging procedure is different for the development kits and the nRF52840 Dongle. - - ### Flashing on the development kits To flash the application to the device, use the west tool and run the following @@ -418,8 +402,6 @@ directory: $ west debug - - ### Flashing on the nRF52840 Dongle Visit diff --git a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 4b2eca8e4cd66b..3fa8dace395131 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,11 +14,16 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; /* Disable unused peripherals to reduce power consumption */ diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index a2a149a9e01d50..5d3c2b0d2bba8c 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -36,8 +36,8 @@ #endif #include -#include -#include +#include +#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/main.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/main.cpp index ec11d180c8c911..400f9b30e0dd01 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/main.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/main.cpp @@ -17,11 +17,11 @@ #include "AppTask.h" -#include +#include #if DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart) -#include -#include +#include +#include #endif LOG_MODULE_REGISTER(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 3c1b616b3feac5..26b4f71e684bb3 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -791,7 +791,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -801,7 +801,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -830,7 +830,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -840,7 +840,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -852,13 +852,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -867,17 +867,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1578,7 +1578,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 44d80159434847..e73615e8ab3932 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -2177,11 +2177,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7151,7 +7151,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -7167,7 +7167,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -7183,7 +7183,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", diff --git a/examples/bridge-app/linux/README.md b/examples/bridge-app/linux/README.md index 9960be56f504a3..83ac848871af20 100644 --- a/examples/bridge-app/linux/README.md +++ b/examples/bridge-app/linux/README.md @@ -9,14 +9,12 @@ Raspberry Pi Desktop 20.10 (aarch64)**
- [CHIP Linux Bridge Example](#chip-linux-bridge-example) - - [Theory of Operation](#operation) + - [Theory of Operation](#theory-of-operation) - [Building](#building) - - [Running the Complete Example on Raspberry Pi 4](#running-complete-example) + - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4)
- - ## Theory of Operation ### Dynamic Endpoints @@ -106,8 +104,6 @@ the `Bridged Device Basic` cluster, the `reachable` attribute is simulated. In the `Fixed Label` cluster, the `LabelList` attribute is simulated with the value/label pair `"room"`/`[light name]`. - - ## Building - Install tool chain @@ -133,8 +129,6 @@ value/label pair `"room"`/`[light name]`. $ rm -rf out/ ``` - - ## Running the Complete Example on Raspberry Pi 4 - Prerequisites diff --git a/examples/chef/chef.py b/examples/chef/chef.py index f6b3cc385897a9..e8cfe07501ffe4 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -18,17 +18,16 @@ import json import optparse import os +import re import shutil import sys import tarfile import textwrap from typing import Any, Dict, Sequence -import yaml -import re - import constants import stateful_shell +import yaml from sample_app_util import zap_file_parser TermColors = constants.TermColors @@ -876,14 +875,14 @@ def main() -> int: f"python3 -m chip_rpc.console --device {config['esp32']['TTY']}") elif (options.build_target == "silabs-thread"): if (sys.platform == "linux") or (sys.platform == "linux2"): - if(config['silabs-thread']['TTY'] is None): + if (config['silabs-thread']['TTY'] is None): flush_print( 'The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.TTY is set on your config.yaml file') exit(1) shell.run_cmd( f"python3 -m chip_rpc.console --device {config['silabs-thread']['TTY']} -b 115200") elif sys.platform == "darwin": - if(config['silabs-thread']['CU'] is None): + if (config['silabs-thread']['CU'] is None): flush_print( 'The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.CU is set on your config.yaml file') exit(1) diff --git a/examples/chef/create_docker.py b/examples/chef/create_docker.py index 688f782f041e4c..bc80b612537cf8 100755 --- a/examples/chef/create_docker.py +++ b/examples/chef/create_docker.py @@ -14,10 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os import argparse -import tarfile +import os import shutil +import tarfile + import docker client = docker.from_env() diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 504061e0f58d39..91d380df17e411 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -646,7 +646,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -656,7 +656,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -685,7 +685,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -695,7 +695,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -707,13 +707,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -722,17 +722,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1390,7 +1390,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 6b7df1a03281d5..b6d0747a158707 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 9c5a387c3a47f0..038fcb6de0977f 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -758,7 +758,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -768,7 +768,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -797,7 +797,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -807,7 +807,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -819,13 +819,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -834,17 +834,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1467,7 +1467,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 67432cb95ed0ac..36b0d622ac2b0b 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -2685,11 +2685,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4551,7 +4551,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -4567,7 +4567,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index fc111c096b4830..2f043101bdcf2b 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -631,7 +631,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -641,7 +641,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -670,7 +670,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -680,7 +680,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -692,13 +692,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -707,17 +707,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1141,7 +1141,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 971297e1bf39d4..30c6a46937fc4a 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b79a4a9ed301ad..4bfa4d7b38575b 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -780,7 +780,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -790,7 +790,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -819,7 +819,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -829,7 +829,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -841,13 +841,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -856,17 +856,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1287,7 +1287,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 197a544b63bb0b..37115ffd01a10d 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index f9065c571e73f0..afb4daa4f02ab3 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -631,7 +631,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -641,7 +641,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -670,7 +670,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -680,7 +680,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -692,13 +692,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -707,17 +707,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1526,7 +1526,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 6fdd82f2a92eba..f0dec5e9969bb2 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 07dd8cc4dbb24a..838c58bbb56a8f 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -780,7 +780,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -790,7 +790,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -819,7 +819,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -829,7 +829,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -841,13 +841,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -856,17 +856,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1542,7 +1542,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index ed74052d1a9128..19752defefad7b 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 38d0ae6a8d3eae..f08b1286aa8a62 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -633,7 +633,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -643,7 +643,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -672,7 +672,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -682,7 +682,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -694,13 +694,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -709,17 +709,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1200,7 +1200,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 62f52151109311..b98d19f53c521a 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -2733,11 +2733,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4599,7 +4599,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -4615,7 +4615,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 0df49dec4fddad..b60b27a39c94a0 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -644,7 +644,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -654,7 +654,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -693,7 +693,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -705,13 +705,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -720,17 +720,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1153,7 +1153,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index c8424aee9f1a39..0661975578c8d0 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index d1c5e67fc79862..ac781a675bfb8d 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -773,7 +773,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -783,7 +783,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -812,7 +812,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -822,7 +822,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -834,13 +834,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -849,17 +849,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1395,7 +1395,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 12bc28d09deeb4..b242891ce36f7b 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 46478dc8eb4e20..13a9e11f9edfa1 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -644,7 +644,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -654,7 +654,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -693,7 +693,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -705,13 +705,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -720,17 +720,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1153,7 +1153,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index db501f62b4e0d4..9c02a9841f4bde 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 52bc8a6a235616..0af0d7ed7fdb3a 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -644,7 +644,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -654,7 +654,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -693,7 +693,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -705,13 +705,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -720,17 +720,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1157,7 +1157,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index cd6ef1952f2dcc..448ff4e6355ce2 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 973f496f56c8fc..8cedada81e9c80 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -644,7 +644,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -654,7 +654,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -693,7 +693,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -705,13 +705,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -720,17 +720,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1152,7 +1152,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 7f0de5650c4329..ace1c0f1e8e25f 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index c04de798ba0f0d..70b088eefe1682 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -780,7 +780,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -790,7 +790,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -819,7 +819,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -829,7 +829,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -841,13 +841,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -856,17 +856,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1277,7 +1277,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index ece0ee2a052aa8..08c03cbd11edb5 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index f9eee7ddeafaef..7a51377ff42501 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -723,7 +723,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -733,7 +733,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -762,7 +762,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -772,7 +772,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -784,13 +784,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -799,17 +799,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1220,7 +1220,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 3394f2f770e006..48508dfbbd64db 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index b26bc9a9ae6dba..a0501828d5e951 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -681,7 +681,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -691,7 +691,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -720,7 +720,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -730,7 +730,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -742,13 +742,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -757,17 +757,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1178,7 +1178,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 64777e266df8bc..93459c3b97f63d 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 05724a4da55c9c..8c510898487586 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -649,7 +649,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -659,7 +659,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -688,7 +688,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -698,7 +698,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -710,13 +710,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -725,17 +725,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1162,7 +1162,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 8525d0e050db84..86d3292626df6b 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index d3c88eb27cb9a7..700353c7f58506 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -771,7 +771,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -781,7 +781,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -810,7 +810,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -820,7 +820,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -832,13 +832,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -847,17 +847,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1268,7 +1268,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 1d1de16b31859a..fefc5542214616 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 6192a201ddf6d3..be2615969272ce 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -644,7 +644,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -654,7 +654,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -693,7 +693,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -705,13 +705,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -720,17 +720,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1152,7 +1152,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 366d20b713a8ea..df51d29f1742dc 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index be4033d3193a83..2a693e4b1e6fd6 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -631,7 +631,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -641,7 +641,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -670,7 +670,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -680,7 +680,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -692,13 +692,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -707,17 +707,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1290,7 +1290,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index 871682eb0ea6a5..aca73d246954a1 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -2637,11 +2637,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index aa61ccb2b9d257..fa49aa6362caab 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -631,7 +631,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -641,7 +641,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -670,7 +670,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -680,7 +680,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -692,13 +692,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -707,17 +707,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1270,7 +1270,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 6d39ef464cdaa2..bb476c7b82fa8a 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -2589,11 +2589,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/chef/sample_app_util/README.md b/examples/chef/sample_app_util/README.md index 041f9462c4232c..9ed7be36a6bd11 100644 --- a/examples/chef/sample_app_util/README.md +++ b/examples/chef/sample_app_util/README.md @@ -2,8 +2,6 @@ ## 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. @@ -22,8 +20,6 @@ The convention proposed here should be adopted by the zap files provided in ## 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. @@ -33,8 +29,6 @@ should rarely happen. ## Convention ---- - ### Sample App Naming Convention Sample apps should be named by concatenating the name of all endpoints in the @@ -144,8 +138,9 @@ The metadata files have a structure as follows: - : ... ``` -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). +For an example, see +[sample_zap_file_hashmeta.yaml](test_files/sample_zap_file_hashmeta.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 @@ -166,8 +161,6 @@ As an example, take a look at ## 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. @@ -180,8 +173,6 @@ There are a few primary usage cases for the utility ## Running Tests ---- - Navigate to the base directory of this README. ``` diff --git a/examples/chef/sample_app_util/test_zap_file_parser.py b/examples/chef/sample_app_util/test_zap_file_parser.py index a49345ad128eb1..5ef9fbdb8d721c 100644 --- a/examples/chef/sample_app_util/test_zap_file_parser.py +++ b/examples/chef/sample_app_util/test_zap_file_parser.py @@ -9,14 +9,14 @@ import tempfile import unittest +import zap_file_parser + 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") diff --git a/examples/chef/sample_app_util/zap_file_parser.py b/examples/chef/sample_app_util/zap_file_parser.py index 66a09c0c70e27a..fddc5c9e8efcd2 100644 --- a/examples/chef/sample_app_util/zap_file_parser.py +++ b/examples/chef/sample_app_util/zap_file_parser.py @@ -29,13 +29,12 @@ available. - Add support for .matter files. """ -import copy import base64 +import copy import hashlib import json import os import re - from typing import Dict, List, Literal, Optional, Sequence, TypedDict, Union try: diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 4b2a0cee169cb6..b24ddb5d28c427 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -60,6 +60,7 @@ static_library("chip-tool-utils") { "commands/common/CredentialIssuerCommands.h", "commands/common/HexConversion.h", "commands/delay/SleepCommand.cpp", + "commands/delay/WaitForCommissioneeCommand.cpp", "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", "commands/discover/DiscoverCommissionersCommand.cpp", diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md index 2f14c1b2a8c989..b22b5276c8c7b6 100644 --- a/examples/chip-tool/README.md +++ b/examples/chip-tool/README.md @@ -5,7 +5,7 @@ An example application that uses Matter to send messages to a Matter server. --- - [Building the Example Application](#building-the-example-application) -- [Using the Client to Request an Echo](#using-the-client-to-request-an-echo) +- [Using the Client to Commission a Device](#using-the-client-to-commission-a-device) --- diff --git a/examples/chip-tool/commands/delay/Commands.h b/examples/chip-tool/commands/delay/Commands.h index 337de3b14d217a..f14b4bd435e72c 100644 --- a/examples/chip-tool/commands/delay/Commands.h +++ b/examples/chip-tool/commands/delay/Commands.h @@ -20,12 +20,14 @@ #include "commands/common/Commands.h" #include "commands/delay/SleepCommand.h" +#include "commands/delay/WaitForCommissioneeCommand.h" void registerCommandsDelay(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { const char * clusterName = "Delay"; commands_list clusterCommands = { - make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // }; commands.Register(clusterName, clusterCommands); diff --git a/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp new file mode 100644 index 00000000000000..bc000608b986b6 --- /dev/null +++ b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.cpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "WaitForCommissioneeCommand.h" + +using namespace chip; + +CHIP_ERROR WaitForCommissioneeCommand::RunCommand() +{ + chip::FabricIndex fabricIndex = CurrentCommissioner().GetFabricIndex(); + ReturnErrorCodeIf(fabricIndex == chip::kUndefinedFabricIndex, CHIP_ERROR_INCORRECT_STATE); + + if (mExpireExistingSession.ValueOr(true)) + { + CurrentCommissioner().SessionMgr()->ExpireAllSessions(chip::ScopedNodeId(mNodeId, fabricIndex)); + } + + return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); +} + +void WaitForCommissioneeCommand::OnDeviceConnectedFn(void * context, Messaging::ExchangeManager & exchangeMgr, + SessionHandle & sessionHandle) +{ + auto * command = reinterpret_cast(context); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null")); + command->SetCommandExitStatus(CHIP_NO_ERROR); +} + +void WaitForCommissioneeCommand::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) +{ + LogErrorOnFailure(err); + + auto * command = reinterpret_cast(context); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectionFailureFn: context is null")); + command->SetCommandExitStatus(err); +} diff --git a/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.h b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.h new file mode 100644 index 00000000000000..50c6b73e915dc7 --- /dev/null +++ b/examples/chip-tool/commands/delay/WaitForCommissioneeCommand.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "../common/CHIPCommand.h" +#include +#include + +class WaitForCommissioneeCommand : public CHIPCommand +{ +public: + WaitForCommissioneeCommand(CredentialIssuerCommands * credIssuerCommands) : + CHIPCommand("wait-for-commissionee", credIssuerCommands), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), + mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("expire-existing-session", 0, 1, &mExpireExistingSession); + AddArgument("timeout", 0, UINT64_MAX, &mTimeoutSecs, + "Time, in seconds, before this command is considered to have timed out."); + } + + /////////// CHIPCommand Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeoutSecs.ValueOr(10)); + } + +private: + chip::NodeId mNodeId; + chip::Optional mTimeoutSecs; + chip::Optional mExpireExistingSession; + + static void OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, + chip::SessionHandle & sessionHandle); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); + + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; +}; diff --git a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp index b873c15fe707cb..093a83f4620bbd 100644 --- a/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp +++ b/examples/chip-tool/commands/payload/SetupPayloadGenerateCommand.cpp @@ -17,7 +17,7 @@ */ #include "SetupPayloadGenerateCommand.h" -#include +#include #include #include #include diff --git a/examples/common/README.md b/examples/common/README.md index 5f0f8790a26241..252f75f2732760 100644 --- a/examples/common/README.md +++ b/examples/common/README.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # Examples common libraries ## What is this? diff --git a/examples/common/pigweed/nrfconnect/PigweedLoggerMutex.h b/examples/common/pigweed/nrfconnect/PigweedLoggerMutex.h index 18a1327669bd37..1f00287a1581d9 100644 --- a/examples/common/pigweed/nrfconnect/PigweedLoggerMutex.h +++ b/examples/common/pigweed/nrfconnect/PigweedLoggerMutex.h @@ -20,7 +20,7 @@ #include "PigweedLogger.h" #include "pigweed/RpcService.h" -#include +#include namespace chip { namespace rpc { diff --git a/examples/common/pigweed/rpc_console/README.md b/examples/common/pigweed/rpc_console/README.md index d433631b9e12d1..4b4ceed7bc1f00 100644 --- a/examples/common/pigweed/rpc_console/README.md +++ b/examples/common/pigweed/rpc_console/README.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # CHIP RPC CONSOLE This python application provides a console for interacting with rpc-enabled chip diff --git a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py index c74b6617396e59..7df7214808f47c 100644 --- a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py +++ b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py @@ -37,32 +37,31 @@ """ import argparse -from typing import Callable -from collections import namedtuple -from inspect import cleandoc import logging import re import socket -from concurrent.futures import ThreadPoolExecutor import sys import threading -from typing import Any, BinaryIO, Collection +from collections import namedtuple +from concurrent.futures import ThreadPoolExecutor +from inspect import cleandoc +from typing import Any, BinaryIO, Callable, Collection +import pw_cli.log from chip_rpc.plugins.device_toolbar import DeviceToolbar from chip_rpc.plugins.helper_scripts import HelperScripts -import pw_cli.log from pw_console import PwConsoleEmbed from pw_console.__main__ import create_temp_log_file from pw_console.pyserial_wrapper import SerialWithLogging from pw_hdlc.rpc import HdlcRpcClient, default_channels from pw_rpc import callback_client from pw_rpc.console_tools.console import ClientInfo, flattened_rpc_completions - -from pw_tokenizer.database import LoadTokenDatabases -from pw_tokenizer.detokenize import Detokenizer, detokenize_base64 from pw_tokenizer import tokens +from pw_tokenizer.database import LoadTokenDatabases +from pw_tokenizer.detokenize import Detokenizer # Protos +# isort: off from attributes_service import attributes_service_pb2 from button_service import button_service_pb2 from descriptor_service import descriptor_service_pb2 diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index abc9dd1268b6fa..ba3453df43ed86 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -25,9 +25,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include namespace chip { diff --git a/examples/common/screen-framework/README.md b/examples/common/screen-framework/README.md index e4792fdc59ee5c..81e9151e3a9844 100644 --- a/examples/common/screen-framework/README.md +++ b/examples/common/screen-framework/README.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # Simple Screen UI Framework ## Overview diff --git a/examples/common/tracing/README.md b/examples/common/tracing/README.md index 154054bf514163..9b3c5392bd4a74 100644 --- a/examples/common/tracing/README.md +++ b/examples/common/tracing/README.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # Trace Handlers These are trace message handlers which get registered with pw_trace_chip and diff --git a/examples/common/tracing/decoder/TraceDecoderProtocols.cpp b/examples/common/tracing/decoder/TraceDecoderProtocols.cpp index 18da44d7578181..d50ccd77147b8f 100644 --- a/examples/common/tracing/decoder/TraceDecoderProtocols.cpp +++ b/examples/common/tracing/decoder/TraceDecoderProtocols.cpp @@ -24,7 +24,7 @@ #include "secure_channel/Decoder.h" #include "udc/Decoder.h" -#include +#include #include #include diff --git a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp index c2f73187cac3ff..47a0b850955da2 100644 --- a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp +++ b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include namespace { diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index fac8abe275b249..611cd6b8306dfb 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -634,7 +634,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -644,7 +644,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -673,7 +673,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -683,7 +683,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -695,13 +695,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -710,17 +710,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1366,7 +1366,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index 240c199920563a..9e9944246b3119 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -2685,11 +2685,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md index c1633be5b1eae6..14e23161deac9f 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w/k32w0/README.md @@ -14,35 +14,33 @@ network.
-- [CHIP K32W0 Contact Sensor Example Application](#chip-k32w-contact-example-application) - +- [CHIP K32W0 Contact Sensor Example Application](#chip-k32w061-contact-sensor-example-application) - [Introduction](#introduction) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues](#building-issues) -- [Manufacturing data](#manufacturing) -- [Flashing and debugging](#flashdebug) -- [Pigweed Tokenizer](#tokenizer) - - [Detokenizer script](#detokenizer) - - [Notes](#detokenizer-notes) - - [Known issues](#detokenizer-known-issues) -- [Tinycrypt ECC operations](#tinycrypt) - - [Building steps](#tinycrypt-building-steps) + - [Known issues](#known-issues) +- [Manufacturing data](#manufacturing-data) +- [Flashing and debugging](#flashing-and-debugging) +- [Pigweed Tokenizer](#pigweed-tokenizer) + - [Detokenizer script](#detokenizer-script) + - [Notes](#notes) + - [Known issues](#known-issues-1) +- [Tinycrypt ECC operations](#tinycrypt-ecc-operations) + - [Building steps](#building-steps) - [OTA](#ota) - - [Writing the SSBL](#ssbl) - - [Writing the PSECT](#psect) - - [Writing the application](#appwrite) - - [OTA Testing](#otatesting) - - [Known issues](#otaissues) + - [Writing the SSBL](#writing-the-ssbl) + - [Writing the PSECT](#writing-the-psect) + - [Writing the application](#writing-the-application) + - [OTA Testing](#ota-testing) + - [Known issues](#known-issues-2) - [Low power](#low-power) - - [Known issues](#low-power-issues) + - [Known issues](#known-issues-3) - - ## Introduction ![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg) @@ -171,8 +169,6 @@ DS3, which can be found on the DK6 board. Also, by long pressing the **USERINTERFACE** button, the factory reset action will be initiated. - - ## Building In order to build the Project CHIP example, we recommend using a Linux @@ -229,22 +225,16 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-contact-example. - - ## Known issues - When using Secure element and cross-compiling on Linux, log messages from the Plug&Trust middleware stack may not echo to the console. - - ## Manufacturing data See [Guide for writing manufacturing data on NXP devices](../../../../platform/nxp/doc/manufacturing_flow.md). - - ## Flashing and debugging Program the firmware using the official @@ -254,8 +244,6 @@ All you have to do is to replace the Openthread binaries from the above documentation with _out/debug/chip-k32w0x-light-example.bin_ if DK6Programmer is used or with _out/debug/chip-k32w0x-light-example_ if MCUXpresso is used. - - ## Pigweed tokenizer The tokenizer is a pigweed module that allows hashing the strings. This greatly @@ -263,8 +251,6 @@ reduces the flash needed for logs. The module can be enabled by building with the gn argument _chip_pw_tokenizer_logging=true_. The detokenizer script is needed for parsing the hashed scripts. - - ### Detokenizer script The python3 script detokenizer.py is a script that decodes the tokenized logs @@ -293,8 +279,6 @@ where the decoded logs will be stored. This parameter is required for file usage and optional for serial usage. If not provided when used with serial port, it will show the decoded log only at the stdout and not save it to file. - - ### Notes The token database is created automatically after building the binary if the @@ -309,8 +293,6 @@ detokenizer script to see logs of a contact-sensor app: python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-contact-example-database.bin -o device.txt ``` - - ### Known issues The building process will not update the token database if it already exists. In @@ -328,12 +310,8 @@ If run, closed and rerun with the serial option on the same serial port, the detokenization script will get stuck and not show any logs. The solution is to unplug and plug the board and then rerun the script. - - ## Tinycrypt ECC operations - - ### Building steps Note: This solution is temporary. @@ -348,8 +326,6 @@ To disable tinycrypt ecc operations, simply build with _chip_crypto=\"mbedtls\"_ and with or without _mbedtls_repo_. If used with _mbedtls_repo_ the mbedtls implementation from `NXPmicro/mbedtls` library will be used. - - ## OTA The internal flash needs to be prepared for the OTA process. First 16K of the @@ -358,8 +334,6 @@ related data while the last 8.5K of flash space is holding image directory related data (PSECT). The space between these two zones will be filled by the application. - - ### Writing the SSBL The SSBL can ge generated from one of the SDK demo examples. The SDK demo @@ -389,8 +363,6 @@ k32w061dk6_ssbl.bin must be written at address 0 in the internal flash: DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x00="k32w061dk6_ssbl.bin" ``` - - ### Writing the PSECT First, image directory 0 must be written: @@ -423,8 +395,6 @@ CD04 -> 0x4C9 pages of 512-bytes (= 612,5kB) 01 -> image type for the application ``` - - ### Writing the application DK6Programmer can be used for flashing the application: @@ -438,8 +408,6 @@ application. Please make sure that the application is written at address 0x4000: ![FLASH_LOCATION](../../../../platform/nxp/k32w/k32w0/doc/images/flash_location.JPG) - - ### OTA Testing The OTA topology used for OTA testing is illustrated in the figure below. @@ -517,8 +485,6 @@ Start the OTA process: user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 ``` - - ## Known issues - SRP cache on the openthread border router needs to flushed each time a new @@ -552,8 +518,6 @@ user@computer1:~/connectedhomeip$ sudo ifconfig eth0 -multicast - If Wi-Fi is used on a RPI4, then a 5Ghz network should be selected. Otherwise, issues related to BLE-WiFi combo may appear. - - ## Low power The example also offers the possibility to run in low power mode. This means @@ -584,8 +548,6 @@ below: Please note that that the Power Measurement Tool is not very accurate and professional tools must be used if exact power consumption needs to be known. - - ## Known issues - Power Measurement Tool may not work correctly in MCUXpresso versions greater diff --git a/examples/contact-sensor-app/telink/Readme.md b/examples/contact-sensor-app/telink/README.md similarity index 100% rename from examples/contact-sensor-app/telink/Readme.md rename to examples/contact-sensor-app/telink/README.md diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index 3e59a3c9264342..cea7f9d794ff57 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -62,14 +62,14 @@ action("build-darwin-framework") { "Matter Framework", "--log_path", rebase_path("${root_build_dir}/darwin_framework_build.log", root_build_dir), + "--target_arch", + mac_target_arch, ] if (sdk != "macosx") { args += [ "--target_sdk", sdk, - "--target_arch", - mac_target_arch, ] } diff --git a/examples/darwin-framework-tool/README.md b/examples/darwin-framework-tool/README.md index 7da06958ae5ac1..4b8b2d29ac7658 100644 --- a/examples/darwin-framework-tool/README.md +++ b/examples/darwin-framework-tool/README.md @@ -8,7 +8,7 @@ found at [code-signing](https://developer.apple.com/support/code-signing/). --- - [Building the Example Application](#building-the-example-application) -- [Using the Client to Request an Echo](#using-the-client-to-request-an-echo) +- [Using the Client to Commission a Device](#using-the-client-to-commission-a-device) --- diff --git a/examples/darwin-framework-tool/entitlements/codesign.py b/examples/darwin-framework-tool/entitlements/codesign.py index bc7cb56b81cb0b..f3ec9802223d22 100644 --- a/examples/darwin-framework-tool/entitlements/codesign.py +++ b/examples/darwin-framework-tool/entitlements/codesign.py @@ -15,8 +15,8 @@ # limitations under the License. import argparse -import subprocess import re +import subprocess def run_command(command): diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 3c1b616b3feac5..26b4f71e684bb3 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -791,7 +791,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -801,7 +801,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -830,7 +830,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -840,7 +840,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -852,13 +852,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -867,17 +867,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1578,7 +1578,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap index 44d80159434847..e73615e8ab3932 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap @@ -2177,11 +2177,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -7151,7 +7151,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -7167,7 +7167,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -7183,7 +7183,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", diff --git a/examples/dynamic-bridge-app/linux/README.md b/examples/dynamic-bridge-app/linux/README.md index 85c71429fe8d0a..aff20863c752c7 100644 --- a/examples/dynamic-bridge-app/linux/README.md +++ b/examples/dynamic-bridge-app/linux/README.md @@ -9,14 +9,12 @@ Raspberry Pi Desktop 20.10 (aarch64)**
- [CHIP Linux Bridge Example](#chip-linux-bridge-example) - - [Theory of Operation](#operation) + - [Theory of Operation](#theory-of-operation) - [Building](#building) - - [Running the Complete Example on Raspberry Pi 4](#running-complete-example) + - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4)
- - ## Theory of Operation ### Dynamic Endpoints @@ -106,8 +104,6 @@ the `Bridged Device Basic` cluster, the `reachable` attribute is simulated. In the `Fixed Label` cluster, the `LabelList` attribute is simulated with the value/label pair `"room"`/`[light name]`. - - ## Building - Install tool chain @@ -133,8 +129,6 @@ value/label pair `"room"`/`[light name]`. $ rm -rf out/ ``` - - ## Running the Complete Example on Raspberry Pi 4 - Prerequisites diff --git a/examples/java-matter-controller/README.md b/examples/java-matter-controller/README.md index cf94be00be6b32..fae126f8b7af10 100644 --- a/examples/java-matter-controller/README.md +++ b/examples/java-matter-controller/README.md @@ -14,8 +14,6 @@ cluster requests to a Matter device
- - ## Requirements for building You need to have the following two software installed on your Ubuntu system: @@ -57,8 +55,6 @@ export JAVA_PATH=[JDK path]
- - ## Preparing for build Complete the following steps to prepare the Matter build: @@ -71,8 +67,6 @@ Complete the following steps to prepare the Matter build: source scripts/bootstrap.sh ``` - - ## Building & Running the app This is the simplest option. In the command line, run the following command from diff --git a/examples/light-switch-app/genio/README.md b/examples/light-switch-app/genio/README.md index d735915d016956..7961597d4df055 100644 --- a/examples/light-switch-app/genio/README.md +++ b/examples/light-switch-app/genio/README.md @@ -1,22 +1,18 @@ -#Matter `Genio` Light Switch Example +# Matter `Genio` Light Switch Example An example showing the use of Matter on the MediaTek `Genio` MT793X.
-- [Matter Genio Light Switch Example](#chip-genio-light-switch-example) +- [Matter Genio Light Switch Example](#matter-genio-light-switch-example) - [Introduction](#introduction) - [Building](#building) - - [Note](#note) - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - [Notes](#notes)
- - ## Introduction The `Genio` (MT793X) light switch example provides a baseline demonstration of a @@ -32,8 +28,6 @@ The light switch example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the MediaTek platform. - - ## Building - Following the Linux related descriptions in diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 304a3b013c2cdd..0d1a1c382bfaa5 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -836,7 +836,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -846,7 +846,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -875,7 +875,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -885,7 +885,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -897,13 +897,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -912,17 +912,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1830,7 +1830,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 10301e01d011ba..c68084806a8c23 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -2667,11 +2667,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -5269,6 +5269,228 @@ "reportableChange": 0 } ] + }, + { + "name": "Client Monitoring", + "code": 4166, + "mfgCode": null, + "define": "CLIENT_MONITORING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "RegisterClientMonitoring", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UnregisterClientMonitoring", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StayAwakeRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Client Monitoring", + "code": 4166, + "mfgCode": null, + "define": "CLIENT_MONITORING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "IdleModeInterval", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x12C", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeInterval", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x12C", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFA0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExpectedClients", + "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": "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": "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 + } + ] } ] }, @@ -9071,7 +9293,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -9087,7 +9309,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -9103,7 +9325,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -9231,5 +9453,6 @@ "endpointVersion": 1, "deviceIdentifier": 15 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/light-switch-app/nrfconnect/README.md b/examples/light-switch-app/nrfconnect/README.md index c14a997c481ee1..4c3f7bcfa21b6d 100644 --- a/examples/light-switch-app/nrfconnect/README.md +++ b/examples/light-switch-app/nrfconnect/README.md @@ -8,10 +8,8 @@ switch uses buttons to test changing the lighting application example LED state and works as a brightness dimmer. You can use this example as a reference for creating your own application. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK The example is based on [Matter](https://github.com/project-chip/connectedhomeip) and Nordic @@ -33,7 +31,7 @@ device. - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Device Firmware Upgrade](#device-firmware-upgrade) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [IPv6 network support](#ipv6-network-support) - [Device UI](#device-ui) - [LEDs](#leds) @@ -60,8 +58,6 @@ device.
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -223,16 +219,12 @@ section to learn how to change MCUboot and flash configuration in this example.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -266,8 +258,6 @@ CHIP Tool.
- - ## Device UI This section lists the User Interface elements that you can use to control and @@ -329,13 +319,13 @@ platform image. - If pressed for less than 0.5 seconds, it changes the light state to the opposite one on the bound lighting device - ([lighting-app](../../lighting-app/nrfconnect/)) + ([lighting-app](../../lighting-app/nrfconnect/README.md)) - If pressed for more than 0.5 seconds, it changes the brightness of the light on the bound lighting bulb device - ([lighting-app](../../lighting-app/nrfconnect/)). The brightness is - changing from 0% to 100% with 1% increments every 300 milliseconds as - long as **Button 2** is pressed. + ([lighting-app](../../lighting-app/nrfconnect/README.md)). The + brightness is changing from 0% to 100% with 1% increments every 300 + milliseconds as long as **Button 2** is pressed. - On nRF7002 DK: @@ -420,7 +410,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -503,8 +493,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -593,8 +581,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -643,8 +629,6 @@ page.
- - ## Flashing and debugging To flash the application to the device, use the west tool and run the following @@ -662,14 +646,12 @@ directory:
- - ## Testing the example After building and flashing the example, you can test its functionalities. For this purpose, you need to prepare a second device that is programmed with the -[Lighting Example](../../lighting-app/nrfconnect/), perform the binding process, -and add Access Control Lists (ACLs). +[Lighting Example](../../lighting-app/nrfconnect/README.md), perform the binding +process, and add Access Control Lists (ACLs). ### Commissioning the lighting device @@ -683,12 +665,14 @@ communicate with each other. To perform binding, you need a controller that can write the binding table to the light switch device and write proper ACL to the endpoint light bulb on the -[Lighting Example application](../../lighting-app/nrfconnect/)). For example, -you can use the [CHIP Tool for Windows or Linux](../../chip-tool/README.md) as -the controller. The ACL should contain information about all clusters that can -be called by the light switch application. See the section about -[interacting with ZCL clusters](../../../docs/guides/chip_tool_guide.md#interacting-with-zcl-clusters) -in the CHIP Tool's user guide for more information about ACLs. +[Lighting Example application](../../lighting-app/nrfconnect/README.md)). For +example, you can use the +[CHIP Tool for Windows or Linux](../../chip-tool/README.md) as the controller. +The ACL should contain information about all clusters that can be called by the +light switch application. See the section about interacting with ZCL clusters in +the +[CHIP Tool's user guide](../../../docs/guides/chip_tool_guide.md#interacting-with-data-model-clusters) +for more information about ACLs. You can perform the binding process to a single remote endpoint (unicast binding) or to a group of remote endpoints (group multicast). @@ -705,11 +689,11 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building). + [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building-and-running-the-chip-tool). 2. Go to the CHIP Tool build directory. 3. Add an ACL to the development kit that is programmed with the - [Lighting Application Example](../../lighting-app/nrfconnect/) by running - the following command: + [Lighting Application Example](../../lighting-app/nrfconnect/README.md) by + running the following command: chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [2], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}, {"cluster": 8, "endpoint": 1, "deviceType": null}]}]' 1 0 @@ -745,10 +729,10 @@ The group multicast binding lets you control more than one lighting device at a time using a single light switch. The group multicast binding targets all development kits that are programmed -with the [Lighting Application Example](../../lighting-app/nrfconnect/) and -added to the same multicast group. After the binding is established, the light -switch device can send multicast requests, and all of the devices in the bound -groups can run the received command. +with the [Lighting Application Example](../../lighting-app/nrfconnect/README.md) +and added to the same multicast group. After the binding is established, the +light switch device can send multicast requests, and all of the devices in the +bound groups can run the received command. In this scenario, commands are provided for a light switch device with the `nodeId = 2` and a light bulb device with `nodeId = 1`, both commissioned to the @@ -757,7 +741,7 @@ same Matter network. To perform the unicast binding process, complete the following steps: 1. Build the CHIP Tool according to the steps from the - [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building). + [CHIP Tool user guide](../../../docs/guides/chip_tool_guide.md#building-and-running-the-chip-tool). 2. Go to the CHIP Tool build directory. 3. Add the light switch device to the multicast group by running the following diff --git a/examples/light-switch-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index cf300f82ba0a4a..6f560e36368b6c 100644 --- a/examples/light-switch-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/light-switch-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,9 +14,14 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; diff --git a/examples/light-switch-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/light-switch-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay index 90f303f82cc4e0..3063fbbcdee779 100644 --- a/examples/light-switch-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/examples/light-switch-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -14,7 +14,6 @@ * limitations under the License. */ - / { chosen { nordic,pm-ext-flash = &mx25r64; diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 3ba17c73a5c147..bf28af3f97fab5 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -45,8 +45,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/light-switch-app/silabs/efr32/README.md b/examples/light-switch-app/silabs/efr32/README.md index 3a72765e663796..d79ab2895cbf91 100644 --- a/examples/light-switch-app/silabs/efr32/README.md +++ b/examples/light-switch-app/silabs/efr32/README.md @@ -32,8 +32,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 light switch example provides a baseline demonstration of a on-off @@ -53,8 +51,6 @@ The light switch example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -181,15 +177,11 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -199,8 +191,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -249,8 +239,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -385,8 +373,6 @@ combination with JLinkRTTClient as follows: #Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 - - ## Running RPC console - As part of building the example with RPCs enabled the chip_rpc python @@ -432,7 +418,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options diff --git a/examples/light-switch-app/telink/Readme.md b/examples/light-switch-app/telink/README.md similarity index 100% rename from examples/light-switch-app/telink/Readme.md rename to examples/light-switch-app/telink/README.md diff --git a/examples/lighting-app/beken/README.md b/examples/lighting-app/beken/README.md index 12fa6683d162e6..2ae904fc7fd043 100755 --- a/examples/lighting-app/beken/README.md +++ b/examples/lighting-app/beken/README.md @@ -4,7 +4,7 @@ This example demonstrates the Matter Lighting application on BEKEN platforms. --- -- [Matter BEKEN Lighting Example](#matter-BEKEN-lighting-example) +- [Matter BEKEN Lighting Example](#matter-beken-lighting-example) - [Supported Devices](#supported-devices) - [Building the Example Application](#building-the-example-application) - [Commissioning over BLE using chip-tool](#commissioning-over-ble-using-chip-tool) diff --git a/examples/lighting-app/genio/README.md b/examples/lighting-app/genio/README.md index 867882a3ba7e98..575d4ba5e1cf13 100644 --- a/examples/lighting-app/genio/README.md +++ b/examples/lighting-app/genio/README.md @@ -1,22 +1,18 @@ -#Matter `Genio` Lighting Example +# Matter `Genio` Lighting Example An example showing the use of Matter on the MediaTek `Genio` MT793X.
-- [Matter Genio Lighting Example](#chip-genio-lighting-example) +- [Matter Genio Lighting Example](#matter-genio-lighting-example) - [Introduction](#introduction) - [Building](#building) - - [Note](#note) - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - [Notes](#notes)
- - ## Introduction The `Genio` (MT793X) lighting example provides a baseline demonstration of a @@ -32,8 +28,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the MediaTek platform. - - ## Building - Following the Linux related descriptions in diff --git a/examples/lighting-app/infineon/psoc6/README.md b/examples/lighting-app/infineon/psoc6/README.md index e37b1bbb0a313d..e5b5854fc275e5 100644 --- a/examples/lighting-app/infineon/psoc6/README.md +++ b/examples/lighting-app/infineon/psoc6/README.md @@ -1,10 +1,10 @@ -#CHIP PSoC6 Lighting Example +# CHIP PSoC6 Lighting Example An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter PSoC6 Lighting Example](#chip-psoc6-Lighting-example) +- [Matter PSoC6 Lighting Example](#chip-psoc6-lighting-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -18,8 +18,6 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- - ## Introduction The PSoC6 lighting example provides a baseline demonstration of a Light control @@ -31,8 +29,6 @@ and the Matter controller will exchange security information with the Rendezvous procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. - - ## Building - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) @@ -59,8 +55,6 @@ will then join the network. $ cd ~/connectedhomeip $ rm -rf out/ - - ## Flashing the Application - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the @@ -72,14 +66,10 @@ will then join the network. $ cd ~/connectedhomeip $ python3 out/infineon-psoc6-light/chip-psoc6-lighting-example.flash.py - - ## Commissioning and cluster control Commissioning can be carried out using BLE. - - ### Setting up Chip tool Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to @@ -94,8 +84,6 @@ perform commissioning and cluster control. $ ./out/debug/chip-tool - - ### Commissioning over BLE Run the built executable and pass it the discriminator and pairing code of the @@ -110,8 +98,6 @@ remote device, as well as the network credentials to use. 4. SSID : Wi-Fi SSID 5. PASSWORD : Wi-Fi Password - - #### Notes Raspberry Pi 4 BLE connection issues can be avoided by running the following @@ -121,8 +107,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. $ sudo btmgmt -i hci0 bredr off $ sudo btmgmt -i hci0 power on - - ### Cluster control - After successful commissioning, use the OnOff cluster command to toggle diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 6941b5c4c7c1c9..c1c694608683a5 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -792,7 +792,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -802,7 +802,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -831,7 +831,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -841,7 +841,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -853,13 +853,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -868,17 +868,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1817,7 +1817,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 16de5c96dc21ce..f1149ad7c0ad82 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -2685,11 +2685,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/lighting-app/linux/README.md b/examples/lighting-app/linux/README.md index 001c214ea6f5ed..f41a351da1bebb 100644 --- a/examples/lighting-app/linux/README.md +++ b/examples/lighting-app/linux/README.md @@ -13,15 +13,13 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** - [CHIP Linux Lighting Example](#chip-linux-lighting-example) - [Building](#building) - - [Commandline Arguments](#command-line-args) - - [Running the Complete Example on Raspberry Pi 4](#running-complete-example) + - [Commandline Arguments](#commandline-arguments) + - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) - [Running RPC console](#running-rpc-console) - [Device Tracing](#device-tracing)
- - ## Building - Install tool chain @@ -49,8 +47,6 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - - ## Commandline arguments - `--wifi` @@ -70,8 +66,6 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** `hciconfig` command, for example, `--ble-device 1` means using `hci1` interface. Default: `0`. - - ## Running the Complete Example on Raspberry Pi 4 > If you want to test Echo protocol, please enable Echo handler diff --git a/examples/lighting-app/mbed/README.md b/examples/lighting-app/mbed/README.md index 02a41c085e68d9..0eafd74a5e2c25 100644 --- a/examples/lighting-app/mbed/README.md +++ b/examples/lighting-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS Lighting Example Application

+# Matter Arm Mbed OS Lighting Example Application The Arm Mbed OS Lighting Example demonstrates how to remotely control a dimmable white light source. The example takes advantage of the IO available on board: @@ -49,19 +49,19 @@ serial port to the device. The following RPC protocols services are available:
-# Overview +## Overview The Matter device that runs the lighting application is controlled by the Matter controller device over WiFi. By default, the Matter device is disconnected , and it should be paired with Matter controller and get configuration from it. Actions required before establishing full communication are described below. -## Bluetooth Low Energy advertising +### Bluetooth Low Energy advertising To commission the device onto a Matter network, the device must be discoverable over BLE. The BLE advertising starts automatically after device boot-up. -## Bluetooth Low Energy rendezvous +### Bluetooth Low Energy rendezvous In Matter, the commissioning procedure (called rendezvous) is done over BLE between a Matter device and the Matter controller, where the controller has the @@ -71,16 +71,16 @@ To start the rendezvous, the controller must get the commissioning information from the Matter device. The data payload is encoded within a QR code, printed to the UART console. -## WiFi provisioning +### WiFi provisioning The last part of the rendezvous procedure, provisioning involves sending the network credentials from the Matter controller to the Matter device. As a result, device is able to join the network and communicate with other devices in the network. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -128,7 +128,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The Lighting application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -146,7 +146,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=lighting-app -b= Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing -### Serial port terminal +#### Serial port terminal The application traces are streaming to serial output. To start communication open a terminal session and connect to the serial port of the device. You can @@ -238,13 +238,13 @@ After device reset these lines should be visible: The lighting-app application launched correctly and you can follow traces in the terminal. -### CHIP Tools +#### CHIP Tools Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. -### RPC console +#### RPC console The RPC console is an interactive Python shell console, where the different RPC command can be invoked. It is a complete solution for interacting with hardware @@ -302,26 +302,25 @@ The response from the device should contain the current lighting state: For more details about RPC console and supported services visit [CHIP RPC console](../../common/pigweed/rpc_console/README.md). -## Supported devices +### Supported devices The example supports building and running on the following mbed-enabled devices: -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lighting LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • The board's touch slider corresponds to UI slider
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lighting LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • The board's touch slider corresponds to UI slider
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `lighting-app/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `lighting-app/mbed/mbed_app.json`. Information about this file syntax and + its meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -# Device UI +## Device UI This section lists the User Interface elements that you can use to control and monitor the state of the device. These correspond to PCB components on the @@ -371,9 +370,9 @@ dimming lighting state from the OFF state to maximum brightness corresponding to ON state. Currently the dimming resolution is set from 0-255 to satisfy ZCL 8 bit commands argument for lighting cluster. -### Notes +#### Notes Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform +[Supported devices](#supported-devices) section and check board's 'Platform components' column for additional information about the limitation. diff --git a/examples/lighting-app/nrfconnect/README.md b/examples/lighting-app/nrfconnect/README.md index 29f15ea497d37f..ee816203b06937 100644 --- a/examples/lighting-app/nrfconnect/README.md +++ b/examples/lighting-app/nrfconnect/README.md @@ -27,7 +27,7 @@ platform, so only one protocol can be supported for a specific light device. - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Device Firmware Upgrade](#device-firmware-upgrade) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [IPv6 network support](#ipv6-network-support) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) @@ -41,8 +41,8 @@ platform, so only one protocol can be supported for a specific light device. - [Configuring the example](#configuring-the-example) - [Example build types](#example-build-types) - [Flashing and debugging](#flashing-and-debugging) - - [Flashing on the development kits](#nrfdks_flashing) - - [Flashing on the nRF52840 Dongle](#nrf52840dongle_flashing) + - [Flashing on the development kits](#flashing-on-the-development-kits) + - [Flashing on the nRF52840 Dongle](#flashing-on-the-nrf52840-dongle) - [Testing the example](#testing-the-example) - [Testing using Linux CHIPTool](#testing-using-linux-chiptool) - [Testing using Android CHIPTool](#testing-using-android-chiptool) @@ -51,8 +51,6 @@ platform, so only one protocol can be supported for a specific light device.
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -172,16 +170,12 @@ section to learn how to change MCUboot and flash configuration in this example.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -204,8 +198,6 @@ for Matter: `nrf5340dk_nrf5340_cpuapp`. - Matter over Wi-Fi is supported for `nrf7002dk_nrf5340_cpuapp`. - - ## Device UI This section lists the User Interface elements that you can use to control and @@ -313,7 +305,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -408,8 +400,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -525,8 +515,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -580,15 +568,11 @@ page.
- - ## Flashing and debugging The flashing and debugging procedure is different for the development kits and the nRF52840 Dongle. - - ### Flashing on the development kits To flash the application to the device, use the west tool and run the following @@ -608,8 +592,6 @@ directory: $ west debug ``` - - ### Flashing on the nRF52840 Dongle Visit diff --git a/examples/lighting-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index d900ac5d9861e4..ae489254784606 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/lighting-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,6 +14,8 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; @@ -34,7 +36,10 @@ pwms = < &pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>; }; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; &pwm0 { diff --git a/examples/lighting-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay b/examples/lighting-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay index 481ff46231e7d1..de203e27aa1f69 100644 --- a/examples/lighting-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/examples/lighting-app/nrfconnect/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -14,7 +14,6 @@ * limitations under the License. */ - / { chosen { nordic,pm-ext-flash = &mx25r64; @@ -32,7 +31,7 @@ pwmleds { compatible = "pwm-leds"; pwm_led1: pwm_led_1 { - pwms = < &pwm0 1 PWM_MSEC(20) PWM_POLARITY_INVERTED>; + pwms = < &pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; }; }; diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 26a90b858eaf64..390a6718c8ea77 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -50,8 +50,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/lighting-app/nrfconnect/main/include/AppConfig.h b/examples/lighting-app/nrfconnect/main/include/AppConfig.h index 536e92e37bfd37..3f311d4a8a45d3 100644 --- a/examples/lighting-app/nrfconnect/main/include/AppConfig.h +++ b/examples/lighting-app/nrfconnect/main/include/AppConfig.h @@ -1,20 +1,18 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// +// 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. +// #pragma once @@ -41,5 +39,3 @@ #define FACTORY_RESET_SIGNAL_LED DK_LED3 #define FACTORY_RESET_SIGNAL_LED1 DK_LED4 #endif -// Time it takes in ms for the simulated actuator to move from one state to another. -#define ACTUATOR_MOVEMENT_PERIOS_MS 2000 diff --git a/examples/lighting-app/nxp/k32w/k32w0/README.md b/examples/lighting-app/nxp/k32w/k32w0/README.md index 6b7f6d83a44d6c..9550f64354bbd6 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w/k32w0/README.md @@ -16,32 +16,28 @@ network.
-- [CHIP K32W061 Lighting Example Application](#chip-k32w-lighting-example-application) - +- [CHIP K32W061 Lighting Example Application](#chip-k32w061-lighting-example-application) - [Introduction](#introduction) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues](#building-issues) -- [Manufacturing data](#manufacturing) -- [Flashing and debugging](#flashdebug) -- [Pigweed Tokenizer](#tokenizer) - - [Detokenizer script](#detokenizer) - - [Notes](#detokenizer-notes) - - [Known issues](#detokenizer-known-issues) -- [Tinycrypt ECC operations](#tinycrypt) - - [Building steps](#tinycrypt-building-steps) + - [Known issues](#known-issues) +- [Manufacturing data](#manufacturing-data) +- [Flashing and debugging](#flashing-and-debugging) +- [Pigweed Tokenizer](#pigweed-tokenizer) + - [Detokenizer script](#detokenizer-script) + - [Notes](#notes) + - [Known issues](#known-issues-1) +- [Tinycrypt ECC operations](#tinycrypt-ecc-operations) + - [Building steps](#building-steps) - [OTA](#ota) - - - [Writing the SSBL](#ssbl) - - [Writing the PSECT](#psect) - - [Writing the application](#appwrite) - - [OTA Testing](#otatesting) - - [Known issues](#otaissues) - - - - + - [Writing the SSBL](#writing-the-ssbl) + - [Writing the PSECT](#writing-the-psect) + - [Writing the application](#writing-the-application) + - [OTA Testing](#ota-testing) + - [Known issues](#known-issues-2) + ## Introduction @@ -188,8 +184,6 @@ effects: - _Finish effect_ — complete current effect sequence and terminate - _Stop effect_ — terminate as soon as possible - - ## Building In order to build the Project CHIP example, we recommend using a Linux @@ -245,22 +239,16 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-light-example. - - ## Known issues - When using Secure element and cross-compiling on Linux, log messages from the Plug&Trust middleware stack may not echo to the console. - - ## Manufacturing data See [Guide for writing manufacturing data on NXP devices](../../../../platform/nxp/doc/manufacturing_flow.md). - - ## Flashing and debugging Program the firmware using the official @@ -270,8 +258,6 @@ All you have to do is to replace the Openthread binaries from the above documentation with _out/debug/chip-k32w0x-light-example.bin_ if DK6Programmer is used or with _out/debug/chip-k32w0x-light-example_ if MCUXpresso is used. - - ## Pigweed tokenizer The tokenizer is a pigweed module that allows hashing the strings. This greatly @@ -279,8 +265,6 @@ reduces the flash needed for logs. The module can be enabled by building with the gn argument _chip_pw_tokenizer_logging=true_. The detokenizer script is needed for parsing the hashed scripts. - - ### Detokenizer script The python3 script detokenizer.py is a script that decodes the tokenized logs @@ -309,8 +293,6 @@ where the decoded logs will be stored. This parameter is required for file usage and optional for serial usage. If not provided when used with serial port, it will show the decoded log only at the stdout and not save it to file. - - ### Notes The token database is created automatically after building the binary if the @@ -325,8 +307,6 @@ detokenizer script to see logs of a lighting app: python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-light-example-database.bin -o device.txt ``` - - ### Known issues The building process will not update the token database if it already exists. In @@ -344,12 +324,8 @@ If run, closed and rerun with the serial option on the same serial port, the detokenization script will get stuck and not show any logs. The solution is to unplug and plug the board and then rerun the script. - - ## Tinycrypt ECC operations - - ### Building steps Note: This solution is temporary. @@ -364,8 +340,6 @@ To disable tinycrypt ecc operations, simply build with _chip_crypto=\"mbedtls\"_ and with or without _mbedtls_repo_. If used with _mbedtls_repo_ the mbedtls implementation from `NXPmicro/mbedtls` library will be used. - - ## OTA The internal flash needs to be prepared for the OTA process. First 16K of the @@ -374,8 +348,6 @@ related data while the last 8.5K of flash space is holding image directory related data (PSECT). The space between these two zones will be filled by the application. - - ### Writing the SSBL The SSBL can ge generated from one of the SDK demo examples. The SDK demo @@ -405,8 +377,6 @@ k32w061dk6_ssbl.bin must be written at address 0 in the internal flash: DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x00="k32w061dk6_ssbl.bin" ``` - - ### Writing the PSECT First, image directory 0 must be written: @@ -439,8 +409,6 @@ CD04 -> 0x4C9 pages of 512-bytes (= 612,5kB) 01 -> image type for the application ``` - - ### Writing the application DK6Programmer can be used for flashing the application: @@ -454,8 +422,6 @@ application. Please make sure that the application is written at address 0x4000: ![FLASH_LOCATION](../../../../platform/nxp/k32w/k32w0/doc/images/flash_location.JPG) - - ### OTA Testing The OTA topology used for OTA testing is illustrated in the figure below. @@ -533,8 +499,6 @@ Start the OTA process: user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 ``` - - ## Known issues - SRP cache on the openthread border router needs to flushed each time a new diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index c76cc902b026b1..f130629386ff02 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -707,7 +707,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -717,7 +717,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -746,7 +746,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -756,7 +756,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -768,13 +768,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -783,10 +783,10 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 92ac1c2930ffdc..b9ac3fdb17a0a3 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -2871,11 +2871,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 0, "storageOption": "External", "singleton": 0, diff --git a/examples/lighting-app/python/README.md b/examples/lighting-app/python/README.md index 69487bb3b74899..8e34e59dea5847 100644 --- a/examples/lighting-app/python/README.md +++ b/examples/lighting-app/python/README.md @@ -1,4 +1,4 @@ -# Python based lighting example (bridge) device to DALI. +# Python-based lighting example (bridge) device to DALI ## Installation diff --git a/examples/lighting-app/python/lighting.py b/examples/lighting-app/python/lighting.py index a10fbbddf14e35..148f2296c9848f 100644 --- a/examples/lighting-app/python/lighting.py +++ b/examples/lighting-app/python/lighting.py @@ -14,30 +14,20 @@ # limitations under the License. # -from chip.server import ( - GetLibraryHandle, - NativeLibraryHandleMethodArguments, - PostAttributeChangeCallback, -) - -from chip.exceptions import ChipStackError - -from ctypes import CFUNCTYPE, c_char_p, c_int32, c_uint8 - -import sys +import asyncio import os - -import textwrap import string - -from cmd import Cmd - -import asyncio +import sys +import textwrap import threading +from cmd import Cmd +from ctypes import CFUNCTYPE, c_char_p, c_int32, c_uint8 -from dali.driver.hid import tridonic -from dali.gear.general import RecallMaxLevel, Off, DAPC +from chip.exceptions import ChipStackError +from chip.server import GetLibraryHandle, NativeLibraryHandleMethodArguments, PostAttributeChangeCallback from dali.address import Broadcast, Short +from dali.driver.hid import tridonic +from dali.gear.general import DAPC, Off, RecallMaxLevel dali_loop = None dev = None diff --git a/examples/lighting-app/qpg/APPLICATION.md b/examples/lighting-app/qpg/APPLICATION.md index 8215525d4f477e..6ba46dbbe0bb97 100644 --- a/examples/lighting-app/qpg/APPLICATION.md +++ b/examples/lighting-app/qpg/APPLICATION.md @@ -14,4 +14,4 @@ More detailed information on the Qorvo SDK can be found in the ## More information For more information on our product line and support options, please visit -[www.qorvo.com](www.qorvo.com) or contact us at +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/lighting-app/silabs/SiWx917/README.md b/examples/lighting-app/silabs/SiWx917/README.md index ae7565f492c620..6ec100ade5d46a 100644 --- a/examples/lighting-app/silabs/SiWx917/README.md +++ b/examples/lighting-app/silabs/SiWx917/README.md @@ -30,8 +30,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 lighting example provides a baseline demonstration of a Light control @@ -51,8 +49,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -171,15 +167,11 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -189,8 +181,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -239,8 +229,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -326,8 +314,6 @@ combination with JLinkRTTClient as follows: - Add Ipv6 route on PC(Linux) `sudo ip route add /64 via 2002::2` - - ## Running RPC console - As part of building the example with RPCs enabled the chip_rpc python @@ -379,13 +365,13 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Group Communication (Multicast) With this lighting example you can also use group communication to send Lighting commands to multiples devices at once. Please refer to the -[chip-tool documentation](../../chip-tool/README.md) _Configuring the server +[chip-tool documentation](../../../chip-tool/README.md) _Configuring the server side for Group Commands_ and _Using the Client to Send Group (Multicast) Matter Commands_ diff --git a/examples/lighting-app/silabs/efr32/README.md b/examples/lighting-app/silabs/efr32/README.md index aab225106d11cc..26027fc6ad108e 100644 --- a/examples/lighting-app/silabs/efr32/README.md +++ b/examples/lighting-app/silabs/efr32/README.md @@ -30,8 +30,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 lighting example provides a baseline demonstration of a Light control @@ -51,8 +49,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -171,15 +167,13 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) + [Running Pigweed RPC console](#running-rpc-console) For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -189,8 +183,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -239,8 +231,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -326,8 +316,6 @@ combination with JLinkRTTClient as follows: - Add Ipv6 route on PC(Linux) `sudo ip route add /64 via 2002::2` - - ## Running RPC console - As part of building the example with RPCs enabled the chip_rpc python @@ -379,13 +367,13 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Group Communication (Multicast) With this lighting example you can also use group communication to send Lighting commands to multiples devices at once. Please refer to the -[chip-tool documentation](../../chip-tool/README.md) _Configuring the server +[chip-tool documentation](../../../chip-tool/README.md) _Configuring the server side for Group Commands_ and _Using the Client to Send Group (Multicast) Matter Commands_ diff --git a/examples/lighting-app/telink/Readme.md b/examples/lighting-app/telink/README.md similarity index 100% rename from examples/lighting-app/telink/Readme.md rename to examples/lighting-app/telink/README.md diff --git a/examples/lighting-app/tizen/README.md b/examples/lighting-app/tizen/README.md index 4b9eea699f8d9c..28e0d9b2c0b22b 100644 --- a/examples/lighting-app/tizen/README.md +++ b/examples/lighting-app/tizen/README.md @@ -25,11 +25,17 @@ Building tizen-arm-light ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light ``` -## Preparing Tizen SDK certificate +## Preparing Tizen SDK certificate (optional) -For packaging the Tizen APP, there is a need to generate an author certificate -and security profile using the commands described below. Change password and -author data as needed. +When building Matter example application, this step is optional. In case when +author certificate and security profile are not found, they will be created +automatically. Automatically generated dummy certificate will have the following +options: name="Matter Example" email="matter@tizen.org" password="0123456789" + +In order to create and use custom author certificate, one can use the commands +described below. Change the certificate password and author data as needed. The +security profile alias should not be changed, as the "CHIP" name is used in the +Matter example build system. ```sh $TIZEN_SDK_ROOT/tools/ide/bin/tizen certificate \ @@ -59,11 +65,9 @@ rm -r \ After that, normally call scripts to generate the author certificate and security profile mentioned previously. -### Important - -Regenerating the author certificate and security profile makes it necessary to -remove the previously installed Tizen app. You can't reinstall an application on -the Tizen device with a different certificate. +Please note, that regenerating the author certificate and security profile makes +it necessary to remove the previously installed Tizen app. You can't reinstall +an application on the Tizen device with a different certificate. ```sh pkgcmd -u -n org.tizen.matter.example.lighting @@ -108,37 +112,37 @@ installed. 1. Build app: -``` -open the Command Palette (Ctrl+Shift+P) -> - Tasks: Run Task -> - Build LightingApp (Tizen) -``` + ```text + open the Command Palette (Ctrl+Shift+P) -> + Tasks: Run Task -> + Build LightingApp (Tizen) + ``` 2. SDB connect to device: required to run Tizen commands below if device is debugged over network -``` -open the Command Palette (Ctrl+Shift+P) -> - Tasks: Run Task -> Connect to device (Tizen) -> - insert IP address and port -``` + ```text + open the Command Palette (Ctrl+Shift+P) -> + Tasks: Run Task -> Connect to device (Tizen) -> + insert IP address and port + ``` 3. Install app: it is separated from build app step. -``` -open the Command Palette (Ctrl+Shift+P) -> - Tasks: Run Task -> - Install LightingApp (Tizen) -``` + ```text + open the Command Palette (Ctrl+Shift+P) -> + Tasks: Run Task -> + Install LightingApp (Tizen) + ``` 4. Launch LightingApp with gdbserver attached: require to install app previously. -``` -open the Command Palette (Ctrl+Shift+P) -> - Tasks: Run Task -> - Launch LightingApp with gdbserver attached (Tizen) -``` + ```text + open the Command Palette (Ctrl+Shift+P) -> + Tasks: Run Task -> + Launch LightingApp with gdbserver attached (Tizen) + ``` ### Debug diff --git a/examples/lock-app/cc13x2x7_26x2x7/README.md b/examples/lock-app/cc13x2x7_26x2x7/README.md index b9160bf082c5fb..541bffe7c000c6 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/README.md +++ b/examples/lock-app/cc13x2x7_26x2x7/README.md @@ -19,14 +19,13 @@ Instruments CC13XX_26XX family of Wireless MCUs. - [Provisioning](#provisioning) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [Matter Remote Commands](#matter-remote-commands) - [TI Support](#ti-support) --- ## Introduction -![CC1352R1_LAUNCHXL](doc/images/cc1352r1_launchxl.jpg) +![CC1352R1_LAUNCHXL](../../pump-app/cc13x2x7_26x2x7/doc/images/cc1352r1_launchxl.jpg) The CC13XX_26XX lock example application provides a working demonstration of a connected door lock device. This uses the open-source Matter implementation and diff --git a/examples/lock-app/cc32xx/README.md b/examples/lock-app/cc32xx/README.md index c1474a096a6b25..4cd77f6faeb235 100644 --- a/examples/lock-app/cc32xx/README.md +++ b/examples/lock-app/cc32xx/README.md @@ -5,7 +5,7 @@ Instruments CC32XX family of Wireless MCUs. --- -- [Matter CC32XX Lock Example Application](#matter-cc32xx-lock-example-application) +- [Matter CC32XX Lock Example Application](#matter-cc32xxsf-lock-example-application) - [Introduction](#introduction) - [Device UI](#device-ui) - [Building](#building) @@ -13,19 +13,15 @@ Instruments CC32XX family of Wireless MCUs. - [Compilation](#compilation) - [Programming](#programming) - [Code Composer Studio](#code-composer-studio) - - [UniFlash](#uniflash) - [Viewing Logging Output](#viewing-logging-output) - [Running the Example](#running-the-example) - [Provisioning](#provisioning) - - [Matter Remote Commands](#matter-remote-commands) - [TI Support](#ti-support) --- ## Introduction -![CC3235SF_LAUNCHXL](doc/images/cc3235sf_launchxl.jpg) - The CC32XX lock example application provides a working demonstration of a connected door lock device. This uses the open-source CHIP implementation and the Texas Instruments SimpleLinkâ„¢ Wi-Fi® CC32xx software development kit. diff --git a/examples/lock-app/genio/README.md b/examples/lock-app/genio/README.md index f4d0653016e4b5..7c4582f707c4cd 100644 --- a/examples/lock-app/genio/README.md +++ b/examples/lock-app/genio/README.md @@ -1,22 +1,18 @@ -#Matter `Genio` Lock Example +# Matter `Genio` Lock Example An example showing the use of Matter on the MediaTek `Genio` MT793X.
-- [Matter Genio Lock Example](#chip-genio-lock-example) +- [Matter Genio Lock Example](#matter-genio-lock-example) - [Introduction](#introduction) - [Building](#building) - - [Note](#note) - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - [Notes](#notes)
- - ## Introduction The `Genio` (MT793X) lock example provides a baseline demonstration of a door @@ -32,8 +28,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the MediaTek platform. - - ## Building - Following the Linux related descriptions in @@ -104,8 +98,6 @@ MediaTek platform. chiptool onoff off 1 1 ``` -```` - - You can test the LED by light command as shown below ``` @@ -114,7 +106,7 @@ MediaTek platform. onoff Usage: light onoff color Usage: light color level Usage: light level - ``` + ``` ### Notes @@ -122,4 +114,3 @@ MediaTek platform. addresses to your devices (Border router / PC). If this is the case, you need to add a static ipv6 addresses on both device and then an ipv6 route to the border router on your PC -```` diff --git a/examples/lock-app/infineon/psoc6/README.md b/examples/lock-app/infineon/psoc6/README.md index 781b8364afb1a8..7adc1b9b41b481 100644 --- a/examples/lock-app/infineon/psoc6/README.md +++ b/examples/lock-app/infineon/psoc6/README.md @@ -4,7 +4,7 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
-- [Matter PSoC6 Lock Example](#chip-psoc6-lock-example) +- [Matter PSoC6 Lock Example](#matter-psoc6-lock-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) @@ -18,8 +18,6 @@ An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board.
- - ## Introduction The PSoC6 lock example provides a demonstration of a door lock control device, @@ -31,8 +29,6 @@ and the Matter controller will exchange security information with the Rendezvous procedure. Wi-Fi Network credentials are then provided to the PSoC6 device which will then join the network. - - ## Building - [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) @@ -59,8 +55,6 @@ will then join the network. $ cd ~/connectedhomeip $ rm -rf out/ - - ## Flashing the Application - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the @@ -72,14 +66,10 @@ will then join the network. $ cd ~/connectedhomeip $ python3 out/infineon-psoc6-lock/chip-psoc6-lock-example.flash.py - - ## Commissioning and cluster control Commissioning can be carried out using BLE. - - ### Setting up Chip tool Once PSoC6 is up and running, we need to set up chip-tool on Raspberry Pi 4 to @@ -94,8 +84,6 @@ perform commissioning and cluster control. $ ./out/debug/chip-tool - - ### Commissioning over BLE Run the built executable and pass it the discriminator and pairing code of the @@ -110,8 +98,6 @@ remote device, as well as the network credentials to use. 4. SSID : Wi-Fi SSID 5. PASSWORD : Wi-Fi Password - - #### Notes Raspberry Pi 4 BLE connection issues can be avoided by running the following @@ -121,8 +107,6 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. $ sudo btmgmt -i hci0 bredr off $ sudo btmgmt -i hci0 power on - - ### Cluster control - After successful commissioning, use the OnOff cluster command to toggle diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 2fcd9006309e29..1ffe1367aee41b 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -708,7 +708,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -718,7 +718,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -747,7 +747,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -757,7 +757,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -769,13 +769,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -784,17 +784,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2003,7 +2003,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 8ac3ca3a0e298a..c9cd0207b0224e 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -2613,11 +2613,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/lock-app/mbed/README.md b/examples/lock-app/mbed/README.md index cc48cebeb68ae9..27eb42224678ab 100644 --- a/examples/lock-app/mbed/README.md +++ b/examples/lock-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS Lock Example Application

+# Matter Arm Mbed OS Lock Example Application The Arm Mbed OS Lock Example demonstrates how to remotely control a door lock device with one basic bolt. The example takes advantage of the IO available on @@ -39,19 +39,19 @@ paired into an existing Matter network and can be controlled by this network.
-# Overview +## Overview The Matter device that runs the lock application is controlled by the Matter controller device over WiFi. By default, the Matter device is disconnected , and it should be paired with Matter controller and get configuration from it. Actions required before establishing full communication are described below. -## Bluetooth Low Energy advertising +### Bluetooth Low Energy advertising To commission the device onto a Matter network, the device must be discoverable over BLE. The BLE advertising starts automatically after device boot-up. -## Bluetooth Low Energy rendezvous +### Bluetooth Low Energy rendezvous In Matter, the commissioning procedure (called rendezvous) is done over BLE between a Matter device and the Matter controller, where the controller has the @@ -61,16 +61,16 @@ To start the rendezvous, the controller must get the commissioning information from the Matter device. The data payload is encoded within a QR code, printed to the UART console. -## WiFi provisioning +### WiFi provisioning The last part of the rendezvous procedure, provisioning involves sending the network credentials from the Matter controller to the Matter device. As a result, device is able to join the network and communicate with other devices in the network. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -98,7 +98,7 @@ its requirements. > devcontainer is the recommended way to interact with Arm Mbed-OS port of the > Matter Project.** > -> **Please read this [README.md](../../..//docs/VSCODE_DEVELOPMENT.md) for more +> **Please read this [README.md](../../../docs/VSCODE_DEVELOPMENT.md) for more > information about using VSCode in container.** To initialize the development environment, download all registered sub-modules @@ -116,7 +116,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The Lock application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -134,7 +134,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=lock-app -b= Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing -### Serial port terminal +#### Serial port terminal The application traces are streaming to serial output. To start communication open a terminal session and connect to the serial port of the device. You can @@ -222,13 +222,13 @@ After device reset these lines should be visible: The lock-app application launched correctly and you can follow traces in the terminal. -### CHIP Tools +#### CHIP Tools Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application within a WiFi network. -### RPC console +#### RPC console The RPC console is an interactive Python shell console, where the different RPC command can be invoked. It is a complete solution for interacting with hardware @@ -276,26 +276,25 @@ The response from the device should contain the current lock state: For more details about RPC console and supported services visit [CHIP RPC console](../../common/pigweed/rpc_console/README.md). -## Supported devices +### Supported devices The example supports building and running on the following mbed-enabled devices: -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lock state LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lock state LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • Unused
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `lock-app/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `lock-app/mbed/mbed_app.json`. Information about this file syntax and its + meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -## Device UI +### Device UI This section lists the User Interface elements that you can use to control and monitor the state of the device. These correspond to PCB components on the @@ -340,5 +339,5 @@ opposite one. Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform +[Supported devices](#supported-devices) section and check board's 'Platform components' column for additional information about the limitation. diff --git a/examples/lock-app/nrfconnect/README.md b/examples/lock-app/nrfconnect/README.md index 3189dc2730b629..7aef2c91559d43 100644 --- a/examples/lock-app/nrfconnect/README.md +++ b/examples/lock-app/nrfconnect/README.md @@ -5,10 +5,8 @@ device with one basic bolt. It uses buttons to test changing the lock and device states and LEDs to show the state of these changes. You can use this example as a reference for creating your own application. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK The example is based on [Matter](https://github.com/project-chip/connectedhomeip) and Nordic @@ -29,7 +27,7 @@ platform, so only one protocol can be supported for a specific lock device. - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Device Firmware Upgrade](#device-firmware-upgrade) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [IPv6 network support](#ipv6-network-support) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) @@ -49,8 +47,6 @@ platform, so only one protocol can be supported for a specific lock device.
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -165,16 +161,12 @@ section to learn how to change MCUboot and flash configuration in this example.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -196,8 +188,6 @@ for Matter: `nrf5340dk_nrf5340_cpuapp`. - Matter over Wi-Fi is supported for `nrf7002dk_nrf5340_cpuapp`. - - ## Device UI This section lists the User Interface elements that you can use to control and @@ -297,7 +287,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -380,8 +370,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -470,8 +458,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -520,8 +506,6 @@ page.
- - ## Flashing and debugging To flash the application to the device, use the west tool and run the following diff --git a/examples/lock-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/lock-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index d1d93c9dbf033d..f9fe5b0fd9a950 100644 --- a/examples/lock-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/lock-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,11 +14,16 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; /* Disable unused peripherals to reduce power consumption */ diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 77d689971568c4..5e1248cfbd8ae4 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -48,8 +48,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/lock-app/nrfconnect/main/include/BoltLockManager.h b/examples/lock-app/nrfconnect/main/include/BoltLockManager.h index 8811723cd8421f..b5b5b66b9b1aef 100644 --- a/examples/lock-app/nrfconnect/main/include/BoltLockManager.h +++ b/examples/lock-app/nrfconnect/main/include/BoltLockManager.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/examples/lock-app/nxp/k32w/k32w0/README.md b/examples/lock-app/nxp/k32w/k32w0/README.md index 352d03055e862d..c797127b5dbd3b 100644 --- a/examples/lock-app/nxp/k32w/k32w0/README.md +++ b/examples/lock-app/nxp/k32w/k32w0/README.md @@ -16,29 +16,27 @@ network.
-- [CHIP K32W0 Lock Example Application](#chip-k32w-lock-example-application) - +- [CHIP K32W0 Lock Example Application](#chip-k32w061-lock-example-application) - [Introduction](#introduction) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - [Device UI](#device-ui) - [Building](#building) - - [Known issues](#building-issues) -- [Manufacturing data](#manufacturing) -- [Flashing and debugging](#flashdebug) -- [Pigweed Tokenizer](#tokenizer) - - [Detokenizer script](#detokenizer) - - [Notes](#detokenizer-notes) - - [Known issues](#detokenizer-known-issues) -- [Tinycrypt ECC operations](#tinycrypt) - - [Building steps](#tinycrypt-building-steps) + - [Known issues](#known-issues) +- [Manufacturing data](#manufacturing-data) +- [Flashing and debugging](#flashing-and-debugging) +- [Pigweed Tokenizer](#pigweed-tokenizer) + - [Detokenizer script](#detokenizer-script) + - [Notes](#notes) + - [Known issues](#known-issues-1) +- [Tinycrypt ECC operations](#tinycrypt-ecc-operations) + - [Building steps](#building-steps) - [Low power](#low-power) - - [Known issues](#low-power-issues) + - [Known issues](#known-issues-2) - - ## Introduction ![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg) @@ -167,8 +165,6 @@ DS3, which can be found on the DK6 board. Also, by long pressing the **USERINTERFACE** button, the factory reset action will be initiated. - - ## Building In order to build the Project CHIP example, we recommend using a Linux @@ -217,22 +213,16 @@ pycryptodome 3.9.8 The resulting output file can be found in out/debug/chip-k32w0x-lock-example. - - ## Known issues - When using Secure element and cross-compiling on Linux, log messages from the Plug&Trust middleware stack may not echo to the console. - - ## Manufacturing data See [Guide for writing manufacturing data on NXP devices](../../../../platform/nxp/doc/manufacturing_flow.md). - - ## Flashing and debugging Program the firmware using the official @@ -242,8 +232,6 @@ All you have to do is to replace the Openthread binaries from the above documentation with _out/debug/chip-k32w0x-lock-example.bin_ if DK6Programmer is used or with _out/debug/chip-k32w0x-lock-example_ if MCUXpresso is used. - - ## Pigweed tokenizer The tokenizer is a pigweed module that allows hashing the strings. This greatly @@ -251,8 +239,6 @@ reduces the flash needed for logs. The module can be enabled by building with the gn argument _chip_pw_tokenizer_logging=true_. The detokenizer script is needed for parsing the hashed scripts. - - ### Detokenizer script The python3 script detokenizer.py is a script that decodes the tokenized logs @@ -281,8 +267,6 @@ where the decoded logs will be stored. This parameter is required for file usage and optional for serial usage. If not provided when used with serial port, it will show the decoded log only at the stdout and not save it to file. - - ### Notes The token database is created automatically after building the binary if the @@ -297,8 +281,6 @@ detokenizer script to see logs of a lock app: python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-lock-example-database.bin -o device.txt ``` - - ### Known issues The building process will not update the token database if it already exists. In @@ -316,12 +298,8 @@ If run, closed and rerun with the serial option on the same serial port, the detokenization script will get stuck and not show any logs. The solution is to unplug and plug the board and then rerun the script. - - ## Tinycrypt ECC operations - - ### Building steps Note: This solution is temporary. @@ -336,8 +314,6 @@ To disable tinycrypt ecc operations, simply build with _chip_crypto=\"mbedtls\"_ and with or without _mbedtls_repo_. If used with _mbedtls_repo_ the mbedtls implementation from `NXPmicro/mbedtls` library will be used. - - ## Low power The example also offers the possibility to run in low power mode. This means @@ -369,8 +345,6 @@ below: Please note that that the Power Measurement Tool is not very accurate and professional tools must be used if exact power consumption needs to be known. - - ## Known issues - Power Measurement Tool may not work correctly in MCUXpresso versions greater diff --git a/examples/lock-app/qpg/APPLICATION.md b/examples/lock-app/qpg/APPLICATION.md index f97b4876bc8840..a7b312e157ab51 100644 --- a/examples/lock-app/qpg/APPLICATION.md +++ b/examples/lock-app/qpg/APPLICATION.md @@ -14,4 +14,4 @@ More detailed information on the Qorvo SDK can be found in the ## More information For more information on our product line and support options, please visit -[www.qorvo.com](www.qorvo.com) or contact us at +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/lock-app/silabs/efr32/README.md b/examples/lock-app/silabs/efr32/README.md index a681df76cc6d45..5944a5f8afe767 100644 --- a/examples/lock-app/silabs/efr32/README.md +++ b/examples/lock-app/silabs/efr32/README.md @@ -27,8 +27,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 lock example provides a baseline demonstration of a door lock control @@ -48,8 +46,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -189,8 +185,6 @@ Mac OS X $ ninja -C out/debug ``` - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments @@ -198,8 +192,6 @@ arguments ./scripts/examples/gn_efr32_example.sh ``` - - ## Flashing the Application - On the command line: @@ -211,8 +203,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -271,8 +261,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient ``` - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -413,7 +401,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options diff --git a/examples/minimal-mdns/README.md b/examples/minimal-mdns/README.md index 8e781f852424ff..391b7f0adb5bfe 100644 --- a/examples/minimal-mdns/README.md +++ b/examples/minimal-mdns/README.md @@ -1,3 +1,8 @@ +# Minimal mDNS example + +This example demonstrates the multicast DNS (mDNS) protocol functionality in +Matter. + ## Example server The file `server.cpp` contains an example of a mdns server that can listen on diff --git a/examples/ota-provider-app/esp32/README.md b/examples/ota-provider-app/esp32/README.md index aa2ead1d25816b..2102aabd1a714d 100644 --- a/examples/ota-provider-app/esp32/README.md +++ b/examples/ota-provider-app/esp32/README.md @@ -81,4 +81,4 @@ privileges to all nodes for the OTA Provider cluster (0x0029) on every endpoint --- Once OTA provider is commissioned then head over to -[OTA Requestor Example](../../ota-requestor-app/esp32). +[OTA Requestor Example](../../ota-requestor-app/esp32/README.md). diff --git a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp index e7715a9fb9357a..234ee940b6d9db 100644 --- a/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp +++ b/examples/ota-provider-app/ota-provider-common/OTAProviderExample.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 631d8303ffa7c8..53e94893fd520a 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -495,7 +495,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -505,7 +505,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -534,7 +534,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -544,7 +544,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -556,13 +556,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -571,17 +571,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -915,7 +915,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index 4ffb2bf292a170..77a71f47dac91d 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -2475,11 +2475,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/ota-requestor-app/esp32/README.md b/examples/ota-requestor-app/esp32/README.md index ac61c1ecde8be0..4fb56712670429 100644 --- a/examples/ota-requestor-app/esp32/README.md +++ b/examples/ota-requestor-app/esp32/README.md @@ -13,7 +13,6 @@ guides to get started. - [Prerequisite](#prerequisite) - [Query for an OTA Image](#query-for-an-ota-image) - [ESP32 OTA Requestor with Linux OTA Provider](#esp32-ota-requestor-with-linux-ota-provider) -- [Generate OTA image](#generate-ota-image) - [RPC console and Device Tracing](../../../docs/guides/esp32/rpc_console.md) --- @@ -38,7 +37,7 @@ application of OTA image. ### ESP32 OTA Requestor with Linux OTA Provider -- Build the [Linux OTA Provider](../../ota-provider-app/linux) +- Build the [Linux OTA Provider](../../ota-provider-app/linux/README.md) - Run the Linux OTA Provider with OTA image. ``` diff --git a/examples/ota-requestor-app/genio/README.md b/examples/ota-requestor-app/genio/README.md index 2b448ff94d0b8a..e8675adc62199b 100644 --- a/examples/ota-requestor-app/genio/README.md +++ b/examples/ota-requestor-app/genio/README.md @@ -1,22 +1,18 @@ -#Matter `Genio` Lighting Example +# Matter `Genio` Lighting Example An example showing the use of Matter on the MediaTek `Genio` MT793X.
-- [Matter Genio Lighting Example](#chip-genio-lighting-example) +- [Matter Genio Lighting Example](#matter-genio-lighting-example) - [Introduction](#introduction) - [Building](#building) - - [Note](#note) - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - [Notes](#notes)
- - ## Introduction The `Genio` (MT793X) lighting example provides a baseline demonstration of a @@ -32,8 +28,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the MediaTek platform. - - ## Building - Following the Linux related descriptions in diff --git a/examples/ota-requestor-app/mbed/README.md b/examples/ota-requestor-app/mbed/README.md index 38133986fda880..6f8bcdaf53c380 100644 --- a/examples/ota-requestor-app/mbed/README.md +++ b/examples/ota-requestor-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS Lock Example Application

+# Matter Arm Mbed OS Lock Example Application The Arm Mbed OS OTA Requestor Example demonstrates how to remotely trigger update image downloading and apply it if needed. Full functionality of this @@ -41,19 +41,19 @@ paired into an existing Matter network and can be controlled by this network.
-# Overview +## Overview The Matter device that runs the lock application is controlled by the Matter controller device over WiFi. By default, the Matter device is disconnected , and it should be paired with Matter controller and get configuration from it. Actions required before establishing full communication are described below. -## Bluetooth Low Energy advertising +### Bluetooth Low Energy advertising To commission the device onto a Matter network, the device must be discoverable over BLE. The BLE advertising starts automatically after device boot-up. -## Bluetooth Low Energy rendezvous +### Bluetooth Low Energy rendezvous In Matter, the commissioning procedure (called rendezvous) is done over BLE between a Matter device and the Matter controller, where the controller has the @@ -63,16 +63,16 @@ To start the rendezvous, the controller must get the commissioning information from the Matter device. The data payload is encoded within a QR code, printed to the UART console. -## WiFi provisioning +### WiFi provisioning The last part of the rendezvous procedure, provisioning involves sending the network credentials from the Matter controller to the Matter device. As a result, device is able to join the network and communicate with other devices in the network. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -118,7 +118,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The OTA Requestor application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -136,7 +136,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=ota-requestor-app -b ``` Both approaches are limited to supported evaluation boards which are listed in -[Supported devices](#supported_devices) paragraph. +[Supported devices](#supported-devices) paragraph. Mbed OS defines three building profiles: _develop, debug_ and _release_. For more details please visit @@ -155,7 +155,7 @@ There are also three types of built application: _simple, boot_ and _upgrade_: When using the building script, it is possible expand the list of acceptable targets; this may be useful for rapid testing of a new mbed-targets. -## Flashing +### Flashing The Lock application can be flashed in the same way as any other Matter example ported to mbed-os platform. @@ -188,7 +188,7 @@ device. It is possible to connect to an external gdb-server session by using specific **'Flash Mbed examples [remote]'** task. -## Debugging +### Debugging Debugging can be performed in the same was as with any other Matter example ported to mbed-os platform. @@ -204,14 +204,14 @@ Run and Debug (Ctrl+Shift+D) => Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing The provider application is required to transfer image file to OTA requestor. Mbed example is compatible with Linux version of OTA provider example. Read the [OTAProvider](../../ota-provider-app/linux/README.md) to see how to build and run the OTA provider. -### Serial port terminal +#### Serial port terminal The application traces are streaming to serial output. To start communication open a terminal session and connect to the serial port of the device. You can @@ -229,7 +229,7 @@ After device reset these lines should be visible: The ota-requestor-app application launched correctly and you can follow traces in the terminal. -### CHIP Tools +#### CHIP Tools Read the [MbedCommissioning](../../../docs/guides/mbedos_commissioning.md) to see how to use different CHIP tools to commission and control the application @@ -244,7 +244,7 @@ receiving this command OTA requestor will query for OTA image: The OTA requestor should communicate with provider, download update image and apply it. -#### Notes +##### Notes - You have to provision the OTA Provider in the same Matter network. Use the `connect -ip` command of Python Device Controller: @@ -254,26 +254,25 @@ apply it. - POSIX CLI CHIPTool can be also used for testing this example. Use the correct `chip-tool` arguments to perform above-mentioned steps. -## Supported devices +### Supported devices The example supports building and running on the following mbed-enabled devices: -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lock state LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
  • Lock state LED should be an external component connected to PB9_6 pin (active high).
Buttons
  • SW2 push-button is not used in this example due to its interaction with WIFI module interrupt line.
  • Button 0 corresponds to BTN0 capacitive button.
  • Button 1 corresponds to BTN1 capacitive button.
Slider
  • Unused
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `ota-requestor-app/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `ota-requestor-app/mbed/mbed_app.json`. Information about this file syntax + and its meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -## Device UI +### Device UI This section lists the User Interface elements that you can use to control and monitor the state of the device. These correspond to PCB components on the @@ -319,5 +318,5 @@ BLE advertising. Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform +[Supported devices](#supported-devices) section and check board's 'Platform components' column for additional information about the limitation. diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index a2ce3e2b02aa6f..0f6471521fd769 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -660,7 +660,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -670,7 +670,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -699,7 +699,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -709,7 +709,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -721,13 +721,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -736,17 +736,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1081,7 +1081,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 45c956b1da3a61..59756eed342383 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -2529,11 +2529,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/persistent-storage/efr32/README.md b/examples/persistent-storage/efr32/README.md index abe1750132bb7f..a2726d99094e85 100644 --- a/examples/persistent-storage/efr32/README.md +++ b/examples/persistent-storage/efr32/README.md @@ -1,4 +1,4 @@ -#CHIP EFR32 Persistent Storage Example +# CHIP EFR32 Persistent Storage Example An example testing and demonstrating the key value storage API. @@ -13,8 +13,6 @@ An example testing and demonstrating the key value storage API.
- - ## Introduction This example serves to both test the key value storage implementation and API as @@ -24,14 +22,10 @@ to use the API. In the future this example can be moved into a unit test when available on all platforms. - - ## EFR32 The EFR32 platform KVS is fully implemented - - ### Building - Download the @@ -101,8 +95,6 @@ OR use GN/Ninja directly $ cd ~/connectedhomeip/examples/persistent-storage/efr32 $ rm -rf out/ - - ### Flashing the Application - On the command line: @@ -112,8 +104,6 @@ OR use GN/Ninja directly - Or with the Ozone debugger, just load the .out file. - - ### Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) diff --git a/examples/persistent-storage/infineon/psoc6/README.md b/examples/persistent-storage/infineon/psoc6/README.md index 19a32c60c85acf..f42617e7f3350c 100644 --- a/examples/persistent-storage/infineon/psoc6/README.md +++ b/examples/persistent-storage/infineon/psoc6/README.md @@ -4,16 +4,14 @@ An example testing and demonstrating the key value storage API.
-- [CHIP PSoC6 Persistent Storage Example](#chip-PSoC6-persistent-storage-example) +- [CHIP PSoC6 Persistent Storage Example](#chip-psoc6-persistent-storage-example) - [Introduction](#introduction) - - [PSoC6](#PSoC6) + - [PSoC6](#psoc6) - [Building](#building) - [Flashing the Application](#flashing-the-application)
- - ## Introduction This example serves to both test the key value storage implementation and API as @@ -23,15 +21,11 @@ to use the API. In the future this example can be moved into a unit test when available on all platforms. - - ## PSoC6 The Infineon PSoC6 platform KVS is fully implemented, the KVS is enabled and configured by providing a file during the init call. - - ### Building - Build the example application: @@ -40,8 +34,6 @@ configured by providing a file during the init call. $ source third_party/connectedhomeip/scripts/activate.sh $ ./scripts/examples/gn_psoc6_example.sh examples/persistent-storage/infineon/psoc6 out/persistent_storage_app_psoc6 - - ### Flashing the Application - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the diff --git a/examples/persistent-storage/linux/README.md b/examples/persistent-storage/linux/README.md index 196c2230573d48..f21f259783f6fa 100644 --- a/examples/persistent-storage/linux/README.md +++ b/examples/persistent-storage/linux/README.md @@ -12,8 +12,6 @@ An example testing and demonstrating the key value storage API.
- - ## Introduction This example serves to both test the key value storage implementation and API as @@ -23,15 +21,11 @@ to use the API. In the future this example can be moved into a unit test when available on all platforms. - - ## Linux The Linux platform KVS is fully implemented, the KVS is enabled and configured by providing a file during the init call. - - ### Building - Install tool chain @@ -46,8 +40,6 @@ by providing a file during the init call. $ gn gen out/debug $ ninja -C out/debug - - ### Running - Run Linux Example diff --git a/examples/pigweed-app/efr32/README.md b/examples/pigweed-app/efr32/README.md index 3680f42a67b535..b016a0b06550ae 100644 --- a/examples/pigweed-app/efr32/README.md +++ b/examples/pigweed-app/efr32/README.md @@ -1,4 +1,4 @@ -#CHIP EFR32 Pigweed Example Application +# CHIP EFR32 Pigweed Example Application The EFR32 example demonstrates the usage of Pigweed module functionalities in an application. @@ -21,9 +21,9 @@ following features are available: --- -- [CHIP EFR32 Pigweed Example Application](#chip-EFR32-pigweed-example-application) +- [CHIP EFR32 Pigweed Example Application](#chip-efr32-pigweed-example-application) - [Building the Example Application](#building-the-example-application) - - [To build the application, follow these steps:](#to-build-the-application-follow-these-steps) + - [Flashing the Application](#flashing-the-application) - [Testing the Example Application](#testing-the-example-application) --- diff --git a/examples/pigweed-app/mbed/README.md b/examples/pigweed-app/mbed/README.md index 19f9a13012dc1e..8ca7aca3c221c6 100644 --- a/examples/pigweed-app/mbed/README.md +++ b/examples/pigweed-app/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS Pigweed Example Application

+# Matter Arm Mbed OS Pigweed Example Application The Arm Mbed OS Pigweed Example demonstrates the usage of Pigweed module functionalities in an application. @@ -35,7 +35,7 @@ serial port to the device. The following RPC protocols services are available:
-# Overview +## Overview Pigweed libraries are built and organized in a way that enables faster and more reliable development. In the Matter project, the Pigweed module is planned to be @@ -43,9 +43,9 @@ used to create system infrastructures, for example for performing on-device tests, but considering its general functionalities, it can be useful also in other cases. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -91,7 +91,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The Pigweed application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -109,7 +109,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=pigweed-app -b= Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing -### Serial port terminal +#### Serial port terminal The application traces are streaming to serial output. To start communication open a terminal session and connect to the serial port of the device. You can @@ -197,7 +197,7 @@ After device reset these lines should be visible: The pigweed-app application launched correctly and you can follow traces in the terminal. -### RPC console +#### RPC console The RPC console is an interactive Python shell console, where the different RPC command can be invoked. It is a complete solution for interacting with hardware @@ -237,26 +237,25 @@ The response from the device should be: For more details about RPC console and supported services visit [CHIP RPC console](../../common/pigweed/rpc_console/README.md). -## Supported devices +### Supported devices The example supports building and running on the following mbed-enabled devices: -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| :heavy_check_mark: |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| ✔ |
LEDs
  • Board has only one usable LED (LED4) which corresponds to USER LED from UI.
Buttons
  • Unused
Slider
  • Unused
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `pigweed-app/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `pigweed-app/mbed/mbed_app.json`. Information about this file syntax and its + meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -# Device UI +## Device UI This section lists the User Interface elements that you can use to control and monitor the state of the device. These correspond to PCB components on the @@ -267,9 +266,9 @@ possible: - _Solid On_ — The application was flashed and run successfully. -### Notes +#### Notes Some of the supported boards may not have sufficient number PCB components to follow above description. In that case please refer to -[Supported devices](#Supported-devices) section and check board's 'Platform +[Supported devices](#supported-devices) section and check board's 'Platform components' column for additional information about the limitation. diff --git a/examples/pigweed-app/mobly_tests/echo_test.py b/examples/pigweed-app/mobly_tests/echo_test.py index 179987f60f5dd9..071a555934f87d 100644 --- a/examples/pigweed-app/mobly_tests/echo_test.py +++ b/examples/pigweed-app/mobly_tests/echo_test.py @@ -12,12 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from chip_mobly import pigweed_device -from mobly import asserts -from mobly import base_test -from mobly import test_runner import time +from chip_mobly import pigweed_device +from mobly import asserts, base_test, test_runner + class PigweedEchoTest(base_test.BaseTestClass): def setup_class(self): diff --git a/examples/pigweed-app/nrfconnect/README.md b/examples/pigweed-app/nrfconnect/README.md index d226db40338513..a6adf61fbfde47 100644 --- a/examples/pigweed-app/nrfconnect/README.md +++ b/examples/pigweed-app/nrfconnect/README.md @@ -3,10 +3,8 @@ The nRF Connect Pigweed Example demonstrates the usage of Pigweed module functionalities in an application. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK The example is based on [Matter](https://github.com/project-chip/connectedhomeip), the @@ -29,7 +27,7 @@ the following features are available: - [Overview](#overview) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) - [Using Docker container for setup](#using-docker-container-for-setup) @@ -37,14 +35,12 @@ the following features are available: - [Building](#building) - [Configuring the example](#configuring-the-example) - [Flashing and debugging](#flashing-and-debugging) - - [Flashing on the nRF52840 DK](#nrf52840dk_flashing) - - [Flashing on the nRF52840 Dongle](#nrf52840dongle_flashing) + - [Flashing on the nRF52840 DK](#flashing-on-the-nrf52840-dk) + - [Flashing on the nRF52840 Dongle](#flashing-on-the-nrf52840-dongle) - [Testing the example](#testing-the-example)
- - ## Overview This example is running on the nRF Connect platform, which is based on the @@ -61,16 +57,12 @@ other cases.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: @@ -82,8 +74,6 @@ The example supports building and running on the following devices:
- - ## Device UI This section lists the User Interface elements that you can use to control and @@ -124,7 +114,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -207,8 +197,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -245,8 +233,6 @@ following command:
- - ## Configuring the example The Zephyr ecosystem is highly configurable and allows you to modify many @@ -285,15 +271,11 @@ page.
- - ## Flashing and debugging The flashing and debugging procedure is different for the nRF52840 DK and the nRF52840 Dongle. - - ### Flashing on the nRF52840 DK To flash the application to the device, use the west tool and run the following @@ -309,8 +291,6 @@ directory: $ west debug - - ### Flashing on the nRF52840 Dongle Visit @@ -319,8 +299,6 @@ to read more about flashing on the nRF52840 Dongle.
- - ## Testing the example Run the following command to start an interactive Python shell, where the Echo diff --git a/examples/pigweed-app/nrfconnect/main/main.cpp b/examples/pigweed-app/nrfconnect/main/main.cpp index 9abede4a6f0314..dd092668d4192f 100644 --- a/examples/pigweed-app/nrfconnect/main/main.cpp +++ b/examples/pigweed-app/nrfconnect/main/main.cpp @@ -19,7 +19,7 @@ #include "LEDWidget.h" #include "PigweedLoggerMutex.h" #include "pigweed/RpcService.h" -#include +#include #include "pw_rpc/echo_service_nanopb.h" #include "pw_sys_io/sys_io.h" diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 735bc9df2e3d7d..1cd80b3b84eb89 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -972,7 +972,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -982,7 +982,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -1011,7 +1011,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -1021,7 +1021,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -1033,13 +1033,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -1048,17 +1048,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2858,7 +2858,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 76b7f6794bfdd4..69e0bb8dcdfaf8 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -2195,11 +2195,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -3009,7 +3009,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -3025,7 +3025,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -3041,7 +3041,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -8015,13 +8015,29 @@ ] }, { - "name": "Fixed Label", - "code": 64, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", "enabled": 1, "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8041,18 +8057,34 @@ ] }, { - "name": "Fixed Label", - "code": 64, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "label list", + "name": "ActiveLocale", "code": 0, "mfgCode": null, "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", "type": "array", "included": 1, "storageOption": "External", @@ -8064,6 +8096,22 @@ "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, @@ -8083,38 +8131,12 @@ ] }, { - "name": "Color Control", - "code": 768, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", + "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], + "enabled": 1, "attributes": [ { "name": "ClusterRevision", @@ -8126,7 +8148,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8135,48 +8157,48 @@ ] }, { - "name": "Color Control", - "code": 768, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", + "define": "UNIT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "CurrentHue", + "name": "TemperatureUnit", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 0, + "type": "TempUnit", + "included": 1, "storageOption": "RAM", - "singleton": 0, + "singleton": 1, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 1, + "minInterval": 0, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentSaturation", - "code": 1, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", - "included": 0, + "type": "bitmap32", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentX", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", @@ -8184,84 +8206,124 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x616B", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ { - "name": "CurrentY", - "code": 4, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x607D", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "ColorTemperatureMireds", - "code": 7, + "name": "label list", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", + "type": "array", + "included": 1, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00FA", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Options", - "code": 15, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "1", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ { - "name": "CoupleColorTempToLevelMinMireds", - "code": 16397, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ { - "name": "StartUpColorTemperatureMireds", - "code": 16400, + "name": "label list", + "code": 0, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8293,10 +8355,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8305,29 +8367,39 @@ ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "Color Control", + "code": 768, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "COLOR_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ + "enabled": 0, + "commands": [ { - "name": "FeatureMap", - "code": 65532, + "name": "MoveToColor", + "code": 7, "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -8338,135 +8410,147 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Localization Configuration", - "code": 43, + "name": "Color Control", + "code": 768, "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "define": "COLOR_CONTROL_CLUSTER", "side": "server", "enabled": 1, "attributes": [ { - "name": "ActiveLocale", + "name": "CurrentHue", "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", - "included": 1, + "type": "int8u", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedLocales", + "name": "CurrentSaturation", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentX", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x616B", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "CurrentY", + "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x607D", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ColorTemperatureMireds", + "code": 7, "mfgCode": null, "side": "server", "type": "int16u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00FA", + "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": "1", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 1, - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CoupleColorTempToLevelMinMireds", + "code": 16397, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ + }, { - "name": "temperature unit", - "code": 0, + "name": "StartUpColorTemperatureMireds", + "code": 16400, "mfgCode": null, "side": "server", - "type": "TempUnit", + "type": "int16u", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, + "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, @@ -8496,7 +8580,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8505,7 +8589,7 @@ ] }, { - "name": "Occupancy Sensor", + "name": "Occupancy Sensing", "code": 1030, "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", @@ -8529,9 +8613,9 @@ "reportableChange": 0 } ] - }, + }, { - "name": "Occupancy Sensor", + "name": "Occupancy Sensing", "code": 1030, "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", @@ -8539,7 +8623,7 @@ "enabled": 1, "attributes": [ { - "name": "Occupancy", + "name": "occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -8555,7 +8639,7 @@ "reportableChange": 0 }, { - "name": "OccupancySensorType", + "name": "occupancy sensor type", "code": 1, "mfgCode": null, "side": "server", @@ -8571,7 +8655,7 @@ "reportableChange": 0 }, { - "name": "OccupancySensorTypeBitmap", + "name": "occupancy sensor type bitmap", "code": 2, "mfgCode": null, "side": "server", @@ -8587,7 +8671,7 @@ "reportableChange": 0 }, { - "name": "PIROccupiedToUnoccupiedDelay", + "name": "PIR occupied to unoccupied delay", "code": 16, "mfgCode": null, "side": "server", @@ -8603,7 +8687,7 @@ "reportableChange": 0 }, { - "name": "PIRUnoccupiedToOccupiedDelay", + "name": "PIR unoccupied to occupied delay", "code": 17, "mfgCode": null, "side": "server", @@ -8619,11 +8703,11 @@ "reportableChange": 0 }, { - "name": "PIRUnoccupiedToOccupiedThreshold", + "name": "PIR unoccupied to occupied threshold", "code": 18, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8635,7 +8719,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicOccupiedToUnoccupiedDelay", + "name": "ultrasonic occupied to unoccupied delay", "code": 32, "mfgCode": null, "side": "server", @@ -8651,7 +8735,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicUnoccupiedToOccupiedDelay", + "name": "ultrasonic unoccupied to occupied delay", "code": 33, "mfgCode": null, "side": "server", @@ -8667,7 +8751,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "name": "ultrasonic unoccupied to occupied threshold", "code": 34, "mfgCode": null, "side": "server", @@ -8683,7 +8767,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "name": "physical contact occupied to unoccupied delay", "code": 48, "mfgCode": null, "side": "server", @@ -8699,7 +8783,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "name": "physical contact unoccupied to occupied delay", "code": 49, "mfgCode": null, "side": "server", @@ -8715,7 +8799,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "name": "physical contact unoccupied to occupied threshold", "code": 50, "mfgCode": null, "side": "server", @@ -8729,7 +8813,7 @@ "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + }, { "name": "GeneratedCommandList", "code": 65528, @@ -8811,90 +8895,6 @@ "reportableChange": 0 } ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] } ] } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index dfb8f49b950deb..c2aa039292b92c 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -949,7 +949,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -959,7 +959,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -988,7 +988,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -998,7 +998,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -1010,13 +1010,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -1025,17 +1025,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2848,7 +2848,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 5d2f46b4ebedf2..64e3d1784795a3 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -920,6 +920,206 @@ } ] }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "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": "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": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnit", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "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": "Power Source Configuration", "code": 46, @@ -2195,11 +2395,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -2450,206 +2650,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "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": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "temperature unit", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "TempUnit", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "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": "WiFi Network Diagnostics", "code": 54, @@ -3209,7 +3209,7 @@ "enabled": 1, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -3225,7 +3225,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -3241,7 +3241,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -3763,7 +3763,7 @@ "enabled": 1, "attributes": [ { - "name": "LabelList", + "name": "label list", "code": 0, "mfgCode": null, "side": "server", @@ -8589,7 +8589,7 @@ ] }, { - "name": "Occupancy Sensor", + "name": "Occupancy Sensing", "code": 1030, "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", @@ -8613,9 +8613,9 @@ "reportableChange": 0 } ] - }, + }, { - "name": "Occupancy Sensor", + "name": "Occupancy Sensing", "code": 1030, "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", @@ -8623,7 +8623,7 @@ "enabled": 1, "attributes": [ { - "name": "Occupancy", + "name": "occupancy", "code": 0, "mfgCode": null, "side": "server", @@ -8639,7 +8639,7 @@ "reportableChange": 0 }, { - "name": "OccupancySensorType", + "name": "occupancy sensor type", "code": 1, "mfgCode": null, "side": "server", @@ -8655,7 +8655,7 @@ "reportableChange": 0 }, { - "name": "OccupancySensorTypeBitmap", + "name": "occupancy sensor type bitmap", "code": 2, "mfgCode": null, "side": "server", @@ -8671,7 +8671,7 @@ "reportableChange": 0 }, { - "name": "PIROccupiedToUnoccupiedDelay", + "name": "PIR occupied to unoccupied delay", "code": 16, "mfgCode": null, "side": "server", @@ -8687,7 +8687,7 @@ "reportableChange": 0 }, { - "name": "PIRUnoccupiedToOccupiedDelay", + "name": "PIR unoccupied to occupied delay", "code": 17, "mfgCode": null, "side": "server", @@ -8703,11 +8703,11 @@ "reportableChange": 0 }, { - "name": "PIRUnoccupiedToOccupiedThreshold", + "name": "PIR unoccupied to occupied threshold", "code": 18, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8719,7 +8719,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicOccupiedToUnoccupiedDelay", + "name": "ultrasonic occupied to unoccupied delay", "code": 32, "mfgCode": null, "side": "server", @@ -8735,7 +8735,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicUnoccupiedToOccupiedDelay", + "name": "ultrasonic unoccupied to occupied delay", "code": 33, "mfgCode": null, "side": "server", @@ -8751,7 +8751,7 @@ "reportableChange": 0 }, { - "name": "UltrasonicUnoccupiedToOccupiedThreshold", + "name": "ultrasonic unoccupied to occupied threshold", "code": 34, "mfgCode": null, "side": "server", @@ -8767,7 +8767,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactOccupiedToUnoccupiedDelay", + "name": "physical contact occupied to unoccupied delay", "code": 48, "mfgCode": null, "side": "server", @@ -8783,7 +8783,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactUnoccupiedToOccupiedDelay", + "name": "physical contact unoccupied to occupied delay", "code": 49, "mfgCode": null, "side": "server", @@ -8799,7 +8799,7 @@ "reportableChange": 0 }, { - "name": "PhysicalContactUnoccupiedToOccupiedThreshold", + "name": "physical contact unoccupied to occupied threshold", "code": 50, "mfgCode": null, "side": "server", @@ -8813,7 +8813,7 @@ "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index 929fc26052f801..899ca7e3b3d381 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -17,6 +17,7 @@ */ #include "CommonDeviceCallbacks.h" +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #if CONFIG_BT_ENABLED #include "esp_bt.h" #if CONFIG_BT_NIMBLE_ENABLED @@ -26,6 +27,7 @@ #include "nimble/nimble_port.h" #endif // CONFIG_BT_NIMBLE_ENABLED #endif // CONFIG_BT_ENABLED +#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE #include "esp_err.h" #include "esp_heap_caps.h" @@ -78,7 +80,7 @@ void CommonDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, i case DeviceEventType::kCommissioningComplete: { ESP_LOGI(TAG, "Commissioning complete"); -#if CONFIG_BT_NIMBLE_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING +#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE && CONFIG_BT_NIMBLE_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING if (ble_hs_is_enabled()) { diff --git a/examples/platform/linux/testing/CustomCSRResponseOperationalKeyStore.cpp b/examples/platform/linux/testing/CustomCSRResponseOperationalKeyStore.cpp index 0ff63a70ef24eb..dfd063e866f9ea 100644 --- a/examples/platform/linux/testing/CustomCSRResponseOperationalKeyStore.cpp +++ b/examples/platform/linux/testing/CustomCSRResponseOperationalKeyStore.cpp @@ -19,7 +19,7 @@ #include "CustomCSRResponseOperationalKeyStore.h" #include -#include +#include #include namespace chip { diff --git a/examples/platform/nrfconnect/pw_sys_io/sys_io_nrfconnect.cc b/examples/platform/nrfconnect/pw_sys_io/sys_io_nrfconnect.cc index f41dce65b59ff7..7c9f3429d12727 100644 --- a/examples/platform/nrfconnect/pw_sys_io/sys_io_nrfconnect.cc +++ b/examples/platform/nrfconnect/pw_sys_io/sys_io_nrfconnect.cc @@ -17,9 +17,9 @@ #include -#include "console/console.h" #include "pw_sys_io/sys_io.h" #include +#include #include #ifdef CONFIG_USB diff --git a/examples/platform/nrfconnect/util/LEDWidget.cpp b/examples/platform/nrfconnect/util/LEDWidget.cpp index eca7765ab0a0d9..56bb9436eece47 100644 --- a/examples/platform/nrfconnect/util/LEDWidget.cpp +++ b/examples/platform/nrfconnect/util/LEDWidget.cpp @@ -20,7 +20,7 @@ #include "LEDWidget.h" #include -#include +#include static LEDWidget::LEDWidgetStateUpdateHandler sStateUpdateCallback; diff --git a/examples/platform/nrfconnect/util/PWMDevice.cpp b/examples/platform/nrfconnect/util/PWMDevice.cpp index 2d17d31e4e703e..d0a77ab63f1800 100644 --- a/examples/platform/nrfconnect/util/PWMDevice.cpp +++ b/examples/platform/nrfconnect/util/PWMDevice.cpp @@ -23,8 +23,8 @@ #include #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/platform/nrfconnect/util/PigweedLogger.cpp b/examples/platform/nrfconnect/util/PigweedLogger.cpp index 33e7fdc01068bd..851dd445ceff23 100644 --- a/examples/platform/nrfconnect/util/PigweedLogger.cpp +++ b/examples/platform/nrfconnect/util/PigweedLogger.cpp @@ -24,11 +24,11 @@ * needs to use HDLC/UART for another purpose like the RPC server. */ +#include #include #include #include #include -#include #include #include diff --git a/examples/platform/nrfconnect/util/include/DFUOverSMP.h b/examples/platform/nrfconnect/util/include/DFUOverSMP.h index cf839cf166911f..1c5ace635783e1 100644 --- a/examples/platform/nrfconnect/util/include/DFUOverSMP.h +++ b/examples/platform/nrfconnect/util/include/DFUOverSMP.h @@ -25,7 +25,7 @@ #include -#include +#include typedef void (*DFUOverSMPRestartAdvertisingHandler)(void); diff --git a/examples/platform/nrfconnect/util/include/LEDWidget.h b/examples/platform/nrfconnect/util/include/LEDWidget.h index 4859bc9bf048df..aee857ffd91667 100644 --- a/examples/platform/nrfconnect/util/include/LEDWidget.h +++ b/examples/platform/nrfconnect/util/include/LEDWidget.h @@ -20,7 +20,7 @@ #include -#include +#include class LEDWidget { diff --git a/examples/platform/nxp/doc/manufacturing_flow.md b/examples/platform/nxp/doc/manufacturing_flow.md index 83afb4ab85335b..f8d83f16d73e09 100644 --- a/examples/platform/nxp/doc/manufacturing_flow.md +++ b/examples/platform/nxp/doc/manufacturing_flow.md @@ -1,5 +1,3 @@ - - ## Manufacturing data By default, the example application is configured to use generic test diff --git a/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py b/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py index d2dbfa49c7ff5a..4ad1436a71fc8b 100644 --- a/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py +++ b/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py @@ -1,8 +1,9 @@ import argparse -import sys import os -import serial +import sys + import pw_tokenizer +import serial def parse_args(): @@ -75,8 +76,8 @@ def decode_serial(serialport, outfile, database): if input: try: - while(True): - if(input.in_waiting > 0): + while (True): + if (input.in_waiting > 0): # read line from serial port and ascii decode line = input.readline().decode('ascii').strip() # find token start and detokenize diff --git a/examples/platform/nxp/se05x/DeviceAttestationSe05xCredsExample_v2.cpp b/examples/platform/nxp/se05x/DeviceAttestationSe05xCredsExample_v2.cpp index eb3b5e52553180..08cab351f771aa 100644 --- a/examples/platform/nxp/se05x/DeviceAttestationSe05xCredsExample_v2.cpp +++ b/examples/platform/nxp/se05x/DeviceAttestationSe05xCredsExample_v2.cpp @@ -20,10 +20,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #if CHIP_CRYPTO_HSM @@ -279,4 +279,4 @@ DeviceAttestationCredentialsProvider * GetExampleSe05xDACProviderv2() } // namespace Credentials } // namespace chip -#endif //#ifdef ENABLE_HSM_DEVICE_ATTESTATION +#endif // #ifdef ENABLE_HSM_DEVICE_ATTESTATION diff --git a/examples/platform/qpg/README.md b/examples/platform/qpg/README.md index dcbd61619b020d..d8e070848f540c 100644 --- a/examples/platform/qpg/README.md +++ b/examples/platform/qpg/README.md @@ -1,3 +1,7 @@ +--- +orphan: true +--- + # Matter QPG6105 SDK ## Qorvo SDK @@ -8,4 +12,4 @@ More detailed information on the Qorvo SDK can be found in the ## More information For more information on our product line and support options, please visit -[www.qorvo.com](www.qorvo.com) or contact us at +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/providers/DeviceInfoProviderImpl.cpp b/examples/providers/DeviceInfoProviderImpl.cpp index d8c262647768ff..0e731492a91ba2 100644 --- a/examples/providers/DeviceInfoProviderImpl.cpp +++ b/examples/providers/DeviceInfoProviderImpl.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include #include diff --git a/examples/pump-app/nrfconnect/README.md b/examples/pump-app/nrfconnect/README.md index c4a02dc8a2ebb0..9c20935f23c116 100644 --- a/examples/pump-app/nrfconnect/README.md +++ b/examples/pump-app/nrfconnect/README.md @@ -6,10 +6,8 @@ state and device states and LEDs to show the state of these changes. This example is inherited from the "lock-app" example but modified to simulate a pump device and can be used as a reference for creating your own pump application. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK The example is based on [Matter](https://github.com/project-chip/connectedhomeip) and Nordic @@ -27,7 +25,7 @@ device works as a Thread Minimal End Device. - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Device Firmware Upgrade](#device-firmware-upgrade) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) - [Using Docker container for setup](#using-docker-container-for-setup) @@ -42,8 +40,6 @@ device works as a Thread Minimal End Device.
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -151,29 +147,23 @@ section to learn how to change MCUboot and flash configuration in this example.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: -| Hardware platform | Build target | Platform image | -| ----------------------------------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` |
nRF52840 DKnRF52840 DK
| -| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` |
nRF5340 DKnRF5340 DK
| +| Hardware platform | Build target | Platform image | +| ----------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` |
nRF52840 DKnRF52840 DK
| +| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` |
nRF5340 DKnRF5340 DK
|
- - ## Device UI This section lists the User Interface elements that you can use to control and @@ -250,7 +240,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -333,8 +323,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -426,8 +414,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -476,8 +462,6 @@ page.
- - ## Flashing and debugging To flash the application to the device, use the west tool and run the following diff --git a/examples/pump-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 76031564db7950..e52b2072ec1b10 100644 --- a/examples/pump-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/pump-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,9 +14,15 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; + diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 14ea81f628e2d6..b6454b09be2871 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -42,8 +42,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/pump-app/nrfconnect/main/PumpManager.cpp b/examples/pump-app/nrfconnect/main/PumpManager.cpp index f24bd3262f45b8..1709e19fd32ff2 100644 --- a/examples/pump-app/nrfconnect/main/PumpManager.cpp +++ b/examples/pump-app/nrfconnect/main/PumpManager.cpp @@ -22,8 +22,8 @@ #include "AppConfig.h" #include "AppTask.h" +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 5ceb261f6af7cc..756c8659f9acff 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -659,7 +659,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -669,7 +669,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -698,7 +698,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -708,7 +708,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -720,13 +720,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -735,10 +735,10 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index cc1bfa9cff07e1..a0305007ef2ae0 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -3101,11 +3101,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 0, "storageOption": "External", "singleton": 0, diff --git a/examples/pump-controller-app/nrfconnect/README.md b/examples/pump-controller-app/nrfconnect/README.md index 8fb710d4d272f2..e8fc9ac57cfa63 100644 --- a/examples/pump-controller-app/nrfconnect/README.md +++ b/examples/pump-controller-app/nrfconnect/README.md @@ -7,10 +7,8 @@ these changes. This example is inherited from the "lock-app" example but modified to simulate a pump device and can be used as a reference for creating your own pump application. -

- Nordic Semiconductor logo - nRF52840 DK -

+Nordic Semiconductor logo +nRF52840 DK The example is based on [Matter](https://github.com/project-chip/connectedhomeip) and Nordic @@ -28,7 +26,7 @@ device works as a Thread Minimal End Device. - [Bluetooth LE rendezvous](#bluetooth-le-rendezvous) - [Device Firmware Upgrade](#device-firmware-upgrade) - [Requirements](#requirements) - - [Supported devices](#supported_devices) + - [Supported devices](#supported-devices) - [Device UI](#device-ui) - [Setting up the environment](#setting-up-the-environment) - [Using Docker container for setup](#using-docker-container-for-setup) @@ -43,8 +41,6 @@ device works as a Thread Minimal End Device.
- - ## Overview This example is running on the nRF Connect platform, which is based on Nordic @@ -152,29 +148,23 @@ section to learn how to change MCUboot and flash configuration in this example.
- - ## Requirements The application requires a specific revision of the nRF Connect SDK to work correctly. See [Setting up the environment](#setting-up-the-environment) for more information. - - ### Supported devices The example supports building and running on the following devices: -| Hardware platform | Build target | Platform image | -| ----------------------------------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` |
nRF52840 DKnRF52840 DK
| -| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` |
nRF5340 DKnRF5340 DK
| +| Hardware platform | Build target | Platform image | +| ----------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` |
nRF52840 DKnRF52840 DK
| +| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` |
nRF5340 DKnRF5340 DK
|
- - ## Device UI This section lists the User Interface elements that you can use to control and @@ -250,7 +240,7 @@ image that has the tools pre-installed. If you are a macOS user, you won't be able to use the Docker container to flash the application onto a Nordic development kit due to [certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell) for building instead. +Use the [native shell](#using-native-shell-for-setup) for building instead. ### Using Docker container for setup @@ -333,8 +323,6 @@ Now you can proceed with the [Building](#building) instruction.
- - ## Building Complete the following steps, regardless of the method used for setting up the @@ -426,8 +414,6 @@ example `nrf52840dk_nrf52840`), edit the `pm_static_dfu.yml` file located in the
- - ## Configuring the example The Zephyr ecosystem is based on Kconfig files and the settings can be modified @@ -476,8 +462,6 @@ page.
- - ## Flashing and debugging To flash the application to the device, use the west tool and run the following diff --git a/examples/pump-controller-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/pump-controller-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 76031564db7950..e52b2072ec1b10 100644 --- a/examples/pump-controller-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/pump-controller-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,9 +14,15 @@ * limitations under the License. */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; +}; +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; }; + diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 1e59d9bd6affbe..dd2ce3e4eab5f2 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -42,8 +42,8 @@ #endif #include +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp b/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp index 2b6215dc896938..64e848a56a312d 100644 --- a/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp +++ b/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp @@ -22,8 +22,8 @@ #include "AppConfig.h" #include "AppTask.h" +#include #include -#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index a0d543be5c3e48..97239df2d8a114 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -558,7 +558,7 @@ server cluster NetworkCommissioning = 49 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -568,7 +568,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -597,7 +597,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -607,7 +607,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -619,13 +619,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -634,10 +634,10 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute command_id generatedCommandList[] = 65528; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 1f1484134279a6..396738d9530d42 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -3049,11 +3049,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 0, "storageOption": "External", "singleton": 0, diff --git a/examples/shell/README.md b/examples/shell/README.md index 4b76af87e5d89c..7caa043d7bd63a 100644 --- a/examples/shell/README.md +++ b/examples/shell/README.md @@ -34,9 +34,8 @@ Done - [exit](#exit) - [help](#help) - [otcli](README_OTCLI.md) -- [ping](#ping) - [rand](#rand) -- [server](README_SERVER.md) +- server - [version](#version) ## Matter Shell Command Details diff --git a/examples/shell/README_SERVER.md b/examples/shell/README_SERVER.md index 4b1133ea1cf6af..93af1bb7884e36 100644 --- a/examples/shell/README_SERVER.md +++ b/examples/shell/README_SERVER.md @@ -7,7 +7,6 @@ The all-clusters-app server may be invoked and managed via the Matter Shell CLI. - [help](#help) - [clusters](#clusters) - [endpoints](#endpoints) -- [exchanges](#exchanges) - [port](#port) - [sessions](#sessions) - [start](#start) diff --git a/examples/shell/mbed/README.md b/examples/shell/mbed/README.md index 02738126c8e0de..16a9f987bc5c8f 100644 --- a/examples/shell/mbed/README.md +++ b/examples/shell/mbed/README.md @@ -1,6 +1,6 @@ ![ARM Mbed-OS logo](https://raw.githubusercontent.com/ARMmbed/mbed-os/master/logo.png) -

Matter Arm Mbed OS Shell Example Application

+# Matter Arm Mbed OS Shell Example Application The Arm Mbed OS Shell Example exposes configuration and management APIs via a command line interface (CLI). Use the shell CLI to experiment with Matter @@ -28,7 +28,7 @@ supports remote access and control of device over serial port.
-# Overview +## Overview The Matter device that runs the shell application can be controlled over serial port. The shell is used to parse a command line and call the corresponding @@ -36,9 +36,9 @@ service execution. There is a set of common shell commands which performs basic device operations. Mbed OS application also supports some custom services and corresponding shell commands allow them execution. -# Run application +## Run application -## Environment setup +### Environment setup Before building the example, check out the Matter repository and sync submodules using the following command: @@ -84,7 +84,7 @@ environment: $ source ./scripts/activate.sh ``` -## Building +### Building The shell application can be built in the same way as any other Matter example ported to the mbed-os platform. @@ -102,7 +102,7 @@ ${MATTER_ROOT}/scripts/examples/mbed_example.sh -c=build -a=shell -b= Debug Mbed examples => Start Debugging (F5) => ( It is possible to connect to an external gdb-server session by using specific **'Debug Mbed examples [remote]'** task. -## Testing +### Testing -### Serial port terminal +#### Serial port terminal To start communication open a serial terminal session and connect to the serial port of the device. You can use **mbed-tools** for this purpose @@ -195,29 +195,28 @@ Example: Hello Done -## Supported devices +### Supported devices The example supports building and running on the following mbed-enabled devices: -| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | -| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| :heavy_check_mark: |
LEDs
  • Unused
Buttons
  • Unused
Slider
  • Unused
| +| Manufacturer | Hardware platform | Build target | Platform image | Status | Platform components | +| ----------------------------------------------------- | ------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cypress
Semiconductor](https://www.cypress.com/) | [CY8CPROTO-062-4343W](https://os.mbed.com/platforms/CY8CPROTO-062-4343W/) | `CY8CPROTO_062_4343W` |
CY8CPROTO-062-4343WCY8CPROTO-062-4343W
| ✔ |
LEDs
  • Unused
Buttons
  • Unused
Slider
  • Unused
| -#### Notes +##### Notes - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in - `shell/mbed/mbed_app.json`. - Information about this file syntax and its meaning in mbed-os project can be - found here: + `shell/mbed/mbed_app.json`. Information about this file syntax and its + meaning in mbed-os project can be found here: [Mbed-Os configuration system](https://os.mbed.com/docs/mbed-os/latest/program-setup/advanced-configuration.html)) -# Shell commands +## Shell commands The application supports common Matter shell commands. They are used to control the basic functionalities of the device. For more details visit: -[Common shell commands](../README.md#chip-shell-command-details) +[Common shell commands](../README.md#matter-shell-command-details) diff --git a/examples/shell/openiotsdk/README.md b/examples/shell/openiotsdk/README.md index 5307edf1f86cd2..3acf66098b0094 100644 --- a/examples/shell/openiotsdk/README.md +++ b/examples/shell/openiotsdk/README.md @@ -6,7 +6,7 @@ execution. There is a set of common shell commands which perform basic device operations. For more details see -[Common shell commands](../README.md#chip-shell-command-details). +[Common shell commands](../README.md#matter-shell-command-details). ## Build and run @@ -34,7 +34,7 @@ supports common Matter shell commands. They are used to control the basic functionalities of the device. For more details read: -[Common shell commands](../README.md#chip-shell-command-details) +[Common shell commands](../README.md#matter-shell-command-details) Example: diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 44b5f9c7eba810..05de5a718a65e6 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -402,7 +402,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -412,7 +412,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -441,7 +441,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -451,7 +451,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -463,13 +463,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -478,17 +478,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -938,7 +938,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 1a2dd5df66f990..220e18c3578ca8 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -1813,11 +1813,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, diff --git a/examples/thermostat/genio/README.md b/examples/thermostat/genio/README.md index 9ed78f98c4ace9..4ae5bba01758cb 100644 --- a/examples/thermostat/genio/README.md +++ b/examples/thermostat/genio/README.md @@ -1,22 +1,18 @@ -#Matter `Genio` Thermostat Example +# Matter `Genio` Thermostat Example An example showing the use of Matter on the MediaTek `Genio` MT793X.
-- [Matter Genio Thermostat Example](#chip-genio-thermostat-example) +- [Matter Genio Thermostat Example](#matter-genio-thermostat-example) - [Introduction](#introduction) - [Building](#building) - - [Note](#note) - [Flashing the Application](#flashing-the-application) - - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - [Notes](#notes)
- - ## Introduction The `Genio` (MT793X) thermostat example provides a baseline demonstration of a @@ -32,8 +28,6 @@ The thermostat example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the MediaTek platform. - - ## Building - Following the Linux related descriptions in diff --git a/examples/thermostat/silabs/efr32/README.md b/examples/thermostat/silabs/efr32/README.md index 098f652150e49d..bd80d425d29a87 100644 --- a/examples/thermostat/silabs/efr32/README.md +++ b/examples/thermostat/silabs/efr32/README.md @@ -32,8 +32,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 Thermostat example provides a baseline demonstration of a thermostat @@ -53,8 +51,6 @@ The light switch example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -181,15 +177,11 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -199,8 +191,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -249,8 +239,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -334,8 +322,6 @@ combination with JLinkRTTClient as follows: #Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 - - ## Running RPC console - As part of building the example with RPCs enabled the chip_rpc python @@ -375,7 +361,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 78c1f6d91045c2..b04286a27a899e 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -796,7 +796,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -806,7 +806,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -835,7 +835,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -845,7 +845,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -857,13 +857,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -872,17 +872,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -1612,7 +1612,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 46a2ac12d79943..c505ffa6829bd9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -2699,11 +2699,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4537,7 +4537,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -4553,7 +4553,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -4569,7 +4569,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", @@ -9655,7 +9655,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -9671,7 +9671,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -9687,7 +9687,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java index d5d634015366c5..f5f54d2ff81bcd 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java @@ -72,6 +72,10 @@ public void init(@NonNull Context context) { registerContentAppUpdatesReceiver(); } + public void addSelfVendorAsAdmin() { + mAppPlatform.addSelfVendorAsAdmin(); + } + private void initializeContentAppEndpoints() { // Read the metadada of previously discovered endpoints. diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServantService.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServantService.java index 978ce7dfd039ef..0d135e71d698be 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServantService.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServantService.java @@ -24,6 +24,7 @@ public void onCreate() { MatterServant.get().initCommissioner(); AppPlatformService.get().init(this.getApplicationContext()); + AppPlatformService.get().addSelfVendorAsAdmin(); } @Nullable diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 90fc6b5d50d991..d0280edd92c074 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -44,9 +44,11 @@ #include #include #include +#include using namespace chip; using namespace chip::AppPlatform; +using namespace chip::DeviceLayer; #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED ContentAppFactoryImpl gFactory; @@ -407,6 +409,20 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi { if (endpointId == kLocalVideoPlayerEndpointId) { + if (GetVendorPrivilege(vendorId) == Access::Privilege::kAdminister) + { + ChipLogProgress(DeviceLayer, + "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint priviledged vendor accessible clusters " + "being returned."); + return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, + chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, + chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, + chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::ApplicationLauncher::Id }; + } + ChipLogProgress( + DeviceLayer, + "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint operator vendor accessible clusters being returned."); return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, @@ -478,3 +494,16 @@ void ReportAttributeChange(EndpointId epId, chip::ClusterId clusterId, chip::Att { MatterReportingAttributeChangeCallback(epId, clusterId, attributeId); } + +void AddSelfVendorAsAdmin() +{ + uint16_t value; + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(value) != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "AppImpl addSelfVendorAsAdmin Vendor ID not known"); + } + else + { + gFactory.AddAdminVendorId(value); + } +} diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index df257e081577dc..fb11ee33529f70 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -60,6 +60,8 @@ EndpointId AddContentApp(const char * szVendorName, uint16_t vendorId, const cha EndpointId RemoveContentApp(EndpointId epId); void ReportAttributeChange(EndpointId epId, chip::ClusterId clusterId, chip::AttributeId attributeId); +void AddSelfVendorAsAdmin(); + #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED namespace chip { diff --git a/examples/tv-app/android/java/AppPlatform-JNI.cpp b/examples/tv-app/android/java/AppPlatform-JNI.cpp index 3675c33852bd0f..cf0ee2450cc982 100644 --- a/examples/tv-app/android/java/AppPlatform-JNI.cpp +++ b/examples/tv-app/android/java/AppPlatform-JNI.cpp @@ -87,3 +87,9 @@ JNI_METHOD(void, reportAttributeChange) ReportAttributeChange(static_cast(endpointId), static_cast(clusterId), static_cast(attributeId)); } + +JNI_METHOD(void, addSelfVendorAsAdmin) +(JNIEnv *, jobject, jint endpointId, jint clusterId, jint attributeId) +{ + AddSelfVendorAsAdmin(); +} diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/AppPlatform.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/AppPlatform.java index a01a50fe253361..cc8356f5be0323 100644 --- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/AppPlatform.java +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/AppPlatform.java @@ -55,6 +55,10 @@ public native int addContentAppAtEndpoint( // Method to report attribute change for content app endpoints to the SDK public native void reportAttributeChange(int endpointId, int clusterId, int attributeId); + // Method to add the current vendorId of the node as an admin to enable clients from same vendor + // to be admins + public native void addSelfVendorAsAdmin(); + static { System.loadLibrary("TvApp"); } diff --git a/examples/tv-app/linux/AppImpl.cpp b/examples/tv-app/linux/AppImpl.cpp index d6496acdb1ad9e..75e4786f33afa6 100644 --- a/examples/tv-app/linux/AppImpl.cpp +++ b/examples/tv-app/linux/AppImpl.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include using namespace chip; @@ -502,6 +503,20 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi { if (endpointId == kLocalVideoPlayerEndpointId) { + if (GetVendorPrivilege(vendorId) == Access::Privilege::kAdminister) + { + ChipLogProgress(DeviceLayer, + "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint priviledged vendor accessible clusters " + "being returned."); + return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, + chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, + chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, + chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::ApplicationLauncher::Id }; + } + ChipLogProgress( + DeviceLayer, + "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint operator vendor accessible clusters being returned."); return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, @@ -520,6 +535,15 @@ CHIP_ERROR InitVideoPlayerPlatform() #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED ContentAppPlatform::GetInstance().SetupAppPlatform(); ContentAppPlatform::GetInstance().SetContentAppFactory(&gFactory); + uint16_t value; + if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetVendorId(value) != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "AppImpl InitVideoPlayerPlatform Vendor ID not known"); + } + else + { + gFactory.AddAdminVendorId(value); + } #endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE diff --git a/examples/tv-app/linux/README.md b/examples/tv-app/linux/README.md index 8583b9fbb2de4c..147c6c81804f55 100644 --- a/examples/tv-app/linux/README.md +++ b/examples/tv-app/linux/README.md @@ -16,8 +16,6 @@ Desktop 20.10 (aarch64)**
- - ## Building - Install tool chain @@ -37,8 +35,6 @@ Desktop 20.10 (aarch64)** $ cd ~/connectedhomeip/examples/tv-app/linux $ rm -rf out/ - - ## Exercising Commissioning - Regular Commissioning diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index dd3ed3a662be02..e1ed622db28296 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -841,7 +841,7 @@ server cluster DiagnosticLogs = 50 { } server cluster GeneralDiagnostics = 51 { - enum BootReasonType : ENUM8 { + enum BootReasonEnum : ENUM8 { kUnspecified = 0; kPowerOnReboot = 1; kBrownOutReset = 2; @@ -851,7 +851,7 @@ server cluster GeneralDiagnostics = 51 { kSoftwareReset = 6; } - enum HardwareFaultType : ENUM8 { + enum HardwareFault : ENUM8 { kUnspecified = 0; kRadio = 1; kSensor = 2; @@ -880,7 +880,7 @@ server cluster GeneralDiagnostics = 51 { kConnectionFailed = 3; } - enum RadioFaultType : ENUM8 { + enum RadioFault : ENUM8 { kUnspecified = 0; kWiFiFault = 1; kCellularFault = 2; @@ -890,7 +890,7 @@ server cluster GeneralDiagnostics = 51 { kEthernetFault = 6; } - struct NetworkInterfaceType { + struct NetworkInterface { char_string<32> name = 0; boolean isOperational = 1; nullable boolean offPremiseServicesReachableIPv4 = 2; @@ -902,13 +902,13 @@ server cluster GeneralDiagnostics = 51 { } critical event HardwareFaultChange = 0 { - HardwareFaultType current[] = 0; - HardwareFaultType previous[] = 1; + HardwareFault current[] = 0; + HardwareFault previous[] = 1; } critical event RadioFaultChange = 1 { - RadioFaultType current[] = 0; - RadioFaultType previous[] = 1; + RadioFault current[] = 0; + RadioFault previous[] = 1; } critical event NetworkFaultChange = 2 { @@ -917,17 +917,17 @@ server cluster GeneralDiagnostics = 51 { } critical event BootReason = 3 { - BootReasonType bootReason = 0; + BootReasonEnum bootReason = 0; } - readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute NetworkInterface networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; readonly attribute int64u upTime = 2; readonly attribute int32u totalOperationalHours = 3; - readonly attribute enum8 bootReasons = 4; - readonly attribute ENUM8 activeHardwareFaults[] = 5; - readonly attribute ENUM8 activeRadioFaults[] = 6; - readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly attribute BootReasonEnum bootReason = 4; + readonly attribute HardwareFault activeHardwareFaults[] = 5; + readonly attribute RadioFault activeRadioFaults[] = 6; + readonly attribute NetworkFaultType activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2247,7 +2247,7 @@ endpoint 0 { callback attribute rebootCount; callback attribute upTime; callback attribute totalOperationalHours; - callback attribute bootReasons; + callback attribute bootReason; callback attribute activeHardwareFaults; callback attribute activeRadioFaults; callback attribute activeNetworkFaults; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index f1a89a06e0b4aa..da63ed737daf2a 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -2509,11 +2509,11 @@ "reportableChange": 0 }, { - "name": "BootReasons", + "name": "BootReason", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "BootReasonEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -4347,7 +4347,7 @@ "enabled": 0, "attributes": [ { - "name": "number of positions", + "name": "NumberOfPositions", "code": 0, "mfgCode": null, "side": "server", @@ -4363,7 +4363,7 @@ "reportableChange": 0 }, { - "name": "current position", + "name": "CurrentPosition", "code": 1, "mfgCode": null, "side": "server", @@ -4379,7 +4379,7 @@ "reportableChange": 0 }, { - "name": "multi press max", + "name": "MultiPressMax", "code": 2, "mfgCode": null, "side": "server", diff --git a/examples/tv-casting-app/android/App/app/build.gradle b/examples/tv-casting-app/android/App/app/build.gradle index b697bf8b6369d4..3dcdad715e6393 100644 --- a/examples/tv-casting-app/android/App/app/build.gradle +++ b/examples/tv-casting-app/android/App/app/build.gradle @@ -44,6 +44,10 @@ android { sourceSets { main { jniLibs.srcDirs = ['libs/jniLibs'] + java.srcDirs = [ + 'src/main/java', + 'src/main/jni', + ] // uncomment this code to debug // java.srcDirs = [ diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java new file mode 100644 index 00000000000000..3f7d05197a9f04 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java @@ -0,0 +1,401 @@ +package com.chip.casting.app; + +import android.app.Activity; +import android.os.Bundle; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ArrayAdapter; +import android.widget.ListView; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import com.chip.casting.ContentApp; +import com.chip.casting.ContentLauncherTypes; +import com.chip.casting.FailureCallback; +import com.chip.casting.MatterCallbackHandler; +import com.chip.casting.MatterError; +import com.chip.casting.SuccessCallback; +import com.chip.casting.TvCastingApp; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +/** A {@link Fragment} to send Content Launcher commands from the TV Casting App. */ +public class CertTestFragment extends Fragment { + private static final String TAG = CertTestFragment.class.getSimpleName(); + + private final TvCastingApp tvCastingApp; + + private View.OnClickListener launchTestButtonClickListener; + private List certTestStatuses = new ArrayList(); + + private static final ContentApp kTVApp = new ContentApp((short) 1, null); + private static final ContentApp kTVAppSpeaker = new ContentApp((short) 2, null); + + private static final ContentApp kContentApp = new ContentApp((short) 4, null); + private ArrayAdapter certTestStatusesAdapter; + + public CertTestFragment(TvCastingApp tvCastingApp) { + this.tvCastingApp = tvCastingApp; + } + + /** + * Use this factory method to create a new instance of this fragment using the provided + * parameters. + * + * @param tvCastingApp TV Casting App (JNI) + * @return A new instance of fragment ContentLauncherFragment. + */ + public static CertTestFragment newInstance(TvCastingApp tvCastingApp) { + return new CertTestFragment(tvCastingApp); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + this.launchTestButtonClickListener = + new View.OnClickListener() { + @Override + public void onClick(View v) { + Activity activity = getActivity(); + certTestStatuses.clear(); + certTestStatusesAdapter.notifyDataSetChanged(); + + runCertTests(activity); + } + }; + + return inflater.inflate(R.layout.fragment_cert_test_launcher, container, false); + } + + private void runCertTests(Activity activity) { + CertTestMatterSuccessFailureCallback successFailureCallback = + new CertTestMatterSuccessFailureCallback(activity); + CertTestMatterSuccessFailureCallbackInteger successFailureCallbackInteger = + new CertTestMatterSuccessFailureCallbackInteger(successFailureCallback); + CertTestMatterCallbackHandler callback = + new CertTestMatterCallbackHandler(successFailureCallback); + + runAndWait( + "keypadInput_sendKey", + successFailureCallback, + () -> { + // 3.3.1. [TC-KEYPADINPUT-3.1] Send Key Command Verification (DUT as Client) + tvCastingApp.keypadInput_sendKey(kTVApp, (byte) 10, callback); + }); + + runAndWait( + "applicationLauncher_launchApp", + successFailureCallback, + () -> { + // 3.4.4. [TC-APPLAUNCHER-3.7.1] Launch Application Verification (DUT as Client) + tvCastingApp.applicationLauncher_launchApp( + kTVApp, (short) 123, "exampleid", new byte[] {}, callback); + }); + + runAndWait( + "applicationLauncher_stopApp", + successFailureCallback, + () -> { + // [TC-APPLAUNCHER-3.8.1] Stop Application Verification (DUT as Client) + tvCastingApp.applicationLauncher_stopApp(kTVApp, (short) 123, "exampleid", callback); + }); + + runAndWait( + "applicationLauncher_hideApp", + successFailureCallback, + () -> { + // [TC-APPLAUNCHER-3.9.1] Hide Application Verification (DUT as Client) + tvCastingApp.applicationLauncher_hideApp(kTVApp, (short) 123, "exampleid", callback); + }); + + runAndWait( + "targetNavigator_navigateTarget", + successFailureCallback, + () -> { + // 3.10.2. [TC-TGTNAV-8.2] Navigate Target Verification (DUT as Client) + tvCastingApp.targetNavigator_navigateTarget(kTVApp, (byte) 1, "", callback); + }); + + ArrayList list = new ArrayList<>(); + list.add(new ContentLauncherTypes.AdditionalInfo("imdb", "dummyId")); + + ArrayList paramList = new ArrayList<>(); + paramList.add(new ContentLauncherTypes.Parameter(13, "Dummy Video", Optional.of(list))); + + runAndWait( + "contentLauncher_launchContent", + successFailureCallback, + () -> { + // 3.12.3. [TC-CONTENTLAUNCHER-10.4] Launch Content Verification (DUT as Client) + tvCastingApp.contentLauncher_launchContent( + kTVApp, new ContentLauncherTypes.ContentSearch(paramList), true, "", callback); + }); + + runAndWait( + "contentLauncherLaunchURL", + successFailureCallback, + () -> { + // 3.12.5. [TC-CONTENTLAUNCHER-10.6] Launch URL Verification (DUT as Client) + tvCastingApp.contentLauncherLaunchURL( + kTVApp, "https://dummyurl", "Dummy Content", callback); + }); + + runAndWait( + "mediaPlayback_play", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_play(kContentApp, callback); + }); + + runAndWait( + "mediaPlayback_next", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_next(kContentApp, callback); + }); + + runAndWait( + "mediaPlayback_skipForward", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_skipForward(kContentApp, 10000, callback); + }); + + runAndWait( + "mediaPlayback_skipBackward", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_skipBackward(kContentApp, 10000, callback); + }); + + runAndWait( + "mediaPlayback_pause", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_pause(kContentApp, callback); + }); + + runAndWait( + "mediaPlayback_stopPlayback", + successFailureCallback, + () -> { + // 3.8.5. [TC-MEDIAPLAYBACK-6.5] Mandatory Media Playback Verification (DUT as Client) + tvCastingApp.mediaPlayback_stopPlayback(kContentApp, callback); + }); + + // Additional Tests + // Mandatory + // OnOff cluster + runAndWait( + "onOff_on", + successFailureCallback, + () -> { + tvCastingApp.onOff_on(kTVApp, callback); + }); + + runAndWait( + "onOff_off", + successFailureCallback, + () -> { + tvCastingApp.onOff_off(kTVApp, callback); + }); + + runAndWait( + "onOff_toggle", + successFailureCallback, + () -> { + tvCastingApp.onOff_toggle(kTVApp, callback); + }); + + // Application Basic + runAndWait( + "applicationBasic_readApplicationVersion", + successFailureCallback, + () -> { + tvCastingApp.applicationBasic_readApplicationVersion( + kContentApp, successFailureCallback, successFailureCallback); + }); + + runAndWait( + "applicationBasic_readVendorName", + successFailureCallback, + () -> { + tvCastingApp.applicationBasic_readVendorName( + kContentApp, successFailureCallback, successFailureCallback); + }); + + runAndWait( + "applicationBasic_readApplicationName", + successFailureCallback, + () -> { + tvCastingApp.applicationBasic_readApplicationName( + kContentApp, successFailureCallback, successFailureCallback); + }); + + runAndWait( + "applicationBasic_readVendorID", + successFailureCallback, + () -> { + tvCastingApp.applicationBasic_readVendorID( + kContentApp, successFailureCallbackInteger, successFailureCallbackInteger); + }); + + runAndWait( + "applicationBasic_readProductID", + successFailureCallback, + () -> { + tvCastingApp.applicationBasic_readProductID( + kContentApp, successFailureCallbackInteger, successFailureCallbackInteger); + }); + + // Unsupported & Optional + // 3.2.2. [TC-LOWPOWER-2.2] Low Power Mode Verification (DUT as Client) + // 3.5.5. [TC-MEDIAINPUT-3.14] Select Input Verification (DUT as Client) + // 3.5.6. [TC-MEDIAINPUT-3.15] Show Input Status Verification (DUT as Client) + // 3.5.7. [TC-MEDIAINPUT-3.16] Hide Input Status Verification (DUT as Client) + // 3.5.8. [TC-MEDIAINPUT-3.17] Rename Input Verification (DUT as Client) + + // 3.7.4. [TC-CHANNEL-5.4] Change Channel Verification (DUT as Client) + // 3.7.5. [TC-CHANNEL-5.5] Change Channel By Number Verification (DUT as Client) + // 3.7.6. [TC-CHANNEL-5.6] Skip Channel Verification (DUT as Client) + + // 19.9.3. [TC-AUDIOOUTPUT-7.3] Select Output Verification (DUT as Client) + // 19.9.4. [TC-AUDIOOUTPUT-7.4] Rename Output Verification (DUT as Client) + + // 3.14.2. [TC-ALOGIN-12.2] Account Login Verification (DUT as Client) + } + + @Override + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + Log.d(TAG, "ContentLauncherFragment.onViewCreated called"); + certTestStatusesAdapter = + new ArrayAdapter( + this.getContext(), + R.layout.cert_test_status_item, + R.id.launchCertTestStatus, + certTestStatuses); + ListView launchCertTestStatusUpdatesView = + getView().findViewById(R.id.launchCertTestStatusUpdates); + launchCertTestStatusUpdatesView.setAdapter(certTestStatusesAdapter); + getView() + .findViewById(R.id.launchCertTestButton) + .setOnClickListener(launchTestButtonClickListener); + } + + private void runAndWait( + String testMethod, CertTestMatterSuccessFailureCallback callback, Runnable runnable) { + CountDownLatch cdl = new CountDownLatch(1); + callback.setTestMethod(testMethod); + callback.setCountDownLatch(cdl); + runnable.run(); + try { + if (!cdl.await(10, TimeUnit.SECONDS)) { + Log.d(TAG, "Timed out for test to finish : " + testMethod); + } + } catch (InterruptedException e) { + Log.d(TAG, "Interrupted waiting for test to finish : " + testMethod); + } + } + + private void addCertTestStatus(Activity activity, MatterError error, String testMethod) { + Log.d(TAG, "Cert Test Status for " + testMethod + " : " + error); + certTestStatuses.add(testMethod + ":" + (error.isNoError() ? "Success!" : "Failure!")); + activity.runOnUiThread( + () -> { + certTestStatusesAdapter.notifyDataSetChanged(); + }); + } + + class CertTestMatterCallbackHandler extends MatterCallbackHandler { + private CertTestMatterSuccessFailureCallback delegate; + + CertTestMatterCallbackHandler(CertTestMatterSuccessFailureCallback delegate) { + this.delegate = delegate; + } + + @Override + public void handle(MatterError error) { + delegate.handle(error); + } + } + + class CertTestMatterSuccessFailureCallback extends FailureCallback + implements SuccessCallback { + private Activity activity; + private String testMethod; + private CountDownLatch cdl; + + CertTestMatterSuccessFailureCallback(Activity activity) { + this.activity = activity; + } + + void setTestMethod(String testMethod) { + this.testMethod = testMethod; + } + + public void setCountDownLatch(CountDownLatch cdl) { + this.cdl = cdl; + } + + @Override + public void handle(MatterError error) { + try { + cdl.countDown(); + addCertTestStatus(activity, error, testMethod); + } catch (Exception e) { + Log.e( + TAG, + "Exception when handling matter callback when running test method " + testMethod, + e); + } + } + + @Override + public void handle(String response) { + try { + cdl.countDown(); + addCertTestStatus(activity, MatterError.NO_ERROR, testMethod); + } catch (Exception e) { + Log.e( + TAG, + "Exception when handling matter callback when running test method " + testMethod, + e); + } + } + } + + class CertTestMatterSuccessFailureCallbackInteger extends FailureCallback + implements SuccessCallback { + + private CertTestMatterSuccessFailureCallback delegate; + + CertTestMatterSuccessFailureCallbackInteger(CertTestMatterSuccessFailureCallback delegate) { + this.delegate = delegate; + } + + @Override + public void handle(MatterError error) { + delegate.handle(error); + } + + @Override + public void handle(Integer response) { + delegate.handle(response.toString()); + } + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ContentLauncherFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ContentLauncherFragment.java index c1bb7dba3d6c42..2c3db2bc01f6d2 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ContentLauncherFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/ContentLauncherFragment.java @@ -61,9 +61,13 @@ public void onClick(View v) { new MatterCallbackHandler() { @Override public void handle(MatterError error) { - Log.d(TAG, "handle() called on LaunchURLResponse with " + error); - TextView launchUrlStatus = getView().findViewById(R.id.launchUrlStatus); - launchUrlStatus.setText(error.isNoError() ? "Success!" : "Failure!"); + try { + Log.d(TAG, "handle() called on LaunchURLResponse with " + error); + TextView launchUrlStatus = getView().findViewById(R.id.launchUrlStatus); + launchUrlStatus.setText(error.isNoError() ? "Success!" : "Failure!"); + } catch (Exception e) { + Log.e(TAG, "Exception in handler", e); + } } }); } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java index a9884bfdb88eac..03d18735edbf35 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java @@ -51,6 +51,11 @@ public void handleContentLauncherSelected() { showFragment(ContentLauncherFragment.newInstance(tvCastingApp)); } + @Override + public void handleCertTestLauncherSelected() { + showFragment(CertTestFragment.newInstance(tvCastingApp)); + } + @Override public void handleMediaPlaybackSelected() { showFragment(MediaPlaybackFragment.newInstance(tvCastingApp)); diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/SelectClusterFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/SelectClusterFragment.java index f80f286ea3df22..7f5277aeb81138 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/SelectClusterFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/SelectClusterFragment.java @@ -17,6 +17,7 @@ public class SelectClusterFragment extends Fragment { private View.OnClickListener selectContentLauncherButtonClickListener; private View.OnClickListener selectMediaPlaybackButtonClickListener; + private View.OnClickListener selectCertTestButtonClickListener; private View.OnClickListener disconnectButtonClickListener; public SelectClusterFragment(TvCastingApp tvCastingApp) { @@ -61,6 +62,14 @@ public void onClick(View v) { } }; + this.selectCertTestButtonClickListener = + new View.OnClickListener() { + @Override + public void onClick(View v) { + Log.d(TAG, "handle() called on selectCertTestButtonClickListener"); + callback.handleCertTestLauncherSelected(); + } + }; this.disconnectButtonClickListener = new View.OnClickListener() { @Override @@ -84,6 +93,9 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { getView() .findViewById(R.id.selectMediaPlaybackButton) .setOnClickListener(selectMediaPlaybackButtonClickListener); + getView() + .findViewById(R.id.selectCertTestButton) + .setOnClickListener(selectCertTestButtonClickListener); getView().findViewById(R.id.disconnectButton).setOnClickListener(disconnectButtonClickListener); } @@ -97,5 +109,8 @@ public interface Callback { /** Notifies listener to trigger transition on click of the Disconnect button */ void handleDisconnect(); + + /** Notifies listener to trigger transition on click of the Cert Test button */ + void handleCertTestLauncherSelected(); } } diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index d483844a79c26b..c34bb129b2b64d 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -399,7 +399,13 @@ public native boolean applicationBasic_readProductID( public native boolean applicationBasic_readApplicationVersion( ContentApp contentApp, SuccessCallback readSuccessHandler, - FailureCallback readFailureHandlerr); + FailureCallback readFailureHandler); + + public native boolean onOff_on(ContentApp contentApp, Object responseHandler); + + public native boolean onOff_off(ContentApp contentApp, Object responseHandler); + + public native boolean onOff_toggle(ContentApp contentApp, Object responseHandler); static { System.loadLibrary("TvCastingApp"); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h index 334e1180e13f72..293e6683f4509b 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h @@ -23,6 +23,9 @@ enum MediaCommandName ContentLauncher_LaunchContent, LevelControl_Step, LevelControl_MoveToLevel, + OnOff_On, + OnOff_Off, + OnOff_Toggle, MediaPlayback_Play, MediaPlayback_Pause, MediaPlayback_StopPlayback, diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index 7ac67e67f4f7d6..079c695a3bcd1d 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -452,7 +452,9 @@ JNI_METHOD(jboolean, contentLauncher_1subscribeToSupportedStreamingProtocols) err = TvCastingAppJNIMgr().getSupportedStreamingProtocolsSuccessHandler().SetUp(env, jReadSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SuccessHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); - err = TvCastingAppJNIMgr().getReadFailureHandler(ContentLauncher_SupportedStreamingProtocols).SetUp(env, jReadFailureHandler); + err = TvCastingAppJNIMgr() + .getSubscriptionReadFailureHandler(ContentLauncher_SupportedStreamingProtocols) + .SetUp(env, jReadFailureHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SubscriptionReadFailureHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); @@ -469,7 +471,7 @@ JNI_METHOD(jboolean, contentLauncher_1subscribeToSupportedStreamingProtocols) TvCastingAppJNIMgr().getSupportedStreamingProtocolsSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { - TvCastingAppJNIMgr().getReadFailureHandler(ContentLauncher_SupportedStreamingProtocols).Handle(err); + TvCastingAppJNIMgr().getSubscriptionReadFailureHandler(ContentLauncher_SupportedStreamingProtocols).Handle(err); }, static_cast(minInterval), static_cast(maxInterval), [](void * context) { @@ -707,6 +709,97 @@ JNI_METHOD(jboolean, levelControl_1subscribeToMaxLevel) return true; } +JNI_METHOD(jboolean, onOff_1on) +(JNIEnv * env, jobject, jobject contentApp, jobject jResponseHandler) +{ + chip::DeviceLayer::StackLock lock; + + ChipLogProgress(AppServer, "JNI_METHOD onOff_on called"); + + TargetEndpointInfo endpoint; + CHIP_ERROR err = convertJContentAppToTargetEndpointInfo(contentApp, endpoint); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, + err.Format())); + + err = TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_On).SetUp(env, jResponseHandler); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "MatterCallbackHandlerJNI.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + err = CastingServer::GetInstance()->OnOff_On( + &endpoint, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_On).Handle(err); }); + VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "CastingServer.OnOff_On failed %" CHIP_ERROR_FORMAT, err.Format())); + +exit: + if (err != CHIP_NO_ERROR) + { + return false; + } + + return true; +} + +JNI_METHOD(jboolean, onOff_1off) +(JNIEnv * env, jobject, jobject contentApp, jobject jResponseHandler) +{ + chip::DeviceLayer::StackLock lock; + + ChipLogProgress(AppServer, "JNI_METHOD onOff_off called"); + + TargetEndpointInfo endpoint; + CHIP_ERROR err = convertJContentAppToTargetEndpointInfo(contentApp, endpoint); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, + err.Format())); + + err = TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_Off).SetUp(env, jResponseHandler); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "MatterCallbackHandlerJNI.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + err = CastingServer::GetInstance()->OnOff_Off( + &endpoint, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_Off).Handle(err); }); + VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "CastingServer.OnOff_Off failed %" CHIP_ERROR_FORMAT, err.Format())); + +exit: + if (err != CHIP_NO_ERROR) + { + return false; + } + + return true; +} + +JNI_METHOD(jboolean, onOff_1toggle) +(JNIEnv * env, jobject, jobject contentApp, jobject jResponseHandler) +{ + chip::DeviceLayer::StackLock lock; + + ChipLogProgress(AppServer, "JNI_METHOD onOff_toggle called"); + + TargetEndpointInfo endpoint; + CHIP_ERROR err = convertJContentAppToTargetEndpointInfo(contentApp, endpoint); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, + err.Format())); + + err = TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_Toggle).SetUp(env, jResponseHandler); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "MatterCallbackHandlerJNI.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + err = CastingServer::GetInstance()->OnOff_Toggle( + &endpoint, [](CHIP_ERROR err) { TvCastingAppJNIMgr().getMediaCommandResponseHandler(OnOff_Toggle).Handle(err); }); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "CastingServer.OnOff_Toggle failed %" CHIP_ERROR_FORMAT, err.Format())); + +exit: + if (err != CHIP_NO_ERROR) + { + return false; + } + + return true; +} + JNI_METHOD(jboolean, mediaPlayback_1play) (JNIEnv * env, jobject, jobject contentApp, jobject jResponseHandler) { @@ -1809,7 +1902,7 @@ JNI_METHOD(jboolean, applicationBasic_1readVendorName) err = CastingServer::GetInstance()->ApplicationBasic_ReadVendorName( &endpoint, nullptr, [](void * context, chip::app::Clusters::ApplicationBasic::Attributes::VendorName::TypeInfo::DecodableArgType responseData) { - TvCastingAppJNIMgr().getVendorNameSuccessHandler().Handle(responseData); + TvCastingAppJNIMgr().getReadVendorNameSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_VendorName).Handle(err); @@ -1841,7 +1934,7 @@ JNI_METHOD(jboolean, applicationBasic_1readVendorID) ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, err.Format())); - err = TvCastingAppJNIMgr().getVendorIDSuccessHandler().SetUp(env, jReadSuccessHandler); + err = TvCastingAppJNIMgr().getReadVendorIDSuccessHandler().SetUp(env, jReadSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SuccessHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_VendorID).SetUp(env, jReadFailureHandler); @@ -1851,7 +1944,7 @@ JNI_METHOD(jboolean, applicationBasic_1readVendorID) err = CastingServer::GetInstance()->ApplicationBasic_ReadVendorID( &endpoint, nullptr, [](void * context, chip::app::Clusters::ApplicationBasic::Attributes::VendorID::TypeInfo::DecodableArgType responseData) { - TvCastingAppJNIMgr().getVendorIDSuccessHandler().Handle(responseData); + TvCastingAppJNIMgr().getReadVendorIDSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_VendorID).Handle(err); }); @@ -1880,7 +1973,7 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationName) ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, err.Format())); - err = TvCastingAppJNIMgr().getApplicationNameSuccessHandler().SetUp(env, jReadSuccessHandler); + err = TvCastingAppJNIMgr().getReadApplicationNameSuccessHandler().SetUp(env, jReadSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SuccessHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ApplicationName).SetUp(env, jReadFailureHandler); @@ -1891,7 +1984,7 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationName) &endpoint, nullptr, [](void * context, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::TypeInfo::DecodableArgType responseData) { - TvCastingAppJNIMgr().getApplicationNameSuccessHandler().Handle(responseData); + TvCastingAppJNIMgr().getReadApplicationNameSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ApplicationName).Handle(err); @@ -1923,7 +2016,7 @@ JNI_METHOD(jboolean, applicationBasic_1readProductID) ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, err.Format())); - err = TvCastingAppJNIMgr().getProductIDSuccessHandler().SetUp(env, jReadSuccessHandler); + err = TvCastingAppJNIMgr().getReadProductIDSuccessHandler().SetUp(env, jReadSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SuccessHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ProductID).SetUp(env, jReadFailureHandler); @@ -1933,7 +2026,7 @@ JNI_METHOD(jboolean, applicationBasic_1readProductID) err = CastingServer::GetInstance()->ApplicationBasic_ReadProductID( &endpoint, nullptr, [](void * context, chip::app::Clusters::ApplicationBasic::Attributes::ProductID::TypeInfo::DecodableArgType responseData) { - TvCastingAppJNIMgr().getProductIDSuccessHandler().Handle(responseData); + TvCastingAppJNIMgr().getReadProductIDSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ProductID).Handle(err); }); @@ -1962,7 +2055,7 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationVersion) ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, err.Format())); - err = TvCastingAppJNIMgr().getApplicationVersionSuccessHandler().SetUp(env, jReadSuccessHandler); + err = TvCastingAppJNIMgr().getReadApplicationVersionSuccessHandler().SetUp(env, jReadSuccessHandler); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "SuccessHandler.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ApplicationVersion).SetUp(env, jReadFailureHandler); @@ -1973,7 +2066,7 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationVersion) &endpoint, nullptr, [](void * context, chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::TypeInfo::DecodableArgType responseData) { - TvCastingAppJNIMgr().getApplicationVersionSuccessHandler().Handle(responseData); + TvCastingAppJNIMgr().getReadApplicationVersionSuccessHandler().Handle(responseData); }, [](void * context, CHIP_ERROR err) { TvCastingAppJNIMgr().getReadFailureHandler(ApplicationBasic_ApplicationVersion).Handle(err); diff --git a/examples/tv-casting-app/android/App/app/src/main/res/layout/cert_test_status_item.xml b/examples/tv-casting-app/android/App/app/src/main/res/layout/cert_test_status_item.xml new file mode 100644 index 00000000000000..b1f1a1ed9e7604 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/layout/cert_test_status_item.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_cert_test_launcher.xml b/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_cert_test_launcher.xml new file mode 100644 index 00000000000000..f92d3e3957bbdc --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_cert_test_launcher.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + +