diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b860db10af8d43..f8e46241763eb4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -25,9 +25,10 @@ ENV LANG en_US.utf8 # these are installed for terminal/dev convenience. If more tooling for build is required, please # add them to chip-build (in integrations/docker/images/chip-build) -RUN apt-get update -RUN apt-get install -y locales && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -RUN apt-get -fy install git vim emacs sudo \ +RUN apt-get update \ + && apt-get install -y locales \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get -fy install git vim emacs sudo \ apt-utils dialog zsh \ iproute2 procps lsb-release \ bash-completion \ @@ -36,49 +37,31 @@ RUN apt-get -fy install git vim emacs sudo \ docker.io \ iputils-ping net-tools \ libncurses5 \ - libpython2.7 - -RUN groupadd -g $USER_GID $USERNAME -RUN useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker -m $USERNAME -RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME -RUN chmod 0440 /etc/sudoers.d/$USERNAME - -RUN mkdir -p /var/downloads -RUN cd /var/downloads -RUN curl -JL https://github.com/microsoft/vscode-cpptools/releases/download/0.27.0/cpptools-linux.vsix > extension.zip -RUN unzip extension.zip -RUN mkdir -p /home/$USERNAME/.vscode-server/extensions -RUN mv extension /home/$USERNAME/.vscode-server/extensions/ms-vscode.cpptools-0.27.0 -RUN mkdir -p /home/$USERNAME/bin -RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /home/$USERNAME/bin/restyle-path -RUN chmod +x /home/$USERNAME/bin/restyle-path -RUN chown -R $USERNAME:$USERNAME /home/$USERNAME -RUN echo "PATH=/home/$USERNAME/bin:${PATH}" >> /home/$USERNAME/.bashrc - -# $USERNAME needs to own the esp-idf and tools for the examples to build -RUN chown -R $USERNAME:$USERNAME /opt/espressif/esp-idf -RUN chown -R $USERNAME:$USERNAME /opt/espressif/tools - -# $USERNAME needs to own west configuration to build nRF Connect examples -RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/ - -# allow read/write access to header and libraries -RUN chown -R $USERNAME:$USERNAME /opt/ubuntu-21.04-aarch64-sysroot/usr/ - -# allow licenses to be accepted -RUN chown -R $USERNAME:$USERNAME /opt/android/sdk - -# AmebaD requires access to change build_info.h -RUN chown -R $USERNAME:$USERNAME /opt/ameba/ambd_sdk_with_chip_non_NDA/ - -# NXP uses a patch_sdk script to change SDK files -RUN mkdir -p /opt/sdk/sdks/ -RUN chown -R $USERNAME:$USERNAME /opt/sdk/sdks/ - -RUN chown -R $USERNAME:$USERNAME /opt/fsl-imx-xwayland/5.15-kirkstone/ - -# Add access to openocd for VSCode debugging -RUN chown -R $USERNAME:$USERNAME /opt/openocd + libpython2.7 \ + && : + +RUN groupadd -g $USER_GID $USERNAME \ + && useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo -m $USERNAME \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + && : + +RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/restyle-path -o /usr/local/bin/restyle-path \ + && chmod +x /usr/local/bin/restyle-path \ + && : + +RUN mkdir -p /opt/sdk/sdks/ \ + && chown -R $USERNAME:$USERNAME \ + /opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \ + /opt/espressif/esp-idf `# $USERNAME needs to own the esp-idf and tools for the examples to build` \ + /opt/espressif/tools \ + /opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \ + /opt/ubuntu-21.04-aarch64-sysroot/usr/ `# allow read/write access to header and libraries` \ + /opt/android/sdk `# allow licenses to be accepted` \ + /opt/ameba/ambd_sdk_with_chip_non_NDA/ `# AmebaD requires access to change build_info.h` \ + /opt/fsl-imx-xwayland/5.15-kirkstone/ \ + /opt/openocd \ + && : # Fix Tizen SDK paths for new user RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 70c206f1058ce3..5ddef22276ed10 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.6.18" + "BUILD_VERSION": "0.6.27" } }, "remoteUser": "vscode", @@ -34,6 +34,7 @@ "maelvalais.autoconf", "marus25.cortex-debug", "ms-azuretools.vscode-docker", + "ms-vscode.cpptools", "msedge-dev.gnls", "redhat.vscode-yaml", "vadimcn.vscode-lldb", diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2061c3a630bccb..e7f2686627524c 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -54,7 +54,7 @@ AmebaZ amebaz2 announcementReason AnnounceOTAProvider -AnnounceOtaProviderRequest +AnnounceOTAProviderRequest APIs apk AppConfig diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index b5325da5ec1ff3..ba734f22758ca9 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.18 + image: connectedhomeip/chip-build:0.6.27 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 443210b15c3c05..00ab192750e13f 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.18 + image: connectedhomeip/chip-build:0.6.27 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.18 + image: connectedhomeip/chip-build:0.6.27 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.18 + image: connectedhomeip/chip-build:0.6.27 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 3a7a91d60663e9..eca0463b31931a 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.18 + image: connectedhomeip/chip-build:0.6.27 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.18 + image: connectedhomeip/chip-build-esp32:0.6.27 options: --user root steps: @@ -85,6 +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 options: --user root diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index c55e84b7a9273d..58fc8091a224df 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.18 + DOCKER_RUN_VERSION: 0.6.27 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.18 + # image: connectedhomeip/chip-build-cirque:0.6.27 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index d5f84576ff0fc7..669efca5f6d4c7 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.18 + image: connectedhomeip/chip-build-doxygen:0.6.27 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 6986e6b6bda00b..3b568a270aa0ae 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.18 + image: connectedhomeip/chip-build-ameba:0.6.27 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index a62e0dad3c74dd..04331435bc6e14 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.18 + image: connectedhomeip/chip-build-bouffalolab:0.6.27 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 d8598c6561eba9..99baf383bbaf3f 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -28,7 +28,7 @@ env: jobs: cc26x2x7: name: cc26x2x7 - timeout-minutes: 60 + timeout-minutes: 120 env: BUILD_TYPE: gn_cc26x2x7 @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.18 + image: connectedhomeip/chip-build-ti:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -68,7 +68,7 @@ jobs: .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - name: Build examples - timeout-minutes: 60 + timeout-minutes: 100 run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 30374f090bfe96..90e0e397c82517 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.18 + image: connectedhomeip/chip-build-efr32:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 61d9d032042c9d..13a025fe229767 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.18 + image: connectedhomeip/chip-build-esp32:0.6.27 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.18 + image: connectedhomeip/chip-build-esp32:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 51d89d81c0b316..bb629fa999fcf2 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.18 + image: connectedhomeip/chip-build-infineon:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 76f8d8237f2d56..53b1aa46701771 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.18 + image: connectedhomeip/chip-build-k32w:0.6.27 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 1a5b9c07395482..159960bef927a4 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.18 + image: connectedhomeip/chip-build-crosscompile:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index b8bfdc0c086c14..42f426bfa959b0 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.18 + image: connectedhomeip/chip-build-imx:0.6.27 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 2c09f5871e7f7f..11c913cfee488c 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.18 + image: connectedhomeip/chip-build:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 3a9d522b1aa676..91f9f6f82a2097 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.18 + image: connectedhomeip/chip-build-mbed-os:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index aedded0398df28..7fc6238cc81034 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.18 + image: connectedhomeip/chip-build:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 7d0c274dc2d029..1fa32d751037e8 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.18 + image: connectedhomeip/chip-build-nrf-platform:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index f3b49f828704ff..7e043d58d98ee5 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.18 + image: connectedhomeip/chip-build-openiotsdk:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index c32dd590ddc930..35bc2987a4d10a 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.18 + image: connectedhomeip/chip-build:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 2099621e165ed3..28d5c7faf03f4f 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.18 + image: connectedhomeip/chip-build-telink:0.6.27 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -75,6 +75,15 @@ jobs: out/telink-tlsr9518adk80d-all-clusters-minimal/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: Build example Telink Contact Sensor App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-contact-sensor' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d contact-sensor-app \ + out/telink-tlsr9518adk80d-contact-sensor/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + - name: Build example Telink Lighting App run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 259733a008237c..8f892c8c712f13 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.18 + image: connectedhomeip/chip-build-tizen:0.6.27 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 1173adaf7c82d5..8f87a48a9e6043 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.18 + image: connectedhomeip/chip-build-android:0.6.27 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index bd96ff35792e31..bfb1eac538a138 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.18 + image: connectedhomeip/chip-build:0.6.27 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 89e8c44d26a37f..3bfcc32bd9da4c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -98,13 +98,13 @@ jobs: if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi # Test files are intentionally small and not spec-compilant, just parse-compliant - if [ "$idl_file" = "./scripts/idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/global_struct_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/optional_argument.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/several_clusters.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/simple_attribute.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/large_lighting_app.matter" ]; then continue; fi - if [ "$idl_file" = "./scripts/idl/tests/inputs/large_all_clusters_app.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/global_struct_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/optional_argument.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/several_clusters.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/simple_attribute.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_lighting_app.matter" ]; then continue; fi + if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter" ]; then continue; fi ./scripts/run_in_build_env.sh "./scripts/idl_lint.py --log-level warn $idl_file" >/dev/null || exit 1 done diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 1a0c88e28d47b3..965e69ae1f3576 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.18 + image: connectedhomeip/chip-build-esp32-qemu:0.6.27 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 6b57156ba01f2d..5a6c13f85f8f14 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.18 + image: connectedhomeip/chip-build-esp32:0.6.27 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.18 + image: connectedhomeip/chip-build-efr32:0.6.27 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 04c4c8ecb77d2b..dc8ee425c28fca 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.18 + image: connectedhomeip/chip-build-android:0.6.27 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7d35cde0db27ff..e492cba4c6b360 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.18 + image: connectedhomeip/chip-build:0.6.27 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -105,7 +105,7 @@ jobs: # things. run: | ./scripts/run_in_build_env.sh \ - "./scripts/idl/xml_parser.py \ + "./scripts/py_matter_idl/matter_idl/xml_parser.py \ --no-print \ --log-level info \ src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ @@ -352,7 +352,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.18 + image: connectedhomeip/chip-build:0.6.27 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.18 + image: connectedhomeip/chip-build:0.6.27 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 a0ea6842e24dc0..a6cb192b058a99 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.18 + image: connectedhomeip/chip-build:0.6.27 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 7db5b259340810..72cdc5fbc47808 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.24 + image: connectedhomeip/chip-build:0.6.28 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index d59598bff10781..4a53d2b180a1df 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.24 + image: connectedhomeip/chip-build:0.6.28 defaults: run: shell: sh diff --git a/.gitmodules b/.gitmodules index f211ca385789ff..9e5b4f09f0fb39 100644 --- a/.gitmodules +++ b/.gitmodules @@ -290,3 +290,7 @@ url = https://github.com/bouffalolab/bl_iot_sdk_tiny.git branch = main platforms = bouffalolab +[submodule "third_party/libwebsockets/repo"] + path = third_party/libwebsockets/repo + url = https://github.com/warmcat/libwebsockets + platforms = linux,darwin diff --git a/.restyled.yaml b/.restyled.yaml index 13d499b2b8967f..75b649d9e4242d 100644 --- a/.restyled.yaml +++ b/.restyled.yaml @@ -69,7 +69,7 @@ exclude: - "third_party/android_deps/gradlew" # gradle wrapper generated file - "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle - "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle - - "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1 + - "scripts/py_matter_idl/matter_idl/tests/outputs/**/*" # Matches generated output 1:1 - "examples/chef/sample_app_util/test_files/*.yaml" - "examples/chef/zzz_generated/**/*" - "examples/platform/nxp/k32w/k32w0/scripts/demo_generated_certs/**/*" diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 352fb19ae65035..d5969bc3ae58f2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -15,6 +15,7 @@ "maelvalais.autoconf", "marus25.cortex-debug", "ms-azuretools.vscode-docker", + "ms-vscode.cpptools", "msedge-dev.gnls", "redhat.vscode-yaml", "vadimcn.vscode-lldb", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index fd815494affee7..32db085151c081 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -621,12 +621,12 @@ "mbed-CY8CPROTO_062_4343W-shell-debug", "mbed-CY8CPROTO_062_4343W-shell-develop", "mbed-CY8CPROTO_062_4343W-shell-release", - "nrf-nrf52840-light", - "nrf-nrf52840-light-rpc", - "nrf-nrf52840-lock", - "nrf-nrf52840-pump", - "nrf-nrf52840-pump-controller", - "nrf-nrf52840-shell", + "nrf-nrf52840dk-light", + "nrf-nrf52840dk-light-rpc", + "nrf-nrf52840dk-lock", + "nrf-nrf52840dk-pump", + "nrf-nrf52840dk-pump-controller", + "nrf-nrf52840dk-shell", "nrf-nrf5340-light", "nrf-nrf5340-light-rpc", "nrf-nrf5340-lock", @@ -638,6 +638,7 @@ "qpg-qpg6100-lock", "telink-tlsr9518adk80d-all-clusters", "telink-tlsr9518adk80d-all-clusters-minimal", + "telink-tlsr9518adk80d-contact-sensor", "telink-tlsr9518adk80d-light", "telink-tlsr9518adk80d-light-switch", "telink-tlsr9518adk80d-ota-requestor", diff --git a/BUILD.gn b/BUILD.gn index e4e1b8e02da1b5..ce3a154774d272 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -120,7 +120,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { } pw_python_pip_install("pip_install_matter_packages") { - packages = [ "//examples/common/pigweed/rpc_console:chip_rpc_distribution" ] + packages = [ + "//examples/common/pigweed/rpc_console:chip_rpc_distribution", + "//scripts:matter_yamltests_distribution", + ] } # Python packages installed during bootstrap. @@ -260,7 +263,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { "//:fake_platform_tests", "//examples/chef:chef.tests", "//scripts/build:build_examples.tests", - "//scripts/idl:idl.tests", + "//scripts/py_matter_idl:matter_idl.tests", + "//scripts/py_matter_yamltests:matter_yamltests.tests", "//src:tests_run", ] } diff --git a/build/chip/chip_codegen.gni b/build/chip/chip_codegen.gni index 533cd02b27ea76..d59277ae1e484d 100644 --- a/build/chip/chip_codegen.gni +++ b/build/chip/chip_codegen.gni @@ -17,7 +17,7 @@ import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") import("$dir_pw_build/python.gni") -import("${chip_root}/scripts/idl/files.gni") +import("${chip_root}/scripts/py_matter_idl/files.gni") declare_args() { # Location where code has been pre-generated diff --git a/build_overrides/bouffalolab_iot_sdk.gni b/build_overrides/bouffalolab_iot_sdk.gni index 77ab3440927271..2a87174c734d84 100644 --- a/build_overrides/bouffalolab_iot_sdk.gni +++ b/build_overrides/bouffalolab_iot_sdk.gni @@ -13,11 +13,7 @@ # limitations under the License. declare_args() { - # Root directory for bl602 SDK build files. - bl602_sdk_build_root = "//third_party/bouffalolab/bl602" - - # Root directory for bl702 SDK build files. - bl702_sdk_build_root = "//third_party/bouffalolab/bl702" + bouffalolab_iot_sdk_build_root = "//third_party/bouffalolab/" bouffalolab_sdk_root = "/opt/bouffalolab_sdk" } diff --git a/config/bouffalolab/args.gni b/config/bouffalolab/args.gni new file mode 100644 index 00000000000000..a85d0ea655d0b4 --- /dev/null +++ b/config/bouffalolab/args.gni @@ -0,0 +1,19 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Options from standalone-chip.mk that differ from configure defaults. These +# options are used from examples/. + +custom_toolchain = + "//third_party/connectedhomeip/config/bouffalolab/toolchain:riscv_gcc" diff --git a/examples/platform/bouffalolab/common/toolchain/BUILD.gn b/config/bouffalolab/toolchain/BUILD.gn similarity index 100% rename from examples/platform/bouffalolab/common/toolchain/BUILD.gn rename to config/bouffalolab/toolchain/BUILD.gn diff --git a/examples/platform/bouffalolab/common/toolchain/riscv_toolchain.gni b/config/bouffalolab/toolchain/riscv_toolchain.gni similarity index 100% rename from examples/platform/bouffalolab/common/toolchain/riscv_toolchain.gni rename to config/bouffalolab/toolchain/riscv_toolchain.gni diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index d8247813838e68..ad61ab9e848112 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -25,6 +25,7 @@ config CHIP_DEVICE_VENDOR_NAME config CHIP_APP_LOG_LEVEL int "Set logging level in application" default LOG_DEFAULT_LEVEL + depends on LOG help Sets the logging level in Matter application. This config should be used only within application. @@ -135,16 +136,45 @@ config CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE As a result, a new output file merged.hex will consist of all partitions including factory data. -# Use default certificates without generating or providing them -config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS - bool "Use default certificates located in Matter repository" - default y +# Select source of the certificates +choice CHIP_FACTORY_DATA_CERT_SOURCE + prompt "Attestation certificate file source" + default CHIP_FACTORY_DATA_USE_DEFAULT_CERTS + + config CHIP_FACTORY_DATA_USE_DEFAULT_CERTS + bool "Use pre-generated development certificates" + help + Use pre-generated certificate files from the credentials/development/attestation/ + directory that match the configured Product ID. This can be used for development + purpose. + config CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED + bool "Auto-generate certificates" + help + Generate new certificates instead of using pre-generated ones. + The certificates are generated on every build. + config CHIP_FACTORY_DATA_CERT_SOURCE_USER + bool "Use user-provided certificate files" + help + Use user-provided certificate files. + The user needs to specify the absolute path to all necessary files. +endchoice + +if CHIP_FACTORY_DATA_CERT_SOURCE_USER + +config CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT + string "Path to the DAC certificate *.der-file" + help + Absolute path to the DAC certificate file in binary format. +config CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY + string "Path to the DAC private key *.der-file" + help + Absolute path to the DAC keysfile in binary format. + Note that both public and private keys must be present (will be extracted automatically). +config CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT + string "Path to the PAI certificate *.der-file" help - Pre-generated certificates can be used for development purpose. - This config includes default pre-generated certificates - which are located in credentials/development/attestation/ directory - instead of generating new ones. - If this config is set to `n` new certificates will be generated. + Absolute path pointing to the PAI certificate in binary format. +endif # Configs for SPAKE2 generation config CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER @@ -169,3 +199,11 @@ config CHIP_FACTORY_RESET_ERASE_NVS default y if CHIP_FACTORY_DATA || CHIP_FACTORY_DATA_CUSTOM_BACKEND endif + +config CHIP_LOG_SIZE_OPTIMIZATION + bool "Disable some detailed logs to decrease flash usage" + help + Disables some log levels for the specific log modules + providing detailed information that are not used in most cases. + You can find full configuration enabled by this option + in the platform/nrfconnect/CHIPPlatformConfig.h file. diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index f24fc4608b4122..88519293b67d77 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -21,7 +21,6 @@ if CHIP config LOG - bool default y if LOG @@ -35,144 +34,131 @@ choice MATTER_LOG_LEVEL_CHOICE endchoice config LOG_DEFAULT_LEVEL - int default 2 +config CHIP_LOG_SIZE_OPTIMIZATION + default y + endif config PRINTK_SYNC - bool default y config ASSERT - bool default y config HW_STACK_PROTECTION - bool default y config FPU - bool default y config SHELL - bool default y +config PTHREAD_IPC + bool + default n + # Generic networking options config NET_SOCKETS_POSIX_NAMES - bool default n # Application stack size config MAIN_STACK_SIZE - int default 8192 config INIT_STACKS - bool default y # Disable certain parts of Zephyr IPv6 stack config NET_IPV6_NBR_CACHE - bool default n config NET_IPV6_MLD - bool default y config NET_IF_MCAST_IPV6_ADDR_COUNT - int default 14 # Network buffers config NET_PKT_RX_COUNT - int default 16 config NET_PKT_TX_COUNT - int default 16 config NET_BUF_RX_COUNT - int default 80 config NET_BUF_TX_COUNT - int default 80 # Bluetooth Low Energy configs config BT - bool default y config BT_PERIPHERAL - bool default y config BT_PERIPHERAL_PREF_MIN_INT - int default 36 config BT_PERIPHERAL_PREF_MAX_INT - int default 36 config BT_GAP_AUTO_UPDATE_CONN_PARAMS - bool default y config BT_GATT_DYNAMIC_DB - bool default y config BT_DEVICE_NAME_DYNAMIC - bool default y config BT_DEVICE_NAME_MAX - int default 15 config BT_MAX_CONN - int default 1 config BT_L2CAP_TX_MTU - int default 247 config BT_BUF_ACL_RX_SIZE - int default 251 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_RX_STACK_SIZE - int default 1200 +config BT_CTLR_ECDH + bool + default n + +config BT_CTLR_LE_ENC + bool + default n + +config BT_DEVICE_NAME_GATT_WRITABLE + bool + default n + # Enable NFC support config CHIP_NFC_COMMISSIONING - bool default y config CHIP_OTA_REQUESTOR - bool default y # All boards besides nRF7002DK use QSPI NOR external flash if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 config CHIP_QSPI_NOR - bool default y endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 @@ -182,35 +168,29 @@ endif # BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 if BOARD_NRF7002DK_NRF5340_CPUAPP config CHIP_SPI_NOR - bool default y endif # BOARD_NRF7002DK_NRF5340_CPUAPP # Enable extended discovery config CHIP_EXTENDED_DISCOVERY - bool default y config NVS_LOOKUP_CACHE - bool default y config NVS_LOOKUP_CACHE_SIZE - int default 512 # Enable OpenThread config NET_L2_OPENTHREAD - bool default y if !WIFI_NRF700X if NET_L2_OPENTHREAD # Increase the default RX stack size config IEEE802154_NRF5_RX_STACK_SIZE - int default 1024 endif @@ -218,50 +198,39 @@ endif if CHIP_WIFI config NRF_WIFI_LOW_POWER - bool default n config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG - bool default n config SYSTEM_WORKQUEUE_STACK_SIZE - int default 1120 # align these numbers to match the OpenThread config config NET_IF_UNICAST_IPV6_ADDR_COUNT - int default 6 config NET_IF_MCAST_IPV6_ADDR_COUNT - int default 8 config NET_SOCKETS_POSIX_NAMES - bool default n config MBEDTLS_SSL_OUT_CONTENT_LEN - int default 900 # options managed by IP4/IP6 simultaneous support # aligned here to match OpenThread config config NET_MAX_ROUTERS - int default 1 config NET_MAX_CONN - int default 4 config SHELL_STACK_SIZE - int default 2616 config HEAP_MEM_POOL_SIZE - int default 200000 endif @@ -274,183 +243,139 @@ choice OPENTHREAD_SECURITY endchoice config PSA_CRYPTO_DRIVER_CC3XX - bool default n config OBERON_BACKEND - bool default y config MBEDTLS_ENABLE_HEAP - bool default y config MBEDTLS_HEAP_SIZE - int default 15360 config MBEDTLS_TLS_LIBRARY - bool default y config NRF_SECURITY_ADVANCED - bool default y config MBEDTLS_AES_C - bool default y config MBEDTLS_ECP_C - bool default y config MBEDTLS_ECP_DP_SECP256R1_ENABLED - bool default y config MBEDTLS_CTR_DRBG_C - bool default y config MBEDTLS_CIPHER_MODE_CTR - bool default y config MBEDTLS_ECJPAKE_C - bool default y config MBEDTLS_SHA256_C - bool default y config MBEDTLS_PK_C - bool default y config MBEDTLS_PK_WRITE_C - bool default y config MBEDTLS_X509_CREATE_C - bool default y if !CHIP_CRYPTO_PSA config MBEDTLS_X509_CSR_WRITE_C - bool default y if !CHIP_CRYPTO_PSA # Disable unneeded crypto operations config MBEDTLS_SHA384_C - bool default n config MBEDTLS_SHA512_C - bool default n config MBEDTLS_CIPHER_MODE_XTS - bool default n config MBEDTLS_CHACHA20_C - bool default n config MBEDTLS_POLY1305_C - bool default n config MBEDTLS_CHACHAPOLY_C - bool default n config MBEDTLS_GCM_C - bool default n config MBEDTLS_RSA_C - bool default n config PSA_WANT_KEY_TYPE_ARIA - bool default n config PSA_WANT_KEY_TYPE_CHACHA20 - bool default n config PSA_WANT_ALG_GCM - bool default n config PSA_WANT_ALG_CHACHA20_POLY1305 - bool default n config PSA_WANT_ALG_SHA_1 - bool default n config PSA_WANT_ALG_SHA_224 - bool default n config PSA_WANT_ALG_SHA_384 - bool default n config PSA_WANT_ALG_SHA_512 - bool default n config PSA_WANT_ALG_RIPEMD160 - bool default n config PSA_WANT_ALG_MD5 - bool default n config PSA_WANT_ALG_CFB - bool default n config PSA_WANT_ALG_OFB - bool default n # Disable not used shell modules config SENSOR_SHELL - bool default n config DEVICE_SHELL - bool default n config DATE_SHELL - bool default n config DEVMEM_SHELL - bool default n config MCUBOOT_SHELL - bool default n config CLOCK_CONTROL_NRF_SHELL - bool default n config FLASH_SHELL - bool default n # SoC series related configuration @@ -459,7 +384,6 @@ if SOC_SERIES_NRF52X # Increase maximum data length of PDU supported in the Controller config BT_CTLR_DATA_LENGTH_MAX - int default 251 endif # SOC_SERIES_NRF52X @@ -467,7 +391,6 @@ endif # SOC_SERIES_NRF52X if SOC_SERIES_NRF53X config UPDATEABLE_IMAGE_NUMBER - int default 2 # Generate random numbers using Xoroshiro algorithm instead of direct calls diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index 918a82685cad02..662d7074ebe0b3 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -49,11 +49,9 @@ config CHIP_QSPI_NOR if CHIP_QSPI_NOR config NORDIC_QSPI_NOR - bool default y config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - int default 16 endif # CHIP_QSPI_NOR @@ -71,7 +69,6 @@ config CHIP_SPI_NOR if CHIP_SPI_NOR config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 endif # CHIP_SPI_NOR @@ -96,41 +93,33 @@ if CHIP_DFU_OVER_BT_SMP # MCU Manager and SMP configuration config MCUMGR_SMP_BT_AUTHEN - bool default n config MCUMGR_BUF_COUNT - int default 6 # Increase BT MTU and RX buffer for big size DFU messages config BT_L2CAP_TX_MTU - int default 498 config BT_BUF_ACL_RX_SIZE - int default 502 # Increase MCUMGR_BUF_SIZE, as it must be big enough to fit MAX MTU + overhead and for single-image DFU default is 384 B config MCUMGR_BUF_SIZE - int default 1024 # Increase system workqueue size, as SMP is processed within it config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2800 if SOC_SERIES_NRF53X # Enable custom SMP request to erase settings partition. config MCUMGR_GRP_ZEPHYR_BASIC - bool default y config MCUMGR_GRP_BASIC_CMD_STORAGE_ERASE - bool default y endif # SOC_SERIES_NRF53X diff --git a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults index 8069d710047338..83290b2b492f28 100644 --- a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults @@ -17,83 +17,63 @@ # The purpose of this file is to define new default values of settings used when building hci_rpmsg child image for Matter samples. config LOG - bool default n config HEAP_MEM_POOL_SIZE - int default 8192 config MAIN_STACK_SIZE - int default 2048 config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2048 config BT - bool default y config BT_HCI_RAW - bool default y config BT_MAX_CONN - int default 1 config BT_PERIPHERAL - bool default y config BT_CENTRAL - bool default n config BT_BUF_ACL_RX_SIZE - int default 502 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_CTLR_DATA_LENGTH_MAX - int default 251 config BT_CTLR_ASSERT_HANDLER - bool default y config BT_HCI_RAW_RESERVE - int default 1 # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. config BT_BUF_CMD_TX_COUNT - int default 10 config ASSERT - bool default y config DEBUG_INFO - bool default y config EXCEPTION_STACK_TRACE - bool default y config IPC_SERVICE - bool default y config MBOX - bool default y diff --git a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults b/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults index b9c6dce1982fb7..72169ca50afd8e 100644 --- a/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults +++ b/config/nrfconnect/chip-module/Kconfig.mcuboot.defaults @@ -17,50 +17,39 @@ # The purpose of this file is to define new default values of settings used when building mcuboot child image for Matter samples. config MAIN_STACK_SIZE - int default 10240 config BOOT_SWAP_SAVE_ENCTLV - bool default n config BOOT_ENCRYPT_RSA - bool default n config BOOT_ENCRYPT_EC256 - bool default n config BOOT_ENCRYPT_X25519 - bool default n config BOOT_BOOTSTRAP - bool default n config PM - bool default n config FLASH - bool default y config FPROTECT - bool default y # nRF7002DK uses SPI NOR external flash if BOARD_NRF7002DK_NRF5340_CPUAPP config SPI - bool default y config SPI_NOR - bool default y choice SPI_NOR_SFDP @@ -68,15 +57,12 @@ choice SPI_NOR_SFDP endchoice config SPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 config MULTITHREADING - bool default y config PM_OVERRIDE_EXTERNAL_DRIVER_CHECK - bool default y endif @@ -85,68 +71,53 @@ endif if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 config NORDIC_QSPI_NOR - bool default y config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE - int default 4096 config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE - int default 16 endif config BOOT_MAX_IMG_SECTORS - int default 256 config LOG - bool default n config CONSOLE_HANDLER - bool default n config BOOT_BANNER - bool default n config TIMESLICING - bool default n config RESET_ON_FATAL_ERROR - bool default n config MULTITHREADING - bool default n config TICKLESS_KERNEL - bool default n config TIMEOUT_64BIT - bool default n config NRF_ENABLE_ICACHE - bool default n if SOC_SERIES_NRF53X # The following configurations are required to support simultaneous multi image update config PCD_APP - bool default y config UPDATEABLE_IMAGE_NUMBER - int default 2 # Multi-image updates do not support image swapping yet. @@ -157,24 +128,19 @@ endchoice # The network core cannot access external flash directly. The flash simulator must be used to # provide a memory region that is used to forward the new firmware to the network core. config FLASH_SIMULATOR - bool default y config FLASH_SIMULATOR_DOUBLE_WRITES - bool default y config FLASH_SIMULATOR_STATS - bool default n # Enable custom command to erase settings partition. config ENABLE_MGMT_PERUSER - bool default y config BOOT_MGMT_CUSTOM_STORAGE_ERASE - bool default y endif # SOC_SERIES_NRF53X diff --git a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults index 18d3e7889ae1a2..9fee38cb5f38fc 100644 --- a/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.defaults @@ -17,87 +17,66 @@ # The purpose of this file is to define new default values of settings used when building multiprotocol_rpmsg child image for Matter samples. config LOG - bool default n config HEAP_MEM_POOL_SIZE - int default 8192 config MAIN_STACK_SIZE - int default 2048 config SYSTEM_WORKQUEUE_STACK_SIZE - int default 2048 config BT - bool default y config BT_HCI_RAW - bool default y config BT_MAX_CONN - int default 1 config BT_PERIPHERAL - bool default y config BT_CENTRAL - bool default n config BT_BUF_ACL_RX_SIZE - int default 502 config BT_BUF_ACL_TX_SIZE - int default 251 config BT_CTLR_DATA_LENGTH_MAX - int default 251 config BT_CTLR_ASSERT_HANDLER - bool default y config BT_HCI_RAW_RESERVE - int default 1 # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. config BT_BUF_CMD_TX_COUNT - int default 10 config ASSERT - bool default y config DEBUG_INFO - bool default y config EXCEPTION_STACK_TRACE - bool default y config NRF_802154_SER_RADIO - bool default y config NRF_RTC_TIMER_USER_CHAN_COUNT - int default 2 config NRF_802154_ENCRYPTION - bool default y diff --git a/config/nrfconnect/chip-module/generate_factory_data.cmake b/config/nrfconnect/chip-module/generate_factory_data.cmake index 2888822efcaea3..be0c4c0fac692c 100644 --- a/config/nrfconnect/chip-module/generate_factory_data.cmake +++ b/config/nrfconnect/chip-module/generate_factory_data.cmake @@ -69,6 +69,10 @@ if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS) string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Cert.der\"\n") string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Key.der\"\n") string(APPEND script_args "--pai_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der\"\n") +elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER) + string(APPEND script_args "--dac_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT}\"\n") + string(APPEND script_args "--dac_key \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY}\"\n") + string(APPEND script_args "--pai_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_PAI_CERT}\"\n") else() find_program(chip_cert_exe NAMES chip-cert REQUIRED) string(APPEND script_args "--gen_cd\n") diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 0bb8ffeca65103..9d02f8f06d4b31 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -118,6 +118,12 @@ CONFIG_DYNAMIC_INTERRUPTS=y # nvs_sector_size = flash_page_size * mult = 256 * 8 = 2048 CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=8 +# Enable NVS lookup cache +CONFIG_NVS_LOOKUP_CACHE=y + +# Reboot system when fault happened +CONFIG_TELINK_B91_REBOOT_ON_FAULT=y + # Shell settings CONFIG_SHELL=n CONFIG_SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE=255 diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index 6113325da57f95..4f1ed485c156b4 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -297,21 +297,14 @@ add_dependencies(chip chip-gn) if (CONFIG_CHIP_OTA_IMAGE_BUILD) add_custom_target(build_mcuboot ALL COMMAND - west build -b tlsr9518adk80d -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr - ) - - add_custom_target(west_sign ALL - COMMAND - west sign -t imgtool -p ${ZEPHYR_BASE}/../bootloader/mcuboot/scripts/imgtool.py -d ${PROJECT_BINARY_DIR}/.. -- --key ${ZEPHYR_BASE}/../bootloader/mcuboot/root-rsa-2048.pem - BYPRODUCTS - ${PROJECT_BINARY_DIR}/zephyr.signed.bin + west build -b tlsr9518adk80d -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr -- -DCONFIG_BOOT_SWAP_USING_MOVE=y ) add_custom_target(merge_mcuboot ALL COMMAND dd if=${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin of=${PROJECT_BINARY_DIR}/zephyr.bin COMMAND - dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=96 + dd if=${PROJECT_BINARY_DIR}/zephyr.signed.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=76 ) chip_ota_image(chip-ota-image @@ -319,15 +312,14 @@ if (CONFIG_CHIP_OTA_IMAGE_BUILD) OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin ) - add_dependencies(west_sign ${ZEPHYR_FINAL_EXECUTABLE}) - add_dependencies(merge_mcuboot west_sign) - add_dependencies(chip-ota-image west_sign) + add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE}) + add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE}) endif() if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) add_custom_target(merge_factory_data ALL COMMAND - dd if=${PROJECT_BINARY_DIR}/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=2000 + dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=1024 seek=1040 ) if (CONFIG_CHIP_OTA_IMAGE_BUILD) add_dependencies(merge_factory_data merge_mcuboot) diff --git a/config/telink/chip-module/generate_factory_data.cmake b/config/telink/chip-module/generate_factory_data.cmake index a1c9f0ef9780a0..6b7681defc8224 100644 --- a/config/telink/chip-module/generate_factory_data.cmake +++ b/config/telink/chip-module/generate_factory_data.cmake @@ -15,49 +15,63 @@ # -# Create a JSON file based on factory data given via kConfigs. +# Create a binary file with factory data given via kConfigs. # -# This function creates a list of arguments for external script and then run it to write a JSON file. -# Created JSON file can be checked using JSON SCHEMA file if it is provided. +# This function creates a list of arguments for external script and then run it to write a factory data file. # # This script can be manipulated using following kConfigs: # - To merge generated factory data with final zephyr.hex file set kConfig CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y # - To use default certification paths set CONFIG_CHIP_FACTORY_DATA_USE_DEFAULTS_CERTS_PATH=y # -# During generation process a some file will be created in zephyr's build directory: -# - .json a file containing all factory data written in JSON format. +# During generation process a some file will be created in zephyr's build directory under factory subdirectory: +# - factory_data.bin +# - factory_data.hex +# - DAC_cert.der +# - DAC_cert.pem +# - DAC_key.pem +# - DAC_private_key.bin +# - DAC_public_key.bin +# - pai_cert.der +# - onb_codes.csv +# - pin_disc.csv +# - qrcode.png +# - summary.json # # [Args]: # factory_data_target - a name for target to generate factory_data. # script_path - a path to script that makes a JSON factory data file from given arguments. -# schema_path - a path to JSON schema file which can be used to verify generated factory data JSON file. -# This argument is optional, if you don't want to verify the JSON file put it empty "". # output_path - a path to output directory, where created JSON file will be stored. -function(telink_create_factory_data_json factory_data_target script_path schema_path output_path) +function(telink_create_factory_data_json factory_data_target script_path output_path) # set script args for future purpose set(script_args) ## generate all script arguments -string(APPEND script_args "--sn \"${CONFIG_CHIP_DEVICE_SERIAL_NUMBER}\"\n") -string(APPEND script_args "--date \"${CONFIG_CHIP_DEVICE_MANUFACTURING_DATE}\"\n") -string(APPEND script_args "--vendor_id ${CONFIG_CHIP_DEVICE_VENDOR_ID}\n") -string(APPEND script_args "--product_id ${CONFIG_CHIP_DEVICE_PRODUCT_ID}\n") -string(APPEND script_args "--vendor_name \"${CONFIG_CHIP_DEVICE_VENDOR_NAME}\"\n") -string(APPEND script_args "--product_name \"${CONFIG_CHIP_DEVICE_PRODUCT_NAME}\"\n") -string(APPEND script_args "--hw_ver ${CONFIG_CHIP_DEVICE_HARDWARE_VERSION}\n") -string(APPEND script_args "--hw_ver_str \"${CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING}\"\n") +string(APPEND script_args "--serial-num \"${CONFIG_CHIP_DEVICE_SERIAL_NUMBER}\"\n") +string(APPEND script_args "--mfg-date \"${CONFIG_CHIP_DEVICE_MANUFACTURING_DATE}\"\n") +string(APPEND script_args "--vendor-id ${CONFIG_CHIP_DEVICE_VENDOR_ID}\n") +string(APPEND script_args "--product-id ${CONFIG_CHIP_DEVICE_PRODUCT_ID}\n") +string(APPEND script_args "--vendor-name \"${CONFIG_CHIP_DEVICE_VENDOR_NAME}\"\n") +string(APPEND script_args "--product-name \"${CONFIG_CHIP_DEVICE_PRODUCT_NAME}\"\n") +string(APPEND script_args "--hw-ver ${CONFIG_CHIP_DEVICE_HARDWARE_VERSION}\n") +string(APPEND script_args "--hw-ver-str \"${CONFIG_CHIP_DEVICE_HARDWARE_VERSION_STRING}\"\n") +string(APPEND script_args "--overwrite\n") +string(APPEND script_args "--in-tree\n") # check if Rotating Device Id Unique Id should be generated if(NOT CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID) if(NOT DEFINED CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID) message(FATAL_ERROR "CHIP_DEVICE_ROTATING_DEVICE_UID was not provided. To generate it use CONFIG_CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID=y") else() - string(APPEND script_args "--rd_uid \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n") + string(APPEND script_args "--rd-id-uid \"${CONFIG_CHIP_DEVICE_ROTATING_DEVICE_UID}\"\n") endif() else() - string(APPEND script_args "--generate_rd_uid\n") + string(APPEND script_args "--enable-rotating-device-id\n") endif() +# find chip cert tool +find_program(chip_cert_exe NAMES chip-cert REQUIRED) +string(APPEND script_args "--chip-cert-path ${chip_cert_exe}\n") + # for development purpose user can use default certs instead of generating or providing them if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS) # convert decimal PID to its hexadecimal representation to find out certification files in repository @@ -66,99 +80,57 @@ if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS) string(TOUPPER ${raw_pid} raw_pid_upper) # all certs are located in ${CHIP_ROOT}/credentials/development/attestation # it can be used during development without need to generate new certifications - string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Cert.der\"\n") - string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Key.der\"\n") - string(APPEND script_args "--pai_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der\"\n") + string(APPEND script_args "--dac-cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Cert.pem\"\n") + string(APPEND script_args "--dac-key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Key.pem\"\n") + string(APPEND script_args "--cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Cert.pem\"\n") + string(APPEND script_args "--key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Key.pem\"\n") + string(APPEND script_args "-cd \"${CHIP_ROOT}/credentials/development/cd-certs/Chip-Test-CD-Cert.der\"\n") + string(APPEND script_args "--pai\n") else() - find_program(chip_cert_exe NAMES chip-cert REQUIRED) - string(APPEND script_args "--gen_cd\n") - string(APPEND script_args "--chip_cert_path ${chip_cert_exe}\n") + # generate PAI and DAC certs + string(APPEND script_args "--cert \"${CHIP_ROOT}/credentials/test/attestation/Chip-Test-PAA-NoVID-Cert.pem\"\n") + string(APPEND script_args "--key \"${CHIP_ROOT}/credentials/test/attestation/Chip-Test-PAA-NoVID-Key.pem\"\n") + string(APPEND script_args "-cd \"${CHIP_ROOT}/credentials/development/cd-certs/Chip-Test-CD-Cert.der\"\n") + string(APPEND script_args "--paa\n") endif() +# find chip tool requied for generating QRCode +find_program(chip_tool_exe NAMES chip-tool REQUIRED) +string(APPEND script_args "--chip-tool-path ${chip_tool_exe}\n") + # add Password-Authenticated Key Exchange parameters -string(APPEND script_args "--spake2_it \"${CONFIG_CHIP_DEVICE_SPAKE2_IT}\"\n") -string(APPEND script_args "--spake2_salt \"${CONFIG_CHIP_DEVICE_SPAKE2_SALT}\"\n") +string(APPEND script_args "--spake2-it \"${CONFIG_CHIP_DEVICE_SPAKE2_IT}\"\n") string(APPEND script_args "--discriminator ${CONFIG_CHIP_DEVICE_DISCRIMINATOR}\n") string(APPEND script_args "--passcode ${CONFIG_CHIP_DEVICE_SPAKE2_PASSCODE}\n") -string(APPEND script_args "--include_passcode\n") -string(APPEND script_args "--overwrite\n") -# check if spake2 verifier should be generated using script -if(CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER) - # request script to generate a new spake2_verifier - # by adding an argument to script_args - find_program(spake_exe NAMES spake2p REQUIRED) - string(APPEND script_args "--spake2p_path ${spake_exe}\n") -else() - # Spake2 verifier should be provided using kConfig - string(APPEND script_args "--spake2_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n") -endif() +# request spake2p to generate a new spake2_verifier +find_program(spake_exe NAMES spake2p REQUIRED) +string(APPEND script_args "--spake2-path ${spake_exe}\n") if(CONFIG_CHIP_DEVICE_ENABLE_KEY) # Add optional EnableKey that triggers user-specific action. -string(APPEND script_args "--enable_key \"${CONFIG_CHIP_DEVICE_ENABLE_KEY}\"\n") +string(APPEND script_args "--enable-key \"${CONFIG_CHIP_DEVICE_ENABLE_KEY}\"\n") endif() -# Set output JSON file and path to SCHEMA file to validate generated factory data -set(factory_data_json ${output_path}/${factory_data_target}.json) -string(APPEND script_args "-o \"${factory_data_json}\"\n") -string(APPEND script_args "-s \"${schema_path}\"\n") +string(APPEND script_args "--output \"${output_path}\"/factory\n") + +set(factory_data_bin ${output_path}/factory/factory_data.bin) -# execute first script to create a JSON file +# execute a script to create a factory data file separate_arguments(separated_script_args NATIVE_COMMAND ${script_args}) add_custom_command( - OUTPUT ${factory_data_json} + OUTPUT ${factory_data_bin} DEPENDS ${FACTORY_DATA_SCRIPT_PATH} COMMAND ${Python3_EXECUTABLE} ${FACTORY_DATA_SCRIPT_PATH} ${separated_script_args} COMMENT "Generating new Factory Data..." ) add_custom_target(${factory_data_target} ALL - DEPENDS ${factory_data_json} + DEPENDS ${factory_data_bin} ) endfunction() -# Create a .hex file with factory data in CBOR format. -# -# This function creates a .hex and .cbor files from given JSON factory data file. -# -# -# During generation process some files will be created in zephyr's build directory: -# - .hex a file containing all factory data in CBOR format. -# - .bin a binary file containing all raw factory data in CBOR format. -# - .cbor a file containing all factory data in CBOR format. -# -# [Args]: -# factory_data_hex_target - a name for target to generate factory data HEX file. -# factory_data_target - a name for target to generate factory data JSON file. -# script_path - a path to script that makes a factory data .hex file from given arguments. -# output_path - a path to output directory, where created JSON file will be stored. -function(telink_create_factory_data_hex_file factory_data_hex_target factory_data_target script_path output_path) - -# Pass the argument list via file -set(cbor_script_args "-i ${output_path}/${factory_data_target}.json\n") -string(APPEND cbor_script_args "-o ${output_path}/${factory_data_target}\n") -# get partition address and offset from partition manager during compilation -string(APPEND cbor_script_args "--offset 0x1f4000\n") -string(APPEND cbor_script_args "--size 0x1000\n") -string(APPEND cbor_script_args "-r\n") - -# execute second script to create a hex file containing factory data in cbor format -separate_arguments(separated_cbor_script_args NATIVE_COMMAND ${cbor_script_args}) -set(factory_data_hex ${output_path}/${factory_data_target}.hex) - -add_custom_command(OUTPUT ${factory_data_hex} - COMMAND ${Python3_EXECUTABLE} ${script_path} ${separated_cbor_script_args} - COMMENT "Generating factory data HEX file..." - DEPENDS ${factory_data_target} ${script_path} - ) -add_custom_target(${factory_data_hex_target} ALL - DEPENDS ${factory_data_hex} - ) - -endfunction() - # Generate factory data partition using given args # # @@ -176,21 +148,12 @@ message(FATAL_ERROR "CHIP_ROOT variable is not set, please add it to CMakeLists. endif() # Localize all scripts needed to generate factory data partition -set(FACTORY_DATA_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/telink/generate_telink_chip_factory_data.py) -set(GENERATE_CBOR_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/telink/telink_generate_partition.py) -set(FACTORY_DATA_SCHEMA_PATH ${CHIP_ROOT}/scripts/tools/telink/telink_factory_data.schema) +set(FACTORY_DATA_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/telink/mfg_tool.py) set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr) -# create a JSON file with all factory data +# create a binary file with all factory data telink_create_factory_data_json(factory_data - ${FACTORY_DATA_SCRIPT_PATH} - ${FACTORY_DATA_SCHEMA_PATH} + ${FACTORY_DATA_SCRIPT_PATH} ${OUTPUT_FILE_PATH}) -# create a .hex file with factory data in CBOR format based on the JSON file created previously -telink_create_factory_data_hex_file(factory_data_hex - factory_data - ${GENERATE_CBOR_SCRIPT_PATH} - ${OUTPUT_FILE_PATH}) - endfunction() diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.der b/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.der new file mode 100644 index 00000000000000..ab43a33ac40d22 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.pem new file mode 100644 index 00000000000000..3be0a6dcc30a38 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_ESP_Matter_PAA_test_vid_0x131B.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBxjCCAWygAwIBAgIIMUCMiCKeyWUwCgYIKoZIzj0EAwIwNDEcMBoGA1UEAwwT +RVNQIE1hdHRlciBQQUEgdGVzdDEUMBIGCisGAQQBgqJ8AgEMBDEzMUIwIBcNMjEw +NjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDQxHDAaBgNVBAMME0VTUCBNYXR0 +ZXIgUEFBIHRlc3QxFDASBgorBgEEAYKifAIBDAQxMzFCMFkwEwYHKoZIzj0CAQYI +KoZIzj0DAQcDQgAENKx8o1Jvt+7eQ8dzLRoX1aDGOKLVskUvXlDvsIKflsN81Szm +RvBz9g/ngVOM/YphlMQSmJbYgCX5r8OPo//2mKNmMGQwEgYDVR0TAQH/BAgwBgEB +/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBBXiQ7CHOd7WlZhCcoLOera +CCdxMB8GA1UdIwQYMBaAFBBXiQ7CHOd7WlZhCcoLOeraCCdxMAoGCCqGSM49BAMC +A0gAMEUCIQCKtY04p5Cw0f/Dx4+lsawvVtVRj8crBpN7MIO9CPY02wIgdPICa/zE +5VQbBubw19Epj4Ib+8DcRlqRYFRU0mPEruA= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.der new file mode 100644 index 00000000000000..d8b27845f7f7f4 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.pem new file mode 100644 index 00000000000000..82397ca822460f --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Heiman_Matter_Test_PAA_vid_0x120B.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBzDCCAXKgAwIBAgIIXtY+YtAm944wCgYIKoZIzj0EAwIwNzEfMB0GA1UEAwwW +SGVpbWFuIE1hdHRlciBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEyMEIwIBcN +MjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTlaMDcxHzAdBgNVBAMMFkhlaW1h +biBNYXR0ZXIgVGVzdCBQQUExFDASBgorBgEEAYKifAIBDAQxMjBCMFkwEwYHKoZI +zj0CAQYIKoZIzj0DAQcDQgAE3giOwaFlfhbRss7S+v70G1rQc6UdkSJk3u02DxuW +j3kXzq59tH8c3jA6NM7gOWe3sl6Gz7aLGUEzt6I0BMqKVKNmMGQwEgYDVR0TAQH/ +BAgwBgEB/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBqL17cLDtAEM0TS +EEI1VEYpx0VpMB8GA1UdIwQYMBaAFBqL17cLDtAEM0TSEEI1VEYpx0VpMAoGCCqG +SM49BAMCA0gAMEUCIExYnMl3qsXwJN1nCAC1D+D3i+L6NMOf0kJiLDHG6OUHAiEA +xoj89D0kF6k9McvsPv8yhnj0vb7gK7Ivyd1iKD/PLnc= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.der b/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.der new file mode 100644 index 00000000000000..bc2efdaa0768bf Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.pem new file mode 100644 index 00000000000000..690fd2e497f68d --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_HooRii_Matter_Development_PAA_With_VID_0x1351_vid_0x1351.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB+DCCAZ6gAwIBAgIIBk27AsFF0LswCgYIKoZIzj0EAwIwTjE2MDQGA1UEAwwt +SG9vUmlpIE1hdHRlciBEZXZlbG9wbWVudCBQQUEgV2l0aCBWSUQgMHgxMzUxMRQw +EgYKKwYBBAGConwCAQwEMTM1MTAeFw0yMDEwMTUxNDIzNDNaFw00MDEwMTUxNDIz +NDJaME4xNjA0BgNVBAMMLUhvb1JpaSBNYXR0ZXIgRGV2ZWxvcG1lbnQgUEFBIFdp +dGggVklEIDB4MTM1MTEUMBIGCisGAQQBgqJ8AgEMBDEzNTEwWTATBgcqhkjOPQIB +BggqhkjOPQMBBwNCAAST3wykHyzHsM7EAnY07y+DGj+fk3GfzclOt+Ahlv8+24pL +u6/6vngSibE2oTyeSMkDtyUNgZw+T8HaMpf9Sm9Ao2YwZDASBgNVHRMBAf8ECDAG +AQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU0KpTU6mb/AdvdypNFGSD +1bGOxGwwHwYDVR0jBBgwFoAU0KpTU6mb/AdvdypNFGSD1bGOxGwwCgYIKoZIzj0E +AwIDSAAwRQIhAPGKnOdwgO4Rc6HBWSudEJTeOv9+d47WUnSlrVCoQ63ZAiBElSjW ++g2uNYxW4Iwst7tFtMZ39TfWGo7RFoLP7+pPGQ== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.der new file mode 100644 index 00000000000000..52accdbc52ccc0 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.pem new file mode 100644 index 00000000000000..00f4f71eb4daad --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Kasa_Matter_Test_PAA_vid_0x1391.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIByTCCAW6gAwIBAgIIVeghUiXWLnIwCgYIKoZIzj0EAwIwNTEdMBsGA1UEAwwU +S2FzYSBNYXR0ZXIgVGVzdCBQQUExFDASBgorBgEEAYKifAIBDAQxMzkxMCAXDTIy +MTEwMzE0MjM0M1oYDzk5OTkxMjMxMjM1OTU5WjA1MR0wGwYDVQQDDBRLYXNhIE1h +dHRlciBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEzOTEwWTATBgcqhkjOPQIB +BggqhkjOPQMBBwNCAATAJXAHVqu4gxI6kjuUqtGfm82vC3J/OFFgEDmqWDH3o+xy +jLoQVSKoMNNb6QK0rY5VMxGzz8XDQHlYmNYUCa4wo2YwZDASBgNVHRMBAf8ECDAG +AQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUFCV19rUO5+aWJqjFu9+D +ivU1R94wHwYDVR0jBBgwFoAUFCV19rUO5+aWJqjFu9+DivU1R94wCgYIKoZIzj0E +AwIDSQAwRgIhAJt239EX0sb/Iq4k8tUhuU8Z7K8yPmuopqPTSnO2x4K/AiEAwDn9 +Dodh5Mj1cX9xLGNoUKad82M6m1lxq+Gzp2PFuGQ= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.der b/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.der new file mode 100644 index 00000000000000..bafcf483f1d72a Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.pem new file mode 100644 index 00000000000000..eeb3c834c72ce5 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_PV_Test_PAA_vid_0x1381.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBuDCCAV+gAwIBAgIQXp0/DDCeJVpuI1QbL5nTRzAKBggqhkjOPQQDAjAsMRQw +EgYDVQQDDAtQViBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEzODEwHhcNMjIx +MTAzMDAwMzA4WhcNMjMxMTAzMDEwMzA4WjAsMRQwEgYDVQQDDAtQViBUZXN0IFBB +QTEUMBIGCisGAQQBgqJ8AgEMBDEzODEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC +AAQsEql6YspiEmKJG4dn2Pah8IHTLr8NVHjTwyoiSUBNVVI+9kuCa4xONZb0H9ZZ +zHm5iM6B1/h6B3m8+eJ6La2lo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBQqdZ9deiUhrsmPljLHfjSRC/8UOzAOBgNVHQ8BAf8EBAMCAYYwHwYDVR0jBBgw +FoAUKnWfXXolIa7Jj5Yyx340kQv/FDswCgYIKoZIzj0EAwIDRwAwRAIgLYPIJnkx +ipTW8uIIsFWXF8fZ3WOWENz0YJOITz5kibgCIDpeP4vmJ/fEeDyVYdtg0PhevH6U +hx8lVhYmRLmEaZk3 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.der new file mode 100644 index 00000000000000..3e4254ad8a9a3e Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.pem new file mode 100644 index 00000000000000..c4ed733425a7b1 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Pankore_Matter_Test_PAA.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBozCCAUigAwIBAgIIIh3zuRPQUMkwCgYIKoZIzj0EAwIwIjEgMB4GA1UEAwwX +UGFua29yZSBNYXR0ZXIgVGVzdCBQQUEwIBcNMjIwNzEwMTQyMzQzWhgPOTk5OTEy +MzEyMzU5NTlaMCIxIDAeBgNVBAMMF1BhbmtvcmUgTWF0dGVyIFRlc3QgUEFBMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOGjZ9QwkghR9TPHTVj+XdOZ79o1/ID4q +YNwLFQpBcucwUm0y2RlwtNVqOk+zwaeajZ1jVyj/c/kHMLotIHlTVqNmMGQwEgYD +VR0TAQH/BAgwBgEB/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFNSQNtX8 +TpteNV68FR6mU90YXcOCMB8GA1UdIwQYMBaAFNSQNtX8TpteNV68FR6mU90YXcOC +MAoGCCqGSM49BAMCA0kAMEYCIQDdof47JpWuW8GwCxvB1L25NdGaN9esVcTo0BYA +VBoswAIhANS7fxnh+SGV+hPEF1YQop84fhU+k4aDnjoCgEh9qBtv +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.der b/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.der new file mode 100644 index 00000000000000..c09d3943223eeb Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.pem new file mode 100644 index 00000000000000..9fa4b3c0315851 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_SAVANT_Matter_PAA_vid_0x1339.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBwDCCAWagAwIBAgIIahMWpBqqgC8wCgYIKoZIzj0EAwIwMjEaMBgGA1UEAwwR +U0FWQU5UIE1hdHRlciBQQUExFDASBgorBgEEAYKifAIBDAQxMzM5MB4XDTIyMTEz +MDE1MjM0M1oXDTQyMTEzMDE1MjM0MlowMjEaMBgGA1UEAwwRU0FWQU5UIE1hdHRl +ciBQQUExFDASBgorBgEEAYKifAIBDAQxMzM5MFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEm8sEuUyhzBEU6159qtAra4WvPIO9XrTdQuakpI2g2gn6hxcvljTsiG0Q +BW5j6KTbUFStNDexVi4wfmDPELhwt6NmMGQwEgYDVR0TAQH/BAgwBgEB/wIBATAO +BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFI/Y+33CensBfNAfXboQS8bs124lMB8G +A1UdIwQYMBaAFI/Y+33CensBfNAfXboQS8bs124lMAoGCCqGSM49BAMCA0gAMEUC +IQCTURyxOR0OEPsQdmXrf6Liyg442V/Vk8Zf/jWzbNNjOwIgGK0ZaBjhgawCk/NC +6PltqRbuc7OqeoyKcyNhe70MlBQ= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.der b/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.der new file mode 100644 index 00000000000000..88fb9ebb9c9665 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.pem new file mode 100644 index 00000000000000..7457f63be57f06 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_SIEGENIA_Testnet_PAA_vid_0x135A.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBxjCCAWygAwIBAgIIEDD67HZUoa0wCgYIKoZIzj0EAwIwNTEdMBsGA1UEAwwU +U0lFR0VOSUEgVGVzdG5ldCBQQUExFDASBgorBgEEAYKifAIBDAQxMzVBMB4XDTIy +MTExNjAwMDAwMFoXDTMyMTExMjIzNTk1OVowNTEdMBsGA1UEAwwUU0lFR0VOSUEg +VGVzdG5ldCBQQUExFDASBgorBgEEAYKifAIBDAQxMzVBMFkwEwYHKoZIzj0CAQYI +KoZIzj0DAQcDQgAEs2PplHaSf6mVZo9Nhc9Vvx8/HkKi+ufMh5eLheZ8tvFbcCXc +q3bQ6fnK3UIkD2BywaYo6yG57zabM6SdnQFZNKNmMGQwEgYDVR0TAQH/BAgwBgEB +/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJ8AEJ0oGFHjM3qhcXzT4XNL +psLhMB8GA1UdIwQYMBaAFJ8AEJ0oGFHjM3qhcXzT4XNLpsLhMAoGCCqGSM49BAMC +A0gAMEUCIQCJzeEmROipdHOofDoPt8pVydozYnTrhiyOZYxxr8Z0wQIgCRRTV0aP +ntrFDv4WNPKfyHQ4sdBx/ecyb2cN4fS21nA= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.der new file mode 100644 index 00000000000000..585a0944178069 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.pem new file mode 100644 index 00000000000000..736e6e591e57a5 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Tapo_Matter_Test_PAA_vid_0x1392.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIByTCCAW6gAwIBAgIIBzWL4hqQMr0wCgYIKoZIzj0EAwIwNTEdMBsGA1UEAwwU +VGFwbyBNYXR0ZXIgVGVzdCBQQUExFDASBgorBgEEAYKifAIBDAQxMzkyMCAXDTIy +MTEwMzE0MjM0M1oYDzk5OTkxMjMxMjM1OTU5WjA1MR0wGwYDVQQDDBRUYXBvIE1h +dHRlciBUZXN0IFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEzOTIwWTATBgcqhkjOPQIB +BggqhkjOPQMBBwNCAARfF9pu3b4kHgYq07dcMU7v/j3Xix+Q58k+RgJJkhRVt2tF +pdG+aF3AyRWVrmA0f9IhigXvurbL4cST+qCQzRaXo2YwZDASBgNVHRMBAf8ECDAG +AQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUbpFwxVcelv0hRKGyfJmr +EsNT6T8wHwYDVR0jBBgwFoAUbpFwxVcelv0hRKGyfJmrEsNT6T8wCgYIKoZIzj0E +AwIDSQAwRgIhAPmt76S78f2wJ+uI3F28ecIS7HeVQGsp0J/ZxGzLD1C7AiEAvOAp +D7zCAk2WAC2So9tTbQwCI4sayKl0C/SAcszW9i0= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.der new file mode 100644 index 00000000000000..c11e4f5b9ff36a Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.pem new file mode 100644 index 00000000000000..6b42872c13c3c3 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Telink_Matter_Development_PAA_01_vid_0x1141.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB3zCCAYSgAwIBAgIIFGPiTAVNxycwCgYIKoZIzj0EAwIwQTEpMCcGA1UEAwwg +VGVsaW5rIE1hdHRlciBEZXZlbG9wbWVudCBQQUEgMDExFDASBgorBgEEAYKifAIB +DAQxMTQxMB4XDTIyMTExMTAwMTEyMloXDTQyMTExMTAwMTEyMVowQTEpMCcGA1UE +AwwgVGVsaW5rIE1hdHRlciBEZXZlbG9wbWVudCBQQUEgMDExFDASBgorBgEEAYKi +fAIBDAQxMTQxMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOO5hm5qgrjD2i0pF +bhHATvoezhm28q2H3eQNDZ5T2ItyUjv9LKLyUx/NTF9T6Q5i/1UWEug2Mm2Twus6 +M+1dR6NmMGQwEgYDVR0TAQH/BAgwBgEB/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYD +VR0OBBYEFG7w/adj8GRbuK/eq4lSjSYjDl6BMB8GA1UdIwQYMBaAFG7w/adj8GRb +uK/eq4lSjSYjDl6BMAoGCCqGSM49BAMCA0kAMEYCIQC8V4yKaylCPOonDBQW7I+M +xhE/q1SoHiTvvp8upgaX9gIhAJup5L3Uvn0qxxhifSqNJydbVXPru2dYlHNr/vn/ +MUPm +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der new file mode 100644 index 00000000000000..22faa441566ad7 Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem new file mode 100644 index 00000000000000..ac90a091b71803 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem @@ -0,0 +1,13 @@ +Subject: CN=Tuya Matter PAA,vid=0x125D +-----BEGIN CERTIFICATE----- +MIIBvDCCAWKgAwIBAgIGAYRXDp5eMAoGCCqGSM49BAMCMDAxGDAWBgNVBAMMD1R1 +eWEgTWF0dGVyIFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEyNUQwIBcNMjIxMTA4MTE0 +NDQ2WhgPOTk5OTEyMzEyMzU5NTlaMDAxGDAWBgNVBAMMD1R1eWEgTWF0dGVyIFBB +QTEUMBIGCisGAQQBgqJ8AgEMBDEyNUQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC +AAQEUjCg9l3KEG1clKDMUifywrM0K9Gov0bHuoyvLM814ROF+0n5pZCxFLBi6B9k +DcZVia3LIHu7cN3VdvZbw+SSo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMB8GA1Ud +IwQYMBaAFDVXUqOnIFgzdx76vqUyZwywsx0JMB0GA1UdDgQWBBQ1V1KjpyBYM3ce ++r6lMmcMsLMdCTAOBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwIDSAAwRQIgBM5O +Zkgp6kiwdTX8ubii0/zzeh6/ZlVS8Cr4CW7lzSgCIQDzcQyiTX7t5+K7MZ+26Vgu +cXq+8bBdhTUbaM1CpHa2zw== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.der b/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.der new file mode 100644 index 00000000000000..16dcb616b3a46e Binary files /dev/null and b/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.der differ diff --git a/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.pem b/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.pem new file mode 100644 index 00000000000000..ae836bb4621609 --- /dev/null +++ b/credentials/development/paa-root-certs/dcld_mirror_CN_Uascent_Matter_Development_PAA_01_vid_0x1400.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB4DCCAYagAwIBAgIIO4ZtViQ5ep8wCgYIKoZIzj0EAwIwQjEqMCgGA1UEAwwh +VWFzY2VudCBNYXR0ZXIgRGV2ZWxvcG1lbnQgUEFBIDAxMRQwEgYKKwYBBAGConwC +AQwEMTQwMDAeFw0yMjEwMDYxNDIzNDNaFw00MjEwMDYxNDIzNDJaMEIxKjAoBgNV +BAMMIVVhc2NlbnQgTWF0dGVyIERldmVsb3BtZW50IFBBQSAwMTEUMBIGCisGAQQB +gqJ8AgEMBDE0MDAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATzGyM5sEHaRLE6 +T+IfnhCi0+pwZtR8J1HpzaG4XxRB2twE1V/DQ+4CDcSRH55As6aPWFADgulvI4c4 +tYYtaV4Ro2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAd +BgNVHQ4EFgQUzLmToS7mhedy2PMxMxJS9mxDM7EwHwYDVR0jBBgwFoAUzLmToS7m +hedy2PMxMxJS9mxDM7EwCgYIKoZIzj0EAwIDSAAwRQIhAORilXYwycE9YgEn5Qy5 +lB25H5cgpOwfAlKWYkAfEwdMAiBM47txXe9x/GVl5DtOOA2Ux3QToGyPARWSvnSr +Sicvaw== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.der b/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.der new file mode 100644 index 00000000000000..a5d8af96d4fb19 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.pem new file mode 100644 index 00000000000000..3af8819994bb1e --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_ACK_PAA_vid_0x137A.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBtDCCAVqgAwIBAgIRAKmlv/NkWcbEmD8lf53gJ8IwCgYIKoZIzj0EAwIwKDEQ +MA4GA1UEAwwHQUNLIFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEzN0EwIBcNMjIxMjIx +MTcyODI4WhgPMjEyMjExMjcxODI4MjhaMCgxEDAOBgNVBAMMB0FDSyBQQUExFDAS +BgorBgEEAYKifAIBDAQxMzdBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEm4U8 +MVedT5hVlDTuDO31lnEHWbjW2euLdkcwWoK50S1wHnIHGdtmQwVFfl/QsfR2vknr +u09p1W/8pHbwmPbq7aNjMGEwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUsmX4 +RnbkZc9s0jK2k4MwyOowZAYwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFLJl ++EZ25GXPbNIytpODMMjqMGQGMAoGCCqGSM49BAMCA0gAMEUCIQCrjO6txs7d8VA4 +hFHM4ZYAcSXTNWKYKIFRNEIbGOlJXwIgYGjCddu3ddzOnjXEd3kK1oO+Exs4Wtzw +XHHTB2RisdU= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.der new file mode 100644 index 00000000000000..8cccdfe5d6053c Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.pem new file mode 100644 index 00000000000000..fdd6d2f528df8d --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Basics_PAA_vid_0x137B.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBujCCAV+gAwIBAgIQWLcxV1Mfj6lftudYrsmyljAKBggqhkjOPQQDAjArMRMw +EQYDVQQDDApCYXNpY3MgUEFBMRQwEgYKKwYBBAGConwCAQwEMTM3QjAgFw0yMjEy +MjExNzM3NThaGA8yMTIyMTEyNzE4Mzc1OFowKzETMBEGA1UEAwwKQmFzaWNzIFBB +QTEUMBIGCisGAQQBgqJ8AgEMBDEzN0IwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC +AASnpaiASxMZDfqgC3oYe18bkB25PWJI+jI7MvKWnhq2+FxdaByMU1P6Sv2qoBCg +ikN54BMhJNthnQQL8bGtrE/Co2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW +BBQ/4wy1FSZGe0TBECIIbihQpVCcqjAOBgNVHQ8BAf8EBAMCAYYwHwYDVR0jBBgw +FoAUP+MMtRUmRntEwRAiCG4oUKVQnKowCgYIKoZIzj0EAwIDSQAwRgIhAPaRP+mH +VnXvZaYIkyoAh34JVfTJvhOcPxmgaywmvqh3AiEAqrsuiz6oZnU0j+fqyhXj7w1S +Mwzbg5//iCLEUET36XU= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.der new file mode 100644 index 00000000000000..f4299e6374d6c8 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.pem new file mode 100644 index 00000000000000..735a6d0f233298 --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Espressif_Matter_PAA_O_Espressif_Systems_vid_0x131B.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICCDCCAa6gAwIBAgIQaAJCUN1IiECssOZIuhJXPDAKBggqhkjOPQQDAjBRMR0w +GwYDVQQDDBRFc3ByZXNzaWYgTWF0dGVyIFBBQTEaMBgGA1UECgwRRXNwcmVzc2lm +IFN5c3RlbXMxFDASBgorBgEEAYKifAIBDAQxMzFCMCAXDTIyMTEyODA4MTM0MVoY +Dzk5OTkxMjMxMjM1OTU5WjBRMR0wGwYDVQQDDBRFc3ByZXNzaWYgTWF0dGVyIFBB +QTEaMBgGA1UECgwRRXNwcmVzc2lmIFN5c3RlbXMxFDASBgorBgEEAYKifAIBDAQx +MzFCMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEi6YLVYUIZ85zY/OZtse5csL6 +Uthd9R+IjpZ1j6SBLysbzbjt3EqGVAew1pQUkzrwmzEXpoXgkUGLSRqdSh5PcqNm +MGQwEgYDVR0TAQH/BAgwBgEB/wIBATAfBgNVHSMEGDAWgBRNEvWAG3XTI4XFVZDv +RSe8s7px4DAdBgNVHQ4EFgQUTRL1gBt10yOFxVWQ70UnvLO6ceAwDgYDVR0PAQH/ +BAQDAgGGMAoGCCqGSM49BAMCA0gAMEUCIQDcyYwJvBkl+VaU1bfqF4EcJ0SYq+u2 +keLIKJofbHZS4AIgO12+Flxj9X6XwL2z1g9G6JoOHKJMgZjcmRiTDwib3Vs= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.der new file mode 100644 index 00000000000000..134fbb01f8fc4a Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.pem new file mode 100644 index 00000000000000..1578cb8b04636c --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Kasa_Matter_PAA_vid_0x1391.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvzCCAWSgAwIBAgIIQZCTp/8AkHgwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP +S2FzYSBNYXR0ZXIgUEFBMRQwEgYKKwYBBAGConwCAQwEMTM5MTAgFw0yMjExMDMx +NDIzNDNaGA85OTk5MTIzMTIzNTk1OVowMDEYMBYGA1UEAwwPS2FzYSBNYXR0ZXIg +UEFBMRQwEgYKKwYBBAGConwCAQwEMTM5MTBZMBMGByqGSM49AgEGCCqGSM49AwEH +A0IABFcDxlEI/cWsbO5KrwHFCdr5q/LsDk7v8U/6e6BMuHegByEgnavT7A0FqM7f +3rhBFrM6lPzceCuhrLwASsDZcgqjZjBkMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBQ1Z89ZefZaomCA9PHJWq1uiVGdLzAfBgNV +HSMEGDAWgBQ1Z89ZefZaomCA9PHJWq1uiVGdLzAKBggqhkjOPQQDAgNJADBGAiEA +nMzUHVyjTvsLuBycTO4x1cvqNn9yJeHDqrmpBk7SjO0CIQDxjC9RCLIMTjFoOMiT +e2ziOfYvaGnKzXdGQja5pSfmog== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.der b/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.der new file mode 100644 index 00000000000000..2a8ac3010cd8b6 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.pem new file mode 100644 index 00000000000000..e7dfdb13a33b12 --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_LEEDARSON-MATTER-PAA_vid_0x1168.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBzTCCAXOgAwIBAgIQJVXK8CXBFQX15w1K3uF2UDAKBggqhkjOPQQDAjA1MR0w +GwYDVQQDDBRMRUVEQVJTT04tTUFUVEVSLVBBQTEUMBIGCisGAQQBgqJ8AgEMBDEx +NjgwIBcNMjIxMTA4MDgwNDUwWhgPMjUyMjExMDgwOTA0NTBaMDUxHTAbBgNVBAMM +FExFRURBUlNPTi1NQVRURVItUEFBMRQwEgYKKwYBBAGConwCAQwEMTE2ODBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABMM9d54nEwgCUOdih2ryUPJrqMxqfAoalp0o +KH4+7GX5PPBxt9qRdHHZx8BN++vNXnrQguTq6dKG0i4T9gFmQeGjYzBhMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFHKmOjFumjyuFSmc/46Mx/qzh9GFMA4GA1Ud +DwEB/wQEAwIBhjAfBgNVHSMEGDAWgBRypjoxbpo8rhUpnP+OjMf6s4fRhTAKBggq +hkjOPQQDAgNIADBFAiEAvuDxdzYT3mtHhACHOebgtZXkmhBTnWsuXhWg8UZslJ8C +IAoeQhjElDIVP8gUvj0ziX7SpK9i/DNlYaBrUWQ3iB0U +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.der new file mode 100644 index 00000000000000..e8b9ed7e981c09 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.pem new file mode 100644 index 00000000000000..347ced27f3f81b --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Legrand_Group_Matter_PAA_vid_0x1021.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB3DCCAYKgAwIBAgIUVyXsUE9uwOsz3WIzCwpjyxHpuRowCgYIKoZIzj0EAwIw +OTEhMB8GA1UEAwwYTGVncmFuZCBHcm91cCBNYXR0ZXIgUEFBMRQwEgYKKwYBBAGC +onwCAQwEMTAyMTAgFw0yMjEwMTExODQzMjNaGA8yMDc5MDYwNTIzNTk1OVowOTEh +MB8GA1UEAwwYTGVncmFuZCBHcm91cCBNYXR0ZXIgUEFBMRQwEgYKKwYBBAGConwC +AQwEMTAyMTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABNxf8IrVTUSMZIC1mO/p +NeEvJxiRi+luZmMCydMzWZ4JTWz5ue96T1HbsTmrn8BCnHz7zwE3d1wuxtEfSoTc +WpyjZjBkMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB8GA1Ud +IwQYMBaAFAtRB7zeDTBB1iaJGMp9epKGQqHxMB0GA1UdDgQWBBQLUQe83g0wQdYm +iRjKfXqShkKh8TAKBggqhkjOPQQDAgNIADBFAiAX46VlfsA+SgimfSPbrm3EFRrV +6yOCBGcyOQaXWZ9C5wIhANukApPkPni8AEEtZBXcTlahRBIYochPoxeG7dXQOZK0 +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.der new file mode 100644 index 00000000000000..de608b97680b8e Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.pem new file mode 100644 index 00000000000000..a3803141bd598a --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Leviton_PAA_vid_0x109B.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBtjCCAVygAwIBAgIIBP4h4RYCMRAwCgYIKoZIzj0EAwIwLDEUMBIGA1UEAwwL +TGV2aXRvbiBQQUExFDASBgorBgEEAYKifAIBDAQxMDlCMCAXDTIwMTIwMTEyMDAw +MFoYDzIwNzIwMzIwMTE1OTU5WjAsMRQwEgYDVQQDDAtMZXZpdG9uIFBBQTEUMBIG +CisGAQQBgqJ8AgEMBDEwOUIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQ9Qd9T +8JmqN8a5wH/sdf8JY34NsPOTuroJPTKE+1MyxioXHgnCQXxReVbwPoFqjjC/BoAM +KSQETnG99up9mZ9vo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQE +AwIBBjAdBgNVHQ4EFgQUjpWxwLYQUZPbQbZr70NOLDiiemcwHwYDVR0jBBgwFoAU +jpWxwLYQUZPbQbZr70NOLDiiemcwCgYIKoZIzj0EAwIDSAAwRQIgMm6kWZJlebL3 +fJUz4VEpGC5bnh9ozY0RhR4Pki7SrJoCIQDISZBPSSKqFc9i74MIToSUW2vVbW6w +OGAuzK6lwnvhtQ== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.der new file mode 100644 index 00000000000000..70bd97aef43fff Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.pem new file mode 100644 index 00000000000000..c8585a407ff55d --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_PAA_1_O_ubisys_technologies_GmbH_vid_0x10F2.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICBzCCAa6gAwIBAgIQTnUMFODg5jtpD4m9eotV3TAKBggqhkjOPQQDAjBRMSEw +HwYDVQQKDBh1YmlzeXMgdGVjaG5vbG9naWVzIEdtYkgxFjAUBgNVBAMMDU1hdHRl +ciBQQUEgIzExFDASBgorBgEEAYKifAIBDAQxMEYyMCAXDTIyMTEyNTEyNTYxN1oY +Dzk5OTkxMjMxMjM1OTU5WjBRMSEwHwYDVQQKDBh1YmlzeXMgdGVjaG5vbG9naWVz +IEdtYkgxFjAUBgNVBAMMDU1hdHRlciBQQUEgIzExFDASBgorBgEEAYKifAIBDAQx +MEYyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdPTdLt56VwHY8+KZ0MuFI4QQ +LJh7uV0572NtDQJx+riMmyAKt/2w1m9XBbecxhPIkpj9ml+/aaWChJoFQtnUA6Nm +MGQwEgYDVR0TAQH/BAgwBgEB/wIBATAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE +FKXRsL+UiUhnmYbXBhFNlIr6h/kCMB8GA1UdIwQYMBaAFKXRsL+UiUhnmYbXBhFN +lIr6h/kCMAoGCCqGSM49BAMCA0cAMEQCIEMl/Ej0pjTjONuPq1Du45cZJpGmUq2l +UZ7zhejPZVWvAiACI2re2e5TA+p3C+l4w2sfn6LWt3W2UsAACJ1bJit/3w== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.der new file mode 100644 index 00000000000000..582eef1d8c97d6 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.pem new file mode 100644 index 00000000000000..c86cb93cc7660d --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Matter_Signify_PAA_1_vid_0x100B.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBrTCCAVOgAwIBAgIRAPoJEqfBRt1UehNPUgdd+AYwCgYIKoZIzj0EAwIwNTEd +MBsGA1UEAwwUTWF0dGVyIFNpZ25pZnkgUEFBIDExFDASBgorBgEEAYKifAIBDAQx +MDBCMCAXDTIyMTIwNzE0MDMxMVoYDzk5OTkxMjMxMjM1OTU5WjA1MR0wGwYDVQQD +DBRNYXR0ZXIgU2lnbmlmeSBQQUEgMTEUMBIGCisGAQQBgqJ8AgEMBDEwMEIwWTAT +BgcqhkjOPQIBBggqhkjOPQMBBwNCAARnPmL7AcztXBr4UhQcu6Y2EHzCPbNmJtyz +v1hjHQpYNv9k3MmVihOgBTqc4cUoyiYHpyILqbx/I68sQNkN4H29o0IwQDAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQQ3kVZvKqAgoZ4ecCaf47sioh+9zAOBgNV +HQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwIDSAAwRQIgN6ZuBdfkHctkuLAn4kbGM+O+ +sEUneAk1cFzwKQpL0ZkCIQCykokHD3R5+0+ZGLtXkjCKqRVEX62YklSjJ7HRJa9c +7g== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.der new file mode 100644 index 00000000000000..e3adb2e269f409 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.pem new file mode 100644 index 00000000000000..3896aff3f51a7c --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Meross_Matter_PAA_vid_0x1345.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBwTCCAWigAwIBAgIIEy+0SI9K220wCgYIKoZIzj0EAwIwMjEaMBgGA1UEAwwR +TWVyb3NzIE1hdHRlciBQQUExFDASBgorBgEEAYKifAIBDAQxMzQ1MCAXDTIyMTEw +MTAwMDAwMFoYDzIxMjIxMDA3MjM1OTU5WjAyMRowGAYDVQQDDBFNZXJvc3MgTWF0 +dGVyIFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEzNDUwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAARv1gvpF64D9mmepNE2vdKg2NS1CWrVnl9Ol5cEFTxDNsfv2vELo9lY +20tqtA29vmxnw0i0ca0QgW0HjjjbDQoro2YwZDASBgNVHRMBAf8ECDAGAQH/AgEB +MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUQJdGpD1+8VG2zdignqR2+pvfdWMw +HwYDVR0jBBgwFoAUQJdGpD1+8VG2zdignqR2+pvfdWMwCgYIKoZIzj0EAwIDRwAw +RAIgXDpmGQ3lC1TOwzgFE3kajyNCcb2jc8yL8CrWrfln+sMCIHBvg6KH7X52m7nT +ri9So5ut4XgTf3Mm5oPzEYnl+2c+ +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.der new file mode 100644 index 00000000000000..bb14e504ff7123 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.pem new file mode 100644 index 00000000000000..319501a70be056 --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Midea_Group_Matter_PAA_G1_Prod_vid_0x118C.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB3jCCAYOgAwIBAgIJHNpcgyVSU4SYMAoGCCqGSM49BAMCMD8xJzAlBgNVBAMM +Hk1pZGVhIEdyb3VwIE1hdHRlciBQQUEgRzEgUHJvZDEUMBIGCisGAQQBgqJ8AgET +BDExOEMwIBcNMjIxMDMxMTYwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMD8xJzAlBgNV +BAMMHk1pZGVhIEdyb3VwIE1hdHRlciBQQUEgRzEgUHJvZDEUMBIGCisGAQQBgqJ8 +AgETBDExOEMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASkFR7fS3Hfde4xru2n +E0XNQHjhBXLTzksZZ0DmDheY9AjyIElwzwLEr6UTcMJV9LLzKNiHfbMaJjBQ5kd7 +SuMqo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNV +HQ4EFgQUqV7nxHJ/ZGOlKUhAVQzor2JfMREwHwYDVR0jBBgwFoAUqV7nxHJ/ZGOl +KUhAVQzor2JfMREwCgYIKoZIzj0EAwIDSQAwRgIhAKsAXPqJk7j6V+7Ud4J7lq6h +JrJbypaJSCx0C4ZIpv7RAiEAgFHjdOwkBIifJjgh2ENpgLCbVALwCN1JFxTzx0X2 +7d8= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.der new file mode 100644 index 00000000000000..e170a9d793a6c7 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.pem new file mode 100644 index 00000000000000..23e245be88394f --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Prime_PAA_vid_0x1381.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBuDCCAV6gAwIBAgIRAPp8t3DW0qJfh6CY0/RA7a4wCgYIKoZIzj0EAwIwKjES +MBAGA1UEAwwJUHJpbWUgUEFBMRQwEgYKKwYBBAGConwCAQwEMTM4MTAgFw0yMjEy +MjExNzExNDdaGA8yMTIyMTEyNzE4MTE0N1owKjESMBAGA1UEAwwJUHJpbWUgUEFB +MRQwEgYKKwYBBAGConwCAQwEMTM4MTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BDJJ3y8N0AoGu1DvdNqz/zjyV/jhrkwb8jRhJw7ZwhutsZFCsHzZWz1lQZpVcF7/ +rt6aKjSzBkjMJ1ufAQfi/iajYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FOe5kbucntBhp8ub8YhkShVjwk4rMA4GA1UdDwEB/wQEAwIBhjAfBgNVHSMEGDAW +gBTnuZG7nJ7QYafLm/GIZEoVY8JOKzAKBggqhkjOPQQDAgNIADBFAiEA/Xmfa+Ep +VXkNumbQc5hNJ+UwIimsixaVJFo2nLXVhpICIHFLRTaZHOrElMkyO1i06xXg9Kc+ +ACaL+HKmXiXy94JL +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.der new file mode 100644 index 00000000000000..63ce01d106293b Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.pem new file mode 100644 index 00000000000000..885056c9a77350 --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Sengled_Matter_PAA_vid_0x1160.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBqDCCAU6gAwIBAgIQaVnpV7d9umB4dm0aORnqpDAKBggqhkjOPQQDAjAzMRsw +GQYDVQQDDBJTZW5nbGVkIE1hdHRlciBQQUExFDASBgorBgEEAYKifAIBDAQxMTYw +MCAXDTIyMTIyODA3NDA0N1oYDzIwNTIxMjI4MDg0MTAzWjAzMRswGQYDVQQDDBJT +ZW5nbGVkIE1hdHRlciBQQUExFDASBgorBgEEAYKifAIBDAQxMTYwMFkwEwYHKoZI +zj0CAQYIKoZIzj0DAQcDQgAEXp+xXQ144JichnUkcPlLvge/CYh1phyiqLNY4cnS +GPGesd09HqXufT7yHsQV6ajICocsW8GWnH84FP+AntMLOKNCMEAwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUD9nH1i8cU0+V9Q9RUg+7AHW1kpAwDgYDVR0PAQH/ +BAQDAgGGMAoGCCqGSM49BAMCA0gAMEUCIE7cEn6mE7IiiWGw7ZJajo50jfFGupei +Hb5v7ko0QAyvAiEA3PD5vJhIUIuF1H2UyOMz8nTzOc24yS56/epUBwisS6w= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.der new file mode 100644 index 00000000000000..2c16b00dd3fa84 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.pem new file mode 100644 index 00000000000000..cddbb0f87b3d6f --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Tapo_Matter_PAA_vid_0x1392.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvzCCAWSgAwIBAgIIMDmv+XzHSXUwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP +VGFwbyBNYXR0ZXIgUEFBMRQwEgYKKwYBBAGConwCAQwEMTM5MjAgFw0yMjExMDMx +NDIzNDNaGA85OTk5MTIzMTIzNTk1OVowMDEYMBYGA1UEAwwPVGFwbyBNYXR0ZXIg +UEFBMRQwEgYKKwYBBAGConwCAQwEMTM5MjBZMBMGByqGSM49AgEGCCqGSM49AwEH +A0IABP6TyX8UY0Ek1bLaOgy+QeaanXMpZdQq0+1thMGohs+JIWCDtPxSPeGVXypy +bj/NUP9V//PkAJOSJqiqlfLyvmKjZjBkMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSfY7NblSSAQFIieWdx9lrYTbGASTAfBgNV +HSMEGDAWgBSfY7NblSSAQFIieWdx9lrYTbGASTAKBggqhkjOPQQDAgNJADBGAiEA +ks2c4NJXUs9L1pPrcDsYTaox01za4LD5CXmWjocq9+0CIQDRu+X2D3ETsRrygOaA ++oDhvKphxoCLsYMYENDG16+aMA== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der b/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der new file mode 100644 index 00000000000000..22faa441566ad7 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem b/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem new file mode 100644 index 00000000000000..729f81a554fc26 --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_CN_Tuya_Matter_PAA_vid_0x125D.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvDCCAWKgAwIBAgIGAYRXDp5eMAoGCCqGSM49BAMCMDAxGDAWBgNVBAMMD1R1 +eWEgTWF0dGVyIFBBQTEUMBIGCisGAQQBgqJ8AgEMBDEyNUQwIBcNMjIxMTA4MTE0 +NDQ2WhgPOTk5OTEyMzEyMzU5NTlaMDAxGDAWBgNVBAMMD1R1eWEgTWF0dGVyIFBB +QTEUMBIGCisGAQQBgqJ8AgEMBDEyNUQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNC +AAQEUjCg9l3KEG1clKDMUifywrM0K9Gov0bHuoyvLM814ROF+0n5pZCxFLBi6B9k +DcZVia3LIHu7cN3VdvZbw+SSo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMB8GA1Ud +IwQYMBaAFDVXUqOnIFgzdx76vqUyZwywsx0JMB0GA1UdDgQWBBQ1V1KjpyBYM3ce ++r6lMmcMsLMdCTAOBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwIDSAAwRQIgBM5O +Zkgp6kiwdTX8ubii0/zzeh6/ZlVS8Cr4CW7lzSgCIQDzcQyiTX7t5+K7MZ+26Vgu +cXq+8bBdhTUbaM1CpHa2zw== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.der b/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.der new file mode 100644 index 00000000000000..ebca45453896c6 Binary files /dev/null and b/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.der differ diff --git a/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.pem b/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.pem new file mode 100644 index 00000000000000..bf4fd769683fcb --- /dev/null +++ b/credentials/production/paa-root-certs/dcld_mirror_SERIALNUMBER_63709330400001_CN_NXP_Matter_PAA_O_NXP_Semiconductors_NV_C_NL.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICKjCCAc6gAwIBAgIQZIhrnLD8JtUdBFKOg5azKDAMBggqhkjOPQQDAgUAMGEx +FzAVBgNVBAUMDjYzNzA5MzMwNDAwMDAxMSAwHgYDVQQKDBdOWFAgU2VtaWNvbmR1 +Y3RvcnMgTi5WLjELMAkGA1UEBgwCTkwxFzAVBgNVBAMMDk5YUCBNYXR0ZXIgUEFB +MB4XDTIyMTAwMTE0MjM0M1oXDTQ5MTIzMTIzNTk1OVowYTEXMBUGA1UEBQwONjM3 +MDkzMzA0MDAwMDExIDAeBgNVBAoMF05YUCBTZW1pY29uZHVjdG9ycyBOLlYuMQsw +CQYDVQQGDAJOTDEXMBUGA1UEAwwOTlhQIE1hdHRlciBQQUEwWTATBgcqhkjOPQIB +BggqhkjOPQMBBwNCAAQmG9CGuc3THfDL4EvdtnLGVa7HLvsWKITV6EDfswaqKGid +k2TYwuUIVKwU6LxEWhensDfKkEx05I33Gv8bNaAvo2YwZDASBgNVHRMBAf8ECDAG +AQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUl5ekL40HbyPDiIBNTYJC +2T3Xcf0wHwYDVR0jBBgwFoAUl5ekL40HbyPDiIBNTYJC2T3Xcf0wDAYIKoZIzj0E +AwIFAANIADBFAiAoIKgE0cFKmvPSG07jpNrjFX5+9BzTUrnY+ZzItV4q4wIhAKar ++mfA4WFw1ZlFODuQ1NeD7sAqEzDzgqzj+8Loafcn +-----END CERTIFICATE----- \ No newline at end of file diff --git a/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.der b/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.der new file mode 100644 index 00000000000000..93f956666154af Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.pem b/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.pem new file mode 100644 index 00000000000000..5c28c0a147b4a6 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAA-NoVID-ToResignPAIs-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBsDCCAVagAwIBAgIIfQAKFyO+3wYwCgYIKoZIzj0EAwIwKTEnMCUGA1UEAwwe +TWF0dGVyIFRlc3QgUEFBIFRvIFJlc2lnbiBQQUlzMCAXDTIxMDYyODE0MjM0M1oY +Dzk5OTkxMjMxMjM1OTU5WjApMScwJQYDVQQDDB5NYXR0ZXIgVGVzdCBQQUEgVG8g +UmVzaWduIFBBSXMwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQQ7wKoGoe2gSH7 +qNMZePgHoxflCqioKERoKJFLkz3o7dSlw5yf9xpM42R/1/YmU7fSSV/LpMD0f4do +gAOeByBKo2YwZDASBgNVHRMBAf8ECDAGAQH/AgEBMA4GA1UdDwEB/wQEAwIBBjAd +BgNVHQ4EFgQUeFznBbhrj05vx5OqYMtD6mlogtUwHwYDVR0jBBgwFoAUeFznBbhr +j05vx5OqYMtD6mlogtUwCgYIKoZIzj0EAwIDSAAwRQIge2P1stiHl9JjsD+th707 +jIa88A+Zb6hz6P0vgGDCHW8CIQCS4Uyz9pfBj4yFTR9wVL5vGqvOzPPVngzSwnIM +svDIdg== +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.der b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.der new file mode 100644 index 00000000000000..bb13cb0f7d8247 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.pem b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.pem new file mode 100644 index 00000000000000..b3620594118e4a --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-Resigned-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBzTCCAXOgAwIBAgIIYnLHqgoTIJ0wCgYIKoZIzj0EAwIwKTEnMCUGA1UEAwwe +TWF0dGVyIFRlc3QgUEFBIFRvIFJlc2lnbiBQQUlzMCAXDTIxMDYyODE0MjM0M1oY +Dzk5OTkxMjMxMjM1OTU5WjBGMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUkxFDAS +BgorBgEEAYKifAIBDARGRkYyMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqG +SM49AgEGCCqGSM49AwEHA0IABCwGPCCLt88/idiccLJo3sLwrYkZLwIvlUetzHIq +BoBpynI1YIO3JHcbIXZMskxXEbU+/of+T+C0cxQbzKEEso2jZjBkMBIGA1UdEwEB +/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTQWptncaGjepvB +nZXotduPQwC2OjAfBgNVHSMEGDAWgBR4XOcFuGuPTm/Hk6pgy0PqaWiC1TAKBggq +hkjOPQQDAgNIADBFAiEAnw1UN+kJn4U4ylMO6J0qs2QkXOkrIcnKvseb1U0Y5hwC +IHbQ5x/16FDq3QfUgx51RtF51uK22OHGF6xWpeyhVAI4 +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.der b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.der new file mode 100644 index 00000000000000..89b0d9ded65a0b Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.pem b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.pem new file mode 100644 index 00000000000000..3eed75c53562ae --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBzDCCAXOgAwIBAgIITzzC3bEdxMswCgYIKoZIzj0EAwIwKTEnMCUGA1UEAwwe +TWF0dGVyIFRlc3QgUEFBIFRvIFJlc2lnbiBQQUlzMCAXDTIxMDYyODE0MjM0M1oY +Dzk5OTkxMjMxMjM1OTU5WjBGMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUkxFDAS +BgorBgEEAYKifAIBDARGRkYyMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqG +SM49AgEGCCqGSM49AwEHA0IABKH6SCo8kvOkZmOc4zVxOLakyd1EdhaOx+xcRQgr +3BvAbZuU00x53wXfxAsnEIBEC3qItDY4rEye5DnHQZwU3fqjZjBkMBIGA1UdEwEB +/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTbd9JbY20EOKGS +HEFSED7q4sQ7BzAfBgNVHSMEGDAWgBR4XOcFuGuPTm/Hk6pgy0PqaWiC1TAKBggq +hkjOPQQDAgNHADBEAiAFHzA0Vv3rAf/95Hmf+7Q9bdFIZTSK1j+SusvKYMgcKQIg +ERLDCvsqkvYALhR4OSA7Rdu4JVFhsP0M0F4MpMRwyPE= +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.der b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.der new file mode 100644 index 00000000000000..b3791b55bb3686 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.der differ diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.pem b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.pem new file mode 100644 index 00000000000000..7b19f537833cf5 --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSKIDDiff-Key.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEINGuYvtNswX+o4yj6UR0TRvAv/mUqHTcxfV6F/i1GFE1oAoGCCqGSM49 +AwEHoUQDQgAEofpIKjyS86RmY5zjNXE4tqTJ3UR2Fo7H7FxFCCvcG8Btm5TTTHnf +Bd/ECycQgEQLeoi0NjisTJ7kOcdBnBTd+g== +-----END EC PRIVATE KEY----- diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.der b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.der new file mode 100644 index 00000000000000..9bb62f9625d67c Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.pem b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.pem new file mode 100644 index 00000000000000..3e28439c9a470f --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAI-FFF2-8001-ResignedSubjectDiff-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB1jCCAXygAwIBAgIIR+1jaCGXaTEwCgYIKoZIzj0EAwIwKTEnMCUGA1UEAwwe +TWF0dGVyIFRlc3QgUEFBIFRvIFJlc2lnbiBQQUlzMCAXDTIxMDYyODE0MjM0M1oY +Dzk5OTkxMjMxMjM1OTU5WjBPMSEwHwYDVQQDDBhNYXR0ZXIgVGVzdCBQQUkgUmVz +aWduZWQxFDASBgorBgEEAYKifAIBDARGRkYyMRQwEgYKKwYBBAGConwCAgwEODAw +MTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCwGPCCLt88/idiccLJo3sLwrYkZ +LwIvlUetzHIqBoBpynI1YIO3JHcbIXZMskxXEbU+/of+T+C0cxQbzKEEso2jZjBk +MBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTQ +WptncaGjepvBnZXotduPQwC2OjAfBgNVHSMEGDAWgBR4XOcFuGuPTm/Hk6pgy0Pq +aWiC1TAKBggqhkjOPQQDAgNIADBFAiEA6LLGEXBKVAZ5DMXIhzg4iQOcGO3yPV7i +VRUOD/R178kCIH8NlJHm5pHAVcugsEpykHaiWC+zueMKFb7D0FzpES/8 +-----END CERTIFICATE----- diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.der b/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.der new file mode 100644 index 00000000000000..8c7bc50d173b66 Binary files /dev/null and b/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.der differ diff --git a/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.pem b/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.pem new file mode 100644 index 00000000000000..d65148427a2dbb --- /dev/null +++ b/credentials/test/attestation/Chip-Test-PAI-FFF2-NoPID-Resigned-Cert.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBtzCCAV2gAwIBAgIIXQpZwBdLO2UwCgYIKoZIzj0EAwIwKTEnMCUGA1UEAwwe +TWF0dGVyIFRlc3QgUEFBIFRvIFJlc2lnbiBQQUlzMCAXDTIxMDYyODE0MjM0M1oY +Dzk5OTkxMjMxMjM1OTU5WjAwMRgwFgYDVQQDDA9NYXR0ZXIgVGVzdCBQQUkxFDAS +BgorBgEEAYKifAIBDARGRkYyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2L+T +R5LPjq7awk/8lmyRdiD7ly+6uY7G1RMUoHrpjhoD+0GR0m4tEny5UnYhw26XOhhs +VtDK2ZmwQcJwqbHLP6NmMGQwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8E +BAMCAQYwHQYDVR0OBBYEFGE90Ic1XvCLrgHkxpqPxz2sjH39MB8GA1UdIwQYMBaA +FHhc5wW4a49Ob8eTqmDLQ+ppaILVMAoGCCqGSM49BAMCA0gAMEUCIH5fn1//Bus5 +/xNPWu1/P5ZhP+Lxf097v1EkPipzU3D4AiEA7FR9eHPbRYDx6NjpLsrsJF2ICogX +/NgcZ6j65JWO2oI= +-----END CERTIFICATE----- diff --git a/credentials/test/gen-test-attestation-certs.sh b/credentials/test/gen-test-attestation-certs.sh index 2bd8d85894211c..83bc7668a62bb2 100755 --- a/credentials/test/gen-test-attestation-certs.sh +++ b/credentials/test/gen-test-attestation-certs.sh @@ -309,6 +309,37 @@ cert_lifetime=4294967295 "$chip_cert_tool" gen-att-cert --type d --subject-cn "Matter Test DAC $dac" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from_1sec_before_in_future" --lifetime "$cert_lifetime_1year" --ca-key "$pai_key_file".pem --ca-cert "$pai_cert_file".pem --out-key "$dac_key_file".pem --out "$dac_cert_file".pem } +# Set #7: +# - Generate new PAA to resign already generated PAIs +{ + vid=FFF2 + pid=8001 + + paa_key_file="$dest_dir/Chip-Test-PAA-NoVID-Key" + paa_cert_file="$dest_dir/Chip-Test-PAA-NoVID-ToResignPAIs-Cert" + + "$chip_cert_tool" gen-att-cert --type a --subject-cn "Matter Test PAA To Resign PAIs" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --key "$paa_key_file".pem --out "$paa_cert_file".pem + + pai_key_file="$dest_dir/Chip-Test-PAI-$vid-$pid-Key" + pai_cert_file="$dest_dir/Chip-Test-PAI-$vid-$pid-Resigned-Cert" + + "$chip_cert_tool" gen-att-cert --type i --subject-cn "Matter Test PAI" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --ca-key "$paa_key_file".pem --ca-cert "$paa_cert_file".pem --key "$pai_key_file".pem --out "$pai_cert_file".pem + + pai_cert_file="$dest_dir/Chip-Test-PAI-$vid-$pid-ResignedSubjectDiff-Cert" + + "$chip_cert_tool" gen-att-cert --type i --subject-cn "Matter Test PAI Resigned" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --ca-key "$paa_key_file".pem --ca-cert "$paa_cert_file".pem --key "$pai_key_file".pem --out "$pai_cert_file".pem + + pai_key_file="$dest_dir/Chip-Test-PAI-$vid-$pid-ResignedSKIDDiff-Key" + pai_cert_file="$dest_dir/Chip-Test-PAI-$vid-$pid-ResignedSKIDDiff-Cert" + + "$chip_cert_tool" gen-att-cert --type i --subject-cn "Matter Test PAI" --subject-vid "$vid" --subject-pid "$pid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --ca-key "$paa_key_file".pem --ca-cert "$paa_cert_file".pem --out-key "$pai_key_file".pem --out "$pai_cert_file".pem + + pai_key_file="$dest_dir/Chip-Test-PAI-$vid-NoPID-Key" + pai_cert_file="$dest_dir/Chip-Test-PAI-$vid-NoPID-Resigned-Cert" + + "$chip_cert_tool" gen-att-cert --type i --subject-cn "Matter Test PAI" --subject-vid "$vid" --valid-from "$cert_valid_from" --lifetime "$cert_lifetime" --ca-key "$paa_key_file".pem --ca-cert "$paa_cert_file".pem --key "$pai_key_file".pem --out "$pai_cert_file".pem +} + # In addition to PEM format also create certificates in DER form. for cert_file_pem in "$dest_dir"/*Cert.pem; do cert_file_der="${cert_file_pem/.pem/.der}" @@ -366,7 +397,7 @@ namespace TestCerts { printf "$header_includes" >>"$output_cstyle_file".h printf "$namespaces_open\n" >>"$output_cstyle_file".cpp printf "$namespaces_open\n" >>"$output_cstyle_file".h - for cert_file_pem in credentials/test/attestation/*Cert.pem; do + for cert_file_pem in "$dest_dir"/*Cert.pem; do params_prefix="${cert_file_pem/*Chip-Test/sTestCert}" params_prefix="${params_prefix//-/_}" params_prefix="${params_prefix/_Cert.pem/}" @@ -387,24 +418,31 @@ namespace TestCerts { printf "};\n\n" printf "extern const ByteSpan ${params_prefix}_SKID = ByteSpan(${params_prefix}_SKID_Array);\n\n" - printf "// \${chip_root}/$key_file_pem\n\n" + # Print key data if present + if test -f "$key_file_pem"; then + printf "// \${chip_root}/$key_file_pem\n\n" - printf "constexpr uint8_t ${params_prefix}_PublicKey_Array[] = {\n" - openssl ec -text -noout -in "$key_file_pem" | sed '0,/pub:$/d' | sed '/ASN1 OID:/,$d' | sed 's/:/ /g' | sed 's/\/,/g' | sed "s/^[ \t]*/ /" | sed 's/ *$//' - printf "};\n\n" - printf "extern const ByteSpan ${params_prefix}_PublicKey = ByteSpan(${params_prefix}_PublicKey_Array);\n\n" + printf "constexpr uint8_t ${params_prefix}_PublicKey_Array[] = {\n" + openssl ec -text -noout -in "$key_file_pem" | sed '0,/pub:$/d' | sed '/ASN1 OID:/,$d' | sed 's/:/ /g' | sed 's/\/,/g' | sed "s/^[ \t]*/ /" | sed 's/ *$//' + printf "};\n\n" + printf "extern const ByteSpan ${params_prefix}_PublicKey = ByteSpan(${params_prefix}_PublicKey_Array);\n\n" - printf "constexpr uint8_t ${params_prefix}_PrivateKey_Array[] = {\n" - openssl ec -text -noout -in "$key_file_pem" | sed '0,/priv:$/d' | sed '/pub:/,$d' | sed 's/:/ /g' | sed 's/\/,/g' | sed "s/^[ \t]*/ /" | sed 's/ *$//' - printf "};\n\n" - printf "extern const ByteSpan ${params_prefix}_PrivateKey = ByteSpan(${params_prefix}_PrivateKey_Array);\n\n" + printf "constexpr uint8_t ${params_prefix}_PrivateKey_Array[] = {\n" + openssl ec -text -noout -in "$key_file_pem" | sed '0,/priv:$/d' | sed '/pub:/,$d' | sed 's/:/ /g' | sed 's/\/,/g' | sed "s/^[ \t]*/ /" | sed 's/ *$//' + printf "};\n\n" + printf "extern const ByteSpan ${params_prefix}_PrivateKey = ByteSpan(${params_prefix}_PrivateKey_Array);\n\n" + fi } >>"$output_cstyle_file".cpp { printf "extern const ByteSpan ${params_prefix}_Cert;\n" printf "extern const ByteSpan ${params_prefix}_SKID;\n" - printf "extern const ByteSpan ${params_prefix}_PublicKey;\n" - printf "extern const ByteSpan ${params_prefix}_PrivateKey;\n\n" + # Print key data if present + if test -f "$key_file_pem"; then + printf "extern const ByteSpan ${params_prefix}_PublicKey;\n" + printf "extern const ByteSpan ${params_prefix}_PrivateKey;\n" + fi + printf "\n" } >>"$output_cstyle_file".h done diff --git a/docs/code_generation.md b/docs/code_generation.md index 7deed7ba05fb1a..c676fa887ebd7c 100644 --- a/docs/code_generation.md +++ b/docs/code_generation.md @@ -84,9 +84,10 @@ specific codegen. ### `*.matter` parsing and codegen `*.matter` files are both human and machine readable. Code that can process -these files is available at `scripts/idl` and `scripts/codegen.py`. You can read -the [scripts/idl/README.md](../scripts/idl/README.md) for details of how things -work. +these files is available at `scripts/py_matter_idl` and `scripts/codegen.py`. +You can read the +[scripts/py_matter_idl/matter_idl/README.md](../scripts/py_matter_idl/matter_idl/README.md) +for details of how things work. `scripts/codegen.py` can generate various outputs based on an input `*.matter` file. @@ -198,7 +199,7 @@ Code pre-generation can be used: generation at build time or to save the code generation time at the expense of running code generation for every possible zap/generation type - To check changes in generated code across versions, beyond the comparisons - of golden image tests in `scripts/idl/tests` + of golden image tests in `scripts/py_matter_idl/matter_idl/tests` The script to trigger code pre-generation is `scripts/code_pregenerate.py` and requires the pre-generation output directory as an argument diff --git a/docs/guides/access-control-guide.md b/docs/guides/access-control-guide.md index 53275f6308ed08..d82ec309b8b8b9 100644 --- a/docs/guides/access-control-guide.md +++ b/docs/guides/access-control-guide.md @@ -378,15 +378,15 @@ strongly typed values: The privileges are: -- Clusters.AccessControl.Enums.Privilege.kView -- Clusters.AccessControl.Enums.Privilege.kOperate -- Clusters.AccessControl.Enums.Privilege.kManage -- Clusters.AccessControl.Enums.Privilege.kAdminister +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kManage` +- `Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister` The authentication modes are: -- Clusters.AccessControl.Enums.AuthMode.kCASE -- Clusters.AccessControl.Enums.AuthMode.kGroup +- `Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCASE` +- `Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kGroup` Some typical clusters: @@ -433,14 +433,14 @@ await devCtrl.ReadAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl ) ] ) ``` await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kAdminister, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 1 ] ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kView, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 4444, 5555, 6666 ], ), ] ) ) ] ) @@ -482,19 +482,19 @@ await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ ``` await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [ - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kAdminister, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 1 ] ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kView, - authMode = Clusters.AccessControl.Enums.AuthMode.kCase, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kView, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase, subjects = [ 4444, 5555, 6666 ], ), - Clusters.AccessControl.Structs.AccessControlEntry( - privilege = Clusters.AccessControl.Enums.Privilege.kOperate, - authMode = Clusters.AccessControl.Enums.AuthMode.kGroup, + Clusters.AccessControl.Structs.AccessControlEntryStruct( + privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate, + authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kGroup, subjects = [ 123, 456 ], targets = [ Clusters.AccessControl.Structs.Target( diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index c05b5a61ebaa16..7826fd6b9d15a8 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -41,6 +41,8 @@ data secure by applying hardware write protection. - [Enabling factory data support](#enabling-factory-data-support) - [Generating factory data](#generating-factory-data) - [Creating factory data JSON file with the first script](#creating-factory-data-json-file-with-the-first-script) + - [How to set user data](#how-to-set-user-data) + - [How to handle user data](#how-to-handle-user-data) - [Verifying using the JSON Schema tool](#verifying-using-the-json-schema-tool) - [Option 1: Using the php-json-schema tool](#option-1-using-the-php-json-schema-tool) - [Option 2: Using a website validator](#option-2-using-a-website-validator) @@ -110,7 +112,7 @@ The following table lists the parameters of a factory data set: | `spake2_verifier` | SPAKE2+ verifier | 97 B | byte string | mandatory | The SPAKE2+ verifier generated using SPAKE2+ salt, iteration counter, and passcode. | | `discriminator` | Discriminator | 2 B | uint16 | mandatory | A 12-bit value matching the field of the same name in the setup code. The discriminator is used during the discovery process. | | `passcode` | SPAKE passcode | 4 B | uint32 | optional | A pairing passcode is a 27-bit unsigned integer which serves as a proof of possession during the commissioning. Its value must be restricted to the values from `0x0000001` to `0x5F5E0FE` (`00000001` to `99999998` in decimal), excluding the following invalid passcode values: `00000000`, `11111111`, `22222222`, `33333333`, `44444444`, `55555555`, `66666666`, `77777777`, `88888888`, `99999999`, `12345678`, `87654321`. | -| `user` | User data | variable | JSON string | max 1024 B | The user data is provided in the JSON format. This parameter is optional and depends on user's or manufacturer's purpose (or both). It is provided as a string from persistent storage and should be parsed in the user application. This data is not used by the Matter stack. | +| `user` | User data | variable | JSON string | max 1024 B | The user data is provided in the JSON format. This parameter is optional and depends on device manufacturer's purpose. It is provided as a CBOR map type from persistent storage and should be parsed in the user application. This data is not used by the Matter stack. To learn how to work with user data, see [How to set user data](#how-to-set-user-data) section. | ### Factory data format @@ -345,6 +347,89 @@ If the script finishes successfully, go to the location you provided with the > location as an existing file. To allow overwriting, add the `--overwrite` > option to the argument list of the Python script. +### How to set user data + +The user data is an optional field provided in the factory data JSON file and +depends on the manufacturer's purpose. The `user` field in a JSON factory data +file is represented by a flat JSON map and it can consist of `string` or `int32` +data types only. On the device side, the `user` data will be available as a CBOR +map containing all defined `string` and `int32` fields. + +To add user data as an argument to the +[generate_nrfconnect_chip_factory_data.py](../../scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py) +script, add the following line to the argument list: + +``` +--user-data {user data JSON} +``` + +As `user data JSON`, provide a flat JSON map with a value file that consists of +`string` or `int32` types. For example, you can use a JSON file that looks like +follows: + +``` +{ + "name": "product_name", + "version": 123, + "revision": "0x123" +} +``` + +When added to the argument line, the final result would look like follows: + +``` +--user-data '{"name": "product_name", "version": 123, "revision": "0x123"}' +``` + +#### How to handle user data + +The user data is not handled anywhere in the Matter stack, so you must handle it +in your application. To do this, you can use the +[Factory Data Provider](../../src/platform/nrfconnect/FactoryDataProvider.h) and +apply one of the following methods: + +- `GetUserData` method to obtain raw data in the CBOR format as a + `MutableByteSpan`. + +- `GetUserKey` method that lets you search along the user data list using a + specific key, and if the key exists in the user data, the method returns its + value. + +If you opt for `GetUserKey`, complete the following steps to set up the search: + +1. Add the `GetUserKey` method to your code. + +2. Given that all integer fields of the `user` Factory Data field are `int32`, + provide a buffer that has a size of at least `4B` or an `int32_t` variable to + `GetUserKey`. To read a string field from user data, the buffer should have a + size of at least the length of the expected string. + +3. Set it up to read all user data fields. + +Only after this setup is complete, can you use all variables in your code and +cast the result to your own purpose. + +The code example of how to read all fields from the JSON example one by one can +look like follows: + + ``` + chip::DeviceLayer::FactoryDataProvider factoryDataProvider; + + factoryDataProvider.Init(); + + uint8_t user_name[12]; + size_t name_len = sizeof(user_name); + factoryDataProvider.GetUserKey("name", user_name, name_len); + + int32_t version; + size_t version_len = sizeof(version); + factoryDataProvider.GetUserKey("version", &version, version_len); + + uint8_t revision[5]; + size_t revision_len = sizeof(revision); + factoryDataProvider.GetUserKey("revision", revision, revision_len); + ``` + ### Verifying using the JSON Schema tool The JSON file that contains factory data can be verified using the diff --git a/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb b/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb index cf2046aaebc0bd..48cac23fe3434b 100644 --- a/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb +++ b/docs/guides/repl/.ipynb_checkpoints/Matter - Basic Interactions-checkpoint.ipynb @@ -1414,7 +1414,7 @@ "│ │ │ <class 'chip.clusters.Objects.Basic.Attributes.ClusterRevision'>: 1\n", "│ │ },\n", "│ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor'>: {\n", - "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'>: [],\n", + "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'>: [],\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'>: True,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'>: <OTAUpdateStateEnum.kUnknown: 0>,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'>: 0,\n", @@ -2430,7 +2430,7 @@ "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Basic.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m,\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", + "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;92mTrue\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mOTAUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n", diff --git a/docs/guides/repl/Matter_Access_Control.ipynb b/docs/guides/repl/Matter_Access_Control.ipynb index 80dae46862b901..8bc0c44a72a5ac 100644 --- a/docs/guides/repl/Matter_Access_Control.ipynb +++ b/docs/guides/repl/Matter_Access_Control.ipynb @@ -500,10 +500,10 @@ } ], "source": [ - "acl = [ Clusters.AccessControl.Structs.AccessControlEntry(\n", + "acl = [ Clusters.AccessControl.Structs.AccessControlEntryStruct(\n", " fabricIndex = 1,\n", - " privilege = Clusters.AccessControl.Enums.Privilege.kAdminister,\n", - " authMode = Clusters.AccessControl.Enums.AuthMode.kCase,\n", + " privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister,\n", + " authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase,\n", " subjects = [ 1 ] ) \n", "]\n", "\n", @@ -729,10 +729,10 @@ } ], "source": [ - "acl.append(Clusters.AccessControl.Structs.AccessControlEntry(\n", + "acl.append(Clusters.AccessControl.Structs.AccessControlEntryStruct(\n", " fabricIndex = 1,\n", - " privilege = Clusters.AccessControl.Enums.Privilege.kOperate,\n", - " authMode = Clusters.AccessControl.Enums.AuthMode.kCase,\n", + " privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate,\n", + " authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase,\n", " targets = [ Clusters.AccessControl.Structs.Target(\n", " endpoint = 1,\n", " ) ] ) )\n", diff --git a/docs/guides/repl/Matter_Basic_Interactions.ipynb b/docs/guides/repl/Matter_Basic_Interactions.ipynb index 0693f197cdc8b9..12d9224ef48613 100644 --- a/docs/guides/repl/Matter_Basic_Interactions.ipynb +++ b/docs/guides/repl/Matter_Basic_Interactions.ipynb @@ -1407,7 +1407,7 @@ "│ │ │ <class 'chip.clusters.Objects.Basic.Attributes.ClusterRevision'>: 1\n", "│ │ },\n", "│ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor'>: {\n", - "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'>: [],\n", + "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'>: [],\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'>: True,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'>: <OTAUpdateStateEnum.kUnknown: 0>,\n", "│ │ │ <class 'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'>: 0,\n", @@ -2423,7 +2423,7 @@ "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.Basic.Attributes.ClusterRevision'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m1\u001b[0m\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m}\u001b[0m,\n", "\u001b[2;32m│ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m{\u001b[0m\n", - "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOtaProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", + "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.DefaultOTAProviders'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdatePossible'\u001b[0m\u001b[1m>\u001b[0m: \u001b[3;92mTrue\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateState'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1m<\u001b[0m\u001b[1;95mOTAUpdateStateEnum.kUnknown:\u001b[0m\u001b[39m \u001b[0m\u001b[1;36m0\u001b[0m\u001b[1m>\u001b[0m,\n", "\u001b[2;32m│ │ │ \u001b[0m\u001b[1m<\u001b[0m\u001b[1;95mclass\u001b[0m\u001b[39m \u001b[0m\u001b[32m'chip.clusters.Objects.OtaSoftwareUpdateRequestor.Attributes.UpdateStateProgress'\u001b[0m\u001b[1m>\u001b[0m: \u001b[1;36m0\u001b[0m,\n", 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 e5781c207776a5..1b1cf5d21d957d 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 @@ -57,12 +57,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -70,22 +70,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -96,7 +96,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -258,7 +258,7 @@ server cluster OnOff = 6 { readonly attribute int16u clusterRevision = 65533; request struct OffWithEffectRequest { - OnOffEffectIdentifier effectId = 0; + OnOffEffectIdentifier effectIdentifier = 0; OnOffDelayedAllOffEffectVariant effectVariant = 1; } @@ -396,7 +396,7 @@ server cluster BinaryInputBasic = 15 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -423,19 +423,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -443,9 +437,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -457,7 +457,7 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - fabric_scoped struct ExtensionEntry { + fabric_scoped struct AccessControlExtensionStruct { fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -466,7 +466,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -474,12 +474,12 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; - attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -636,8 +636,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -718,22 +718,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; OTAAnnouncementReason announcementReason = 2; optional OCTET_STRING<512> metadataForNode = 3; endpoint_no endpoint = 4; } - command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -862,6 +862,21 @@ server cluster PowerSource = 47 { kReplaceable = 0x8; } + info event WiredFaultChange = 0 { + WiredFault current[] = 0; + WiredFault previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFault current[] = 0; + BatFault previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFault current[] = 0; + BatChargeFault previous[] = 1; + } + readonly attribute PowerSourceStatus status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; @@ -964,7 +979,7 @@ server cluster NetworkCommissioning = 49 { bitmap WiFiSecurity : BITMAP8 { kUnencrypted = 0x1; - kWepPersonal = 0x2; + kWep = 0x2; kWpaPersonal = 0x4; kWpa2Personal = 0x8; kWpa3Personal = 0x10; @@ -1205,7 +1220,7 @@ server cluster SoftwareDiagnostics = 52 { kWaterMarks = 0x1; } - struct ThreadMetrics { + struct ThreadMetricsStruct { int64u id = 0; optional char_string<8> name = 1; optional int32u stackFreeCurrent = 2; @@ -1219,7 +1234,7 @@ server cluster SoftwareDiagnostics = 52 { optional OCTET_STRING faultRecording = 2; } - readonly attribute ThreadMetrics threadMetrics[] = 0; + readonly attribute ThreadMetricsStruct threadMetrics[] = 0; readonly attribute int64u currentHeapFree = 1; readonly attribute int64u currentHeapUsed = 2; readonly attribute int64u currentHeapHighWatermark = 3; @@ -1230,6 +1245,11 @@ server cluster SoftwareDiagnostics = 52 { } server cluster ThreadNetworkDiagnostics = 53 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + enum NetworkFault : ENUM8 { kUnspecified = 0; kLinkDown = 1; @@ -1247,11 +1267,6 @@ server cluster ThreadNetworkDiagnostics = 53 { kLeader = 6; } - enum ThreadConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - bitmap ThreadNetworkDiagnosticsFeature : BITMAP32 { kPacketCounts = 0x1; kErrorCounts = 0x2; @@ -1291,7 +1306,7 @@ server cluster ThreadNetworkDiagnostics = 53 { struct SecurityPolicy { int16u rotationTime = 0; - bitmap16 flags = 1; + int16u flags = 1; } struct OperationalDatasetComponents { @@ -1310,7 +1325,7 @@ server cluster ThreadNetworkDiagnostics = 53 { } info event ConnectionStatus = 0 { - ThreadConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } info event NetworkFaultChange = 1 { @@ -1325,8 +1340,8 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; readonly attribute int64u overrunCount = 6; - readonly attribute NeighborTable neighborTableList[] = 7; - readonly attribute RouteTable routeTableList[] = 8; + readonly attribute NeighborTable neighborTable[] = 7; + readonly attribute RouteTable routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; readonly attribute nullable int8u weighting = 10; readonly attribute nullable int8u dataVersion = 11; @@ -1410,12 +1425,12 @@ server cluster WiFiNetworkDiagnostics = 54 { } enum WiFiVersionType : ENUM8 { - k80211a = 0; - k80211b = 1; - k80211g = 2; - k80211n = 3; - k80211ac = 4; - k80211ax = 5; + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; } info event Disconnection = 0 { @@ -3947,7 +3962,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; @@ -4058,8 +4073,8 @@ endpoint 0 { callback attribute extendedPanId; callback attribute meshLocalPrefix; callback attribute overrunCount; - callback attribute neighborTableList; - callback attribute routeTableList; + callback attribute neighborTable; + callback attribute routeTable; callback attribute partitionId; callback attribute weighting; callback attribute dataVersion; 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 d0874dec15e8e4..0b9943b52dcd26 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 @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -1663,7 +1663,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1699,7 +1699,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", @@ -3745,7 +3745,7 @@ "enabled": 1, "attributes": [ { - "name": "channel", + "name": "Channel", "code": 0, "mfgCode": null, "side": "server", @@ -3857,7 +3857,7 @@ "reportableChange": 0 }, { - "name": "NeighborTableList", + "name": "NeighborTable", "code": 7, "mfgCode": null, "side": "server", @@ -3873,7 +3873,7 @@ "reportableChange": 0 }, { - "name": "RouteTableList", + "name": "RouteTable", "code": 8, "mfgCode": null, "side": "server", @@ -3905,7 +3905,7 @@ "reportableChange": 0 }, { - "name": "weighting", + "name": "Weighting", "code": 10, "mfgCode": null, "side": "server", @@ -4831,7 +4831,7 @@ "enabled": 1, "attributes": [ { - "name": "bssid", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", @@ -4895,7 +4895,7 @@ "reportableChange": 0 }, { - "name": "Rssi", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 67a1845de00639..380cf4bd62c117 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -142,7 +142,9 @@ static void InitServer(intptr_t context) PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); } +#if CONFIG_ENABLE_CHIP_SHELL InitBindingHandler(); +#endif } extern "C" void ChipTest(void) diff --git a/examples/all-clusters-app/ameba/main/include/OnOffCommands.h b/examples/all-clusters-app/ameba/main/include/OnOffCommands.h index 47dfe5698de4aa..02b77ed029284d 100644 --- a/examples/all-clusters-app/ameba/main/include/OnOffCommands.h +++ b/examples/all-clusters-app/ameba/main/include/OnOffCommands.h @@ -124,8 +124,8 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin break; case Clusters::OnOff::Commands::OffWithEffect::Id: - offwitheffectCommand.effectId = static_cast(data->args[0]); - offwitheffectCommand.effectVariant = static_cast(data->args[1]); + offwitheffectCommand.effectIdentifier = static_cast(data->args[0]); + offwitheffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, offwitheffectCommand, onSuccess, onFailure); break; @@ -171,8 +171,8 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi break; case Clusters::OnOff::Commands::OffWithEffect::Id: - offwitheffectCommand.effectId = static_cast(data->args[0]); - offwitheffectCommand.effectVariant = static_cast(data->args[1]); + offwitheffectCommand.effectIdentifier = static_cast(data->args[0]); + offwitheffectCommand.effectVariant = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offwitheffectCommand); break; diff --git a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp index edaa86e44d5125..0ab2703cb268b2 100644 --- a/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp +++ b/examples/all-clusters-app/nrfconnect/main/ZclDoorLockCallbacks.cpp @@ -26,7 +26,7 @@ using namespace ::chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::DoorLock; -LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); // Provided some empty callbacks and replaced feature map // to simulate DoorLock endpoint for All-Clusters-App example diff --git a/examples/all-clusters-app/nrfconnect/prj.conf b/examples/all-clusters-app/nrfconnect/prj.conf index ee2bee67b64ce4..51d5dd89c68a5f 100644 --- a/examples/all-clusters-app/nrfconnect/prj.conf +++ b/examples/all-clusters-app/nrfconnect/prj.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable OTA requestor CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/all-clusters-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-app/nrfconnect/prj_dfu.conf index b91bf3fa8298a6..c0d47e635ed406 100644 --- a/examples/all-clusters-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-app/nrfconnect/prj_dfu.conf @@ -35,7 +35,8 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n -# reduce application size by disabling including assertions in the output file. +# Reduce application size +CONFIG_USE_SEGGER_RTT=n CONFIG_ASSERT_VERBOSE=n CONFIG_ASSERT_NO_FILE_INFO=y CONFIG_ASSERT_NO_COND_INFO=y diff --git a/examples/all-clusters-app/nrfconnect/prj_release.conf b/examples/all-clusters-app/nrfconnect/prj_release.conf index 5816426f0fc09e..b229f68b308b9d 100644 --- a/examples/all-clusters-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-app/nrfconnect/prj_release.conf @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters" CONFIG_RESET_ON_FATAL_ERROR=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/all-clusters-app/telink/include/AppEvent.h b/examples/all-clusters-app/telink/include/AppEvent.h index 000f3e8653d3ff..54250995e06ca8 100644 --- a/examples/all-clusters-app/telink/include/AppEvent.h +++ b/examples/all-clusters-app/telink/include/AppEvent.h @@ -23,11 +23,15 @@ struct AppEvent; typedef void (*EventHandler)(AppEvent *); +class LEDWidget; + struct AppEvent { enum AppEventTypes { kEventType_Button = 0, + kEventType_Timer, + kEventType_UpdateLedState, }; uint16_t Type; @@ -38,6 +42,14 @@ struct AppEvent { uint8_t Action; } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + LEDWidget * LedWidget; + } UpdateLedStateEvent; }; EventHandler Handler; diff --git a/examples/all-clusters-app/telink/include/AppTask.h b/examples/all-clusters-app/telink/include/AppTask.h index d893794235fb47..7787968458b867 100644 --- a/examples/all-clusters-app/telink/include/AppTask.h +++ b/examples/all-clusters-app/telink/include/AppTask.h @@ -19,6 +19,7 @@ #pragma once #include "AppEvent.h" +#include "LEDWidget.h" #include @@ -43,15 +44,20 @@ class AppTask void DispatchEvent(AppEvent * event); static void UpdateStatusLED(); + static void LEDStateUpdateHandler(LEDWidget * ledWidget); static void FactoryResetButtonEventHandler(void); static void StartThreadButtonEventHandler(void); static void StartBleAdvButtonEventHandler(void); static void ChipEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + static void FactoryResetTimerTimeoutCallback(k_timer * timer); + + static void FactoryResetTimerEventHandler(AppEvent * aEvent); static void FactoryResetHandler(AppEvent * aEvent); static void StartThreadHandler(AppEvent * aEvent); static void StartBleAdvHandler(AppEvent * aEvent); + static void UpdateLedStateEventHandler(AppEvent * aEvent); static void InitButtons(void); diff --git a/examples/all-clusters-app/telink/src/AppTask.cpp b/examples/all-clusters-app/telink/src/AppTask.cpp index f5b8cac574c23a..9f831beecfaf9b 100644 --- a/examples/all-clusters-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-app/telink/src/AppTask.cpp @@ -21,7 +21,6 @@ #include "AppConfig.h" #include "AppEvent.h" #include "ButtonManager.h" -#include "LEDWidget.h" #include "binding-handler.h" #include #include @@ -48,12 +47,13 @@ LOG_MODULE_DECLARE(app); namespace { - -constexpr int kAppEventQueueSize = 10; -constexpr uint8_t kButtonPushEvent = 1; -constexpr uint8_t kButtonReleaseEvent = 0; +constexpr int kFactoryResetTriggerTimeout = 2000; +constexpr int kAppEventQueueSize = 10; +constexpr uint8_t kButtonPushEvent = 1; +constexpr uint8_t kButtonReleaseEvent = 0; K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), kAppEventQueueSize, alignof(AppEvent)); +k_timer sFactoryResetTimer; LEDWidget sStatusLED; @@ -61,10 +61,11 @@ Button sFactoryResetButton; Button sThreadStartButton; Button sBleAdvStartButton; -bool sIsThreadProvisioned = false; -bool sIsThreadEnabled = false; -bool sIsThreadAttached = false; -bool sHaveBLEConnections = false; +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sIsThreadAttached = false; +bool sHaveBLEConnections = false; +bool sIsFactoryResetTimerActive = false; chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; @@ -108,6 +109,17 @@ using namespace ::chip::DeviceLayer::Internal; AppTask AppTask::sAppTask; +class AppFabricTableDelegate : public FabricTable::Delegate +{ + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) + { + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + chip::Server::GetInstance().ScheduleFactoryReset(); + } + } +}; + constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; CHIP_ERROR AppTask::Init() @@ -118,12 +130,17 @@ CHIP_ERROR AppTask::Init() // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); + LEDWidget::SetStateUpdateCallback(LEDStateUpdateHandler); sStatusLED.Init(SYSTEM_STATE_LED_PIN); UpdateStatusLED(); InitButtons(); + // Initialize function button timer + k_timer_init(&sFactoryResetTimer, &AppTask::FactoryResetTimerTimeoutCallback, nullptr); + k_timer_user_data_set(&sFactoryResetTimer, this); + // Init ZCL Data Model and start server static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -168,6 +185,13 @@ CHIP_ERROR AppTask::Init() return ret; } + ret = chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(new AppFabricTableDelegate); + if (ret != CHIP_NO_ERROR) + { + LOG_ERR("AppFabricTableDelegate fail"); + return ret; + } + return CHIP_NO_ERROR; } @@ -192,8 +216,6 @@ CHIP_ERROR AppTask::StartApp() DispatchEvent(&event); ret = k_msgq_get(&sAppEventQueue, &event, K_NO_WAIT); } - - sStatusLED.Animate(); } } @@ -209,8 +231,16 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("FactoryResetHandler"); - chip::Server::GetInstance().ScheduleFactoryReset(); + if (!sIsFactoryResetTimerActive) + { + k_timer_start(&sFactoryResetTimer, K_MSEC(kFactoryResetTriggerTimeout), K_NO_WAIT); + sIsFactoryResetTimerActive = true; + } + else + { + k_timer_stop(&sFactoryResetTimer); + sIsFactoryResetTimerActive = false; + } } void AppTask::StartThreadButtonEventHandler(void) @@ -272,6 +302,23 @@ void AppTask::StartBleAdvHandler(AppEvent * aEvent) } } +void AppTask::UpdateLedStateEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type == AppEvent::kEventType_UpdateLedState) + { + aEvent->UpdateLedStateEvent.LedWidget->UpdateState(); + } +} + +void AppTask::LEDStateUpdateHandler(LEDWidget * ledWidget) +{ + AppEvent event; + event.Type = AppEvent::kEventType_UpdateLedState; + event.Handler = UpdateLedStateEventHandler; + event.UpdateLedStateEvent.LedWidget = ledWidget; + sAppTask.PostEvent(&event); +} + void AppTask::UpdateStatusLED() { if (sIsThreadProvisioned && sIsThreadEnabled) @@ -342,11 +389,36 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } } +void AppTask::FactoryResetTimerTimeoutCallback(k_timer * timer) +{ + if (!timer) + { + return; + } + + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = FactoryResetTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FactoryResetTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + sIsFactoryResetTimerActive = false; + LOG_INF("FactoryResetHandler"); + chip::Server::GetInstance().ScheduleFactoryReset(); +} + void AppTask::InitButtons(void) { - sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, FactoryResetButtonEventHandler); - sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, StartThreadButtonEventHandler); - sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, StartBleAdvButtonEventHandler); + sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, true, FactoryResetButtonEventHandler); + sThreadStartButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_2, false, StartThreadButtonEventHandler); + sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, false, StartBleAdvButtonEventHandler); ButtonManagerInst().AddButton(sFactoryResetButton); ButtonManagerInst().AddButton(sThreadStartButton); 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 288a32def968f1..2f9b9fe2974a43 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 @@ -51,12 +51,12 @@ server cluster Groups = 4 { readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } request struct ViewGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct GetGroupMembershipRequest { @@ -64,22 +64,22 @@ server cluster Groups = 4 { } request struct RemoveGroupRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct AddGroupIfIdentifyingRequest { - group_id groupId = 0; + group_id groupID = 0; CHAR_STRING groupName = 1; } response struct AddGroupResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct ViewGroupResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; CHAR_STRING groupName = 2; } @@ -90,7 +90,7 @@ server cluster Groups = 4 { response struct RemoveGroupResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; @@ -346,7 +346,7 @@ server cluster LevelControl = 8 { server cluster Descriptor = 29 { struct DeviceTypeStruct { - devtype_id type = 0; + devtype_id deviceType = 0; int16u revision = 1; } @@ -373,19 +373,13 @@ server cluster Binding = 30 { } server cluster AccessControl = 31 { - enum AuthMode : ENUM8 { + enum AccessControlEntryAuthModeEnum : ENUM8 { kPase = 1; kCase = 2; kGroup = 3; } - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - enum Privilege : ENUM8 { + enum AccessControlEntryPrivilegeEnum : ENUM8 { kView = 1; kProxyView = 2; kOperate = 3; @@ -393,9 +387,15 @@ server cluster AccessControl = 31 { kAdminister = 5; } - fabric_scoped struct AccessControlEntry { - fabric_sensitive Privilege privilege = 1; - fabric_sensitive AuthMode authMode = 2; + enum ChangeTypeEnum : ENUM8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; nullable fabric_sensitive int64u subjects[] = 3; nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; @@ -411,7 +411,7 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable AccessControlEntry latestValue = 4; + nullable AccessControlEntryStruct latestValue = 4; fabric_idx fabricIndex = 254; } @@ -419,11 +419,11 @@ server cluster AccessControl = 31 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; - nullable ExtensionEntry latestValue = 4; + nullable AccessControlExtensionStruct latestValue = 4; fabric_idx fabricIndex = 254; } - attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; @@ -571,8 +571,8 @@ client cluster OtaSoftwareUpdateProvider = 41 { readonly attribute int16u clusterRevision = 65533; request struct QueryImageRequest { - vendor_id vendorId = 0; - INT16U productId = 1; + vendor_id vendorID = 0; + INT16U productID = 1; INT32U softwareVersion = 2; OTADownloadProtocol protocolsSupported[] = 3; optional INT16U hardwareVersion = 4; @@ -653,22 +653,22 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; + attribute ProviderLocation defaultOTAProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct AnnounceOtaProviderRequest { - node_id providerNodeId = 0; - vendor_id vendorId = 1; + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; OTAAnnouncementReason announcementReason = 2; optional OCTET_STRING<512> metadataForNode = 3; endpoint_no endpoint = 4; } - command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } server cluster LocalizationConfiguration = 43 { @@ -794,6 +794,21 @@ server cluster PowerSource = 47 { kReplaceable = 0x8; } + info event WiredFaultChange = 0 { + WiredFault current[] = 0; + WiredFault previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFault current[] = 0; + BatFault previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFault current[] = 0; + BatChargeFault previous[] = 1; + } + readonly attribute PowerSourceStatus status = 0; readonly attribute int8u order = 1; readonly attribute char_string<60> description = 2; @@ -893,7 +908,7 @@ server cluster NetworkCommissioning = 49 { bitmap WiFiSecurity : BITMAP8 { kUnencrypted = 0x1; - kWepPersonal = 0x2; + kWep = 0x2; kWpaPersonal = 0x4; kWpa2Personal = 0x8; kWpa3Personal = 0x10; @@ -1139,6 +1154,11 @@ server cluster SoftwareDiagnostics = 52 { } server cluster ThreadNetworkDiagnostics = 53 { + enum ConnectionStatusEnum : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + enum NetworkFault : ENUM8 { kUnspecified = 0; kLinkDown = 1; @@ -1156,11 +1176,6 @@ server cluster ThreadNetworkDiagnostics = 53 { kLeader = 6; } - enum ThreadConnectionStatus : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - bitmap ThreadNetworkDiagnosticsFeature : BITMAP32 { kPacketCounts = 0x1; kErrorCounts = 0x2; @@ -1200,7 +1215,7 @@ server cluster ThreadNetworkDiagnostics = 53 { struct SecurityPolicy { int16u rotationTime = 0; - bitmap16 flags = 1; + int16u flags = 1; } struct OperationalDatasetComponents { @@ -1219,7 +1234,7 @@ server cluster ThreadNetworkDiagnostics = 53 { } info event ConnectionStatus = 0 { - ThreadConnectionStatus connectionStatus = 0; + ConnectionStatusEnum connectionStatus = 0; } info event NetworkFaultChange = 1 { @@ -1233,8 +1248,8 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute nullable int16u panId = 3; readonly attribute nullable int64u extendedPanId = 4; readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute NeighborTable neighborTableList[] = 7; - readonly attribute RouteTable routeTableList[] = 8; + readonly attribute NeighborTable neighborTable[] = 7; + readonly attribute RouteTable routeTable[] = 8; readonly attribute nullable int32u partitionId = 9; readonly attribute nullable int8u weighting = 10; readonly attribute nullable int8u dataVersion = 11; @@ -1271,12 +1286,12 @@ server cluster WiFiNetworkDiagnostics = 54 { } enum WiFiVersionType : ENUM8 { - k80211a = 0; - k80211b = 1; - k80211g = 2; - k80211n = 3; - k80211ac = 4; - k80211ax = 5; + kA = 0; + kB = 1; + kG = 2; + kN = 3; + kAc = 4; + kAx = 5; } info event Disconnection = 0 { @@ -3328,7 +3343,7 @@ endpoint 0 { } server cluster OtaSoftwareUpdateRequestor { - callback attribute defaultOtaProviders; + callback attribute defaultOTAProviders; ram attribute updatePossible default = 1; ram attribute updateState; ram attribute updateStateProgress; @@ -3422,8 +3437,8 @@ endpoint 0 { callback attribute panId; callback attribute extendedPanId; callback attribute meshLocalPrefix; - callback attribute neighborTableList; - callback attribute routeTableList; + callback attribute neighborTable; + callback attribute routeTable; callback attribute partitionId; callback attribute weighting; callback attribute dataVersion; 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 a9d16f86c65d19..73ab88c4af843a 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 @@ -1663,7 +1663,7 @@ "enabled": 0, "commands": [ { - "name": "AnnounceOtaProvider", + "name": "AnnounceOTAProvider", "code": 0, "mfgCode": null, "source": "client", @@ -1699,7 +1699,7 @@ "enabled": 1, "attributes": [ { - "name": "DefaultOtaProviders", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", @@ -3745,7 +3745,7 @@ "enabled": 1, "attributes": [ { - "name": "channel", + "name": "Channel", "code": 0, "mfgCode": null, "side": "server", @@ -3857,7 +3857,7 @@ "reportableChange": 0 }, { - "name": "NeighborTableList", + "name": "NeighborTable", "code": 7, "mfgCode": null, "side": "server", @@ -3873,7 +3873,7 @@ "reportableChange": 0 }, { - "name": "RouteTableList", + "name": "RouteTable", "code": 8, "mfgCode": null, "side": "server", @@ -3905,7 +3905,7 @@ "reportableChange": 0 }, { - "name": "weighting", + "name": "Weighting", "code": 10, "mfgCode": null, "side": "server", @@ -4831,7 +4831,7 @@ "enabled": 1, "attributes": [ { - "name": "bssid", + "name": "BSSID", "code": 0, "mfgCode": null, "side": "server", @@ -4895,7 +4895,7 @@ "reportableChange": 0 }, { - "name": "Rssi", + "name": "RSSI", "code": 4, "mfgCode": null, "side": "server", diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj.conf b/examples/all-clusters-minimal-app/nrfconnect/prj.conf index 2c2c8d2fc81c28..c33baaa8d79761 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj.conf @@ -36,6 +36,9 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n +# Reduce application size +CONFIG_USE_SEGGER_RTT=n + # Disable OTA requestor CONFIG_CHIP_OTA_REQUESTOR=n diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf index 292d7a086d4e89..6effabf6914a9b 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_dfu.conf @@ -36,7 +36,8 @@ CONFIG_THREAD_NAME=y CONFIG_MPU_STACK_GUARD=y CONFIG_RESET_ON_FATAL_ERROR=n -# reduce application size by disabling including assertions in the output file. +# Reduce application size +CONFIG_USE_SEGGER_RTT=n CONFIG_ASSERT_VERBOSE=n CONFIG_ASSERT_NO_FILE_INFO=y CONFIG_ASSERT_NO_COND_INFO=y diff --git a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf index 33cd3f38589653..8029f55a1e31f4 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf +++ b/examples/all-clusters-minimal-app/nrfconnect/prj_release.conf @@ -35,6 +35,7 @@ CONFIG_BT_DEVICE_NAME="AllClusters" CONFIG_RESET_ON_FATAL_ERROR=y # Disable all debug features +CONFIG_USE_SEGGER_RTT=n CONFIG_SHELL=n CONFIG_OPENTHREAD_SHELL=n CONFIG_CONSOLE=n diff --git a/examples/all-clusters-minimal-app/telink/include/AppEvent.h b/examples/all-clusters-minimal-app/telink/include/AppEvent.h index 000f3e8653d3ff..54250995e06ca8 100644 --- a/examples/all-clusters-minimal-app/telink/include/AppEvent.h +++ b/examples/all-clusters-minimal-app/telink/include/AppEvent.h @@ -23,11 +23,15 @@ struct AppEvent; typedef void (*EventHandler)(AppEvent *); +class LEDWidget; + struct AppEvent { enum AppEventTypes { kEventType_Button = 0, + kEventType_Timer, + kEventType_UpdateLedState, }; uint16_t Type; @@ -38,6 +42,14 @@ struct AppEvent { uint8_t Action; } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + LEDWidget * LedWidget; + } UpdateLedStateEvent; }; EventHandler Handler; diff --git a/examples/all-clusters-minimal-app/telink/include/AppTask.h b/examples/all-clusters-minimal-app/telink/include/AppTask.h index d6a02734a40e74..7d0168759055d0 100644 --- a/examples/all-clusters-minimal-app/telink/include/AppTask.h +++ b/examples/all-clusters-minimal-app/telink/include/AppTask.h @@ -19,6 +19,7 @@ #pragma once #include "AppEvent.h" +#include "LEDWidget.h" #include @@ -43,13 +44,18 @@ class AppTask void DispatchEvent(AppEvent * event); static void UpdateStatusLED(); + static void LEDStateUpdateHandler(LEDWidget * ledWidget); static void FactoryResetButtonEventHandler(void); static void StartBleAdvButtonEventHandler(void); static void ChipEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + static void FactoryResetTimerTimeoutCallback(k_timer * timer); + + static void FactoryResetTimerEventHandler(AppEvent * aEvent); static void FactoryResetHandler(AppEvent * aEvent); static void StartBleAdvHandler(AppEvent * aEvent); + static void UpdateLedStateEventHandler(AppEvent * aEvent); static void InitButtons(void); diff --git a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp index 8ecf29eda06939..4d0f29cb87efea 100644 --- a/examples/all-clusters-minimal-app/telink/src/AppTask.cpp +++ b/examples/all-clusters-minimal-app/telink/src/AppTask.cpp @@ -21,7 +21,6 @@ #include "AppConfig.h" #include "AppEvent.h" #include "ButtonManager.h" -#include "LEDWidget.h" #include "binding-handler.h" #include #include @@ -45,22 +44,24 @@ LOG_MODULE_DECLARE(app); namespace { - -constexpr int kAppEventQueueSize = 10; -constexpr uint8_t kButtonPushEvent = 1; -constexpr uint8_t kButtonReleaseEvent = 0; +constexpr int kFactoryResetTriggerTimeout = 2000; +constexpr int kAppEventQueueSize = 10; +constexpr uint8_t kButtonPushEvent = 1; +constexpr uint8_t kButtonReleaseEvent = 0; K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), kAppEventQueueSize, alignof(AppEvent)); +k_timer sFactoryResetTimer; LEDWidget sStatusLED; Button sFactoryResetButton; Button sBleAdvStartButton; -bool sIsThreadProvisioned = false; -bool sIsThreadEnabled = false; -bool sIsThreadAttached = false; -bool sHaveBLEConnections = false; +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sIsThreadAttached = false; +bool sHaveBLEConnections = false; +bool sIsFactoryResetTimerActive = false; } // namespace @@ -71,6 +72,17 @@ using namespace ::chip::DeviceLayer::Internal; AppTask AppTask::sAppTask; +class AppFabricTableDelegate : public FabricTable::Delegate +{ + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) + { + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + chip::Server::GetInstance().ScheduleFactoryReset(); + } + } +}; + constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; CHIP_ERROR AppTask::Init() @@ -81,12 +93,17 @@ CHIP_ERROR AppTask::Init() // Initialize status LED LEDWidget::InitGpio(SYSTEM_STATE_LED_PORT); + LEDWidget::SetStateUpdateCallback(LEDStateUpdateHandler); sStatusLED.Init(SYSTEM_STATE_LED_PIN); UpdateStatusLED(); InitButtons(); + // Initialize function button timer + k_timer_init(&sFactoryResetTimer, &AppTask::FactoryResetTimerTimeoutCallback, nullptr); + k_timer_user_data_set(&sFactoryResetTimer, this); + // Init ZCL Data Model and start server static chip::CommonCaseDeviceServerInitParams initParams; (void) initParams.InitializeStaticResourcesBeforeServerInit(); @@ -128,6 +145,13 @@ CHIP_ERROR AppTask::Init() return ret; } + ret = chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(new AppFabricTableDelegate); + if (ret != CHIP_NO_ERROR) + { + LOG_ERR("AppFabricTableDelegate fail"); + return ret; + } + return CHIP_NO_ERROR; } @@ -152,8 +176,6 @@ CHIP_ERROR AppTask::StartApp() DispatchEvent(&event); ret = k_msgq_get(&sAppEventQueue, &event, K_NO_WAIT); } - - sStatusLED.Animate(); } } @@ -169,8 +191,16 @@ void AppTask::FactoryResetButtonEventHandler(void) void AppTask::FactoryResetHandler(AppEvent * aEvent) { - LOG_INF("FactoryResetHandler"); - chip::Server::GetInstance().ScheduleFactoryReset(); + if (!sIsFactoryResetTimerActive) + { + k_timer_start(&sFactoryResetTimer, K_MSEC(kFactoryResetTriggerTimeout), K_NO_WAIT); + sIsFactoryResetTimerActive = true; + } + else + { + k_timer_stop(&sFactoryResetTimer); + sIsFactoryResetTimerActive = false; + } } void AppTask::StartBleAdvButtonEventHandler(void) @@ -206,6 +236,23 @@ void AppTask::StartBleAdvHandler(AppEvent * aEvent) } } +void AppTask::UpdateLedStateEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type == AppEvent::kEventType_UpdateLedState) + { + aEvent->UpdateLedStateEvent.LedWidget->UpdateState(); + } +} + +void AppTask::LEDStateUpdateHandler(LEDWidget * ledWidget) +{ + AppEvent event; + event.Type = AppEvent::kEventType_UpdateLedState; + event.Handler = UpdateLedStateEventHandler; + event.UpdateLedStateEvent.LedWidget = ledWidget; + sAppTask.PostEvent(&event); +} + void AppTask::UpdateStatusLED() { if (sIsThreadProvisioned && sIsThreadEnabled) @@ -276,10 +323,35 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } } +void AppTask::FactoryResetTimerTimeoutCallback(k_timer * timer) +{ + if (!timer) + { + return; + } + + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = FactoryResetTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FactoryResetTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + sIsFactoryResetTimerActive = false; + LOG_INF("FactoryResetHandler"); + chip::Server::GetInstance().ScheduleFactoryReset(); +} + void AppTask::InitButtons(void) { - sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, FactoryResetButtonEventHandler); - sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, StartBleAdvButtonEventHandler); + sFactoryResetButton.Configure(BUTTON_PORT, BUTTON_PIN_3, BUTTON_PIN_1, true, FactoryResetButtonEventHandler); + sBleAdvStartButton.Configure(BUTTON_PORT, BUTTON_PIN_4, BUTTON_PIN_2, false, StartBleAdvButtonEventHandler); ButtonManagerInst().AddButton(sFactoryResetButton); ButtonManagerInst().AddButton(sBleAdvStartButton); diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt index ce37951915e283..e7005477deb898 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt @@ -44,6 +44,7 @@ import com.google.chip.chiptool.provisioning.AddressCommissioningFragment import com.google.chip.chiptool.provisioning.DeviceProvisioningFragment import com.google.chip.chiptool.provisioning.EnterNetworkFragment import com.google.chip.chiptool.provisioning.ProvisionNetworkType +import com.google.chip.chiptool.provisioning.UnpairDeviceFragment import com.google.chip.chiptool.setuppayloadscanner.BarcodeFragment import com.google.chip.chiptool.setuppayloadscanner.CHIPDeviceDetailsFragment import com.google.chip.chiptool.setuppayloadscanner.CHIPDeviceInfo @@ -191,6 +192,10 @@ class CHIPToolActivity : showFragment(BarcodeFragment.newInstance()) } + override fun handleUnpairDeviceClicked() { + showFragment(UnpairDeviceFragment.newInstance()) + } + private fun showFragment(fragment: Fragment, showOnBack: Boolean = true) { val fragmentTransaction = supportFragmentManager .beginTransaction() diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt index 263e979bb12b28..4816469c187f61 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt @@ -60,6 +60,7 @@ class SelectActionFragment : Fragment() { clusterInteractionBtn.setOnClickListener { getCallback()?.handleClusterInteractionClicked() } provisionCustomFlowBtn.setOnClickListener{ getCallback()?.handleCustomFlowClicked() } wildcardBtn.setOnClickListener { getCallback()?.handleWildcardClicked() } + unpairDeviceBtn.setOnClickListener{ getCallback()?.handleUnpairDeviceClicked() } } } @@ -157,6 +158,8 @@ class SelectActionFragment : Fragment() { fun handleWildcardClicked() /** Notifies listener of provision-custom-flow button click. */ fun handleCustomFlowClicked() + /** Notifies listener of unpair button click. */ + fun handleUnpairDeviceClicked() } companion object { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/UnpairDeviceFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/UnpairDeviceFragment.kt new file mode 100644 index 00000000000000..801d4fc1272836 --- /dev/null +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/UnpairDeviceFragment.kt @@ -0,0 +1,60 @@ +package com.google.chip.chiptool.provisioning + +import android.os.Bundle +import android.util.Log +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.Fragment +import androidx.lifecycle.lifecycleScope +import chip.devicecontroller.ChipDeviceController +import chip.devicecontroller.UnpairDeviceCallback +import com.google.chip.chiptool.ChipClient +import com.google.chip.chiptool.R +import com.google.chip.chiptool.clusterclient.AddressUpdateFragment +import kotlinx.android.synthetic.main.unpair_device_fragment.view.unpairDeviceBtn +import kotlinx.coroutines.* + +class UnpairDeviceFragment : Fragment() { + private val deviceController: ChipDeviceController + get() = ChipClient.getDeviceController(requireContext()) + + private lateinit var scope: CoroutineScope + + private lateinit var addressUpdateFragment: AddressUpdateFragment + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View { + scope = viewLifecycleOwner.lifecycleScope + + return inflater.inflate(R.layout.unpair_device_fragment, container, false).apply { + addressUpdateFragment = + childFragmentManager.findFragmentById(R.id.addressUpdateFragment) as AddressUpdateFragment + + unpairDeviceBtn.setOnClickListener { scope.launch { unpairDeviceClick() } } + } + } + + inner class ChipUnpairDeviceCallback : UnpairDeviceCallback { + override fun onError(status: Int, remoteDeviceId: Long) { + Log.d(TAG, "onError : $remoteDeviceId, $status") + } + + override fun onSuccess(remoteDeviceId: Long) { + Log.d(TAG, "onSuccess : $remoteDeviceId") + } + } + + private fun unpairDeviceClick() { + deviceController.unpairDeviceCallback(addressUpdateFragment.deviceId, ChipUnpairDeviceCallback()) + } + + + companion object { + private const val TAG = "UnpairDeviceFragment" + fun newInstance(): UnpairDeviceFragment = UnpairDeviceFragment() + } +} diff --git a/examples/android/CHIPTool/app/src/main/res/layout/select_action_fragment.xml b/examples/android/CHIPTool/app/src/main/res/layout/select_action_fragment.xml index 3098a324158270..cfc6b90be5853b 100644 --- a/examples/android/CHIPTool/app/src/main/res/layout/select_action_fragment.xml +++ b/examples/android/CHIPTool/app/src/main/res/layout/select_action_fragment.xml @@ -104,6 +104,14 @@ android:layout_marginTop="8dp" android:text="@string/cluster_interaction_tool" /> +