From 6e8676be6142bb541fa68048c77f2fc56a21c7b1 Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Wed, 29 Jan 2025 05:57:11 +0100 Subject: [PATCH 1/8] Update of nRF Connect SDK version to the 2.9.0 (#37105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Zephyr] Add ZMS to Zephyr port Added a possibility to use ZMS fs backend in Zephyr. NVS fs backend imply is now controlled by the nrfconnect platform configuration directly. All other platforms use NVS fs backend by default. Signed-off-by: Arkadiusz Balys [nrf toup] Fix defines for ZMS It can be squashed with the 0c49058 commit. Signed-off-by: Arkadiusz Balys * [Zephyr] Fix ICD LIT connected configurations According to specification, if ICD LIT is supported, UAT and LITS features must be supported too. If `CHIP_ICD_LIT_SUPPORT` is selected, select CIP and UAT configs instead of implying them. Signed-off-by: Maciej Baczmanski * [nrfconnect] Introduced Kconfigs to configure few params Introduced new Kconfig options to be able to configure the parameters related to persistent subscriptions re-establishment. Signed-off-by: Kamil Kasperczyk [nrfconnect] Added module to synchronize DFU processes Introduced a module that can be used to synchronize DFU processes and make it mutual exclusive (prevent concurrent DFU runs using different protocols, e.g Matter OTA and DFU over BT SMP). Signed-off-by: Kamil Kasperczyk [nrfconnect] Implement IPv6 agnostic L2 network state getters * Added new API for generic IPv6 connectivity checks * This patch allows the application layer to limit the amount of pre-processor logic (CONFIG_NET_L2_OPENTHREAD/CONFIG_CHIP_WIFI) needed to configure the Signed-off-by: Marcin Kajor [nrfconnect] Added support for settings shell in mem profiling Enabled settings shell configuration and increased shell command buffer size when `CHIP_MEMORY_PROFILING` is enabled to allow reading and writing settings using shell. Signed-off-by: Maciej Baczmanski [nrfconnect] Introduced Kconfig to configure CHIP stack size There is not Kconfig that would allow to set the CHIP task size, what is not convenient, as other stacks can be configured using Kconfig. [nrfconnect] Added log for the WiFi connection failure This might help when debugging the WiFi connection failures. Signed-off-by: Marcin Kajor [nrfconnect] Refactor ExternalFlashManager Make `ExternalFlashManager` a singleton Signed-off-by: Maciej Baczmanski [nrfconnect] Increase workqueue stack size for LIT Whien LIT is enabled, higher workqueue stack size is required when entering active mode. Signed-off-by: Maciej Baczmanski [nrfconnect] Switch to nRF54L15 DK - Removed support for nRF54L15 PDK and added for nRF54L15 DK [nrfconnect] wifi: Migrate to nRF70 upstream nRF70 support moved upstream, update the names. Signed-off-by: Chaitanya Tata [nrfconnect] matter: crypto: Use psa_crypto_config -Previously there was a library called mbedcrypto_common which was used to pass build-related configurations to matter. This is changed to instead reference to the following: -psa_crypto_config (for PSA and Mbed TLS configurations) -psa_interface (for PSA crypto include files) -The commit also removes passing the PSA crypto driver config file as this is no longer needed for an interface build (call from matter) Signed-off-by: Frank Audun Kvamtrø [nrfconnect] Fixed mbedtls configs selection The updated way of handling mbedtls config file is done correctly only for TF-M builds, but without it some of the files are missing Signed-off-by: Kamil Kasperczyk [nrfconnect] Disable unsupported SHELL_WILDCARD SHELL_WILDCARD is not supported for Matter devices in the newest Zephyr version because it selects POSIX_C_LIB_EXT, so we need to disable it. [nrfconnect] Enable SPI for nRF54L15DK NS build Added nRF54L15 DK NS to configuration. Signed-off-by: Arkadiusz Balys [nrfconnect] config: align the MCUmgr Bluetooth transport Kconfig Aligned the MCUmgr Bluetooth transport Kconfig with the latest changes from Zephyr. Ref: NCSDK-29061 Signed-off-by: Kamil Piszczek [nrfconnect] Enable MLDv2 join procedure for IPv6 Multicasts This commit updates the IPv6 multicast subscription mechanism by explicitly using the MLDv2 join procedure. This change ensures proper registration for multicast addresses, improving reliability in multicast communication. Signed-off-by: Łukasz Duda [nrfconnect] Implicitly enable PSA crypto driver for given platform This commit makes in clear which crypto driver is enabled by default. Additionally, stack overflow has been fixed for CC3XX variant, and mbedTLS Heap is disabled for TF-M variant. Signed-off-by: Łukasz Duda [nrfconnect] wifi: Fix nRF70 heap allocation The upstream WPA supplicant uses k_heap instead of libc_heap, so, move the heap to k_heap. Signed-off-by: Chaitanya Tata [nrfconnect] wifi: Fix the heap allocation warning By default nRF70 driver allocates a higher heap to handle most cases, but as Matter doesn't use much heap, enable the ignore minimum warning configuration. Signed-off-by: Chaitanya Tata [nrfconnect] Increased stack size for the OpenThread with nRF54L When using nRF54L15 the stack size required for crypto operations by OpenThread is bigger and must be increased. Signed-off-by: Kamil Kasperczyk [nrfconnect] Enable ZMS in nrfconnect if RRAM is in use. Disabled NVS and enabled ZMS fs backend for all devices that uses RRAM. Signed-off-by: Arkadiusz Balys [nrfconnect] Increased CHIP stack size for cracen based targets Targets using cracen crypto backend requires bigger CHIP stack size. Signed-off-by: Kamil Kasperczyk [nrfconnect] disable `FPROTECT` for nRF54L15 `FPROTECT` should be disabled for nRF54L15 in app to allow correctly protecting whole region of mcuboot Signed-off-by: Maciej Baczmanski [nrfconnect] Factory data partition location change - factory data can be placed before or after settings partition Signed-off-by: Konrad Grucel [nrfconnect] Added config to enable report on active mode Introduced Kconfig option that allows to enable an ICD to send data report on entering the active mode. Signed-off-by: Kamil Kasperczyk [nrfconnect] Increased system workqueue size for LIT The LIT devices seem to need bigger size of workqueue on 54L. Signed-off-by: Kamil Kasperczyk [nrfconnect] Change `CHIP_SPI_NOR` config dependency Set `CHIP_SPI_NOR` to y for all targets that are built for nRF54L15DK, regardless of target SoC. Signed-off-by: Maciej Baczmanski [nrfconnect] Disable chip_build_tools Disable chip_build_tools Signed-off-by: Adrian Gielniewski * [Crypto] Stop compiling legacy SPAKE2P if PSA is available If the CHIP_CRYPTO_PSA_SPAKE2P is enabled the build system should not compile Legacy Spake2p implementation, because the PSA one is available in the PSASpake2p.cpp file. * VerifyOrDie logging for constrained devices 1. Add the configuration to enable logging the location of a failed VerifyOrDie() without logging the condition to reduce the code size impact but still be able to debug failing VerifyOrDie() conditions. 2. Allow to override __FILE__ macro with __FILE_NAME__ by setting the warn_builtin_macro_redefined GN arg to false to further reduce the code size increase. 3. Add Kconfigs for nRF Connect platform for enabling both features. Signed-off-by: Damian Krolik * Include EXTRAVERSION in Matter software version string When a Matter application provides the VERSION file, the Matter software version string is set to 4-number string, such as "2.7.99+0" and the EXTRAVERSION field, which is typically used to denote the branch or tag name, such as "dev" or "rc1", is ignored. If the EXTRAVERSION field is non-empty, set the Matter software version string to a string such as "2.7.99-dev+0". * Clear Thread Network after last fabric is removed Dataset has to be cleared to allow commissioning to different network when CONFIG_CHIP_LAST_FABRIC_REMOVED_ERASE_ONLY is used. Signed-off-by: Adrian Gielniewski * [workflows] Update docker images to version 98 Update docker image version to 98. Signed-off-by: Adrian Gielniewski * [nrfconnect] Change the recommended version to 2.9.0 Change the recommended version of nRF Connected SDK to 2.9.0. Signed-off-by: Adrian Gielniewski * [nrfconnect] Align examples to NCS 2.9.0 Signed-off-by: Adrian Gielniewski * [nrfconnect] Fix FLASH overflow Disable some logs in lighting-app and lock-app due to flash overflow. Signed-off-by: Adrian Gielniewski * [nrfconnect] Align test_driver configuration to NCS 2.9.0 Signed-off-by: Adrian Gielniewski * [nrfconnect] Fix nrf builder Use correct path when running ctest. Signed-off-by: Adrian Gielniewski * [nrfconnect] Disable native build Disable Zephyr native build until next release due to Zephyr regression. Signed-off-by: Adrian Gielniewski --------- Signed-off-by: Arkadiusz Balys Signed-off-by: Maciej Baczmanski Signed-off-by: Adrian Gielniewski Signed-off-by: Damian Krolik Co-authored-by: Arkadiusz Balys Co-authored-by: Maciej Baczmanski Co-authored-by: Kamil Kasperczyk Co-authored-by: Damian Krolik --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +-- .github/workflows/chef.yaml | 8 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .../workflows/examples-linux-standalone.yaml | 2 +- .../examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 11 +-- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 4 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 +- .github/workflows/qemu.yaml | 4 +- .github/workflows/release_artifacts.yaml | 4 +- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 +- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- build/config/compiler/BUILD.gn | 6 ++ .../.nrfconnect-recommended-revision | 2 +- config/nrfconnect/chip-gn/args.gni | 1 + config/nrfconnect/chip-module/CMakeLists.txt | 36 +++++++-- config/nrfconnect/chip-module/Kconfig | 74 +++++++++++++++++-- .../nrfconnect/chip-module/Kconfig.defaults | 70 +++++++++++------- .../nrfconnect/chip-module/Kconfig.features | 14 ++-- config/nxp/chip-module/Kconfig | 2 +- config/telink/chip-module/Kconfig | 2 +- config/zephyr/Kconfig | 21 ++++-- config/zephyr/chip-module/Kconfig.features | 6 +- config/zephyr/ota-image.cmake | 2 +- config/zephyr/ota-image_sysbuild.cmake | 8 +- .../nrf/nrfconnect_examples_configuration.md | 7 +- examples/chef/nrfconnect/main.cpp | 2 +- .../main/include/CHIPProjectConfig.h | 7 ++ .../main/include/CHIPProjectConfig.h | 7 ++ examples/platform/nrfconnect/util/OTAUtil.cpp | 8 +- .../nrfconnect/util/PigweedLogger.cpp | 2 +- examples/pump-app/nrfconnect/main/AppTask.cpp | 2 +- .../nrfconnect/main/AppTask.cpp | 2 +- .../window-app/nrfconnect/main/AppTask.cpp | 2 +- scripts/build/builders/nrf.py | 2 +- src/crypto/CHIPCryptoPALPSA.cpp | 5 ++ src/lib/core/CHIPConfig.h | 11 +++ src/lib/support/CodeUtils.h | 5 +- .../GenericNetworkCommissioningThreadDriver.h | 2 + ...nericThreadStackManagerImpl_OpenThread.hpp | 8 ++ .../Zephyr/ConfigurationManagerImpl.cpp | 20 +++-- src/platform/nrfconnect/BUILD.gn | 2 + .../nrfconnect/CHIPDevicePlatformConfig.h | 12 +-- src/platform/nrfconnect/CHIPPlatformConfig.h | 29 +++++++- .../nrfconnect/ConnectivityManagerImpl.cpp | 19 +++-- .../nrfconnect/ConnectivityManagerImpl.h | 26 +++++++ src/platform/nrfconnect/DFUSync.cpp | 50 +++++++++++++ src/platform/nrfconnect/DFUSync.h | 60 +++++++++++++++ .../DiagnosticDataProviderImplNrf.cpp | 4 +- .../DiagnosticDataProviderImplNrf.h | 2 +- .../nrfconnect/ExternalFlashManager.h | 18 ++++- src/platform/nrfconnect/FactoryDataProvider.h | 12 ++- .../nrfconnect/OTAImageProcessorImpl.cpp | 19 ++++- .../nrfconnect/OTAImageProcessorImpl.h | 1 + .../nrfconnect/SystemPlatformConfig.h | 4 +- src/platform/nrfconnect/wifi/WiFiManager.cpp | 2 + .../main/include/CHIPProjectConfig.h | 3 + src/test_driver/nrfconnect/prj.conf | 7 +- 83 files changed, 550 insertions(+), 165 deletions(-) create mode 100644 src/platform/nrfconnect/DFUSync.cpp create mode 100644 src/platform/nrfconnect/DFUSync.h diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 92667ddebe..6ac96aebb7 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 42bd2cac73..895e7260d1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,7 +43,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -139,7 +139,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -308,7 +308,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -373,7 +373,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -492,7 +492,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index be8a6421f6..e6bcb18074 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 options: --user root steps: @@ -57,7 +57,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:97 + image: ghcr.io/project-chip/chip-build-esp32:98 options: --user root steps: @@ -78,7 +78,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:97 + image: ghcr.io/project-chip/chip-build-nrf-platform:98 options: --user root steps: @@ -99,7 +99,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:97 + image: ghcr.io/project-chip/chip-build-telink:98 options: --user root steps: diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index c712ffed71..9cc5751ab3 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:97 + image: ghcr.io/project-chip/chip-build-doxygen:98 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index ed978476c2..121610d215 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:97 + image: ghcr.io/project-chip/chip-build-ameba:98 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index bac2f05f7f..5302926ed7 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:97 + image: ghcr.io/project-chip/chip-build-asr:98 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 37fdb947bf..6fcb047e98 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:97 + image: ghcr.io/project-chip/chip-build-bouffalolab:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 793a27a028..b879eb5025 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:97 + image: ghcr.io/project-chip/chip-build-ti:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 703fea73af..5516d43746 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:97 + image: ghcr.io/project-chip/chip-build-ti:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index bed526f1c1..c1b8253b33 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:95 + image: ghcr.io/project-chip/chip-build-efr32:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index cd626fd026..09f7141f34 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:97 + image: ghcr.io/project-chip/chip-build-esp32:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -132,7 +132,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32:97 + image: ghcr.io/project-chip/chip-build-esp32:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 616b3a5bc4..52bc9f9752 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:97 + image: ghcr.io/project-chip/chip-build-infineon:98 env: # TODO: this should probably be part of the dockerfile itself CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 6c0d741810..0edd776812 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:97 + image: ghcr.io/project-chip/chip-build-crosscompile:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index bc02b0e726..a43aadee9d 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:97 + image: ghcr.io/project-chip/chip-build-imx:98 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 9f03f103cf..021640438b 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index 5d082fb194..85ca839cb8 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 steps: - name: Checkout diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 6e820e8faa..9cec1c6f94 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 77a8ec626b..97034e77f3 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:97 + image: ghcr.io/project-chip/chip-build-nrf-platform:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -193,10 +193,11 @@ jobs: nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \ examples/all-clusters-app/nrfconnect/build/nrfconnect/zephyr/zephyr.elf \ /tmp/bloat_reports/ - - name: Run unit tests for Zephyr native_posix_64 platform - if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' - run: | - scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" + # Disable native build until next release + # - name: Run unit tests for Zephyr native_posix_64 platform + # if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' + # run: | + # scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" - name: Uploading Failed Test Logs uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index 274a18ecd2..6fa6500abb 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:97 + image: ghcr.io/project-chip/chip-build-nuttx:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index d74f01bc81..870de18bda 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:96 + image: ghcr.io/project-chip/chip-build-nxp:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -239,7 +239,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp-zephyr:97 + image: ghcr.io/project-chip/chip-build-nxp-zephyr:98 steps: - name: Checkout diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index eb13238550..a392c00720 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:97 + image: ghcr.io/project-chip/chip-build-openiotsdk:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index d1701e03de..630e81eb8d 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 5f1e859c75..2682fc6ef3 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index a493982513..95fdb77093 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:97 + image: ghcr.io/project-chip/chip-build-telink:98 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 11093d4ffc..bc94b0f337 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:97 + image: ghcr.io/project-chip/chip-build-tizen:98 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 d672632edf..0e116e8062 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:97 + image: ghcr.io/project-chip/chip-build-android:98 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index b236d1bbb6..5bc8c6c6f0 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 7d5170c39b..87122ced0e 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:97 + image: ghcr.io/project-chip/chip-build-java:98 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/lint.yml b/.github/workflows/lint.yml index 786fee6840..3abc726c30 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 03766a639f..fa9bff4a07 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:97 + image: ghcr.io/project-chip/chip-build-minimal:98 steps: - name: Checkout @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:97 + image: ghcr.io/project-chip/chip-build-minimal:98 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 15f04eb82d..c498eb9016 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:97 + image: ghcr.io/project-chip/chip-build-esp32-qemu:98 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -79,7 +79,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:97 + image: ghcr.io/project-chip/chip-build-tizen-qemu:98 options: --user root volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 6df4cdefc7..c513764852 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:97 + image: ghcr.io/project-chip/chip-build-esp32:98 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:97 + image: ghcr.io/project-chip/chip-build-efr32:98 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 58226ceb48..9d98d0faac 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: ghcr.io/project-chip/chip-build-android:97 + image: ghcr.io/project-chip/chip-build-android:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b04edfabac..7b5286ebef 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -461,7 +461,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 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 08296b1a00..8a24ae4572 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index f861a31d29..9baec065c4 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 51e4a78c8f..51752e3fac 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:97 + image: ghcr.io/project-chip/chip-build:98 defaults: run: shell: sh diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 0310e2a365..1796f02861 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -58,6 +58,9 @@ declare_args() { # Enable or disable support for C++ exceptions. enable_exceptions = false + + # Disable this to allow for overriding built-in defines, such as __FILE__. + warn_builtin_macro_redefined = true } if (current_cpu == "arm" || current_cpu == "arm64") { @@ -240,6 +243,9 @@ config("disabled_warnings") { "-Wno-maybe-uninitialized", ] } + if (!warn_builtin_macro_redefined) { + cflags += [ "-Wno-builtin-macro-redefined" ] + } } config("warnings_common") { diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index 873ca0fa62..f367ae3351 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.7.0 +v2.9.0 diff --git a/config/nrfconnect/chip-gn/args.gni b/config/nrfconnect/chip-gn/args.gni index 847a6cff28..c02f1f99d5 100644 --- a/config/nrfconnect/chip-gn/args.gni +++ b/config/nrfconnect/chip-gn/args.gni @@ -19,6 +19,7 @@ import("${chip_root}/src/crypto/crypto.gni") chip_device_platform = "nrfconnect" chip_build_tests = false +chip_build_tools = false chip_project_config_include = "" chip_system_project_config_include = "" diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index e904da06e0..f057ee1415 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -62,13 +62,20 @@ endif() if (CONFIG_NRF_SECURITY) zephyr_include_directories($) - zephyr_include_directories($) + + if(CONFIG_BUILD_WITH_TFM) + zephyr_include_directories($) + else() + zephyr_include_directories($) + matter_add_flags(-DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=) + endif() + + zephyr_include_directories($) if(TARGET platform_cc3xx) zephyr_include_directories($) endif() matter_add_flags(-DMBEDTLS_CONFIG_FILE=) - matter_add_flags(-DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=) - matter_add_flags(-DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=) + matter_add_flags(-DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=) elseif(CONFIG_MBEDTLS) zephyr_include_directories($) zephyr_compile_definitions($) @@ -78,6 +85,11 @@ if (CONFIG_NRF_802154_RADIO_DRIVER) zephyr_include_directories($) endif() +if (CONFIG_CHIP_LOG_FILE_NAME) + zephyr_compile_definitions(__FILE__=__FILE_NAME__) + zephyr_compile_options(-Wno-builtin-macro-redefined) +endif() + zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) matter_add_cflags("${ZEPHYR_CFLAGS_C}") zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) @@ -135,12 +147,12 @@ matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_ matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4) matter_add_gn_arg_bool ("chip_automation_logging" FALSE) matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP) -matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI_NRF700X) +matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI_NRF70) matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS) matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_factory_data" CONFIG_CHIP_FACTORY_DATA) matter_add_gn_arg_bool ("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT) -matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI_NRF700X) +matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI_NRF70) matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD) if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) @@ -148,6 +160,7 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_dsls" CONFIG_CHIP_ICD_DSLS_SUPPORT) + matter_add_gn_arg_bool ("chip_icd_report_on_active_mode" CONFIG_CHIP_ICD_REPORT_ON_ACTIVE_MODE) endif() if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) @@ -160,7 +173,7 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID) matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE) endif() -if(CONFIG_WIFI_NRF700X) +if(CONFIG_WIFI_NRF70) matter_add_gn_arg_string("chip_mdns" "minimal") elseif (CONFIG_NET_L2_OPENTHREAD) matter_add_gn_arg_string("chip_mdns" "platform") @@ -183,6 +196,10 @@ if (NOT CONFIG_CHIP_DEBUG_SYMBOLS) matter_add_gn_arg_string("symbol_level" "0") endif() +if (CONFIG_CHIP_LOG_FILE_NAME) + matter_add_gn_arg_bool("warn_builtin_macro_redefined" FALSE) +endif() + if (CHIP_COMPILER_LAUNCHER) matter_add_gn_arg_string("pw_command_launcher" ${CHIP_COMPILER_LAUNCHER}) endif() @@ -194,6 +211,13 @@ if (CONFIG_CHIP_PW_RPC) matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"]) endif() +# Inform users that they use not-optimized settings backend for the nRF54LX series. +if(CONFIG_SOC_SERIES_NRF54LX AND CONFIG_SETTINGS_NVS) + message(WARNING " + The nRF54L series is not optimized for the NVS settings backend due to RRAM specifications. + Consider using the CONFIG_SETTINGS_ZMS Kconfig option, which is recommended for this type of non-volatile memory.") +endif() + matter_generate_args_tmp_file() # ============================================================================== diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index 08f65eabb8..155349f946 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -17,8 +17,12 @@ rsource "../../zephyr/Kconfig" config CHIP - imply NVS_LOOKUP_CACHE - imply NVS_LOOKUP_CACHE_FOR_SETTINGS + imply NVS if !SOC_FLASH_NRF_RRAM + imply NVS_LOOKUP_CACHE if !SOC_FLASH_NRF_RRAM + imply NVS_LOOKUP_CACHE_FOR_SETTINGS if !SOC_FLASH_NRF_RRAM + imply ZMS if SOC_FLASH_NRF_RRAM + imply ZMS_LOOKUP_CACHE if SOC_FLASH_NRF_RRAM + imply ZMS_LOOKUP_CACHE_FOR_SETTINGS if SOC_FLASH_NRF_RRAM if CHIP @@ -91,9 +95,33 @@ config CHIP_DEBUG_SYMBOLS help Enables building the application with debug symbols. +config CHIP_LOG_VERIFY_OR_DIE + bool "Log source code location on VerifyOrDie failure" + help + Enables the feature to log the file name and line number where the Matter + stack calls the VerifyOrDie macro with the condition evaluating to false. + +config CHIP_LOG_FILE_NAME + bool "Log file name instead of entire file path" + default y + help + Enables using a file name instead of an entire file path whenever the + source code location needs to be logged. This is achieved by overriding + the __FILE__ macro with __FILE_NAME__. + This reduces the code size in debug configurations that enable verbose + assertion macros. + config CHIP_MALLOC_SYS_HEAP default y if !ARCH_POSIX +config CHIP_TASK_STACK_SIZE + int "The CHIP (Matter) thread stack size" + default 10240 if (LTO || PSA_CRYPTO_DRIVER_CC3XX) + default 9216 if PSA_CRYPTO_DRIVER_CRACEN + default 6144 + help + Configures the stack size available for the CHIP (Matter) thread. + config CHIP_FACTORY_DATA bool "Factory data provider" select ZCBOR @@ -138,7 +166,7 @@ config CHIP_FACTORY_DATA_ROTATING_DEVICE_UID_MAX_LEN config CHIP_FACTORY_DATA_WRITE_PROTECT bool "Enable Factory Data write protection" select FPROTECT - depends on CHIP_FACTORY_DATA + depends on CHIP_FACTORY_DATA && !SOC_SERIES_NRF54LX default y help Enables the write protection of the Factory Data partition in the flash memory. @@ -239,9 +267,9 @@ config CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID endif # CHIP_FACTORY_DATA_BUILD # See config/zephyr/Kconfig for full definition -config CHIP_FACTORY_RESET_ERASE_NVS - bool +config CHIP_FACTORY_RESET_ERASE_SETTINGS default y + depends on NVS || ZMS config CHIP_LOG_SIZE_OPTIMIZATION bool "Disable some detailed logs to decrease flash usage" @@ -297,6 +325,42 @@ config CHIP_PERSISTENT_SUBSCRIPTIONS # selecting experimental for this feature since there is an issue with multiple controllers. select EXPERIMENTAL +config CHIP_MAX_FABRICS + int "Maximum number of Matter fabrics" + default 5 + help + The maximum number of Matter fabrics that device can be joined to. + +config CHIP_MAX_ACTIVE_CASE_CLIENTS + int "Maximum number of outgoing CASE sessions" + default CHIP_MAX_FABRICS if CHIP_PERSISTENT_SUBSCRIPTIONS + default 2 + help + The maximum number of outgoing CASE sessions that can be simutaneously handled by the end device. + +config CHIP_MAX_ACTIVE_DEVICES + int "Maximum number of simultaneous connections over CASE" + default CHIP_MAX_FABRICS if CHIP_PERSISTENT_SUBSCRIPTIONS + default 4 + help + The maximum number of devices to which the Server implementers will be able to + concurrently connect over CASE and interact with. + +config CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL + int "Minimum subscription resumption interval in seconds" + default 20 + depends on CHIP_PERSISTENT_SUBSCRIPTIONS + help + The minimum interval in seconds before resuming a subscription that timed out. + +config CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER + int "The multiplier for subscription resumption retry in seconds" + default 40 + depends on CHIP_PERSISTENT_SUBSCRIPTIONS + help + The multiplier per subscription resumption retry attempt that is multiplied by the index of Fibonacci sequence + and added to CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL to obtain final wait time for next retry. + config CHIP_ENABLE_BDX_LOG_TRANSFER bool "Enable BDX transfer for diagnostic logs" help diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index e49893cffa..0ba882c059 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -51,12 +51,15 @@ config INIT_STACKS config SYSTEM_WORKQUEUE_STACK_SIZE default 2560 if CHIP_WIFI + default 2048 if CHIP_ICD_LIT_SUPPORT config HEAP_MEM_POOL_SIZE - default 80000 if CHIP_WIFI + default 110720 if CHIP_WIFI + +config HEAP_MEM_POOL_IGNORE_MIN + default y if CHIP_WIFI config CHIP_MALLOC_SYS_HEAP_SIZE - default 30720 if CHIP_WIFI default 8192 if NET_L2_OPENTHREAD # We use sys_heap based allocators, so make sure we don't reserve unused libc heap anyway @@ -64,7 +67,10 @@ config COMMON_LIBC_MALLOC_ARENA_SIZE default -1 config NVS_LOOKUP_CACHE_SIZE - default 512 + default 512 if NVS + +config ZMS_LOOKUP_CACHE_SIZE + default 512 if ZMS # ============================================================================== # Zephyr networking configuration @@ -201,12 +207,12 @@ config CHIP_QSPI_NOR # nRF7002DK uses SPI NOR external flash -if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP +if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15DK config CHIP_SPI_NOR default y -endif # BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP +endif # BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15DK config BOOT_IMAGE_ACCESS_HOOKS default y if SOC_SERIES_NRF53X @@ -226,7 +232,7 @@ config NRF_WIFI_FW_PATCH_DFU # ============================================================================== config NET_L2_OPENTHREAD - default y if !WIFI_NRF700X + default y if !WIFI_NRF70 if NET_L2_OPENTHREAD @@ -235,7 +241,7 @@ config IEEE802154_NRF5_RX_STACK_SIZE default 1024 config OPENTHREAD_THREAD_STACK_SIZE - default 6144 if PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON + default 6144 if (PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON) || PSA_CRYPTO_DRIVER_CRACEN default 4096 config OPENTHREAD_DEFAULT_TX_POWER @@ -251,35 +257,35 @@ endif # NET_L2_OPENTHREAD if CHIP_WIFI -choice WPA_SUPP_LOG_LEVEL_CHOICE - default WPA_SUPP_LOG_LEVEL_ERR +choice WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_CHOICE + default WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_ERR endchoice # it saves us 20kB of FLASH -config WPA_SUPP_NO_DEBUG +config WIFI_NM_WPA_SUPPLICANT_NO_DEBUG default y -config NRF700X_LOG_VERBOSE +config NRF70_LOG_VERBOSE default n -choice WIFI_NRF700X_LOG_LEVEL_CHOICE - default WIFI_NRF700X_LOG_LEVEL_OFF +choice WIFI_NRF70_LOG_LEVEL_CHOICE + default WIFI_NRF70_LOG_LEVEL_OFF endchoice config NRF_WIFI_LOW_POWER default n -config NRF700X_RX_NUM_BUFS +config NRF70_RX_NUM_BUFS default 16 -config NRF700X_MAX_TX_TOKENS +config NRF70_MAX_TX_TOKENS default 10 -config NRF700X_MAX_TX_AGGREGATION +config NRF70_MAX_TX_AGGREGATION default 1 # it saves 25kB of FLASH -config WPA_SUPP_ADVANCED_FEATURES +config WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES default n endif # CHIP_WIFI @@ -298,15 +304,13 @@ choice RNG_GENERATOR_CHOICE default XOSHIRO_RANDOM_GENERATOR if SOC_SERIES_NRF53X endchoice -config OBERON_BACKEND - default y - config MBEDTLS_ENABLE_HEAP - default y + default y if !BUILD_WITH_TFM + default n config MBEDTLS_HEAP_SIZE default 8192 - + # Enable PSA Crypto dependencies for Matter config CHIP_CRYPTO_PSA @@ -315,9 +319,15 @@ config CHIP_CRYPTO_PSA if CHIP_CRYPTO_PSA +config PSA_CRYPTO_DRIVER_OBERON + default y if (SOC_SERIES_NRF52X || SOC_SERIES_NRF53X) + config PSA_CRYPTO_DRIVER_CC3XX default n +config PSA_CRYPTO_DRIVER_CRACEN + default y if SOC_SERIES_NRF54LX + config PSA_WANT_ALG_SHA_224 default n @@ -333,14 +343,13 @@ config PSA_USE_CC3XX_HASH_DRIVER endif # PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON -# Spake2+ support -config MBEDTLS_MD_C - default y - endif # CHIP_CRYPTO_PSA if !CHIP_CRYPTO_PSA +config OBERON_BACKEND + default y + config NRF_SECURITY_ADVANCED default y @@ -353,6 +362,9 @@ config MBEDTLS_CTR_DRBG_C config MBEDTLS_CIPHER_MODE_CTR default y +config MBEDTLS_MD_C + default y + config MBEDTLS_SHA1_C default y if CHIP_WIFI @@ -471,6 +483,9 @@ config SHELL_MINIMAL config KERNEL_SHELL default n if !CHIP_MEMORY_PROFILING +config SHELL_WILDCARD + default n + config SENSOR_SHELL default n @@ -498,6 +513,9 @@ config HWINFO_SHELL config OPENTHREAD_SHELL default n if !CHIP_MEMORY_PROFILING +config SHELL_CMD_BUFF_SIZE + default 512 if CHIP_MEMORY_PROFILING + endif # SHELL endif # CHIP diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index a610c37eed..1488cc4e46 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -22,9 +22,9 @@ if CHIP config CHIP_WIFI bool "Enable nrfconnect Wi-Fi support" default y if SHIELD_NRF7002EK || BOARD_NRF7002DK_NRF5340_CPUAPP || SHIELD_NRF7002EB || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP - select WIFI_NRF700X + select WIFI_NRF70 select WIFI - select WPA_SUPP + select WIFI_NM_WPA_SUPPLICANT imply NORDIC_SECURITY_BACKEND imply MBEDTLS_ENTROPY_C imply MBEDTLS_PSA_CRYPTO_C @@ -86,6 +86,8 @@ config CHIP_MEMORY_PROFILING select NET_SHELL select NET_BUF_POOL_USAGE select OPENTHREAD_SHELL if !CHIP_WIFI + # Settings + select SETTINGS_SHELL # Zephyr select KERNEL_SHELL help @@ -150,7 +152,7 @@ endif config CHIP_DFU_OVER_BT_SMP bool "Enable DFU over Bluetooth LE SMP feature set" imply CHIP_QSPI_NOR if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840 - imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15PDK_NRF54L15_CPUAPP + imply CHIP_SPI_NOR if BOARD_NRF7002DK_NRF5340_CPUAPP || BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP || BOARD_NRF54L15DK imply BOOTLOADER_MCUBOOT select MCUMGR select MCUMGR_TRANSPORT_BT @@ -159,6 +161,7 @@ config CHIP_DFU_OVER_BT_SMP select ZCBOR select MCUMGR_GRP_IMG select MCUMGR_GRP_OS + select MCUMGR_GRP_IMG_STATUS_HOOKS # Enable custom SMP request to erase settings partition. select MCUMGR_GRP_ZBASIC select MCUMGR_GRP_ZBASIC_STORAGE_ERASE @@ -170,8 +173,9 @@ config CHIP_DFU_OVER_BT_SMP if CHIP_DFU_OVER_BT_SMP # MCU Manager and SMP configuration -config MCUMGR_TRANSPORT_BT_AUTHEN - default n +choice MCUMGR_TRANSPORT_BT_PERM + default MCUMGR_TRANSPORT_BT_PERM_RW +endchoice config MCUMGR_TRANSPORT_NETBUF_COUNT default 6 diff --git a/config/nxp/chip-module/Kconfig b/config/nxp/chip-module/Kconfig index 152d1161f9..022f6d441b 100644 --- a/config/nxp/chip-module/Kconfig +++ b/config/nxp/chip-module/Kconfig @@ -197,7 +197,7 @@ config CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID endif #CHIP_FACTORY_DATA_BUILD # See config/zephyr/Kconfig for full definition -config CHIP_FACTORY_RESET_ERASE_NVS +config CHIP_FACTORY_RESET_ERASE_SETTINGS bool default y diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index 923a2de8c9..7e20a82c48 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -182,7 +182,7 @@ config CHIP_DEVICE_GENERATE_ROTATING_DEVICE_UID endif #CHIP_FACTORY_DATA_BUILD # See config/zephyr/Kconfig for full definition -config CHIP_FACTORY_RESET_ERASE_NVS +config CHIP_FACTORY_RESET_ERASE_SETTINGS bool default n diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 7534fbd2e0..dfe9af7158 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -34,7 +34,7 @@ menuconfig CHIP imply HWINFO imply FLASH imply FLASH_MAP - imply NVS + imply NVS if !CHIP_NRF_PLATFORM imply SETTINGS help Enables Matter libraries required for the Matter protocol stack to work. @@ -398,11 +398,11 @@ config CHIP_ICD_ACTIVE_MODE_THRESHOLD config CHIP_ICD_LIT_SUPPORT bool "Intermittently Connected Device Long Idle Time support" - imply CHIP_ICD_CHECK_IN_SUPPORT - imply CHIP_ICD_UAT_SUPPORT + select CHIP_ICD_CHECK_IN_SUPPORT + select CHIP_ICD_UAT_SUPPORT help Enables the Intermittently Connected Device Long Idle Time support in Matter. - It also implies the ICD Check-In and UAT features support that are mandatory for LIT device. + It also selects the ICD Check-In and UAT features support that are mandatory for LIT device. config CHIP_ICD_CHECK_IN_SUPPORT bool "Intermittently Connected Device Check-In protocol support" @@ -417,7 +417,7 @@ config CHIP_ICD_UAT_SUPPORT means (e.g. button press) to trigger an ICD device to enter the active mode and become responsive. config CHIP_ICD_DSLS_SUPPORT - bool "Intermittenttly Connected Device Dynamic SIT LIT support" + bool "Intermittently Connected Device Dynamic SIT LIT support" depends on CHIP_ICD_LIT_SUPPORT help Enables the Dynamic SIT LIT support in Matter. It allows the application to dynamically switch between @@ -431,6 +431,11 @@ config CHIP_ICD_CLIENTS_PER_FABRIC Provides the Intermittently Connected Device number of clients per fabric. It determines the maximum number of clients per fabric that can be registered to receive notification from a device if their subscription is lost. +config CHIP_ICD_REPORT_ON_ACTIVE_MODE + bool "Intermittently Connected Device report on active mode" + help + Enables an ICD to send data report to the subscribers on entering the active mode. + endif # CHIP_ENABLE_ICD_SUPPORT config CHIP_THREAD_SSED @@ -470,11 +475,11 @@ config CHIP_CERTIFiCATION_DECLARATION_OTA_IMAGE_ID endif -config CHIP_FACTORY_RESET_ERASE_NVS +config CHIP_FACTORY_RESET_ERASE_SETTINGS bool "Erase NVS flash pages on factory reset" - depends on SETTINGS_NVS + depends on SETTINGS_NVS || SETTINGS_ZMS help - Erases flash pages occupied by non-volatile storage when a factory reset + Erases non-volatile pages occupied by non-volatile storage when a factory reset is requested, instead of removing Matter-related settings only. Enabling this option provides a more robust factory reset mechanism and allows to regain the original storage performance if any firmware issue has brought diff --git a/config/zephyr/chip-module/Kconfig.features b/config/zephyr/chip-module/Kconfig.features index 1fa6e051a1..43696be3aa 100644 --- a/config/zephyr/chip-module/Kconfig.features +++ b/config/zephyr/chip-module/Kconfig.features @@ -36,9 +36,9 @@ config MCUMGR_TRANSPORT_BT bool default y -config MCUMGR_TRANSPORT_BT_AUTHEN - bool - default n +choice MCUMGR_TRANSPORT_BT_PERM + default MCUMGR_TRANSPORT_BT_PERM_RW +endchoice config MCUMGR_TRANSPORT_NETBUF_COUNT int diff --git a/config/zephyr/ota-image.cmake b/config/zephyr/ota-image.cmake index f254b97ea5..0d0108aa75 100644 --- a/config/zephyr/ota-image.cmake +++ b/config/zephyr/ota-image.cmake @@ -40,7 +40,7 @@ function(chip_ota_image TARGET_NAME) "--version" ${APPVERSION} "--version-str" - ${APP_VERSION_TWEAK_STRING} + ${APP_VERSION_EXTENDED_STRING} "--digest-algorithm" "sha256" ) diff --git a/config/zephyr/ota-image_sysbuild.cmake b/config/zephyr/ota-image_sysbuild.cmake index 2bd78ea6ee..88968ba15e 100644 --- a/config/zephyr/ota-image_sysbuild.cmake +++ b/config/zephyr/ota-image_sysbuild.cmake @@ -45,8 +45,14 @@ function(chip_ota_image TARGET_NAME) set(app_version_patchlevel ${CMAKE_MATCH_1}) string(REGEX MATCH "VERSION_TWEAK = ([0-9]*)" _ ${ver}) set(app_version_tweak ${CMAKE_MATCH_1}) + string(REGEX MATCH "EXTRAVERSION = ([a-z0-9]*)" _ ${ver}) + set(app_version_extra ${CMAKE_MATCH_1}) - set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}+${app_version_tweak}") + if(app_version_extra) + set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}-${app_version_extra}+${app_version_tweak}") + else() + set(APP_VERSION_STRING "${app_version_major}.${app_version_minor}.${app_version_patchlevel}+${app_version_tweak}") + endif() math(EXPR APPVERSION "(${app_version_major} << 24) | (${app_version_minor} << 16) | (${app_version_patchlevel} << 8) | ${app_version_tweak}" OUTPUT_FORMAT HEXADECIMAL) set(OTA_ARGS diff --git a/docs/platforms/nrf/nrfconnect_examples_configuration.md b/docs/platforms/nrf/nrfconnect_examples_configuration.md index 9116f6518c..ab79e64b92 100644 --- a/docs/platforms/nrf/nrfconnect_examples_configuration.md +++ b/docs/platforms/nrf/nrfconnect_examples_configuration.md @@ -208,9 +208,10 @@ To enable sharing the onboarding payload in an NFC tag, set the By default, the factory reset procedure implemented in the Matter stack removes Matter-related settings only. If your application does not depend on any device-lifelong data stored in the non-volatile storage, set the -`CONFIG_CHIP_FACTORY_RESET_ERASE_NVS` option to fully erase the NVS partition at -the factory reset. This approach is more robust and regains the original NVS -performance in case it has been polluted with unwanted entries. +`CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS` option to fully erase the +non-volatile settings partition at the factory reset. This approach is more +robust and regains the original non-volatile performance in case it has been +polluted with unwanted entries. #### Logging diff --git a/examples/chef/nrfconnect/main.cpp b/examples/chef/nrfconnect/main.cpp index ab2fc8cd51..14068cf37e 100644 --- a/examples/chef/nrfconnect/main.cpp +++ b/examples/chef/nrfconnect/main.cpp @@ -110,7 +110,7 @@ int main() ChipLogError(AppServer, "ConnectivityMgr().SetThreadDeviceType() failed"); return 1; } -#elif !defined(CONFIG_WIFI_NRF700X) +#elif !defined(CONFIG_WIFI_NRF70) return CHIP_ERROR_INTERNAL; #endif diff --git a/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h index 4baa186190..e655282240 100644 --- a/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nrfconnect/main/include/CHIPProjectConfig.h @@ -26,3 +26,10 @@ */ #pragma once + +#define CHIP_CONFIG_LOG_MODULE_Zcl_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_InteractionModel_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_InteractionModel_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_DataManagement_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_FabricProvisioning_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_SecureChannel_PROGRESS 0 diff --git a/examples/lock-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/lock-app/nrfconnect/main/include/CHIPProjectConfig.h index 4baa186190..e655282240 100644 --- a/examples/lock-app/nrfconnect/main/include/CHIPProjectConfig.h +++ b/examples/lock-app/nrfconnect/main/include/CHIPProjectConfig.h @@ -26,3 +26,10 @@ */ #pragma once + +#define CHIP_CONFIG_LOG_MODULE_Zcl_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_InteractionModel_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_InteractionModel_DETAIL 0 +#define CHIP_CONFIG_LOG_MODULE_DataManagement_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_FabricProvisioning_PROGRESS 0 +#define CHIP_CONFIG_LOG_MODULE_SecureChannel_PROGRESS 0 diff --git a/examples/platform/nrfconnect/util/OTAUtil.cpp b/examples/platform/nrfconnect/util/OTAUtil.cpp index c642a9001f..a9d37cce3b 100644 --- a/examples/platform/nrfconnect/util/OTAUtil.cpp +++ b/examples/platform/nrfconnect/util/OTAUtil.cpp @@ -45,7 +45,7 @@ chip::DefaultOTARequestor sOTARequestor; OTAImageProcessorImpl & GetOTAImageProcessor() { #if CONFIG_PM_DEVICE && CONFIG_NORDIC_QSPI_NOR - static OTAImageProcessorImpl sOTAImageProcessor(&GetFlashHandler()); + static OTAImageProcessorImpl sOTAImageProcessor(ExternalFlashManager.GetInstance()); #else static OTAImageProcessorImpl sOTAImageProcessor; #endif @@ -93,9 +93,3 @@ void OtaConfirmNewImage() } #endif - -ExternalFlashManager & GetFlashHandler() -{ - static ExternalFlashManager sFlashHandler; - return sFlashHandler; -} diff --git a/examples/platform/nrfconnect/util/PigweedLogger.cpp b/examples/platform/nrfconnect/util/PigweedLogger.cpp index 1fb0236659..c35db300c4 100644 --- a/examples/platform/nrfconnect/util/PigweedLogger.cpp +++ b/examples/platform/nrfconnect/util/PigweedLogger.cpp @@ -105,7 +105,7 @@ void processMessage(const struct log_backend * const backend, union log_msg_gene return; } - int ret = k_sem_take(&sLoggerLock, K_FOREVER); + [[maybe_unused]] int ret = k_sem_take(&sLoggerLock, K_FOREVER); assert(ret == 0); log_format_func_t outputFunc = log_format_func_t_get(LOG_OUTPUT_TEXT); diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 45fcc3d549..3aa16dba35 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -138,7 +138,7 @@ CHIP_ERROR AppTask::Init() LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); return err; } -#elif !defined(CONFIG_WIFI_NRF700X) +#elif !defined(CONFIG_WIFI_NRF70) return CHIP_ERROR_INTERNAL; #endif diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 0fe9554cea..e22c3c75e3 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -126,7 +126,7 @@ CHIP_ERROR AppTask::Init() LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); return err; } -#elif !defined(CONFIG_WIFI_NRF700X) +#elif !defined(CONFIG_WIFI_NRF70) return CHIP_ERROR_INTERNAL; #endif diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 1ec6df1c88..2b6fb6ba66 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -143,7 +143,7 @@ CHIP_ERROR AppTask::Init() LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); return err; } -#elif !defined(CONFIG_WIFI_NRF700X) +#elif !defined(CONFIG_WIFI_NRF70) return CHIP_ERROR_INTERNAL; #endif diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index bd681abedb..50e9d2be1f 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -220,7 +220,7 @@ def _build(self): # Note: running zephyr/zephyr.elf has the same result except it creates # a flash.bin in the current directory. ctest has more options and does not # pollute the source directory - self._Execute(['ctest', '--build-nocmake', '-V', '--output-on-failure', '--test-dir', self.output_dir], + self._Execute(['ctest', '--build-nocmake', '-V', '--output-on-failure', '--test-dir', os.path.join(self.output_dir, 'nrfconnect')], title='Run Tests ' + self.identifier) def _bundle(self): diff --git a/src/crypto/CHIPCryptoPALPSA.cpp b/src/crypto/CHIPCryptoPALPSA.cpp index eb67240232..924759b935 100644 --- a/src/crypto/CHIPCryptoPALPSA.cpp +++ b/src/crypto/CHIPCryptoPALPSA.cpp @@ -788,6 +788,9 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & return CHIP_NO_ERROR; } +// We should compile this SPAKE2P implementation only if the PSA implementation is not in use. +#if !CHIP_CRYPTO_PSA_SPAKE2P + typedef struct Spake2p_Context { mbedtls_ecp_group curve; @@ -1093,5 +1096,7 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::PointIsValid(void * R) return CHIP_NO_ERROR; } +#endif // !CHIP_CRYPTO_PSA_SPAKE2P + } // namespace Crypto } // namespace chip diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index cf15875fae..8731bc4b30 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1014,6 +1014,17 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE 0 #endif +/** + * @def CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND + * + * @brief If true, VerifyOrDie() built with @c CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE + * generates a short message that includes only the source code location, + * without the condition that fails. + */ +#ifndef CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND +#define CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND 0 +#endif + /** * @def CHIP_CONFIG_CONTROLLER_MAX_ACTIVE_DEVICES * diff --git a/src/lib/support/CodeUtils.h b/src/lib/support/CodeUtils.h index cd07370fa9..d96112d885 100644 --- a/src/lib/support/CodeUtils.h +++ b/src/lib/support/CodeUtils.h @@ -519,7 +519,10 @@ inline void chipDie(void) * @sa #chipDie * */ -#if CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE +#if CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE && CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND +#define VerifyOrDie(aCondition) \ + nlABORT_ACTION(aCondition, ChipLogError(Support, "VerifyOrDie failure at %s:%d", __FILE__, __LINE__)) +#elif CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE #define VerifyOrDie(aCondition) \ nlABORT_ACTION(aCondition, ChipLogError(Support, "VerifyOrDie failure at %s:%d: %s", __FILE__, __LINE__, #aCondition)) #else // CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h index f570a85fef..3cdb8cff66 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h @@ -87,6 +87,8 @@ class GenericThreadDriver final : public ThreadDriver connectNetworkTimeout = connectTimeoutSec; } + void ClearNetwork() { mStagingNetwork.Clear(); } + // BaseDriver NetworkIterator * GetNetworks() override { return new ThreadNetworkIterator(this); } CHIP_ERROR Init(Internal::BaseDriver::NetworkStatusChangeCallback * statusChangeCallback) override; diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp index f15e22252d..86aee98c4a 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.hpp @@ -87,6 +87,13 @@ void initNetworkCommissioningThreadDriver() #endif } +void resetGenericThreadDriver() +{ +#ifndef _NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_ + sGenericThreadDriver.ClearNetwork(); +#endif +} + #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_DNS_CLIENT CHIP_ERROR ReadDomainNameComponent(const char *& in, char * out, size_t outSize) { @@ -1257,6 +1264,7 @@ void GenericThreadStackManagerImpl_OpenThread::_ErasePersistentInfo() otThreadSetEnabled(mOTInst, false); otIp6SetEnabled(mOTInst, false); otInstanceErasePersistentInfo(mOTInst); + resetGenericThreadDriver(); Impl()->UnlockThreadStack(); } diff --git a/src/platform/Zephyr/ConfigurationManagerImpl.cpp b/src/platform/Zephyr/ConfigurationManagerImpl.cpp index b582f4a318..81c5707cb5 100644 --- a/src/platform/Zephyr/ConfigurationManagerImpl.cpp +++ b/src/platform/Zephyr/ConfigurationManagerImpl.cpp @@ -41,10 +41,14 @@ #include #include -#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS -#include +#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS #include -#endif +#if defined(CONFIG_SETTINGS_NVS) +#include +#elif defined(CONFIG_SETTINGS_ZMS) +#include +#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS +#endif // CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS #ifdef CONFIG_NET_L2_OPENTHREAD #include @@ -198,20 +202,24 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) ThreadStackMgr().LockThreadStack(); #endif -#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS +#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS void * storage = nullptr; int status = settings_storage_get(&storage); if (status == 0) { +#if defined(CONFIG_SETTINGS_NVS) status = nvs_clear(static_cast(storage)); +#elif defined(CONFIG_SETTINGS_ZMS) + status = zms_clear(static_cast(storage)); +#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS } - if (status) { ChipLogError(DeviceLayer, "Factory reset failed: %d", status); } #else + const CHIP_ERROR err = PersistedStorage::KeyValueStoreMgrImpl().DoFactoryReset(); if (err != CHIP_NO_ERROR) @@ -220,7 +228,7 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) } ConnectivityMgr().ErasePersistentInfo(); -#endif +#endif // CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS PlatformMgr().Shutdown(); } diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 8b02a62892..b78ddc1253 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -42,6 +42,8 @@ static_library("nrfconnect") { "ConfigurationManagerImpl.h", "ConnectivityManagerImpl.cpp", "ConnectivityManagerImpl.h", + "DFUSync.cpp", + "DFUSync.h", "DiagnosticDataProviderImplNrf.cpp", "DiagnosticDataProviderImplNrf.h", "ExternalFlashManager.h", diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 486a48cc07..ee788b2c90 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -46,7 +46,7 @@ #ifdef CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING CONFIG_CHIP_DEVICE_SOFTWARE_VERSION_STRING #else -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING APP_VERSION_TWEAK_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING APP_VERSION_EXTENDED_STRING #endif #define CHIP_DEVICE_CONFIG_TEST_MANUFACTURING_DATE CONFIG_CHIP_DEVICE_MANUFACTURING_DATE @@ -64,8 +64,8 @@ #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0 #endif -#ifdef CONFIG_WIFI_NRF700X -#define CHIP_DEVICE_CONFIG_ENABLE_WIFI CONFIG_WIFI_NRF700X +#ifdef CONFIG_WIFI_NRF70 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI CONFIG_WIFI_NRF70 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 #else @@ -180,11 +180,7 @@ #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE -#if defined(CONFIG_LTO) -#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 10240 -#else -#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 6144 -#endif // CONFIG_LTO +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE CONFIG_CHIP_TASK_STACK_SIZE #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 64 diff --git a/src/platform/nrfconnect/CHIPPlatformConfig.h b/src/platform/nrfconnect/CHIPPlatformConfig.h index 7355d1a183..af6707f74c 100644 --- a/src/platform/nrfconnect/CHIPPlatformConfig.h +++ b/src/platform/nrfconnect/CHIPPlatformConfig.h @@ -81,9 +81,25 @@ #define CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS 1 #endif // CHIP_CONFIG_BDX_MAX_NUM_TRANSFERS -#ifndef CHIP_CONFIG_MAX_FABRICS -#define CHIP_CONFIG_MAX_FABRICS 5 -#endif +#ifdef CONFIG_CHIP_MAX_FABRICS +#define CHIP_CONFIG_MAX_FABRICS CONFIG_CHIP_MAX_FABRICS +#endif // CONFIG_CHIP_MAX_FABRICS + +#ifdef CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS +#define CHIP_CONFIG_DEVICE_MAX_ACTIVE_CASE_CLIENTS CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS +#endif // CONFIG_CHIP_MAX_ACTIVE_CASE_CLIENTS + +#ifdef CONFIG_CHIP_MAX_ACTIVE_DEVICES +#define CHIP_CONFIG_DEVICE_MAX_ACTIVE_DEVICES CONFIG_CHIP_MAX_ACTIVE_DEVICES +#endif // CONFIG_CHIP_MAX_ACTIVE_DEVICES + +#ifdef CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL +#define CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION_MIN_RETRY_INTERVAL_SECS CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL +#endif // CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_MIN_RETRY_INTERVAL + +#ifdef CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER +#define CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION_WAIT_TIME_MULTIPLIER_SECS CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER +#endif // CONFIG_CHIP_SUBSCRIPTION_RESUMPTION_RETRY_MULTIPLIER #ifdef CONFIG_CHIP_LOG_SIZE_OPTIMIZATION // Disable some of the too detailed log modules to save flash @@ -155,3 +171,10 @@ #define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER #endif // CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER #endif // CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER + +#ifdef CONFIG_CHIP_LOG_VERIFY_OR_DIE +#define CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE 1 +#ifndef CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND +#define CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND 1 +#endif // CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE_NO_COND +#endif // CONFIG_CHIP_LOG_VERIFY_OR_DIE diff --git a/src/platform/nrfconnect/ConnectivityManagerImpl.cpp b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp index 971c365561..f7f4cc5529 100644 --- a/src/platform/nrfconnect/ConnectivityManagerImpl.cpp +++ b/src/platform/nrfconnect/ConnectivityManagerImpl.cpp @@ -43,6 +43,13 @@ #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI +// Temporary workaround for lack of the public Zephyr's API for MLDv2. +// Should be removed after https://github.com/zephyrproject-rtos/zephyr/pull/79274 is merged. +extern "C" int net_ipv6_mld_join(struct net_if * iface, const struct in6_addr * addr); +extern "C" int net_ipv6_mld_leave(struct net_if * iface, const struct in6_addr * addr); +#endif + using namespace ::chip::Inet; using namespace ::chip::DeviceLayer::Internal; @@ -73,19 +80,17 @@ CHIP_ERROR JoinLeaveMulticastGroup(net_if * iface, const Inet::IPAddress & addre // The following code should also be valid for other interface types, such as Ethernet, // but they are not officially supported, so for now enable it for Wi-Fi only. const in6_addr in6Addr = InetUtils::ToZephyrAddr(address); + int status; if (operation == UDPEndPointImplSockets::MulticastOperation::kJoin) { - net_if_mcast_addr * maddr = net_if_ipv6_maddr_add(iface, &in6Addr); - - if (maddr && !net_if_ipv6_maddr_is_joined(maddr)) - { - net_if_ipv6_maddr_join(iface, maddr); - } + status = net_ipv6_mld_join(iface, &in6Addr); + VerifyOrReturnError((status == 0 || status == -EALREADY), System::MapErrorZephyr(status)); } else if (operation == UDPEndPointImplSockets::MulticastOperation::kLeave) { - VerifyOrReturnError(net_if_ipv6_maddr_rm(iface, &in6Addr), CHIP_ERROR_INVALID_ADDRESS); + status = net_ipv6_mld_leave(iface, &in6Addr); + VerifyOrReturnError(status == 0, System::MapErrorZephyr(status)); } else { diff --git a/src/platform/nrfconnect/ConnectivityManagerImpl.h b/src/platform/nrfconnect/ConnectivityManagerImpl.h index 8ea6c2d76b..e7d9fc4f4e 100644 --- a/src/platform/nrfconnect/ConnectivityManagerImpl.h +++ b/src/platform/nrfconnect/ConnectivityManagerImpl.h @@ -81,6 +81,32 @@ class ConnectivityManagerImpl final : public ConnectivityManager, // the implementation methods provided by this class. friend class ConnectivityManager; +public: + // Generic network status checkers + bool IsIPv6NetworkEnabled() + { + return false +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + || IsThreadEnabled() +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + || IsWiFiStationEnabled() +#endif + ; + }; + + bool IsIPv6NetworkProvisioned() + { + return false +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + || IsThreadProvisioned() +#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + || IsWiFiStationProvisioned() +#endif + ; + } + private: // ===== Members that implement the ConnectivityManager abstract interface. diff --git a/src/platform/nrfconnect/DFUSync.cpp b/src/platform/nrfconnect/DFUSync.cpp new file mode 100644 index 0000000000..2d7394a2bc --- /dev/null +++ b/src/platform/nrfconnect/DFUSync.cpp @@ -0,0 +1,50 @@ +/* + * + * Copyright (c) 2024 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. + */ + +#include "DFUSync.h" + +CHIP_ERROR DFUSync::Take(uint32_t & id) +{ + if (mIsTaken) + { + if (id == mOwnerId) + { + return CHIP_NO_ERROR; + } + return CHIP_ERROR_BUSY; + } + + mIsTaken = true; + /* Increment owner id to make sure that every allocation is unique. */ + mOwnerId++; + id = mOwnerId; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DFUSync::Free(uint32_t id) +{ + /* Prevent free operation from the threads that do not own mutex. */ + if (id != mOwnerId) + { + return CHIP_ERROR_ACCESS_DENIED; + } + + mIsTaken = false; + + return CHIP_NO_ERROR; +} diff --git a/src/platform/nrfconnect/DFUSync.h b/src/platform/nrfconnect/DFUSync.h new file mode 100644 index 0000000000..283807339d --- /dev/null +++ b/src/platform/nrfconnect/DFUSync.h @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +class DFUSync +{ +public: + /** + * @brief Tries to take a mutex allowing to perform the DFU process. + * + * @param id reference to the mutex owner id that is assigned with random id, if the mutex was taken successfully + * + * @return CHIP_NO_ERROR on success, the other error code on failure. + */ + CHIP_ERROR Take(uint32_t & id); + + /** + * @brief Tries to free a mutex allowing to perform the DFU process. + * + * @param id mutex owner id that has to be equal to the id assigned by Take method to prevent free attempts from the other + * threads that do not own the mutex. + * + * @return CHIP_NO_ERROR on success, the other error code on failure. + */ + CHIP_ERROR Free(uint32_t id); + + /** + * @brief Get the DFUSync instance + * + * @return DFUSync object + */ + static inline DFUSync & GetInstance() + { + static DFUSync sInstance; + return sInstance; + } + +private: + /* Mutex to synchronize the DFU operations. */ + std::atomic mIsTaken = false; + uint32_t mOwnerId = 0; +}; diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp index 2c4b3b4ff9..12a718e2c5 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.cpp @@ -23,7 +23,7 @@ #include "DiagnosticDataProviderImplNrf.h" -#ifdef CONFIG_WIFI_NRF700X +#ifdef CONFIG_WIFI_NRF70 #include #endif @@ -41,7 +41,7 @@ DiagnosticDataProviderImplNrf & DiagnosticDataProviderImplNrf::GetDefaultInstanc return sInstance; } -#ifdef CONFIG_WIFI_NRF700X +#ifdef CONFIG_WIFI_NRF70 CHIP_ERROR DiagnosticDataProviderImplNrf::GetWiFiBssId(MutableByteSpan & value) { WiFiManager::WiFiInfo info; diff --git a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h index 8b45aed77b..de9168a01b 100644 --- a/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h +++ b/src/platform/nrfconnect/DiagnosticDataProviderImplNrf.h @@ -31,7 +31,7 @@ namespace DeviceLayer { class DiagnosticDataProviderImplNrf : public DiagnosticDataProviderImpl { public: -#ifdef CONFIG_WIFI_NRF700X +#ifdef CONFIG_WIFI_NRF70 CHIP_ERROR GetWiFiBssId(MutableByteSpan & value) override; CHIP_ERROR GetWiFiSecurityType(app::Clusters::WiFiNetworkDiagnostics::SecurityTypeEnum & securityType) override; CHIP_ERROR GetWiFiVersion(app::Clusters::WiFiNetworkDiagnostics::WiFiVersionEnum & wiFiVersion) override; diff --git a/src/platform/nrfconnect/ExternalFlashManager.h b/src/platform/nrfconnect/ExternalFlashManager.h index 6ecfb50759..62bfdd3e05 100644 --- a/src/platform/nrfconnect/ExternalFlashManager.h +++ b/src/platform/nrfconnect/ExternalFlashManager.h @@ -31,9 +31,19 @@ class ExternalFlashManager SLEEP }; - virtual ~ExternalFlashManager() {} + // Not copyable or movable + ExternalFlashManager(ExternalFlashManager &&) = delete; + ExternalFlashManager & operator=(const ExternalFlashManager &) = delete; + ExternalFlashManager(const ExternalFlashManager &) = delete; + ExternalFlashManager & operator=(ExternalFlashManager &&) = delete; - virtual void DoAction(Action aAction) + static ExternalFlashManager & GetInstance() + { + static ExternalFlashManager sExternalFlashManager; + return sExternalFlashManager; + } + + void DoAction(Action aAction) { #if defined(CONFIG_PM_DEVICE) && defined(CONFIG_NORDIC_QSPI_NOR) // utilize the QSPI driver sleep power mode @@ -45,6 +55,10 @@ class ExternalFlashManager } #endif } + +private: + // Singleton Object + ExternalFlashManager() = default; }; } // namespace DeviceLayer diff --git a/src/platform/nrfconnect/FactoryDataProvider.h b/src/platform/nrfconnect/FactoryDataProvider.h index ef6c8ffa66..ea94e2abd0 100644 --- a/src/platform/nrfconnect/FactoryDataProvider.h +++ b/src/platform/nrfconnect/FactoryDataProvider.h @@ -64,7 +64,7 @@ struct InternalFlashFactoryData // 2) it does not exceed the settings partition start address // Note that this block can overlap with app partition but this is not a problem since we do not aim to modify // the application code at runtime anyway. - constexpr size_t FactoryDataBlockBegin() + static constexpr size_t FactoryDataBlockBegin() { // calculate the nearest multiple of CONFIG_FPROTECT_BLOCK_SIZE smaller than FACTORY_DATA_ADDRESS return FACTORY_DATA_ADDRESS & (-CONFIG_FPROTECT_BLOCK_SIZE); @@ -76,11 +76,19 @@ struct InternalFlashFactoryData // and make sure we do not overlap with settings partition constexpr size_t kFactoryDataBlockEnd = (FACTORY_DATA_ADDRESS + FACTORY_DATA_SIZE + CONFIG_FPROTECT_BLOCK_SIZE - 1) & (-CONFIG_FPROTECT_BLOCK_SIZE); - static_assert(kFactoryDataBlockEnd <= PM_SETTINGS_STORAGE_ADDRESS, + + // Only the partition that is protected by fprotect must be aligned to fprotect block size + constexpr size_t kSettingsBlockEnd = PM_SETTINGS_STORAGE_ADDRESS + PM_SETTINGS_STORAGE_SIZE; + + constexpr bool kOverlapsCheck = + (kSettingsBlockEnd <= FactoryDataBlockBegin()) || (kFactoryDataBlockEnd <= PM_SETTINGS_STORAGE_ADDRESS); + + static_assert(kOverlapsCheck, "FPROTECT memory block, which contains factory data" "partition overlaps with the settings partition." "Probably your settings partition size is not a multiple" "of the atomic FPROTECT block size of " TO_STR(CONFIG_FPROTECT_BLOCK_SIZE) "kB"); + return kFactoryDataBlockEnd - FactoryDataBlockBegin(); } #undef TO_STR diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index f0baf084b0..1cd3f051d1 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -31,6 +31,8 @@ #include #endif +#include "DFUSync.h" + #include #include #include @@ -66,9 +68,22 @@ CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { VerifyOrReturnError(mDownloader != nullptr, CHIP_ERROR_INCORRECT_STATE); + if (DFUSync::GetInstance().Take(mDfuSyncMutexId) != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot start Matter OTA, another DFU in progress."); + return CHIP_ERROR_BUSY; + } + TriggerFlashAction(ExternalFlashManager::Action::WAKE_UP); - return DeviceLayer::SystemLayer().ScheduleLambda([this] { mDownloader->OnPreparedForDownload(PrepareDownloadImpl()); }); + return DeviceLayer::SystemLayer().ScheduleLambda([this] { + CHIP_ERROR err = PrepareDownloadImpl(); + if (err != CHIP_NO_ERROR) + { + DFUSync::GetInstance().Free(mDfuSyncMutexId); + } + mDownloader->OnPreparedForDownload(err); + }); } CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl() @@ -112,6 +127,7 @@ CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl() CHIP_ERROR OTAImageProcessorImpl::Finalize() { PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadComplete); + DFUSync::GetInstance().Free(mDfuSyncMutexId); return System::MapErrorZephyr(dfu_multi_image_done(true)); } @@ -119,6 +135,7 @@ CHIP_ERROR OTAImageProcessorImpl::Abort() { CHIP_ERROR error = System::MapErrorZephyr(dfu_multi_image_done(false)); + DFUSync::GetInstance().Free(mDfuSyncMutexId); TriggerFlashAction(ExternalFlashManager::Action::SLEEP); PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadAborted); diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.h b/src/platform/nrfconnect/OTAImageProcessorImpl.h index 7a87bc4bef..9209aeaf71 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.h +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.h @@ -57,6 +57,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface private: bool mImageConfirmed = false; + uint32_t mDfuSyncMutexId; }; } // namespace DeviceLayer diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index de2f59cb7e..a82ce0e35d 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -52,7 +52,7 @@ struct ChipDeviceEvent; #endif #ifndef CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX -#ifdef CONFIG_WIFI_NRF700X +#ifdef CONFIG_WIFI_NRF70 // Minimal mDNS uses Matter packet buffers, so as long as minimal mDNS is used // in Nordic's Wi-Fi solution, the packet buffers must be a bit bigger than what // is required by Matter. @@ -62,7 +62,7 @@ struct ChipDeviceEvent; // unless for large messages that can be sent over BTP or TCP. But those will // likely require a separate buffer pool or employ chained buffers. #define CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX 1280 -#endif // CONFIG_WIFI_NRF700X +#endif // CONFIG_WIFI_NRF70 #endif // CHIP_SYSTEM_CONFIG_PACKETBUFFER_CAPACITY_MAX // ========== Platform-specific Configuration Overrides ========= diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index 6b1effd541..117b8063f1 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -500,6 +500,8 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data, size_t lengt } delegate->OnAssociationFailureDetected(associationFailureCause, reason); + + ChipLogError(DeviceLayer, "WiFi connection failure. Cause: %d, reason: %d", associationFailureCause, reason); } } else // The connection has been established successfully. diff --git a/src/test_driver/nrfconnect/main/include/CHIPProjectConfig.h b/src/test_driver/nrfconnect/main/include/CHIPProjectConfig.h index 3c3df5b97d..0c028f0528 100644 --- a/src/test_driver/nrfconnect/main/include/CHIPProjectConfig.h +++ b/src/test_driver/nrfconnect/main/include/CHIPProjectConfig.h @@ -33,4 +33,7 @@ // Enable unit-test only features #define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 +// Increase max. lambda event size +#define CHIP_CONFIG_LAMBDA_EVENT_SIZE 32 + #endif // CHIP_PROJECT_CONFIG_H diff --git a/src/test_driver/nrfconnect/prj.conf b/src/test_driver/nrfconnect/prj.conf index 97b7787fe9..4cbd592950 100644 --- a/src/test_driver/nrfconnect/prj.conf +++ b/src/test_driver/nrfconnect/prj.conf @@ -43,8 +43,8 @@ CONFIG_MBEDTLS_HEAP_SIZE=65536 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=768 CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y CONFIG_MBEDTLS_USER_CONFIG_FILE="app_mbedtls_config.h" -CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y -CONFIG_MBEDTLS_ENTROPY_ENABLED=y +CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y +CONFIG_MBEDTLS_ENTROPY_C=y CONFIG_MBEDTLS_CTR_DRBG_ENABLED=y CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y @@ -58,6 +58,9 @@ CONFIG_MBEDTLS_PSA_CRYPTO_C=y CONFIG_MBEDTLS_MEMORY_DEBUG=y CONFIG_MBEDTLS_DEBUG=y +# PSA Crypto configuration +CONFIG_PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY=y + # Enable entropy CONFIG_ENTROPY_GENERATOR=y From f40e8bb9358f121f9fb1024993897881010dbc18 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 29 Jan 2025 10:00:01 -0500 Subject: [PATCH 2/8] Bump cloudbuild image version to 98, to match #37105 and make nrf build (#37299) --- integrations/cloudbuild/chef.yaml | 8 ++++---- integrations/cloudbuild/smoke-test.yaml | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 13782e062c..986ee6939b 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -23,7 +23,7 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index d0bfe029e3..c3873a9ddb 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -44,7 +44,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -65,7 +65,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -87,7 +87,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -140,7 +140,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:97" + - name: "ghcr.io/project-chip/chip-build-vscode:98" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv From ef193bc0ca3cfc581da3054bb0ef2cd5bd8da1c2 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 29 Jan 2025 10:31:57 -0500 Subject: [PATCH 3/8] DM XMLs: switch 1.4 to use alchemy (#37201) * Run dos2unix on all DM XML files in 1.4 * Add newlines at end of all DM XML files for 1.4 sed -i -e '$a\' data_model/1.4/device_types/* sed -i -e '$a\' data_model/1.4/clusters/* * DM XMLs: switch 1.4 DM XMLs to alchemy * Generator updates to alchemy * Update 1.4 using alchemy 1.5.0 * Restyled by autopep8 * Add the in-progress defines to match the 1.5 0.7 spec ballot * Fix define processing for alchemy, add tag file * Fix linter, add check for non-existent tag file * Remove a leftover file - this isn't generated by alchemy * Remove file from gni list --------- Co-authored-by: Restyled.io --- data_model/1.4/clusters/ACL-Cluster.xml | 146 +++--- data_model/1.4/clusters/AccountLogin.xml | 116 ++--- .../clusters/AdminCommissioningCluster.xml | 130 ++--- data_model/1.4/clusters/AirQuality.xml | 116 ++--- data_model/1.4/clusters/AlarmBase.xml | 124 ++--- data_model/1.4/clusters/ApplicationBasic.xml | 130 ++--- .../1.4/clusters/ApplicationLauncher.xml | 120 ++--- data_model/1.4/clusters/AudioOutput.xml | 116 ++--- .../1.4/clusters/BallastConfiguration.xml | 146 +++--- .../1.4/clusters/BasicInformationCluster.xml | 166 +++---- data_model/1.4/clusters/Binding-Cluster.xml | 126 ++--- data_model/1.4/clusters/BooleanState.xml | 118 ++--- .../clusters/BooleanStateConfiguration.xml | 126 ++--- data_model/1.4/clusters/Channel.xml | 128 ++--- data_model/1.4/clusters/ColorControl.xml | 206 ++++---- .../clusters/CommissionerControlCluster.xml | 114 ++--- .../1.4/clusters/ConcentrationMeasurement.xml | 157 +++--- .../1.4/clusters/ContentAppObserver.xml | 116 ++--- data_model/1.4/clusters/ContentControl.xml | 157 +++--- data_model/1.4/clusters/ContentLauncher.xml | 137 +++--- .../1.4/clusters/Descriptor-Cluster.xml | 126 ++--- .../1.4/clusters/DeviceEnergyManagement.xml | 152 +++--- .../1.4/clusters/DiagnosticLogsCluster.xml | 116 ++--- .../1.4/clusters/DiagnosticsEthernet.xml | 132 ++--- .../1.4/clusters/DiagnosticsGeneral.xml | 138 +++--- .../1.4/clusters/DiagnosticsSoftware.xml | 114 ++--- data_model/1.4/clusters/DiagnosticsThread.xml | 248 +++++----- data_model/1.4/clusters/DiagnosticsWiFi.xml | 142 +++--- data_model/1.4/clusters/DishwasherAlarm.xml | 128 ++--- data_model/1.4/clusters/DoorLock.xml | 459 +++++++++++------- .../clusters/EcosystemInformationCluster.xml | 124 ++--- .../clusters/ElectricalEnergyMeasurement.xml | 140 +++--- .../clusters/ElectricalPowerMeasurement.xml | 215 ++++---- data_model/1.4/clusters/EnergyEVSE.xml | 172 ++++--- data_model/1.4/clusters/EnergyPreference.xml | 132 ++--- data_model/1.4/clusters/FanControl.xml | 153 +++--- data_model/1.4/clusters/FlowMeasurement.xml | 127 ++--- .../clusters/GeneralCommissioningCluster.xml | 165 +++---- .../clusters/Group-Key-Management-Cluster.xml | 140 +++--- data_model/1.4/clusters/Groups.xml | 118 ++--- data_model/1.4/clusters/ICDManagement.xml | 163 ++++--- data_model/1.4/clusters/Identify.xml | 129 +++-- .../1.4/clusters/IlluminanceMeasurement.xml | 132 ++--- .../clusters/JointFabricDatastoreCluster.xml | 281 ++++++----- .../1.4/clusters/JointFabricPKICluster.xml | 158 +++--- data_model/1.4/clusters/KeypadInput.xml | 230 ++++----- .../Label-Cluster-FixedLabelCluster.xml | 119 +++-- .../clusters/Label-Cluster-LabelCluster.xml | 120 +++-- .../Label-Cluster-UserLabelCluster.xml | 120 +++-- .../1.4/clusters/LaundryDryerControls.xml | 116 ++--- .../1.4/clusters/LaundryWasherControls.xml | 120 ++--- data_model/1.4/clusters/LevelControl.xml | 169 ++++--- .../clusters/LocalizationConfiguration.xml | 118 ++--- .../1.4/clusters/LocalizationTimeFormat.xml | 148 +++--- data_model/1.4/clusters/LocalizationUnit.xml | 116 ++--- data_model/1.4/clusters/LowPower.xml | 116 ++--- data_model/1.4/clusters/MediaInput.xml | 116 ++--- data_model/1.4/clusters/MediaPlayback.xml | 140 +++--- data_model/1.4/clusters/Messages.xml | 181 +++---- .../1.4/clusters/MicrowaveOvenControl.xml | 156 +++--- data_model/1.4/clusters/ModeBase.xml | 150 +++--- data_model/1.4/clusters/ModeSelect.xml | 131 ++--- .../clusters/Mode_DeviceEnergyManagement.xml | 140 +++--- data_model/1.4/clusters/Mode_Dishwasher.xml | 131 ++--- data_model/1.4/clusters/Mode_EVSE.xml | 140 +++--- .../1.4/clusters/Mode_LaundryWasher.xml | 132 ++--- .../1.4/clusters/Mode_MicrowaveOven.xml | 140 +++--- data_model/1.4/clusters/Mode_Oven.xml | 146 +++--- data_model/1.4/clusters/Mode_RVCClean.xml | 139 +++--- data_model/1.4/clusters/Mode_RVCRun.xml | 139 +++--- data_model/1.4/clusters/Mode_Refrigerator.xml | 130 ++--- data_model/1.4/clusters/Mode_WaterHeater.xml | 139 +++--- .../clusters/NetworkCommissioningCluster.xml | 178 +++---- data_model/1.4/clusters/OTAProvider.xml | 120 ++--- data_model/1.4/clusters/OTARequestor.xml | 125 ++--- data_model/1.4/clusters/OccupancySensing.xml | 168 ++++--- data_model/1.4/clusters/OnOff.xml | 132 +++-- .../clusters/OperationalCredentialCluster.xml | 189 ++++---- data_model/1.4/clusters/OperationalState.xml | 138 +++--- .../1.4/clusters/OperationalState_Oven.xml | 116 ++--- .../1.4/clusters/OperationalState_RVC.xml | 140 +++--- .../1.4/clusters/PowerSourceCluster.xml | 156 +++--- .../PowerSourceConfigurationCluster.xml | 116 ++--- data_model/1.4/clusters/PowerTopology.xml | 118 ++--- .../1.4/clusters/PressureMeasurement.xml | 138 +++--- .../clusters/ProxyConfiguration-Cluster.xml | 121 ++--- .../1.4/clusters/ProxyDiscovery-Cluster.xml | 121 ++--- .../1.4/clusters/PumpConfigurationControl.xml | 194 ++++---- data_model/1.4/clusters/RefrigeratorAlarm.xml | 118 ++--- .../1.4/clusters/ResourceMonitoring.xml | 124 ++--- data_model/1.4/clusters/Scenes.xml | 151 +++--- data_model/1.4/clusters/ServiceArea.xml | 157 +++--- data_model/1.4/clusters/SmokeCOAlarm.xml | 136 +++--- data_model/1.4/clusters/Switch.xml | 149 +++--- data_model/1.4/clusters/TargetNavigator.xml | 116 ++--- .../1.4/clusters/TemperatureControl.xml | 125 ++--- .../1.4/clusters/TemperatureMeasurement.xml | 127 ++--- data_model/1.4/clusters/Thermostat.xml | 408 ++++++++-------- .../ThermostatUserInterfaceConfiguration.xml | 114 ++--- .../clusters/ThreadBorderRouterManagement.xml | 126 ++--- .../1.4/clusters/ThreadNetworkDirectory.xml | 134 ++--- data_model/1.4/clusters/TimeSync.xml | 150 +++--- .../1.4/clusters/ValidProxies-Cluster.xml | 122 ++--- .../clusters/ValveConfigurationControl.xml | 142 +++--- data_model/1.4/clusters/WakeOnLAN.xml | 122 ++--- .../1.4/clusters/WaterContentMeasurement.xml | 131 ++--- .../1.4/clusters/WaterHeaterManagement.xml | 138 +++--- .../1.4/clusters/WiFiNetworkManagement.xml | 120 ++--- data_model/1.4/clusters/WindowCovering.xml | 186 +++---- .../bridge-clusters-ActionsCluster.xml | 128 +++-- ...s-BridgedDeviceBasicInformationCluster.xml | 224 +++++---- data_model/1.4/clusters/cluster_ids.json | 16 +- data_model/1.4/device_types/Aggregator.xml | 117 ++--- data_model/1.4/device_types/AirPurifier.xml | 115 ++--- .../1.4/device_types/AirQualitySensor.xml | 115 ++--- .../1.4/device_types/BaseDeviceType.xml | 112 ++--- .../1.4/device_types/BasicVideoPlayer.xml | 114 ++--- .../1.4/device_types/BatteryStorage.xml | 115 ++--- data_model/1.4/device_types/BridgedNode.xml | 117 ++--- .../1.4/device_types/CastingVideoClient.xml | 115 ++--- .../1.4/device_types/CastingVideoPlayer.xml | 118 ++--- .../1.4/device_types/ColorDimmerSwitch.xml | 115 ++--- .../device_types/ColorTemperatureLight.xml | 127 ++--- data_model/1.4/device_types/ContactSensor.xml | 115 ++--- data_model/1.4/device_types/ContentApp.xml | 117 ++--- data_model/1.4/device_types/ControlBridge.xml | 115 ++--- data_model/1.4/device_types/CookSurface.xml | 119 ++--- data_model/1.4/device_types/Cooktop.xml | 115 ++--- .../device_types/DeviceEnergyManagement.xml | 117 ++--- data_model/1.4/device_types/DimmableLight.xml | 125 ++--- .../1.4/device_types/DimmablePlug-InUnit.xml | 125 ++--- data_model/1.4/device_types/DimmerSwitch.xml | 115 ++--- data_model/1.4/device_types/Dishwasher.xml | 117 ++--- data_model/1.4/device_types/DoorLock.xml | 119 ++--- .../1.4/device_types/DoorLockController.xml | 115 ++--- data_model/1.4/device_types/EVSE.xml | 115 ++--- .../1.4/device_types/ElectricalSensor.xml | 118 ++--- .../1.4/device_types/ExtendedColorLight.xml | 129 ++--- data_model/1.4/device_types/ExtractorHood.xml | 115 ++--- data_model/1.4/device_types/Fan.xml | 119 ++--- data_model/1.4/device_types/FlowSensor.xml | 115 ++--- data_model/1.4/device_types/GenericSwitch.xml | 115 ++--- data_model/1.4/device_types/HeatPump.xml | 115 ++--- .../1.4/device_types/HumiditySensor.xml | 115 ++--- .../1.4/device_types/JointFabricAdmin.xml | 114 ++--- data_model/1.4/device_types/LaundryDryer.xml | 117 ++--- data_model/1.4/device_types/LaundryWasher.xml | 117 ++--- data_model/1.4/device_types/LightSensor.xml | 115 ++--- data_model/1.4/device_types/MicrowaveOven.xml | 117 ++--- .../1.4/device_types/ModeSelectDeviceType.xml | 115 ++--- .../MountedDimmableLoadControl.xml | 125 ++--- .../1.4/device_types/MountedOnOffControl.xml | 125 ++--- .../1.4/device_types/NetworkInfraIntro.xml | 58 --- .../1.4/device_types/NetworkInfraManager.xml | 115 ++--- .../1.4/device_types/OccupancySensor.xml | 115 ++--- data_model/1.4/device_types/OnOffLight.xml | 125 ++--- .../1.4/device_types/OnOffLightSwitch.xml | 115 ++--- .../1.4/device_types/OnOffPlug-inUnit.xml | 125 ++--- data_model/1.4/device_types/OnOffSensor.xml | 115 ++--- data_model/1.4/device_types/OtaProvider.xml | 114 ++--- data_model/1.4/device_types/OtaRequestor.xml | 114 ++--- data_model/1.4/device_types/Oven.xml | 115 ++--- data_model/1.4/device_types/PowerSource.xml | 116 ++--- .../1.4/device_types/PressureSensor.xml | 115 ++--- data_model/1.4/device_types/Pump.xml | 115 ++--- .../1.4/device_types/PumpController.xml | 114 ++--- data_model/1.4/device_types/RainSensor.xml | 117 ++--- data_model/1.4/device_types/Refrigerator.xml | 117 ++--- .../1.4/device_types/RoboticVacuumCleaner.xml | 115 ++--- .../1.4/device_types/RoomAirConditioner.xml | 117 ++--- .../1.4/device_types/RootNodeDeviceType.xml | 120 ++--- .../SecondaryNetworkInterface.xml | 114 ++--- data_model/1.4/device_types/SmokeCOAlarm.xml | 115 ++--- data_model/1.4/device_types/SolarPower.xml | 115 ++--- data_model/1.4/device_types/Speaker.xml | 115 ++--- .../TemperatureControlledCabinet.xml | 126 ++--- .../1.4/device_types/TemperatureSensor.xml | 115 ++--- data_model/1.4/device_types/Thermostat.xml | 123 ++--- .../1.4/device_types/ThreadBorderRouter.xml | 115 ++--- .../1.4/device_types/VideoRemoteControl.xml | 115 ++--- .../1.4/device_types/WaterFreezeDetector.xml | 117 ++--- data_model/1.4/device_types/WaterHeater.xml | 115 ++--- .../1.4/device_types/WaterLeakDetector.xml | 117 ++--- data_model/1.4/device_types/WaterValve.xml | 115 ++--- .../1.4/device_types/WindowCovering.xml | 117 ++--- .../device_types/WindowCoveringController.xml | 117 ++--- data_model/1.4/scraper_version | 2 +- scripts/spec_xml/generate_spec_xml.py | 112 ++++- .../data_model_xmls.gni | 1 - 189 files changed, 12799 insertions(+), 12194 deletions(-) delete mode 100644 data_model/1.4/device_types/NetworkInfraIntro.xml diff --git a/data_model/1.4/clusters/ACL-Cluster.xml b/data_model/1.4/clusters/ACL-Cluster.xml index 15eebb4252..4f397f5c6a 100644 --- a/data_model/1.4/clusters/ACL-Cluster.xml +++ b/data_model/1.4/clusters/ACL-Cluster.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,7 @@ Davis, CA 95616, USA - + @@ -83,10 +85,10 @@ Davis, CA 95616, USA - + - + @@ -137,18 +139,22 @@ Davis, CA 95616, USA - + - + + + - + + + @@ -183,7 +189,7 @@ Davis, CA 95616, USA - + @@ -207,7 +213,7 @@ Davis, CA 95616, USA - + @@ -231,32 +237,32 @@ Davis, CA 95616, USA - + - + - + - + - + - + @@ -349,4 +355,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/AccountLogin.xml b/data_model/1.4/clusters/AccountLogin.xml index 6205fb6cb7..f409545b14 100644 --- a/data_model/1.4/clusters/AccountLogin.xml +++ b/data_model/1.4/clusters/AccountLogin.xml @@ -1,61 +1,61 @@ - @@ -115,4 +115,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/AdminCommissioningCluster.xml b/data_model/1.4/clusters/AdminCommissioningCluster.xml index 77a8862b2e..ff34a2133d 100644 --- a/data_model/1.4/clusters/AdminCommissioningCluster.xml +++ b/data_model/1.4/clusters/AdminCommissioningCluster.xml @@ -1,59 +1,61 @@ - @@ -82,7 +84,17 @@ Davis, CA 95616, USA - + + + + + + + + + + + @@ -91,12 +103,12 @@ Davis, CA 95616, USA - + - + @@ -139,4 +151,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/AirQuality.xml b/data_model/1.4/clusters/AirQuality.xml index 69387d451a..b2b3b7ee53 100644 --- a/data_model/1.4/clusters/AirQuality.xml +++ b/data_model/1.4/clusters/AirQuality.xml @@ -1,61 +1,61 @@ - @@ -119,4 +119,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/AlarmBase.xml b/data_model/1.4/clusters/AlarmBase.xml index e374dcc382..c967ee0f8a 100644 --- a/data_model/1.4/clusters/AlarmBase.xml +++ b/data_model/1.4/clusters/AlarmBase.xml @@ -1,63 +1,63 @@ - - + @@ -71,7 +71,7 @@ Davis, CA 95616, USA - + @@ -80,7 +80,7 @@ Davis, CA 95616, USA - + @@ -91,7 +91,7 @@ Davis, CA 95616, USA - + @@ -131,4 +131,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ApplicationBasic.xml b/data_model/1.4/clusters/ApplicationBasic.xml index 93ffeeb958..5e5f2ad364 100644 --- a/data_model/1.4/clusters/ApplicationBasic.xml +++ b/data_model/1.4/clusters/ApplicationBasic.xml @@ -1,61 +1,61 @@ - @@ -92,29 +92,29 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -125,15 +125,15 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ApplicationLauncher.xml b/data_model/1.4/clusters/ApplicationLauncher.xml index 51fcde7690..553328ddf7 100644 --- a/data_model/1.4/clusters/ApplicationLauncher.xml +++ b/data_model/1.4/clusters/ApplicationLauncher.xml @@ -1,61 +1,61 @@ - @@ -113,14 +113,14 @@ Davis, CA 95616, USA - + - + @@ -169,4 +169,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/AudioOutput.xml b/data_model/1.4/clusters/AudioOutput.xml index 9972a8a87e..c2ccff0387 100644 --- a/data_model/1.4/clusters/AudioOutput.xml +++ b/data_model/1.4/clusters/AudioOutput.xml @@ -1,61 +1,61 @@ - @@ -136,4 +136,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/BallastConfiguration.xml b/data_model/1.4/clusters/BallastConfiguration.xml index 9dbf4e6188..3b679b4a7d 100644 --- a/data_model/1.4/clusters/BallastConfiguration.xml +++ b/data_model/1.4/clusters/BallastConfiguration.xml @@ -1,61 +1,61 @@ - @@ -100,15 +100,23 @@ Davis, CA 95616, USA - + + - + + + + - + + - + + + + @@ -118,12 +126,12 @@ Davis, CA 95616, USA - + - + @@ -131,24 +139,24 @@ Davis, CA 95616, USA - + - + - + - + @@ -157,8 +165,8 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/BasicInformationCluster.xml b/data_model/1.4/clusters/BasicInformationCluster.xml index 483cd643e6..7c35354360 100644 --- a/data_model/1.4/clusters/BasicInformationCluster.xml +++ b/data_model/1.4/clusters/BasicInformationCluster.xml @@ -1,59 +1,61 @@ - @@ -175,131 +177,131 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -331,4 +333,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Binding-Cluster.xml b/data_model/1.4/clusters/Binding-Cluster.xml index 72fc1eb6b3..a6856c548d 100644 --- a/data_model/1.4/clusters/Binding-Cluster.xml +++ b/data_model/1.4/clusters/Binding-Cluster.xml @@ -1,61 +1,61 @@ - @@ -69,13 +69,13 @@ Davis, CA 95616, USA - + - + @@ -83,7 +83,7 @@ Davis, CA 95616, USA - + @@ -94,12 +94,12 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/BooleanState.xml b/data_model/1.4/clusters/BooleanState.xml index 9754a7af60..399547dae1 100644 --- a/data_model/1.4/clusters/BooleanState.xml +++ b/data_model/1.4/clusters/BooleanState.xml @@ -1,61 +1,61 @@ - @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + @@ -81,4 +81,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/BooleanStateConfiguration.xml b/data_model/1.4/clusters/BooleanStateConfiguration.xml index d4ae791ad7..7be27159ba 100644 --- a/data_model/1.4/clusters/BooleanStateConfiguration.xml +++ b/data_model/1.4/clusters/BooleanStateConfiguration.xml @@ -1,61 +1,61 @@ - @@ -106,7 +106,7 @@ Davis, CA 95616, USA - + @@ -114,7 +114,7 @@ Davis, CA 95616, USA - + @@ -122,7 +122,7 @@ Davis, CA 95616, USA - + @@ -145,7 +145,7 @@ Davis, CA 95616, USA - + @@ -155,7 +155,7 @@ Davis, CA 95616, USA - + @@ -217,4 +217,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Channel.xml b/data_model/1.4/clusters/Channel.xml index 02bfcf3b25..22820d49e1 100644 --- a/data_model/1.4/clusters/Channel.xml +++ b/data_model/1.4/clusters/Channel.xml @@ -1,61 +1,61 @@ - @@ -281,7 +281,7 @@ Davis, CA 95616, USA - + @@ -307,7 +307,7 @@ Davis, CA 95616, USA - + @@ -315,7 +315,7 @@ Davis, CA 95616, USA - + @@ -390,7 +390,7 @@ Davis, CA 95616, USA - + @@ -427,7 +427,7 @@ Davis, CA 95616, USA - + @@ -452,7 +452,7 @@ Davis, CA 95616, USA - + @@ -462,4 +462,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ColorControl.xml b/data_model/1.4/clusters/ColorControl.xml index fa14aca0f8..c0a9f9c175 100644 --- a/data_model/1.4/clusters/ColorControl.xml +++ b/data_model/1.4/clusters/ColorControl.xml @@ -1,61 +1,61 @@ - @@ -65,10 +65,7 @@ Davis, CA 95616, USA - + @@ -246,7 +243,7 @@ Davis, CA 95616, USA - + @@ -254,7 +251,7 @@ Davis, CA 95616, USA - + @@ -262,38 +259,38 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + @@ -301,7 +298,7 @@ Davis, CA 95616, USA - + @@ -311,13 +308,13 @@ Davis, CA 95616, USA - + - + @@ -331,7 +328,7 @@ Davis, CA 95616, USA - + @@ -345,7 +342,7 @@ Davis, CA 95616, USA - + @@ -358,7 +355,7 @@ Davis, CA 95616, USA - + @@ -372,7 +369,7 @@ Davis, CA 95616, USA - + @@ -386,7 +383,7 @@ Davis, CA 95616, USA - + @@ -399,7 +396,7 @@ Davis, CA 95616, USA - + @@ -413,7 +410,7 @@ Davis, CA 95616, USA - + @@ -427,7 +424,7 @@ Davis, CA 95616, USA - + @@ -440,7 +437,7 @@ Davis, CA 95616, USA - + @@ -454,7 +451,7 @@ Davis, CA 95616, USA - + @@ -468,7 +465,7 @@ Davis, CA 95616, USA - + @@ -481,7 +478,7 @@ Davis, CA 95616, USA - + @@ -495,7 +492,7 @@ Davis, CA 95616, USA - + @@ -509,7 +506,7 @@ Davis, CA 95616, USA - + @@ -522,7 +519,7 @@ Davis, CA 95616, USA - + @@ -536,7 +533,7 @@ Davis, CA 95616, USA - + @@ -550,7 +547,7 @@ Davis, CA 95616, USA - + @@ -583,7 +580,7 @@ Davis, CA 95616, USA - + @@ -598,7 +595,7 @@ Davis, CA 95616, USA - + @@ -613,24 +610,24 @@ Davis, CA 95616, USA - + - + - + - + @@ -638,7 +635,7 @@ Davis, CA 95616, USA - + @@ -646,7 +643,7 @@ Davis, CA 95616, USA - + @@ -690,11 +687,14 @@ Davis, CA 95616, USA - + + + + - + @@ -1159,4 +1159,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/CommissionerControlCluster.xml b/data_model/1.4/clusters/CommissionerControlCluster.xml index d02e9592ee..942925a348 100644 --- a/data_model/1.4/clusters/CommissionerControlCluster.xml +++ b/data_model/1.4/clusters/CommissionerControlCluster.xml @@ -1,59 +1,61 @@ - @@ -144,4 +146,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ConcentrationMeasurement.xml b/data_model/1.4/clusters/ConcentrationMeasurement.xml index 68d4b7937b..ea6bc5461b 100644 --- a/data_model/1.4/clusters/ConcentrationMeasurement.xml +++ b/data_model/1.4/clusters/ConcentrationMeasurement.xml @@ -1,61 +1,63 @@ - - + @@ -76,10 +78,10 @@ Davis, CA 95616, USA - + - + @@ -181,38 +183,46 @@ Davis, CA 95616, USA - + - + + + + - + - + - + + + - + - + + + + - + @@ -220,15 +230,18 @@ Davis, CA 95616, USA - + - + + + + - + @@ -243,14 +256,14 @@ Davis, CA 95616, USA - + - + @@ -260,4 +273,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ContentAppObserver.xml b/data_model/1.4/clusters/ContentAppObserver.xml index 7ffe0b11d0..f508049717 100644 --- a/data_model/1.4/clusters/ContentAppObserver.xml +++ b/data_model/1.4/clusters/ContentAppObserver.xml @@ -1,61 +1,61 @@ - @@ -103,4 +103,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ContentControl.xml b/data_model/1.4/clusters/ContentControl.xml index 6b72a298eb..dedc6176c0 100644 --- a/data_model/1.4/clusters/ContentControl.xml +++ b/data_model/1.4/clusters/ContentControl.xml @@ -1,59 +1,61 @@ - @@ -92,8 +94,39 @@ Davis, CA 95616, USA - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -149,7 +182,7 @@ Davis, CA 95616, USA - + @@ -172,12 +205,12 @@ Davis, CA 95616, USA - + - + @@ -306,7 +339,7 @@ Davis, CA 95616, USA - + @@ -427,4 +460,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ContentLauncher.xml b/data_model/1.4/clusters/ContentLauncher.xml index 5470a14ce1..83d6015fbb 100644 --- a/data_model/1.4/clusters/ContentLauncher.xml +++ b/data_model/1.4/clusters/ContentLauncher.xml @@ -1,61 +1,61 @@ - @@ -105,15 +105,10 @@ Davis, CA 95616, USA - + - + @@ -268,8 +263,8 @@ Davis, CA 95616, USA - - + + @@ -281,7 +276,7 @@ Davis, CA 95616, USA - + @@ -299,7 +294,7 @@ Davis, CA 95616, USA - + @@ -307,7 +302,7 @@ Davis, CA 95616, USA - + @@ -333,7 +328,7 @@ Davis, CA 95616, USA - + @@ -371,4 +366,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Descriptor-Cluster.xml b/data_model/1.4/clusters/Descriptor-Cluster.xml index e30b12ea71..2278e89f89 100644 --- a/data_model/1.4/clusters/Descriptor-Cluster.xml +++ b/data_model/1.4/clusters/Descriptor-Cluster.xml @@ -1,61 +1,61 @@ - @@ -84,20 +84,20 @@ Davis, CA 95616, USA - + - + - + @@ -106,13 +106,13 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DeviceEnergyManagement.xml b/data_model/1.4/clusters/DeviceEnergyManagement.xml index 3b95a7b8d4..89b5cd7fdb 100644 --- a/data_model/1.4/clusters/DeviceEnergyManagement.xml +++ b/data_model/1.4/clusters/DeviceEnergyManagement.xml @@ -1,61 +1,61 @@ - @@ -69,12 +69,10 @@ Davis, CA 95616, USA - + - + @@ -92,33 +90,27 @@ Davis, CA 95616, USA - + - + - + - + - + - @@ -137,7 +129,7 @@ Davis, CA 95616, USA - + @@ -475,12 +467,12 @@ Davis, CA 95616, USA - + - + @@ -495,18 +487,20 @@ Davis, CA 95616, USA - + + + - + - + @@ -665,4 +659,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticLogsCluster.xml b/data_model/1.4/clusters/DiagnosticLogsCluster.xml index 9dc7f4c7ef..5adee11fd0 100644 --- a/data_model/1.4/clusters/DiagnosticLogsCluster.xml +++ b/data_model/1.4/clusters/DiagnosticLogsCluster.xml @@ -1,59 +1,61 @@ - @@ -128,9 +130,9 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticsEthernet.xml b/data_model/1.4/clusters/DiagnosticsEthernet.xml index f000669f64..20f5032ca9 100644 --- a/data_model/1.4/clusters/DiagnosticsEthernet.xml +++ b/data_model/1.4/clusters/DiagnosticsEthernet.xml @@ -1,59 +1,61 @@ - @@ -110,57 +112,57 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + @@ -175,4 +177,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticsGeneral.xml b/data_model/1.4/clusters/DiagnosticsGeneral.xml index 1266705ba6..9f2a48159c 100644 --- a/data_model/1.4/clusters/DiagnosticsGeneral.xml +++ b/data_model/1.4/clusters/DiagnosticsGeneral.xml @@ -1,59 +1,61 @@ - @@ -75,7 +77,7 @@ Davis, CA 95616, USA - + @@ -196,16 +198,18 @@ Davis, CA 95616, USA - + + + - + - + @@ -223,17 +227,17 @@ Davis, CA 95616, USA - + - + - + @@ -272,7 +276,7 @@ Davis, CA 95616, USA - + @@ -284,10 +288,10 @@ Davis, CA 95616, USA - + - + @@ -299,7 +303,7 @@ Davis, CA 95616, USA - + @@ -370,4 +374,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticsSoftware.xml b/data_model/1.4/clusters/DiagnosticsSoftware.xml index 55e865af04..77f60ccfb7 100644 --- a/data_model/1.4/clusters/DiagnosticsSoftware.xml +++ b/data_model/1.4/clusters/DiagnosticsSoftware.xml @@ -1,59 +1,61 @@ - @@ -137,4 +139,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticsThread.xml b/data_model/1.4/clusters/DiagnosticsThread.xml index a712cebc8f..1987e35201 100644 --- a/data_model/1.4/clusters/DiagnosticsThread.xml +++ b/data_model/1.4/clusters/DiagnosticsThread.xml @@ -1,59 +1,61 @@ - @@ -260,404 +262,404 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -668,7 +670,7 @@ Davis, CA 95616, USA - + @@ -676,7 +678,7 @@ Davis, CA 95616, USA - + @@ -714,4 +716,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DiagnosticsWiFi.xml b/data_model/1.4/clusters/DiagnosticsWiFi.xml index 87f7e44dc9..493d287659 100644 --- a/data_model/1.4/clusters/DiagnosticsWiFi.xml +++ b/data_model/1.4/clusters/DiagnosticsWiFi.xml @@ -1,59 +1,61 @@ - @@ -143,81 +145,81 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -257,4 +259,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DishwasherAlarm.xml b/data_model/1.4/clusters/DishwasherAlarm.xml index bdc399f939..6aace5dbe2 100644 --- a/data_model/1.4/clusters/DishwasherAlarm.xml +++ b/data_model/1.4/clusters/DishwasherAlarm.xml @@ -1,61 +1,61 @@ - @@ -70,36 +70,36 @@ Davis, CA 95616, USA - + - + - + - + - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/DoorLock.xml b/data_model/1.4/clusters/DoorLock.xml index 932532c768..69078a0bdb 100644 --- a/data_model/1.4/clusters/DoorLock.xml +++ b/data_model/1.4/clusters/DoorLock.xml @@ -1,61 +1,61 @@ - @@ -66,8 +66,7 @@ Davis, CA 95616, USA - + @@ -89,7 +88,7 @@ Davis, CA 95616, USA - + @@ -125,10 +124,10 @@ Davis, CA 95616, USA - + - + @@ -215,19 +214,17 @@ Davis, CA 95616, USA - + - + - + @@ -511,8 +508,7 @@ Davis, CA 95616, USA - + @@ -532,7 +528,14 @@ Davis, CA 95616, USA - + + + + + + + + @@ -715,7 +718,7 @@ Davis, CA 95616, USA - + @@ -730,7 +733,7 @@ Davis, CA 95616, USA - + @@ -756,28 +759,28 @@ Davis, CA 95616, USA - + - + - + - + @@ -785,7 +788,7 @@ Davis, CA 95616, USA - + @@ -793,7 +796,7 @@ Davis, CA 95616, USA - + @@ -801,111 +804,111 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -916,7 +919,7 @@ Davis, CA 95616, USA - + @@ -925,9 +928,9 @@ Davis, CA 95616, USA - + - + @@ -937,9 +940,9 @@ Davis, CA 95616, USA - + - + @@ -953,7 +956,7 @@ Davis, CA 95616, USA - + @@ -961,39 +964,39 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + @@ -1001,18 +1004,18 @@ Davis, CA 95616, USA - + - + - + - + @@ -1020,21 +1023,21 @@ Davis, CA 95616, USA - + - + - + @@ -1166,7 +1169,10 @@ Davis, CA 95616, USA - + + + + @@ -1244,11 +1250,17 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1277,11 +1289,17 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1290,11 +1308,17 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1327,12 +1351,18 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1342,11 +1372,17 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1362,11 +1398,17 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1375,19 +1417,22 @@ Davis, CA 95616, USA - + + + + - + + + + - - - @@ -1399,12 +1444,18 @@ Davis, CA 95616, USA - + + + + - + + + + @@ -1414,7 +1465,10 @@ Davis, CA 95616, USA - + + + + @@ -1433,7 +1487,10 @@ Davis, CA 95616, USA - + + + + @@ -1442,7 +1499,10 @@ Davis, CA 95616, USA - + + + + @@ -1452,7 +1512,7 @@ Davis, CA 95616, USA - + @@ -1468,7 +1528,10 @@ Davis, CA 95616, USA - + + + + @@ -1610,7 +1673,10 @@ Davis, CA 95616, USA - + + + + @@ -1637,7 +1703,10 @@ Davis, CA 95616, USA - + + + + @@ -1658,12 +1727,12 @@ Davis, CA 95616, USA - - - - - - + + + + + + @@ -1677,7 +1746,10 @@ Davis, CA 95616, USA - + + + + @@ -1686,7 +1758,10 @@ Davis, CA 95616, USA - + + + + @@ -1714,7 +1789,10 @@ Davis, CA 95616, USA - + + + + @@ -1727,7 +1805,10 @@ Davis, CA 95616, USA - + + + + @@ -1737,7 +1818,10 @@ Davis, CA 95616, USA - + + + + @@ -1761,7 +1845,10 @@ Davis, CA 95616, USA - + + + + @@ -1773,12 +1860,12 @@ Davis, CA 95616, USA - - - - - - + + + + + + @@ -1792,7 +1879,10 @@ Davis, CA 95616, USA - + + + + @@ -1819,7 +1909,10 @@ Davis, CA 95616, USA - + + + + @@ -1874,21 +1967,21 @@ Davis, CA 95616, USA - + - + - + - + @@ -1906,7 +1999,7 @@ Davis, CA 95616, USA - + @@ -1915,7 +2008,7 @@ Davis, CA 95616, USA - + @@ -1942,10 +2035,13 @@ Davis, CA 95616, USA - + + + + - + @@ -1975,7 +2071,10 @@ Davis, CA 95616, USA - + + + + @@ -2014,4 +2113,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/EcosystemInformationCluster.xml b/data_model/1.4/clusters/EcosystemInformationCluster.xml index ddebe95679..95349f31a6 100644 --- a/data_model/1.4/clusters/EcosystemInformationCluster.xml +++ b/data_model/1.4/clusters/EcosystemInformationCluster.xml @@ -1,61 +1,61 @@ - @@ -84,7 +84,7 @@ Davis, CA 95616, USA - + @@ -109,7 +109,7 @@ Davis, CA 95616, USA - + @@ -124,14 +124,14 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml b/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml index 259f9f512a..0dcd875014 100644 --- a/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml +++ b/data_model/1.4/clusters/ElectricalEnergyMeasurement.xml @@ -1,61 +1,61 @@ - @@ -67,16 +67,16 @@ Davis, CA 95616, USA - + - + - + - + @@ -109,7 +109,7 @@ Davis, CA 95616, USA - + @@ -122,14 +122,14 @@ Davis, CA 95616, USA - + - + - + @@ -139,7 +139,7 @@ Davis, CA 95616, USA - + @@ -149,7 +149,7 @@ Davis, CA 95616, USA - + @@ -159,7 +159,7 @@ Davis, CA 95616, USA - + @@ -169,7 +169,7 @@ Davis, CA 95616, USA - + @@ -221,4 +221,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ElectricalPowerMeasurement.xml b/data_model/1.4/clusters/ElectricalPowerMeasurement.xml index 5953d36b9d..07bc001884 100644 --- a/data_model/1.4/clusters/ElectricalPowerMeasurement.xml +++ b/data_model/1.4/clusters/ElectricalPowerMeasurement.xml @@ -1,61 +1,61 @@ - @@ -67,10 +67,10 @@ Davis, CA 95616, USA - + - + @@ -108,24 +108,24 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -133,18 +133,18 @@ Davis, CA 95616, USA - + - + - + @@ -152,12 +152,12 @@ Davis, CA 95616, USA - + - + @@ -170,101 +170,107 @@ Davis, CA 95616, USA - + - + - + - + + + + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -273,7 +279,7 @@ Davis, CA 95616, USA - + @@ -282,7 +288,7 @@ Davis, CA 95616, USA - + @@ -290,7 +296,7 @@ Davis, CA 95616, USA - + @@ -298,20 +304,23 @@ Davis, CA 95616, USA - + - + - + + + + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/EnergyEVSE.xml b/data_model/1.4/clusters/EnergyEVSE.xml index 352ac7e24a..63e4207d03 100644 --- a/data_model/1.4/clusters/EnergyEVSE.xml +++ b/data_model/1.4/clusters/EnergyEVSE.xml @@ -1,61 +1,61 @@ - @@ -94,8 +94,6 @@ Davis, CA 95616, USA - - @@ -181,7 +179,7 @@ Davis, CA 95616, USA - + @@ -197,12 +195,10 @@ Davis, CA 95616, USA - + - + @@ -254,7 +250,7 @@ Davis, CA 95616, USA - + @@ -262,7 +258,7 @@ Davis, CA 95616, USA - + @@ -271,7 +267,7 @@ Davis, CA 95616, USA - + @@ -284,37 +280,37 @@ Davis, CA 95616, USA - + - + - + - + - + - + @@ -322,33 +318,33 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -356,14 +352,14 @@ Davis, CA 95616, USA - + - + @@ -371,14 +367,14 @@ Davis, CA 95616, USA - + - + @@ -386,7 +382,7 @@ Davis, CA 95616, USA - + @@ -394,23 +390,23 @@ Davis, CA 95616, USA - + - + - + - + @@ -592,4 +588,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/EnergyPreference.xml b/data_model/1.4/clusters/EnergyPreference.xml index 2534ccfc84..6bb1955359 100644 --- a/data_model/1.4/clusters/EnergyPreference.xml +++ b/data_model/1.4/clusters/EnergyPreference.xml @@ -1,61 +1,61 @@ - @@ -69,10 +69,10 @@ Davis, CA 95616, USA - + - + @@ -92,9 +92,11 @@ Davis, CA 95616, USA + + @@ -104,7 +106,7 @@ Davis, CA 95616, USA - + @@ -112,7 +114,7 @@ Davis, CA 95616, USA - + @@ -120,7 +122,7 @@ Davis, CA 95616, USA - + @@ -129,7 +131,7 @@ Davis, CA 95616, USA - + @@ -137,10 +139,10 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/FanControl.xml b/data_model/1.4/clusters/FanControl.xml index ec05b6f74e..7d57f4b170 100644 --- a/data_model/1.4/clusters/FanControl.xml +++ b/data_model/1.4/clusters/FanControl.xml @@ -1,61 +1,61 @@ - @@ -187,24 +187,17 @@ Davis, CA 95616, USA - + - - - - - - - - + - + @@ -215,7 +208,7 @@ Davis, CA 95616, USA - + @@ -223,23 +216,27 @@ Davis, CA 95616, USA - + - + + + - + - + + + - + @@ -247,7 +244,7 @@ Davis, CA 95616, USA - + @@ -255,7 +252,7 @@ Davis, CA 95616, USA - + @@ -263,7 +260,7 @@ Davis, CA 95616, USA - + @@ -271,7 +268,7 @@ Davis, CA 95616, USA - + @@ -295,4 +292,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/FlowMeasurement.xml b/data_model/1.4/clusters/FlowMeasurement.xml index 7ee97f586e..f1660fc631 100644 --- a/data_model/1.4/clusters/FlowMeasurement.xml +++ b/data_model/1.4/clusters/FlowMeasurement.xml @@ -1,61 +1,61 @@ - @@ -70,19 +70,22 @@ Davis, CA 95616, USA - + - + + + + - + - + @@ -92,4 +95,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/GeneralCommissioningCluster.xml b/data_model/1.4/clusters/GeneralCommissioningCluster.xml index 01450f959d..059e5b858e 100644 --- a/data_model/1.4/clusters/GeneralCommissioningCluster.xml +++ b/data_model/1.4/clusters/GeneralCommissioningCluster.xml @@ -1,59 +1,61 @@ - @@ -74,29 +76,29 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + @@ -130,27 +132,28 @@ Davis, CA 95616, USA - + - + + - + - + - + @@ -160,7 +163,7 @@ Davis, CA 95616, USA - + @@ -170,7 +173,7 @@ Davis, CA 95616, USA - + @@ -180,7 +183,7 @@ Davis, CA 95616, USA - + @@ -190,7 +193,7 @@ Davis, CA 95616, USA - + @@ -212,12 +215,12 @@ Davis, CA 95616, USA - + - + - + @@ -228,7 +231,7 @@ Davis, CA 95616, USA - + @@ -236,10 +239,10 @@ Davis, CA 95616, USA - + - + @@ -249,10 +252,10 @@ Davis, CA 95616, USA - + - + @@ -278,9 +281,9 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Group-Key-Management-Cluster.xml b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml index 1974047c01..31aa2c14ad 100644 --- a/data_model/1.4/clusters/Group-Key-Management-Cluster.xml +++ b/data_model/1.4/clusters/Group-Key-Management-Cluster.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,7 @@ Davis, CA 95616, USA - + @@ -125,7 +127,7 @@ Davis, CA 95616, USA - + @@ -136,7 +138,7 @@ Davis, CA 95616, USA - + @@ -147,7 +149,7 @@ Davis, CA 95616, USA - + @@ -167,7 +169,7 @@ Davis, CA 95616, USA - + @@ -179,52 +181,52 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + @@ -232,4 +234,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Groups.xml b/data_model/1.4/clusters/Groups.xml index 214e6c1828..2829d75985 100644 --- a/data_model/1.4/clusters/Groups.xml +++ b/data_model/1.4/clusters/Groups.xml @@ -1,61 +1,61 @@ - @@ -83,7 +83,7 @@ Davis, CA 95616, USA - + @@ -194,4 +194,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ICDManagement.xml b/data_model/1.4/clusters/ICDManagement.xml index d9cb7397da..a9d6724e7f 100644 --- a/data_model/1.4/clusters/ICDManagement.xml +++ b/data_model/1.4/clusters/ICDManagement.xml @@ -1,61 +1,61 @@ - @@ -64,7 +64,7 @@ Davis, CA 95616, USA - + @@ -94,7 +94,14 @@ Davis, CA 95616, USA - + + + + + + + + @@ -159,10 +166,12 @@ Davis, CA 95616, USA + + @@ -170,6 +179,7 @@ Davis, CA 95616, USA + @@ -178,24 +188,24 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -203,14 +213,14 @@ Davis, CA 95616, USA - + - + @@ -218,15 +228,15 @@ Davis, CA 95616, USA - + - + - + @@ -237,11 +247,14 @@ Davis, CA 95616, USA - + - + + + + @@ -258,11 +271,11 @@ Davis, CA 95616, USA - + - + @@ -286,7 +299,7 @@ Davis, CA 95616, USA - + @@ -314,4 +327,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Identify.xml b/data_model/1.4/clusters/Identify.xml index ddc3e33e9d..557d6e221c 100644 --- a/data_model/1.4/clusters/Identify.xml +++ b/data_model/1.4/clusters/Identify.xml @@ -1,61 +1,61 @@ - @@ -74,18 +74,16 @@ Davis, CA 95616, USA - - - - + + + + @@ -113,8 +111,7 @@ Davis, CA 95616, USA - + @@ -151,4 +148,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/IlluminanceMeasurement.xml b/data_model/1.4/clusters/IlluminanceMeasurement.xml index d7cb9a993d..e5388deb35 100644 --- a/data_model/1.4/clusters/IlluminanceMeasurement.xml +++ b/data_model/1.4/clusters/IlluminanceMeasurement.xml @@ -1,61 +1,61 @@ - @@ -75,28 +75,28 @@ Davis, CA 95616, USA - - - - + - + + + + - + - + @@ -107,8 +107,8 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/JointFabricDatastoreCluster.xml b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml index 4557cfae7f..234985e45d 100644 --- a/data_model/1.4/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/1.4/clusters/JointFabricDatastoreCluster.xml @@ -1,66 +1,68 @@ - - + @@ -77,159 +79,145 @@ Davis, CA 95616, USA - + - - - + - - + - - - - - + + + + + + + + + + + + + + - - - - - - + + - - + + - + - - - + - - - - - - - + - + - - - - - + + - - + - - + + - + - - - - - + @@ -237,66 +225,70 @@ Davis, CA 95616, USA - + - + - + - + - - + + + - - + + + - - + + + - - + + + - - + + - + - + - + - + - + - + @@ -318,11 +310,11 @@ Davis, CA 95616, USA - + - + @@ -348,26 +340,25 @@ Davis, CA 95616, USA - + - - + - + - + - + @@ -385,14 +376,14 @@ Davis, CA 95616, USA - + - + @@ -403,14 +394,14 @@ Davis, CA 95616, USA - + - + @@ -421,14 +412,14 @@ Davis, CA 95616, USA - + - + @@ -442,7 +433,7 @@ Davis, CA 95616, USA - + @@ -455,7 +446,7 @@ Davis, CA 95616, USA - + @@ -468,7 +459,7 @@ Davis, CA 95616, USA - + @@ -477,11 +468,11 @@ Davis, CA 95616, USA - + - + @@ -494,17 +485,17 @@ Davis, CA 95616, USA - + - + - + @@ -515,4 +506,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/JointFabricPKICluster.xml b/data_model/1.4/clusters/JointFabricPKICluster.xml index 41c9823626..15917a0c16 100644 --- a/data_model/1.4/clusters/JointFabricPKICluster.xml +++ b/data_model/1.4/clusters/JointFabricPKICluster.xml @@ -1,59 +1,61 @@ - @@ -66,76 +68,76 @@ Davis, CA 95616, USA - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/KeypadInput.xml b/data_model/1.4/clusters/KeypadInput.xml index efeb92ba28..db05639b0a 100644 --- a/data_model/1.4/clusters/KeypadInput.xml +++ b/data_model/1.4/clusters/KeypadInput.xml @@ -1,61 +1,61 @@ - @@ -81,100 +81,58 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -207,6 +165,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + @@ -264,6 +234,24 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + @@ -318,6 +306,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + @@ -344,7 +344,7 @@ Davis, CA 95616, USA - + @@ -364,4 +364,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml index a172d1e281..9e21318ad6 100644 --- a/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml +++ b/data_model/1.4/clusters/Label-Cluster-FixedLabelCluster.xml @@ -1,61 +1,61 @@ - @@ -65,13 +65,12 @@ Davis, CA 95616, USA - - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml index 2f8a371f74..3a04b25aa1 100644 --- a/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml +++ b/data_model/1.4/clusters/Label-Cluster-LabelCluster.xml @@ -1,63 +1,63 @@ - - + @@ -80,9 +80,7 @@ Davis, CA 95616, USA - - - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml b/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml index 466550f125..10abf4c48a 100644 --- a/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml +++ b/data_model/1.4/clusters/Label-Cluster-UserLabelCluster.xml @@ -1,61 +1,61 @@ - @@ -65,14 +65,12 @@ Davis, CA 95616, USA - - + - - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LaundryDryerControls.xml b/data_model/1.4/clusters/LaundryDryerControls.xml index 85f7871b26..802a133990 100644 --- a/data_model/1.4/clusters/LaundryDryerControls.xml +++ b/data_model/1.4/clusters/LaundryDryerControls.xml @@ -1,59 +1,61 @@ - @@ -88,9 +90,9 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LaundryWasherControls.xml b/data_model/1.4/clusters/LaundryWasherControls.xml index 046ecc3c51..d79ac13361 100644 --- a/data_model/1.4/clusters/LaundryWasherControls.xml +++ b/data_model/1.4/clusters/LaundryWasherControls.xml @@ -1,59 +1,61 @@ - @@ -66,10 +68,10 @@ Davis, CA 95616, USA - + - + @@ -109,7 +111,7 @@ Davis, CA 95616, USA - + @@ -131,4 +133,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LevelControl.xml b/data_model/1.4/clusters/LevelControl.xml index 1a034d5802..872eeb54ce 100644 --- a/data_model/1.4/clusters/LevelControl.xml +++ b/data_model/1.4/clusters/LevelControl.xml @@ -1,86 +1,83 @@ - - + - + - + - + - + @@ -120,13 +117,16 @@ Davis, CA 95616, USA - + - + + + + - + @@ -150,15 +150,21 @@ Davis, CA 95616, USA - + + + + - + - + + + + @@ -171,7 +177,9 @@ Davis, CA 95616, USA - + + + @@ -184,29 +192,32 @@ Davis, CA 95616, USA - + - + + + + - + - + - + - + @@ -315,4 +326,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LocalizationConfiguration.xml b/data_model/1.4/clusters/LocalizationConfiguration.xml index 6bc3abd506..81e66f57c4 100644 --- a/data_model/1.4/clusters/LocalizationConfiguration.xml +++ b/data_model/1.4/clusters/LocalizationConfiguration.xml @@ -1,59 +1,61 @@ - @@ -66,7 +68,7 @@ Davis, CA 95616, USA - + @@ -75,9 +77,9 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LocalizationTimeFormat.xml b/data_model/1.4/clusters/LocalizationTimeFormat.xml index 2de3724879..4ac0604884 100644 --- a/data_model/1.4/clusters/LocalizationTimeFormat.xml +++ b/data_model/1.4/clusters/LocalizationTimeFormat.xml @@ -1,59 +1,61 @@ - @@ -71,43 +73,43 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -125,24 +127,24 @@ Davis, CA 95616, USA - + - + - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LocalizationUnit.xml b/data_model/1.4/clusters/LocalizationUnit.xml index e08ce0e881..b68d951c6f 100644 --- a/data_model/1.4/clusters/LocalizationUnit.xml +++ b/data_model/1.4/clusters/LocalizationUnit.xml @@ -1,59 +1,61 @@ - @@ -84,10 +86,10 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/LowPower.xml b/data_model/1.4/clusters/LowPower.xml index 2e91a02c16..f4a143080e 100644 --- a/data_model/1.4/clusters/LowPower.xml +++ b/data_model/1.4/clusters/LowPower.xml @@ -1,61 +1,61 @@ - @@ -71,4 +71,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/MediaInput.xml b/data_model/1.4/clusters/MediaInput.xml index c01567f6e1..cc909cf911 100644 --- a/data_model/1.4/clusters/MediaInput.xml +++ b/data_model/1.4/clusters/MediaInput.xml @@ -1,61 +1,61 @@ - @@ -165,4 +165,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/MediaPlayback.xml b/data_model/1.4/clusters/MediaPlayback.xml index e37d5944ae..91aac58ef4 100644 --- a/data_model/1.4/clusters/MediaPlayback.xml +++ b/data_model/1.4/clusters/MediaPlayback.xml @@ -1,61 +1,61 @@ - @@ -161,15 +161,13 @@ Davis, CA 95616, USA - + - + @@ -223,7 +221,7 @@ Davis, CA 95616, USA - + @@ -231,7 +229,7 @@ Davis, CA 95616, USA - + @@ -239,7 +237,7 @@ Davis, CA 95616, USA - + @@ -254,7 +252,7 @@ Davis, CA 95616, USA - + @@ -262,7 +260,7 @@ Davis, CA 95616, USA - + @@ -270,7 +268,7 @@ Davis, CA 95616, USA - + @@ -279,7 +277,7 @@ Davis, CA 95616, USA - + @@ -287,7 +285,7 @@ Davis, CA 95616, USA - + @@ -296,7 +294,7 @@ Davis, CA 95616, USA - + @@ -472,4 +470,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Messages.xml b/data_model/1.4/clusters/Messages.xml index d2dbd28ba8..b8910f555d 100644 --- a/data_model/1.4/clusters/Messages.xml +++ b/data_model/1.4/clusters/Messages.xml @@ -1,100 +1,61 @@ - @@ -125,7 +86,6 @@ Davis, CA 95616, USA - @@ -195,9 +155,10 @@ Davis, CA 95616, USA - + + @@ -241,7 +202,7 @@ Davis, CA 95616, USA - + @@ -251,8 +212,9 @@ Davis, CA 95616, USA - + + @@ -284,7 +246,7 @@ Davis, CA 95616, USA - + @@ -292,24 +254,27 @@ Davis, CA 95616, USA - + - + + - + - + + - + - + + @@ -330,4 +295,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/MicrowaveOvenControl.xml b/data_model/1.4/clusters/MicrowaveOvenControl.xml index 2169f7b143..aa0e1f15cf 100644 --- a/data_model/1.4/clusters/MicrowaveOvenControl.xml +++ b/data_model/1.4/clusters/MicrowaveOvenControl.xml @@ -1,61 +1,61 @@ - @@ -85,11 +85,14 @@ Davis, CA 95616, USA - + + + + - + @@ -102,7 +105,7 @@ Davis, CA 95616, USA - + @@ -110,7 +113,7 @@ Davis, CA 95616, USA - + @@ -118,7 +121,7 @@ Davis, CA 95616, USA - + @@ -127,7 +130,7 @@ Davis, CA 95616, USA - + @@ -148,7 +151,7 @@ Davis, CA 95616, USA - + @@ -157,21 +160,27 @@ Davis, CA 95616, USA - + - - + + + + + - + - + + + + - + @@ -185,8 +194,11 @@ Davis, CA 95616, USA - + + + + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ModeBase.xml b/data_model/1.4/clusters/ModeBase.xml index c874eee69d..a9eb66e762 100644 --- a/data_model/1.4/clusters/ModeBase.xml +++ b/data_model/1.4/clusters/ModeBase.xml @@ -1,65 +1,66 @@ - - + - + @@ -73,14 +74,17 @@ Davis, CA 95616, USA + + + @@ -99,25 +103,25 @@ Davis, CA 95616, USA - + - + - + - + @@ -136,23 +140,21 @@ Davis, CA 95616, USA - - - - - - - - - - - + + + + + + + + + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ModeSelect.xml b/data_model/1.4/clusters/ModeSelect.xml index 6e6f062182..56d0a43a4a 100644 --- a/data_model/1.4/clusters/ModeSelect.xml +++ b/data_model/1.4/clusters/ModeSelect.xml @@ -1,59 +1,61 @@ - @@ -72,24 +74,29 @@ Davis, CA 95616, USA + + + + + @@ -97,38 +104,38 @@ Davis, CA 95616, USA - + - + - + - + - + - + @@ -145,4 +152,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml index 9fca7f31ca..742a136355 100644 --- a/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/1.4/clusters/Mode_DeviceEnergyManagement.xml @@ -1,61 +1,61 @@ - @@ -72,6 +72,22 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + @@ -86,12 +102,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -99,4 +111,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_Dishwasher.xml b/data_model/1.4/clusters/Mode_Dishwasher.xml index ca14d02672..ebc10d0d54 100644 --- a/data_model/1.4/clusters/Mode_Dishwasher.xml +++ b/data_model/1.4/clusters/Mode_Dishwasher.xml @@ -1,61 +1,61 @@ - @@ -73,6 +73,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -100,4 +115,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_EVSE.xml b/data_model/1.4/clusters/Mode_EVSE.xml index 863a2b7d64..b776028605 100644 --- a/data_model/1.4/clusters/Mode_EVSE.xml +++ b/data_model/1.4/clusters/Mode_EVSE.xml @@ -1,61 +1,61 @@ - @@ -72,6 +72,22 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + @@ -86,12 +102,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -99,4 +111,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_LaundryWasher.xml b/data_model/1.4/clusters/Mode_LaundryWasher.xml index a13253304d..9a8b64b75e 100644 --- a/data_model/1.4/clusters/Mode_LaundryWasher.xml +++ b/data_model/1.4/clusters/Mode_LaundryWasher.xml @@ -1,61 +1,61 @@ - @@ -73,6 +73,22 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + @@ -100,4 +116,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_MicrowaveOven.xml b/data_model/1.4/clusters/Mode_MicrowaveOven.xml index 371b294849..2b778183d0 100644 --- a/data_model/1.4/clusters/Mode_MicrowaveOven.xml +++ b/data_model/1.4/clusters/Mode_MicrowaveOven.xml @@ -1,61 +1,61 @@ - @@ -71,13 +71,25 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + - - - - - - + + @@ -93,4 +105,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_Oven.xml b/data_model/1.4/clusters/Mode_Oven.xml index 071f70d277..62e50c896f 100644 --- a/data_model/1.4/clusters/Mode_Oven.xml +++ b/data_model/1.4/clusters/Mode_Oven.xml @@ -1,61 +1,61 @@ - @@ -72,6 +72,28 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + @@ -86,12 +108,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -99,4 +117,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_RVCClean.xml b/data_model/1.4/clusters/Mode_RVCClean.xml index b73a4a5361..6d78cbe365 100644 --- a/data_model/1.4/clusters/Mode_RVCClean.xml +++ b/data_model/1.4/clusters/Mode_RVCClean.xml @@ -1,61 +1,61 @@ - @@ -73,6 +73,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -87,12 +102,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -100,4 +111,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_RVCRun.xml b/data_model/1.4/clusters/Mode_RVCRun.xml index c65bc38504..e5b0c0d7c9 100644 --- a/data_model/1.4/clusters/Mode_RVCRun.xml +++ b/data_model/1.4/clusters/Mode_RVCRun.xml @@ -1,61 +1,61 @@ - @@ -73,6 +73,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -87,12 +102,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -100,4 +111,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_Refrigerator.xml b/data_model/1.4/clusters/Mode_Refrigerator.xml index 692740e090..6a786048c3 100644 --- a/data_model/1.4/clusters/Mode_Refrigerator.xml +++ b/data_model/1.4/clusters/Mode_Refrigerator.xml @@ -1,61 +1,61 @@ - @@ -73,6 +73,20 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + @@ -100,4 +114,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Mode_WaterHeater.xml b/data_model/1.4/clusters/Mode_WaterHeater.xml index cc9c96e484..6d60836966 100644 --- a/data_model/1.4/clusters/Mode_WaterHeater.xml +++ b/data_model/1.4/clusters/Mode_WaterHeater.xml @@ -1,61 +1,61 @@ - @@ -71,6 +71,21 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + @@ -85,12 +100,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -98,4 +109,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/NetworkCommissioningCluster.xml b/data_model/1.4/clusters/NetworkCommissioningCluster.xml index 8ee15e1b47..25bf37ec11 100644 --- a/data_model/1.4/clusters/NetworkCommissioningCluster.xml +++ b/data_model/1.4/clusters/NetworkCommissioningCluster.xml @@ -1,59 +1,61 @@ - @@ -80,61 +82,61 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -212,6 +214,8 @@ Davis, CA 95616, USA + + @@ -240,7 +244,7 @@ Davis, CA 95616, USA - + @@ -262,7 +266,7 @@ Davis, CA 95616, USA - + @@ -270,11 +274,13 @@ Davis, CA 95616, USA - + + + - + @@ -285,7 +291,7 @@ Davis, CA 95616, USA - + @@ -296,29 +302,29 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -326,14 +332,14 @@ Davis, CA 95616, USA - + - + @@ -510,4 +516,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OTAProvider.xml b/data_model/1.4/clusters/OTAProvider.xml index f300a41951..feef66814c 100644 --- a/data_model/1.4/clusters/OTAProvider.xml +++ b/data_model/1.4/clusters/OTAProvider.xml @@ -1,59 +1,61 @@ - @@ -127,9 +129,9 @@ Davis, CA 95616, USA - + - + @@ -160,7 +162,7 @@ Davis, CA 95616, USA - + @@ -200,4 +202,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OTARequestor.xml b/data_model/1.4/clusters/OTARequestor.xml index ea7ec03c71..9d88c51822 100644 --- a/data_model/1.4/clusters/OTARequestor.xml +++ b/data_model/1.4/clusters/OTARequestor.xml @@ -1,59 +1,61 @@ - @@ -71,8 +73,7 @@ Davis, CA 95616, USA - + @@ -133,14 +134,14 @@ Davis, CA 95616, USA - + - + - + @@ -150,7 +151,7 @@ Davis, CA 95616, USA - + @@ -225,4 +226,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OccupancySensing.xml b/data_model/1.4/clusters/OccupancySensing.xml index 7400dde084..096614d209 100644 --- a/data_model/1.4/clusters/OccupancySensing.xml +++ b/data_model/1.4/clusters/OccupancySensing.xml @@ -1,61 +1,61 @@ - @@ -63,13 +63,7 @@ Davis, CA 95616, USA - + @@ -77,28 +71,28 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + @@ -151,13 +145,13 @@ Davis, CA 95616, USA - + - + @@ -166,7 +160,7 @@ Davis, CA 95616, USA - + @@ -175,20 +169,20 @@ Davis, CA 95616, USA - + - + - + @@ -214,7 +208,7 @@ Davis, CA 95616, USA - + @@ -262,7 +256,7 @@ Davis, CA 95616, USA - + @@ -311,7 +305,7 @@ Davis, CA 95616, USA - + @@ -324,7 +318,7 @@ Davis, CA 95616, USA - + @@ -344,7 +338,7 @@ Davis, CA 95616, USA - + @@ -365,7 +359,7 @@ Davis, CA 95616, USA - + @@ -378,7 +372,7 @@ Davis, CA 95616, USA - + @@ -398,7 +392,7 @@ Davis, CA 95616, USA - + @@ -427,4 +421,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OnOff.xml b/data_model/1.4/clusters/OnOff.xml index b1ea6ebba4..7151e61dfb 100644 --- a/data_model/1.4/clusters/OnOff.xml +++ b/data_model/1.4/clusters/OnOff.xml @@ -1,61 +1,61 @@ - @@ -78,7 +78,7 @@ Davis, CA 95616, USA - + @@ -128,11 +128,7 @@ Davis, CA 95616, USA - + @@ -143,12 +139,12 @@ Davis, CA 95616, USA - + - + - + @@ -168,7 +164,7 @@ Davis, CA 95616, USA - + @@ -235,4 +231,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OperationalCredentialCluster.xml b/data_model/1.4/clusters/OperationalCredentialCluster.xml index 26ae2c57a2..b59e905135 100644 --- a/data_model/1.4/clusters/OperationalCredentialCluster.xml +++ b/data_model/1.4/clusters/OperationalCredentialCluster.xml @@ -1,74 +1,71 @@ - - + - + - - - - - @@ -81,44 +78,44 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + @@ -130,7 +127,7 @@ Davis, CA 95616, USA - + @@ -155,37 +152,45 @@ Davis, CA 95616, USA - + - + + + - + - + + + - + - + - + + + - + - + + + @@ -198,18 +203,17 @@ Davis, CA 95616, USA - + - - + @@ -232,7 +236,7 @@ Davis, CA 95616, USA - + @@ -242,11 +246,10 @@ Davis, CA 95616, USA - - + @@ -262,9 +265,9 @@ Davis, CA 95616, USA - + - + @@ -322,4 +325,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OperationalState.xml b/data_model/1.4/clusters/OperationalState.xml index d02635cf65..be8fa18b90 100644 --- a/data_model/1.4/clusters/OperationalState.xml +++ b/data_model/1.4/clusters/OperationalState.xml @@ -1,59 +1,61 @@ - @@ -67,24 +69,30 @@ Davis, CA 95616, USA - + - + - + + + + - + + + + - + - + @@ -115,19 +123,19 @@ Davis, CA 95616, USA - + - + - + @@ -217,4 +225,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OperationalState_Oven.xml b/data_model/1.4/clusters/OperationalState_Oven.xml index e743fbf1d7..aec8f7d3f2 100644 --- a/data_model/1.4/clusters/OperationalState_Oven.xml +++ b/data_model/1.4/clusters/OperationalState_Oven.xml @@ -1,61 +1,61 @@ - @@ -77,4 +77,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/OperationalState_RVC.xml b/data_model/1.4/clusters/OperationalState_RVC.xml index fb9fea9d5d..3950183f25 100644 --- a/data_model/1.4/clusters/OperationalState_RVC.xml +++ b/data_model/1.4/clusters/OperationalState_RVC.xml @@ -1,61 +1,61 @@ - @@ -68,6 +68,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + @@ -94,6 +106,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + @@ -120,4 +144,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/PowerSourceCluster.xml b/data_model/1.4/clusters/PowerSourceCluster.xml index 82491aaa74..ca4b91403c 100644 --- a/data_model/1.4/clusters/PowerSourceCluster.xml +++ b/data_model/1.4/clusters/PowerSourceCluster.xml @@ -1,59 +1,61 @@ - @@ -557,32 +559,32 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -590,21 +592,21 @@ Davis, CA 95616, USA - + - + - + @@ -625,14 +627,14 @@ Davis, CA 95616, USA - + - + @@ -640,7 +642,7 @@ Davis, CA 95616, USA - + @@ -660,7 +662,7 @@ Davis, CA 95616, USA - + @@ -681,7 +683,7 @@ Davis, CA 95616, USA - + @@ -689,7 +691,7 @@ Davis, CA 95616, USA - + @@ -697,7 +699,7 @@ Davis, CA 95616, USA - + @@ -705,7 +707,7 @@ Davis, CA 95616, USA - + @@ -713,7 +715,7 @@ Davis, CA 95616, USA - + @@ -721,7 +723,7 @@ Davis, CA 95616, USA - + @@ -731,7 +733,7 @@ Davis, CA 95616, USA - + @@ -745,7 +747,7 @@ Davis, CA 95616, USA - + @@ -758,7 +760,7 @@ Davis, CA 95616, USA - + @@ -827,4 +829,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml b/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml index 61df60149c..d2f41b8977 100644 --- a/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml +++ b/data_model/1.4/clusters/PowerSourceConfigurationCluster.xml @@ -1,59 +1,61 @@ - @@ -67,9 +69,9 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/PowerTopology.xml b/data_model/1.4/clusters/PowerTopology.xml index eb0a2d74f5..3c9e88254c 100644 --- a/data_model/1.4/clusters/PowerTopology.xml +++ b/data_model/1.4/clusters/PowerTopology.xml @@ -1,59 +1,61 @@ - @@ -83,7 +85,7 @@ Davis, CA 95616, USA - + @@ -92,11 +94,11 @@ Davis, CA 95616, USA - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/PressureMeasurement.xml b/data_model/1.4/clusters/PressureMeasurement.xml index 09b9577cc8..a5ea5fe443 100644 --- a/data_model/1.4/clusters/PressureMeasurement.xml +++ b/data_model/1.4/clusters/PressureMeasurement.xml @@ -1,61 +1,61 @@ - @@ -75,19 +75,22 @@ Davis, CA 95616, USA - + - + + + + - + - + @@ -98,15 +101,18 @@ Davis, CA 95616, USA - + - + + + + - + @@ -114,7 +120,7 @@ Davis, CA 95616, USA - + @@ -135,4 +141,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml b/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml index 6796e79ac9..9356e7f559 100644 --- a/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml +++ b/data_model/1.4/clusters/ProxyConfiguration-Cluster.xml @@ -1,66 +1,68 @@ - - + @@ -68,24 +70,23 @@ Davis, CA 95616, USA - - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml b/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml index 7353386929..d87c7e67a7 100644 --- a/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml +++ b/data_model/1.4/clusters/ProxyDiscovery-Cluster.xml @@ -1,72 +1,74 @@ - - + - + @@ -81,8 +83,7 @@ Davis, CA 95616, USA - - + @@ -97,4 +98,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/PumpConfigurationControl.xml b/data_model/1.4/clusters/PumpConfigurationControl.xml index 2be5a44371..d9b81833da 100644 --- a/data_model/1.4/clusters/PumpConfigurationControl.xml +++ b/data_model/1.4/clusters/PumpConfigurationControl.xml @@ -1,59 +1,61 @@ - @@ -68,19 +70,19 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -96,44 +98,37 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + @@ -143,8 +138,7 @@ Davis, CA 95616, USA - + @@ -183,22 +177,22 @@ Davis, CA 95616, USA - + - + - + - + @@ -210,7 +204,7 @@ Davis, CA 95616, USA - + @@ -222,7 +216,7 @@ Davis, CA 95616, USA - + @@ -234,7 +228,7 @@ Davis, CA 95616, USA - + @@ -246,7 +240,7 @@ Davis, CA 95616, USA - + @@ -258,7 +252,7 @@ Davis, CA 95616, USA - + @@ -270,7 +264,7 @@ Davis, CA 95616, USA - + @@ -282,7 +276,7 @@ Davis, CA 95616, USA - + @@ -294,7 +288,7 @@ Davis, CA 95616, USA - + @@ -307,7 +301,7 @@ Davis, CA 95616, USA - + @@ -320,56 +314,56 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + @@ -447,4 +441,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/RefrigeratorAlarm.xml b/data_model/1.4/clusters/RefrigeratorAlarm.xml index a3a7501181..98ee14fb7e 100644 --- a/data_model/1.4/clusters/RefrigeratorAlarm.xml +++ b/data_model/1.4/clusters/RefrigeratorAlarm.xml @@ -1,61 +1,61 @@ - @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + @@ -82,4 +82,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ResourceMonitoring.xml b/data_model/1.4/clusters/ResourceMonitoring.xml index 911ad11373..d263bb53b8 100644 --- a/data_model/1.4/clusters/ResourceMonitoring.xml +++ b/data_model/1.4/clusters/ResourceMonitoring.xml @@ -1,63 +1,63 @@ - - + @@ -137,7 +137,7 @@ Davis, CA 95616, USA - + @@ -153,13 +153,13 @@ Davis, CA 95616, USA - + - + @@ -172,4 +172,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Scenes.xml b/data_model/1.4/clusters/Scenes.xml index 3de80abbc5..53bea65b8f 100644 --- a/data_model/1.4/clusters/Scenes.xml +++ b/data_model/1.4/clusters/Scenes.xml @@ -1,61 +1,61 @@ - @@ -117,29 +117,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - @@ -153,7 +130,7 @@ Davis, CA 95616, USA - + @@ -167,12 +144,12 @@ Davis, CA 95616, USA - + - + @@ -361,6 +338,12 @@ Davis, CA 95616, USA + + + + + + @@ -402,4 +385,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ServiceArea.xml b/data_model/1.4/clusters/ServiceArea.xml index 3ea629625c..9f2c8b3584 100644 --- a/data_model/1.4/clusters/ServiceArea.xml +++ b/data_model/1.4/clusters/ServiceArea.xml @@ -1,59 +1,61 @@ - @@ -76,26 +78,49 @@ Davis, CA 95616, USA - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -175,12 +200,12 @@ Davis, CA 95616, USA - + - + @@ -234,4 +259,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/SmokeCOAlarm.xml b/data_model/1.4/clusters/SmokeCOAlarm.xml index 482a8a82f2..838f0b2e69 100644 --- a/data_model/1.4/clusters/SmokeCOAlarm.xml +++ b/data_model/1.4/clusters/SmokeCOAlarm.xml @@ -1,61 +1,61 @@ - @@ -67,10 +67,10 @@ Davis, CA 95616, USA - + - + @@ -163,31 +163,31 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -196,12 +196,12 @@ Davis, CA 95616, USA - + - + @@ -226,7 +226,7 @@ Davis, CA 95616, USA - + @@ -305,4 +305,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Switch.xml b/data_model/1.4/clusters/Switch.xml index 8662d262f0..def888d4f6 100644 --- a/data_model/1.4/clusters/Switch.xml +++ b/data_model/1.4/clusters/Switch.xml @@ -1,66 +1,66 @@ - - + @@ -116,19 +116,19 @@ Davis, CA 95616, USA - + - + - + - + @@ -143,7 +143,7 @@ Davis, CA 95616, USA - + @@ -153,7 +153,7 @@ Davis, CA 95616, USA - + @@ -163,7 +163,7 @@ Davis, CA 95616, USA - + @@ -173,7 +173,7 @@ Davis, CA 95616, USA - + @@ -183,7 +183,7 @@ Davis, CA 95616, USA - + @@ -198,11 +198,14 @@ Davis, CA 95616, USA - + - + + + + @@ -212,12 +215,14 @@ Davis, CA 95616, USA - + - + + + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/TargetNavigator.xml b/data_model/1.4/clusters/TargetNavigator.xml index b1fcff6d60..8cbe2d4282 100644 --- a/data_model/1.4/clusters/TargetNavigator.xml +++ b/data_model/1.4/clusters/TargetNavigator.xml @@ -1,61 +1,61 @@ - @@ -139,4 +139,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/TemperatureControl.xml b/data_model/1.4/clusters/TemperatureControl.xml index 511761b24b..e7db3b6883 100644 --- a/data_model/1.4/clusters/TemperatureControl.xml +++ b/data_model/1.4/clusters/TemperatureControl.xml @@ -1,59 +1,61 @@ - @@ -82,11 +84,14 @@ Davis, CA 95616, USA - + + + + - + @@ -94,7 +99,7 @@ Davis, CA 95616, USA - + @@ -102,7 +107,7 @@ Davis, CA 95616, USA - + @@ -144,4 +149,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/TemperatureMeasurement.xml b/data_model/1.4/clusters/TemperatureMeasurement.xml index 5c1df46ccb..88e1f4cc08 100644 --- a/data_model/1.4/clusters/TemperatureMeasurement.xml +++ b/data_model/1.4/clusters/TemperatureMeasurement.xml @@ -1,61 +1,61 @@ - @@ -71,19 +71,22 @@ Davis, CA 95616, USA - + - + + + + - + - + @@ -93,4 +96,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/Thermostat.xml b/data_model/1.4/clusters/Thermostat.xml index 6c5584e087..c82c878be9 100644 --- a/data_model/1.4/clusters/Thermostat.xml +++ b/data_model/1.4/clusters/Thermostat.xml @@ -1,59 +1,61 @@ - @@ -63,8 +65,7 @@ Davis, CA 95616, USA - + @@ -77,7 +78,7 @@ Davis, CA 95616, USA - + @@ -85,7 +86,7 @@ Davis, CA 95616, USA - + @@ -116,9 +117,9 @@ Davis, CA 95616, USA - - - + + + @@ -197,7 +198,7 @@ Davis, CA 95616, USA - + @@ -325,12 +326,12 @@ Davis, CA 95616, USA - + - + @@ -397,10 +398,10 @@ Davis, CA 95616, USA - + - + @@ -444,16 +445,16 @@ Davis, CA 95616, USA - + - + - + - + @@ -504,12 +505,12 @@ Davis, CA 95616, USA - + - + @@ -532,13 +533,13 @@ Davis, CA 95616, USA - + - + @@ -581,7 +582,10 @@ Davis, CA 95616, USA - + + + + @@ -627,7 +631,9 @@ Davis, CA 95616, USA - + + + @@ -652,12 +658,12 @@ Davis, CA 95616, USA - + - + @@ -666,88 +672,88 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -756,9 +762,9 @@ Davis, CA 95616, USA - + - + @@ -767,71 +773,67 @@ Davis, CA 95616, USA - + + - + - + + - + - + + - + - + + - + - + - + - + - + - - + - + - - - - - - - @@ -839,9 +841,9 @@ Davis, CA 95616, USA - + - + @@ -849,37 +851,37 @@ Davis, CA 95616, USA - + - + - + - + - + - + @@ -889,97 +891,113 @@ Davis, CA 95616, USA - + - + - + - + - + - + + + + - + - + - + + + - + - + - + + + + - + - + - + + + + - + - + - + + + - + - + - + + + + - + - + - + - + - + - + @@ -989,25 +1007,25 @@ Davis, CA 95616, USA - + - + - + - + @@ -1016,7 +1034,7 @@ Davis, CA 95616, USA - + @@ -1024,35 +1042,35 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -1060,7 +1078,7 @@ Davis, CA 95616, USA - + @@ -1069,16 +1087,18 @@ Davis, CA 95616, USA - + - + + + - + @@ -1086,7 +1106,7 @@ Davis, CA 95616, USA - + @@ -1145,34 +1165,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1193,12 +1185,6 @@ Davis, CA 95616, USA - - - - - - @@ -1221,4 +1207,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml index 8b33ccedbd..a77c6c4fec 100644 --- a/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml +++ b/data_model/1.4/clusters/ThermostatUserInterfaceConfiguration.xml @@ -1,59 +1,61 @@ - @@ -116,4 +118,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ThreadBorderRouterManagement.xml b/data_model/1.4/clusters/ThreadBorderRouterManagement.xml index 7ae4edab62..4059db7ebd 100644 --- a/data_model/1.4/clusters/ThreadBorderRouterManagement.xml +++ b/data_model/1.4/clusters/ThreadBorderRouterManagement.xml @@ -1,61 +1,61 @@ - @@ -79,26 +79,26 @@ Davis, CA 95616, USA - + - + - + - + - + @@ -140,4 +140,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ThreadNetworkDirectory.xml b/data_model/1.4/clusters/ThreadNetworkDirectory.xml index e5112991e6..c814ace82c 100644 --- a/data_model/1.4/clusters/ThreadNetworkDirectory.xml +++ b/data_model/1.4/clusters/ThreadNetworkDirectory.xml @@ -1,61 +1,61 @@ - @@ -69,7 +69,7 @@ Davis, CA 95616, USA - + @@ -86,20 +86,22 @@ Davis, CA 95616, USA - + - + - + - + + + - + @@ -118,7 +120,7 @@ Davis, CA 95616, USA - + @@ -126,7 +128,7 @@ Davis, CA 95616, USA - + @@ -137,4 +139,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/TimeSync.xml b/data_model/1.4/clusters/TimeSync.xml index e72a9d3246..9a50063b75 100644 --- a/data_model/1.4/clusters/TimeSync.xml +++ b/data_model/1.4/clusters/TimeSync.xml @@ -1,62 +1,61 @@ - @@ -99,7 +98,11 @@ Davis, CA 95616, USA - + + + + + @@ -213,7 +216,7 @@ Davis, CA 95616, USA - + @@ -228,14 +231,14 @@ Davis, CA 95616, USA - + - + @@ -244,35 +247,35 @@ Davis, CA 95616, USA - + - + - + - + - + - + @@ -280,7 +283,7 @@ Davis, CA 95616, USA - + @@ -288,15 +291,15 @@ Davis, CA 95616, USA - + - + - + @@ -394,7 +397,6 @@ Davis, CA 95616, USA - @@ -408,4 +410,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ValidProxies-Cluster.xml b/data_model/1.4/clusters/ValidProxies-Cluster.xml index 51cfeedb46..518b4aad57 100644 --- a/data_model/1.4/clusters/ValidProxies-Cluster.xml +++ b/data_model/1.4/clusters/ValidProxies-Cluster.xml @@ -1,66 +1,68 @@ - - + @@ -68,18 +70,18 @@ Davis, CA 95616, USA - + - + - + @@ -95,4 +97,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/ValveConfigurationControl.xml b/data_model/1.4/clusters/ValveConfigurationControl.xml index 6f38375a1a..844eeb781e 100644 --- a/data_model/1.4/clusters/ValveConfigurationControl.xml +++ b/data_model/1.4/clusters/ValveConfigurationControl.xml @@ -1,61 +1,61 @@ - @@ -72,7 +72,11 @@ Davis, CA 95616, USA - + + + + + @@ -108,55 +112,55 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + - + - + @@ -168,7 +172,7 @@ Davis, CA 95616, USA - + @@ -217,4 +221,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/WakeOnLAN.xml b/data_model/1.4/clusters/WakeOnLAN.xml index 092e0a8ea8..a315346bfb 100644 --- a/data_model/1.4/clusters/WakeOnLAN.xml +++ b/data_model/1.4/clusters/WakeOnLAN.xml @@ -1,82 +1,82 @@ - - + - + - + - \ No newline at end of file + diff --git a/data_model/1.4/clusters/WaterContentMeasurement.xml b/data_model/1.4/clusters/WaterContentMeasurement.xml index b613bf4e15..0f2bf36d84 100644 --- a/data_model/1.4/clusters/WaterContentMeasurement.xml +++ b/data_model/1.4/clusters/WaterContentMeasurement.xml @@ -1,88 +1,91 @@ - - + - + - + - + + + + - + - + @@ -92,4 +95,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/WaterHeaterManagement.xml b/data_model/1.4/clusters/WaterHeaterManagement.xml index 49cdf1eeb2..6193fe7eee 100644 --- a/data_model/1.4/clusters/WaterHeaterManagement.xml +++ b/data_model/1.4/clusters/WaterHeaterManagement.xml @@ -1,61 +1,61 @@ - @@ -105,8 +105,19 @@ Davis, CA 95616, USA - - + + + + + + + + + + + + + @@ -116,7 +127,7 @@ Davis, CA 95616, USA - + @@ -124,6 +135,9 @@ Davis, CA 95616, USA + + + @@ -131,7 +145,7 @@ Davis, CA 95616, USA - + @@ -188,4 +202,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/WiFiNetworkManagement.xml b/data_model/1.4/clusters/WiFiNetworkManagement.xml index 3aad5935d2..59a11866f0 100644 --- a/data_model/1.4/clusters/WiFiNetworkManagement.xml +++ b/data_model/1.4/clusters/WiFiNetworkManagement.xml @@ -1,61 +1,61 @@ - @@ -68,13 +68,13 @@ Davis, CA 95616, USA - + - + @@ -91,4 +91,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/WindowCovering.xml b/data_model/1.4/clusters/WindowCovering.xml index dd6d2293cc..f421678aad 100644 --- a/data_model/1.4/clusters/WindowCovering.xml +++ b/data_model/1.4/clusters/WindowCovering.xml @@ -1,61 +1,61 @@ - @@ -71,10 +71,10 @@ Davis, CA 95616, USA - + - + @@ -305,7 +305,7 @@ Davis, CA 95616, USA - + @@ -349,15 +349,15 @@ Davis, CA 95616, USA - + - + - + @@ -405,13 +405,13 @@ Davis, CA 95616, USA - + - + @@ -422,7 +422,7 @@ Davis, CA 95616, USA - + @@ -433,7 +433,7 @@ Davis, CA 95616, USA - + @@ -441,11 +441,14 @@ Davis, CA 95616, USA - + + + + - + @@ -453,31 +456,34 @@ Davis, CA 95616, USA - + + + + - + - + - + - + @@ -487,7 +493,7 @@ Davis, CA 95616, USA - + @@ -497,13 +503,12 @@ Davis, CA 95616, USA - + - - + @@ -513,7 +518,7 @@ Davis, CA 95616, USA - + @@ -523,13 +528,13 @@ Davis, CA 95616, USA - + - + @@ -540,7 +545,7 @@ Davis, CA 95616, USA - + @@ -551,7 +556,7 @@ Davis, CA 95616, USA - + @@ -563,7 +568,7 @@ Davis, CA 95616, USA - + @@ -575,7 +580,7 @@ Davis, CA 95616, USA - + @@ -587,7 +592,7 @@ Davis, CA 95616, USA - + @@ -606,11 +611,10 @@ Davis, CA 95616, USA - + - + - @@ -620,7 +624,7 @@ Davis, CA 95616, USA - + @@ -701,4 +705,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml index 354e24c424..868c40de2d 100644 --- a/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-ActionsCluster.xml @@ -1,61 +1,61 @@ - @@ -101,7 +101,7 @@ Davis, CA 95616, USA - + @@ -166,7 +166,8 @@ Davis, CA 95616, USA - + + @@ -184,21 +185,18 @@ Davis, CA 95616, USA - - - + + - - @@ -379,4 +377,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 3f7eda5f1e..b9847f4f41 100644 --- a/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/1.4/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -1,61 +1,61 @@ - @@ -74,72 +74,134 @@ Davis, CA 95616, USA - + + + + - + + + + - + + + - + + + + - - + + + + + + + + - + + + + - + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + - + + - + + + + - + + + - + + + - + + + + - + + + + @@ -188,4 +250,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/clusters/cluster_ids.json b/data_model/1.4/clusters/cluster_ids.json index 687bbc3229..7850a064e2 100644 --- a/data_model/1.4/clusters/cluster_ids.json +++ b/data_model/1.4/clusters/cluster_ids.json @@ -5,7 +5,7 @@ "8": "Level Control", "29": "Descriptor", "30": "Binding", - "31": "AccessControl", + "31": "Access Control", "37": "Actions", "40": "Basic Information", "41": "OTA Software Update Provider", @@ -28,14 +28,14 @@ "59": "Switch", "60": "Administrator Commissioning", "62": "Operational Credentials", - "63": "GroupKeyManagement", + "63": "Group Key Management", "64": "Fixed Label", "65": "User Label", - "66": "ProxyConfiguration", - "67": "ProxyDiscovery", - "68": "ValidProxies", + "66": "Proxy Configuration", + "67": "Proxy Discovery", + "68": "Valid Proxies", "69": "Boolean State", - "70": "ICDManagement", + "70": "ICD Management", "72": "Oven Cavity Operational State", "73": "Oven Mode", "74": "Laundry Dryer Controls", @@ -100,7 +100,7 @@ "1105": "Wi-Fi Network Management", "1106": "Thread Border Router Management", "1107": "Thread Network Directory", - "1283": "Wake on LAN", + "1283": "Wake On LAN", "1284": "Channel", "1285": "Target Navigator", "1286": "Media Playback", @@ -116,6 +116,6 @@ "1296": "Content App Observer", "1872": "Ecosystem Information", "1873": "Commissioner Control", - "1874": "Joint Fabric Datastore Cluster", + "1874": "Joint Fabric Datastore", "1875": "Joint Fabric PKI" } diff --git a/data_model/1.4/device_types/Aggregator.xml b/data_model/1.4/device_types/Aggregator.xml index be60497652..7e940b075a 100644 --- a/data_model/1.4/device_types/Aggregator.xml +++ b/data_model/1.4/device_types/Aggregator.xml @@ -1,59 +1,61 @@ - @@ -61,6 +63,9 @@ Davis, CA 95616, USA + + + @@ -74,4 +79,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/AirPurifier.xml b/data_model/1.4/device_types/AirPurifier.xml index 62045f090c..b8aac8b444 100644 --- a/data_model/1.4/device_types/AirPurifier.xml +++ b/data_model/1.4/device_types/AirPurifier.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -82,4 +83,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/AirQualitySensor.xml b/data_model/1.4/device_types/AirQualitySensor.xml index 756b42e437..97df65166d 100644 --- a/data_model/1.4/device_types/AirQualitySensor.xml +++ b/data_model/1.4/device_types/AirQualitySensor.xml @@ -1,66 +1,67 @@ - - @@ -105,4 +106,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/BaseDeviceType.xml b/data_model/1.4/device_types/BaseDeviceType.xml index 272b74feb5..676f12eec9 100644 --- a/data_model/1.4/device_types/BaseDeviceType.xml +++ b/data_model/1.4/device_types/BaseDeviceType.xml @@ -1,59 +1,59 @@ - @@ -87,4 +87,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/BasicVideoPlayer.xml b/data_model/1.4/device_types/BasicVideoPlayer.xml index d35bbed321..79f2f4773e 100644 --- a/data_model/1.4/device_types/BasicVideoPlayer.xml +++ b/data_model/1.4/device_types/BasicVideoPlayer.xml @@ -1,59 +1,61 @@ - @@ -104,4 +106,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/BatteryStorage.xml b/data_model/1.4/device_types/BatteryStorage.xml index 5f09eeb1d2..6351fd3eaf 100644 --- a/data_model/1.4/device_types/BatteryStorage.xml +++ b/data_model/1.4/device_types/BatteryStorage.xml @@ -1,69 +1,70 @@ - - - \ No newline at end of file + diff --git a/data_model/1.4/device_types/BridgedNode.xml b/data_model/1.4/device_types/BridgedNode.xml index 1ea7a1984f..1b308650c8 100644 --- a/data_model/1.4/device_types/BridgedNode.xml +++ b/data_model/1.4/device_types/BridgedNode.xml @@ -1,59 +1,61 @@ - @@ -62,6 +64,9 @@ Davis, CA 95616, USA + + + @@ -93,4 +98,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/CastingVideoClient.xml b/data_model/1.4/device_types/CastingVideoClient.xml index 949142a6bc..24f535da7f 100644 --- a/data_model/1.4/device_types/CastingVideoClient.xml +++ b/data_model/1.4/device_types/CastingVideoClient.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -118,4 +119,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/CastingVideoPlayer.xml b/data_model/1.4/device_types/CastingVideoPlayer.xml index 5c88cf9294..77e5f5725a 100644 --- a/data_model/1.4/device_types/CastingVideoPlayer.xml +++ b/data_model/1.4/device_types/CastingVideoPlayer.xml @@ -1,59 +1,61 @@ - @@ -62,9 +64,7 @@ Davis, CA 95616, USA - + @@ -123,4 +123,4 @@ launch Content Apps and represent these apps as separate endpoints."/> - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ColorDimmerSwitch.xml b/data_model/1.4/device_types/ColorDimmerSwitch.xml index abc027eaec..5a4c7af4ed 100644 --- a/data_model/1.4/device_types/ColorDimmerSwitch.xml +++ b/data_model/1.4/device_types/ColorDimmerSwitch.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -89,4 +90,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ColorTemperatureLight.xml b/data_model/1.4/device_types/ColorTemperatureLight.xml index 56db5416cf..4e7a37ac8c 100644 --- a/data_model/1.4/device_types/ColorTemperatureLight.xml +++ b/data_model/1.4/device_types/ColorTemperatureLight.xml @@ -1,59 +1,61 @@ - @@ -63,12 +65,11 @@ Davis, CA 95616, USA - - + @@ -95,13 +96,13 @@ Davis, CA 95616, USA - + - + - + @@ -112,7 +113,7 @@ Davis, CA 95616, USA - + @@ -128,7 +129,7 @@ Davis, CA 95616, USA - + @@ -137,4 +138,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ContactSensor.xml b/data_model/1.4/device_types/ContactSensor.xml index 2767e5e37a..88e82576ed 100644 --- a/data_model/1.4/device_types/ContactSensor.xml +++ b/data_model/1.4/device_types/ContactSensor.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -73,4 +74,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ContentApp.xml b/data_model/1.4/device_types/ContentApp.xml index 81b967db9c..c32856e567 100644 --- a/data_model/1.4/device_types/ContentApp.xml +++ b/data_model/1.4/device_types/ContentApp.xml @@ -1,59 +1,61 @@ - @@ -61,6 +63,9 @@ Davis, CA 95616, USA + + + @@ -102,4 +107,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ControlBridge.xml b/data_model/1.4/device_types/ControlBridge.xml index ab07228e72..be36b89991 100644 --- a/data_model/1.4/device_types/ControlBridge.xml +++ b/data_model/1.4/device_types/ControlBridge.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -95,4 +96,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/CookSurface.xml b/data_model/1.4/device_types/CookSurface.xml index 3a0e8f062c..35bdc0c3b9 100644 --- a/data_model/1.4/device_types/CookSurface.xml +++ b/data_model/1.4/device_types/CookSurface.xml @@ -1,66 +1,67 @@ - - @@ -71,10 +72,10 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Cooktop.xml b/data_model/1.4/device_types/Cooktop.xml index 9164641c06..e780e390cd 100644 --- a/data_model/1.4/device_types/Cooktop.xml +++ b/data_model/1.4/device_types/Cooktop.xml @@ -1,66 +1,67 @@ - - @@ -74,4 +75,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DeviceEnergyManagement.xml b/data_model/1.4/device_types/DeviceEnergyManagement.xml index 0a90a21edb..ae832a8330 100644 --- a/data_model/1.4/device_types/DeviceEnergyManagement.xml +++ b/data_model/1.4/device_types/DeviceEnergyManagement.xml @@ -1,59 +1,61 @@ - @@ -61,6 +63,9 @@ Davis, CA 95616, USA + + + @@ -81,4 +86,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DimmableLight.xml b/data_model/1.4/device_types/DimmableLight.xml index 4d6c53e4ae..7d6fdd016a 100644 --- a/data_model/1.4/device_types/DimmableLight.xml +++ b/data_model/1.4/device_types/DimmableLight.xml @@ -1,59 +1,61 @@ - @@ -62,12 +64,11 @@ Davis, CA 95616, USA - - + @@ -94,13 +95,13 @@ Davis, CA 95616, USA - + - + - + @@ -111,7 +112,7 @@ Davis, CA 95616, USA - + @@ -123,4 +124,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DimmablePlug-InUnit.xml b/data_model/1.4/device_types/DimmablePlug-InUnit.xml index 73fd2a37c4..bf49f0cc47 100644 --- a/data_model/1.4/device_types/DimmablePlug-InUnit.xml +++ b/data_model/1.4/device_types/DimmablePlug-InUnit.xml @@ -1,59 +1,61 @@ - @@ -63,12 +65,11 @@ Davis, CA 95616, USA - - + @@ -95,13 +96,13 @@ Davis, CA 95616, USA - + - + - + @@ -112,7 +113,7 @@ Davis, CA 95616, USA - + @@ -124,4 +125,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DimmerSwitch.xml b/data_model/1.4/device_types/DimmerSwitch.xml index 9dce28fdd7..b4ff8be95f 100644 --- a/data_model/1.4/device_types/DimmerSwitch.xml +++ b/data_model/1.4/device_types/DimmerSwitch.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -86,4 +87,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Dishwasher.xml b/data_model/1.4/device_types/Dishwasher.xml index b13f9a42eb..f64ece8036 100644 --- a/data_model/1.4/device_types/Dishwasher.xml +++ b/data_model/1.4/device_types/Dishwasher.xml @@ -1,66 +1,67 @@ - - @@ -84,7 +85,7 @@ Davis, CA 95616, USA - + @@ -96,4 +97,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DoorLock.xml b/data_model/1.4/device_types/DoorLock.xml index 622b9a8bfc..8c42604ec8 100644 --- a/data_model/1.4/device_types/DoorLock.xml +++ b/data_model/1.4/device_types/DoorLock.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -98,12 +99,12 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/device_types/DoorLockController.xml b/data_model/1.4/device_types/DoorLockController.xml index 40749d77b3..1ac00447f1 100644 --- a/data_model/1.4/device_types/DoorLockController.xml +++ b/data_model/1.4/device_types/DoorLockController.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -80,4 +81,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/EVSE.xml b/data_model/1.4/device_types/EVSE.xml index d468cb8a18..2f7c30d3fc 100644 --- a/data_model/1.4/device_types/EVSE.xml +++ b/data_model/1.4/device_types/EVSE.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -76,4 +77,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ElectricalSensor.xml b/data_model/1.4/device_types/ElectricalSensor.xml index 75c4b0bb7c..c97dcf9516 100644 --- a/data_model/1.4/device_types/ElectricalSensor.xml +++ b/data_model/1.4/device_types/ElectricalSensor.xml @@ -1,59 +1,61 @@ - @@ -62,13 +64,13 @@ Davis, CA 95616, USA - + - + - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ExtendedColorLight.xml b/data_model/1.4/device_types/ExtendedColorLight.xml index 0678094669..0c6a880d1f 100644 --- a/data_model/1.4/device_types/ExtendedColorLight.xml +++ b/data_model/1.4/device_types/ExtendedColorLight.xml @@ -1,59 +1,61 @@ - @@ -63,12 +65,11 @@ Davis, CA 95616, USA - - + @@ -95,13 +96,13 @@ Davis, CA 95616, USA - + - + - + @@ -112,7 +113,7 @@ Davis, CA 95616, USA - + @@ -132,7 +133,7 @@ Davis, CA 95616, USA - + @@ -140,7 +141,7 @@ Davis, CA 95616, USA - + @@ -149,4 +150,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ExtractorHood.xml b/data_model/1.4/device_types/ExtractorHood.xml index 3e8064adb1..18b46b3b26 100644 --- a/data_model/1.4/device_types/ExtractorHood.xml +++ b/data_model/1.4/device_types/ExtractorHood.xml @@ -1,66 +1,67 @@ - - @@ -86,4 +87,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Fan.xml b/data_model/1.4/device_types/Fan.xml index e5184cfe22..81fed1fc3e 100644 --- a/data_model/1.4/device_types/Fan.xml +++ b/data_model/1.4/device_types/Fan.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -76,8 +77,8 @@ Davis, CA 95616, USA - - + + @@ -86,4 +87,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/FlowSensor.xml b/data_model/1.4/device_types/FlowSensor.xml index 6a9023060e..1ae8691382 100644 --- a/data_model/1.4/device_types/FlowSensor.xml +++ b/data_model/1.4/device_types/FlowSensor.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/GenericSwitch.xml b/data_model/1.4/device_types/GenericSwitch.xml index b8bc394b96..ac2e2b9128 100644 --- a/data_model/1.4/device_types/GenericSwitch.xml +++ b/data_model/1.4/device_types/GenericSwitch.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -71,4 +72,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/HeatPump.xml b/data_model/1.4/device_types/HeatPump.xml index 012060e034..d0227ffca0 100644 --- a/data_model/1.4/device_types/HeatPump.xml +++ b/data_model/1.4/device_types/HeatPump.xml @@ -1,66 +1,67 @@ - - @@ -69,4 +70,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/HumiditySensor.xml b/data_model/1.4/device_types/HumiditySensor.xml index c6def400a2..7a2a8c61e5 100644 --- a/data_model/1.4/device_types/HumiditySensor.xml +++ b/data_model/1.4/device_types/HumiditySensor.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/JointFabricAdmin.xml b/data_model/1.4/device_types/JointFabricAdmin.xml index 6c63dc9bdd..b9fa8752eb 100644 --- a/data_model/1.4/device_types/JointFabricAdmin.xml +++ b/data_model/1.4/device_types/JointFabricAdmin.xml @@ -1,59 +1,61 @@ - @@ -68,4 +70,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/LaundryDryer.xml b/data_model/1.4/device_types/LaundryDryer.xml index 36dc182c39..7c51ba5531 100644 --- a/data_model/1.4/device_types/LaundryDryer.xml +++ b/data_model/1.4/device_types/LaundryDryer.xml @@ -1,66 +1,67 @@ - - @@ -84,7 +85,7 @@ Davis, CA 95616, USA - + @@ -96,4 +97,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/LaundryWasher.xml b/data_model/1.4/device_types/LaundryWasher.xml index d88ee7e9fd..41d440039a 100644 --- a/data_model/1.4/device_types/LaundryWasher.xml +++ b/data_model/1.4/device_types/LaundryWasher.xml @@ -1,66 +1,67 @@ - - @@ -81,7 +82,7 @@ Davis, CA 95616, USA - + @@ -96,4 +97,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/LightSensor.xml b/data_model/1.4/device_types/LightSensor.xml index e7200e3477..d2b2d3a9ca 100644 --- a/data_model/1.4/device_types/LightSensor.xml +++ b/data_model/1.4/device_types/LightSensor.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -76,4 +77,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/MicrowaveOven.xml b/data_model/1.4/device_types/MicrowaveOven.xml index 98d2902d04..e02cf7afdc 100644 --- a/data_model/1.4/device_types/MicrowaveOven.xml +++ b/data_model/1.4/device_types/MicrowaveOven.xml @@ -1,66 +1,67 @@ - - @@ -74,7 +75,7 @@ Davis, CA 95616, USA - + @@ -91,4 +92,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ModeSelectDeviceType.xml b/data_model/1.4/device_types/ModeSelectDeviceType.xml index ad4cf56671..28c7ff3e9a 100644 --- a/data_model/1.4/device_types/ModeSelectDeviceType.xml +++ b/data_model/1.4/device_types/ModeSelectDeviceType.xml @@ -1,69 +1,70 @@ - - - \ No newline at end of file + diff --git a/data_model/1.4/device_types/MountedDimmableLoadControl.xml b/data_model/1.4/device_types/MountedDimmableLoadControl.xml index d0cee6e5ef..d282009d99 100644 --- a/data_model/1.4/device_types/MountedDimmableLoadControl.xml +++ b/data_model/1.4/device_types/MountedDimmableLoadControl.xml @@ -1,71 +1,72 @@ - - - + @@ -92,13 +93,13 @@ Davis, CA 95616, USA - + - + - + @@ -109,7 +110,7 @@ Davis, CA 95616, USA - + @@ -121,4 +122,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/MountedOnOffControl.xml b/data_model/1.4/device_types/MountedOnOffControl.xml index 09628bb4e0..2a6b568889 100644 --- a/data_model/1.4/device_types/MountedOnOffControl.xml +++ b/data_model/1.4/device_types/MountedOnOffControl.xml @@ -1,71 +1,72 @@ - - - + @@ -92,13 +93,13 @@ Davis, CA 95616, USA - + - + - + @@ -109,7 +110,7 @@ Davis, CA 95616, USA - + @@ -121,4 +122,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/NetworkInfraIntro.xml b/data_model/1.4/device_types/NetworkInfraIntro.xml deleted file mode 100644 index e5bc56b1f0..0000000000 --- a/data_model/1.4/device_types/NetworkInfraIntro.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - \ No newline at end of file diff --git a/data_model/1.4/device_types/NetworkInfraManager.xml b/data_model/1.4/device_types/NetworkInfraManager.xml index a4d17e11c0..c99c05e1e3 100644 --- a/data_model/1.4/device_types/NetworkInfraManager.xml +++ b/data_model/1.4/device_types/NetworkInfraManager.xml @@ -1,66 +1,67 @@ - - @@ -72,4 +73,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OccupancySensor.xml b/data_model/1.4/device_types/OccupancySensor.xml index f257bab38a..7600fe0ed8 100644 --- a/data_model/1.4/device_types/OccupancySensor.xml +++ b/data_model/1.4/device_types/OccupancySensor.xml @@ -1,59 +1,61 @@ - @@ -63,7 +65,6 @@ Davis, CA 95616, USA - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OnOffLight.xml b/data_model/1.4/device_types/OnOffLight.xml index c74f5f7900..ce841e8977 100644 --- a/data_model/1.4/device_types/OnOffLight.xml +++ b/data_model/1.4/device_types/OnOffLight.xml @@ -1,59 +1,61 @@ - @@ -62,12 +64,11 @@ Davis, CA 95616, USA - - + @@ -94,13 +95,13 @@ Davis, CA 95616, USA - + - + - + @@ -111,7 +112,7 @@ Davis, CA 95616, USA - + @@ -123,4 +124,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OnOffLightSwitch.xml b/data_model/1.4/device_types/OnOffLightSwitch.xml index 0cfa5ba7a3..0fcbf09a80 100644 --- a/data_model/1.4/device_types/OnOffLightSwitch.xml +++ b/data_model/1.4/device_types/OnOffLightSwitch.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -83,4 +84,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OnOffPlug-inUnit.xml b/data_model/1.4/device_types/OnOffPlug-inUnit.xml index 946f791951..b8bc8bc5c6 100644 --- a/data_model/1.4/device_types/OnOffPlug-inUnit.xml +++ b/data_model/1.4/device_types/OnOffPlug-inUnit.xml @@ -1,59 +1,61 @@ - @@ -62,12 +64,11 @@ Davis, CA 95616, USA - - + @@ -94,13 +95,13 @@ Davis, CA 95616, USA - + - + - + @@ -111,7 +112,7 @@ Davis, CA 95616, USA - + @@ -123,4 +124,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OnOffSensor.xml b/data_model/1.4/device_types/OnOffSensor.xml index 0fc76f8314..832e44d5da 100644 --- a/data_model/1.4/device_types/OnOffSensor.xml +++ b/data_model/1.4/device_types/OnOffSensor.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -89,4 +90,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OtaProvider.xml b/data_model/1.4/device_types/OtaProvider.xml index b148d27ebb..4dfe9013b5 100644 --- a/data_model/1.4/device_types/OtaProvider.xml +++ b/data_model/1.4/device_types/OtaProvider.xml @@ -1,59 +1,61 @@ - @@ -68,4 +70,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/OtaRequestor.xml b/data_model/1.4/device_types/OtaRequestor.xml index d782ee992c..d2fd3b460b 100644 --- a/data_model/1.4/device_types/OtaRequestor.xml +++ b/data_model/1.4/device_types/OtaRequestor.xml @@ -1,59 +1,61 @@ - @@ -68,4 +70,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Oven.xml b/data_model/1.4/device_types/Oven.xml index d34bc4c52b..1c012d0548 100644 --- a/data_model/1.4/device_types/Oven.xml +++ b/data_model/1.4/device_types/Oven.xml @@ -1,59 +1,61 @@ - @@ -61,10 +63,9 @@ Davis, CA 95616, USA - - \ No newline at end of file + diff --git a/data_model/1.4/device_types/PowerSource.xml b/data_model/1.4/device_types/PowerSource.xml index 4e6c6defab..f00ae14434 100644 --- a/data_model/1.4/device_types/PowerSource.xml +++ b/data_model/1.4/device_types/PowerSource.xml @@ -1,68 +1,70 @@ - - + - \ No newline at end of file + diff --git a/data_model/1.4/device_types/PressureSensor.xml b/data_model/1.4/device_types/PressureSensor.xml index 5b7ef86c25..c86c0c504e 100644 --- a/data_model/1.4/device_types/PressureSensor.xml +++ b/data_model/1.4/device_types/PressureSensor.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Pump.xml b/data_model/1.4/device_types/Pump.xml index a39cd97b87..13fbf22121 100644 --- a/data_model/1.4/device_types/Pump.xml +++ b/data_model/1.4/device_types/Pump.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -107,4 +108,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/PumpController.xml b/data_model/1.4/device_types/PumpController.xml index 25e9a8e982..e71ab5325e 100644 --- a/data_model/1.4/device_types/PumpController.xml +++ b/data_model/1.4/device_types/PumpController.xml @@ -1,59 +1,61 @@ - @@ -98,4 +100,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/RainSensor.xml b/data_model/1.4/device_types/RainSensor.xml index a03060c541..5d10d26836 100644 --- a/data_model/1.4/device_types/RainSensor.xml +++ b/data_model/1.4/device_types/RainSensor.xml @@ -1,66 +1,67 @@ - - @@ -68,7 +69,7 @@ Davis, CA 95616, USA - + @@ -77,4 +78,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Refrigerator.xml b/data_model/1.4/device_types/Refrigerator.xml index c8bdf86e3e..852dc6effd 100644 --- a/data_model/1.4/device_types/Refrigerator.xml +++ b/data_model/1.4/device_types/Refrigerator.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -74,7 +75,7 @@ Davis, CA 95616, USA - + @@ -83,4 +84,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/RoboticVacuumCleaner.xml b/data_model/1.4/device_types/RoboticVacuumCleaner.xml index 446410dfb7..ed0ce08fdd 100644 --- a/data_model/1.4/device_types/RoboticVacuumCleaner.xml +++ b/data_model/1.4/device_types/RoboticVacuumCleaner.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -80,4 +81,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/RoomAirConditioner.xml b/data_model/1.4/device_types/RoomAirConditioner.xml index e2b3061a42..20b5767ca5 100644 --- a/data_model/1.4/device_types/RoomAirConditioner.xml +++ b/data_model/1.4/device_types/RoomAirConditioner.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -92,7 +93,7 @@ Davis, CA 95616, USA - + @@ -104,4 +105,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/RootNodeDeviceType.xml b/data_model/1.4/device_types/RootNodeDeviceType.xml index 99ce8fc319..304c62b10e 100644 --- a/data_model/1.4/device_types/RootNodeDeviceType.xml +++ b/data_model/1.4/device_types/RootNodeDeviceType.xml @@ -1,59 +1,61 @@ - @@ -62,12 +64,16 @@ Davis, CA 95616, USA + + + + - + @@ -174,4 +180,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/SecondaryNetworkInterface.xml b/data_model/1.4/device_types/SecondaryNetworkInterface.xml index 8217aea715..ed65a5b005 100644 --- a/data_model/1.4/device_types/SecondaryNetworkInterface.xml +++ b/data_model/1.4/device_types/SecondaryNetworkInterface.xml @@ -1,59 +1,61 @@ - @@ -80,4 +82,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/SmokeCOAlarm.xml b/data_model/1.4/device_types/SmokeCOAlarm.xml index 769e6f5f91..cd247953c9 100644 --- a/data_model/1.4/device_types/SmokeCOAlarm.xml +++ b/data_model/1.4/device_types/SmokeCOAlarm.xml @@ -1,66 +1,67 @@ - - @@ -81,4 +82,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/SolarPower.xml b/data_model/1.4/device_types/SolarPower.xml index 7556fb519a..25345c2789 100644 --- a/data_model/1.4/device_types/SolarPower.xml +++ b/data_model/1.4/device_types/SolarPower.xml @@ -1,69 +1,70 @@ - - - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Speaker.xml b/data_model/1.4/device_types/Speaker.xml index d3f9b1166e..11fd3ea3e5 100644 --- a/data_model/1.4/device_types/Speaker.xml +++ b/data_model/1.4/device_types/Speaker.xml @@ -1,66 +1,67 @@ - - @@ -69,4 +70,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/TemperatureControlledCabinet.xml b/data_model/1.4/device_types/TemperatureControlledCabinet.xml index 68788e22d7..45e7f43df1 100644 --- a/data_model/1.4/device_types/TemperatureControlledCabinet.xml +++ b/data_model/1.4/device_types/TemperatureControlledCabinet.xml @@ -1,59 +1,61 @@ - @@ -62,16 +64,20 @@ Davis, CA 95616, USA + + + + - + - + @@ -86,7 +92,7 @@ Davis, CA 95616, USA - + @@ -101,7 +107,7 @@ Davis, CA 95616, USA - + @@ -113,4 +119,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/TemperatureSensor.xml b/data_model/1.4/device_types/TemperatureSensor.xml index bf3221858d..ccc6d143a1 100644 --- a/data_model/1.4/device_types/TemperatureSensor.xml +++ b/data_model/1.4/device_types/TemperatureSensor.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/Thermostat.xml b/data_model/1.4/device_types/Thermostat.xml index dfc55d628a..11b495b88f 100644 --- a/data_model/1.4/device_types/Thermostat.xml +++ b/data_model/1.4/device_types/Thermostat.xml @@ -1,59 +1,61 @@ - @@ -63,14 +65,13 @@ Davis, CA 95616, USA - - + @@ -84,15 +85,15 @@ Davis, CA 95616, USA - + - + - + @@ -113,4 +114,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/ThreadBorderRouter.xml b/data_model/1.4/device_types/ThreadBorderRouter.xml index 792f002801..5dc3d06ade 100644 --- a/data_model/1.4/device_types/ThreadBorderRouter.xml +++ b/data_model/1.4/device_types/ThreadBorderRouter.xml @@ -1,66 +1,67 @@ - - @@ -72,4 +73,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/VideoRemoteControl.xml b/data_model/1.4/device_types/VideoRemoteControl.xml index de83b02508..2b920feb6a 100644 --- a/data_model/1.4/device_types/VideoRemoteControl.xml +++ b/data_model/1.4/device_types/VideoRemoteControl.xml @@ -1,59 +1,61 @@ - @@ -61,7 +63,6 @@ Davis, CA 95616, USA - @@ -109,4 +110,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WaterFreezeDetector.xml b/data_model/1.4/device_types/WaterFreezeDetector.xml index b2f4a49a78..614bf30050 100644 --- a/data_model/1.4/device_types/WaterFreezeDetector.xml +++ b/data_model/1.4/device_types/WaterFreezeDetector.xml @@ -1,66 +1,67 @@ - - @@ -68,7 +69,7 @@ Davis, CA 95616, USA - + @@ -77,4 +78,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WaterHeater.xml b/data_model/1.4/device_types/WaterHeater.xml index 975e9f2bb4..2647c010fc 100644 --- a/data_model/1.4/device_types/WaterHeater.xml +++ b/data_model/1.4/device_types/WaterHeater.xml @@ -1,66 +1,67 @@ - - @@ -80,4 +81,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WaterLeakDetector.xml b/data_model/1.4/device_types/WaterLeakDetector.xml index 7277ce6990..683b841adc 100644 --- a/data_model/1.4/device_types/WaterLeakDetector.xml +++ b/data_model/1.4/device_types/WaterLeakDetector.xml @@ -1,66 +1,67 @@ - - @@ -68,7 +69,7 @@ Davis, CA 95616, USA - + @@ -77,4 +78,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WaterValve.xml b/data_model/1.4/device_types/WaterValve.xml index 21b77edf5f..57f88a717c 100644 --- a/data_model/1.4/device_types/WaterValve.xml +++ b/data_model/1.4/device_types/WaterValve.xml @@ -1,66 +1,67 @@ - - @@ -75,4 +76,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WindowCovering.xml b/data_model/1.4/device_types/WindowCovering.xml index da8780b3c9..75b97cae61 100644 --- a/data_model/1.4/device_types/WindowCovering.xml +++ b/data_model/1.4/device_types/WindowCovering.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -70,7 +71,7 @@ Davis, CA 95616, USA - + @@ -86,4 +87,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/device_types/WindowCoveringController.xml b/data_model/1.4/device_types/WindowCoveringController.xml index 189fee3d9d..56c17bfe51 100644 --- a/data_model/1.4/device_types/WindowCoveringController.xml +++ b/data_model/1.4/device_types/WindowCoveringController.xml @@ -1,59 +1,61 @@ - @@ -62,7 +64,6 @@ Davis, CA 95616, USA - @@ -73,7 +74,7 @@ Davis, CA 95616, USA - + @@ -89,4 +90,4 @@ Davis, CA 95616, USA - \ No newline at end of file + diff --git a/data_model/1.4/scraper_version b/data_model/1.4/scraper_version index c813fe116c..0705c7f52f 100644 --- a/data_model/1.4/scraper_version +++ b/data_model/1.4/scraper_version @@ -1 +1 @@ -1.2.5 +alchemy version: 1.5.0 (585e1dc) diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index e6a7722468..e72da49cf3 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import contextlib import glob import json import os @@ -24,10 +25,33 @@ import click from chip.testing.spec_parsing import build_xml_clusters -from paths import get_chip_root, get_documentation_file_path, get_in_progress_defines +from paths import get_chip_root, get_documentation_file_path + +CURRENT_IN_PROGRESS_DEFINES = [ + "cameras", + "closures", + "device-location", + "endpointuniqueid", + "energy-drlc", + "energy-mtrid", + "energy-price", + "energy-tariff", + "hrap-2", + "hrap-tbrd", + "hvac-preset-suggestions", + "hvac-thermostat-events", + "irrigation-system", + "metering network-recovery", + "nfcCommissioning", + "paftp", + "rvc-direct-mode", + "rvc-moreopstates", + "rvc-vacthenmop", + "soil-sensor", + "thermostat-controller", + "tls", +] -# Use the get_in_progress_defines() function to fetch the in-progress defines -CURRENT_IN_PROGRESS_DEFINES = get_in_progress_defines() # Replace hardcoded paths with dynamic paths using paths.py functions DEFAULT_CHIP_ROOT = get_chip_root() @@ -78,14 +102,64 @@ def make_asciidoc(target: str, include_in_progress: str, spec_dir: str, dry_run: @click.option( '--include-in-progress', type=click.Choice(['All', 'None', 'Current']), default='All') -def main(scraper, spec_root, output_dir, dry_run, include_in_progress): - scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress) - scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress) +@click.option( + '--legacy', + default=False, + is_flag=True, + help='Use the DM editor spec scraper (legacy) rather than alchemy') +def main(scraper, spec_root, output_dir, dry_run, include_in_progress, legacy): + if legacy: + scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress) + scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress) + else: + scrape_all(scraper, spec_root, output_dir, dry_run, include_in_progress) if not dry_run: - dump_versions(scraper, spec_root, output_dir) + dump_versions(scraper, spec_root, output_dir, legacy) dump_cluster_ids(output_dir) +def scrape_all(scraper, spec_root, output_dir, dry_run, include_in_progress): + print('Generating main spec to get file include list - this may take a few minutes') + main_out = make_asciidoc('pdf', include_in_progress, spec_root, dry_run) + print('Generating cluster spec to get file include list - this may take a few minutes') + cluster_out = make_asciidoc('pdf-appclusters-book', include_in_progress, spec_root, dry_run) + print('Generating device type library to get file include list - this may take a few minutes') + device_type_files = make_asciidoc('pdf-devicelibrary-book', include_in_progress, spec_root, dry_run) + + cluster_files = main_out + cluster_out + cmd = [scraper, 'dm', '--dmRoot', output_dir, '--specRoot', spec_root] + if include_in_progress == 'All': + cmd.extend(['-a', 'in-progress']) + elif include_in_progress == 'Current': + for d in CURRENT_IN_PROGRESS_DEFINES: + cmd.extend(['-a']) + cmd.extend([d]) + + if (dry_run): + print(cmd) + return + subprocess.run(cmd) + # Remove all the files that weren't compiled into the spec + clusters_output_dir = os.path.join(output_dir, 'clusters') + device_types_output_dir = os.path.abspath(os.path.join(output_dir, 'device_types')) + for filename in os.listdir(clusters_output_dir): + # There are a couple of clusters that appear in the same adoc file and they have prefixes. + # Look for these specifically. + # For 1.5 onward, we should separate these. + if "Label-Cluster" in filename or "bridge-clusters" in filename: + continue + adoc = os.path.basename(filename).replace('.xml', '.adoc') + if adoc not in cluster_files: + print(f'Removing {adoc} as it was not in the generated spec document') + os.remove(os.path.join(clusters_output_dir, filename)) + + for filename in os.listdir(device_types_output_dir): + adoc = os.path.basename(filename).replace('.xml', '.adoc') + if adoc not in device_type_files: + print(f'Removing {adoc} as it was not in the generated spec document') + os.remove(os.path.join(device_types_output_dir, filename)) + + def scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress): src_dir = os.path.abspath(os.path.join(spec_root, 'src')) sdm_clusters_dir = os.path.abspath(os.path.join(src_dir, 'service_device_management')) @@ -173,20 +247,38 @@ def scrape_device_type(filename: str) -> None: scrape_device_type(filename) -def dump_versions(scraper, spec_root, output_dir): +def dump_versions(scraper, spec_root, output_dir, legacy): sha_file = os.path.abspath(os.path.join(output_dir, 'spec_sha')) + tag_file = os.path.abspath(os.path.join(output_dir, 'spec_tag')) out = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True, encoding="utf8", cwd=spec_root) sha = out.stdout with open(sha_file, 'wt', encoding='utf8') as output: output.write(sha) + cmd = ['git', 'show-ref', '--tags'] + out = subprocess.run(cmd, capture_output=True, encoding="utf-8", cwd=spec_root) + tags = out.stdout.splitlines() + tag = [t for t in tags if sha.strip() in t] + if tag: + with open(tag_file, 'wt', encoding='utf8') as output: + output.write(f'{tag[0].split("/")[-1]}\n') + else: + print(f"WARNING: no tag found for sha {sha}") + with contextlib.suppress(FileNotFoundError): + os.remove(tag_file) scraper_file = os.path.abspath(os.path.join(output_dir, 'scraper_version')) - out = subprocess.run([scraper, '--version'], + version_cmd = 'version' + if legacy: + version_cmd = '--version' + out = subprocess.run([scraper, version_cmd], capture_output=True, encoding="utf8") version = out.stdout with open(scraper_file, "wt", encoding='utf8') as output: - output.write(version) + if legacy: + output.write(version) + else: + output.write(f'alchemy {version}') def dump_cluster_ids(output_dir): diff --git a/src/python_testing/matter_testing_infrastructure/data_model_xmls.gni b/src/python_testing/matter_testing_infrastructure/data_model_xmls.gni index 066537816a..fc2d80305e 100644 --- a/src/python_testing/matter_testing_infrastructure/data_model_xmls.gni +++ b/src/python_testing/matter_testing_infrastructure/data_model_xmls.gni @@ -332,7 +332,6 @@ data_model_XMLS = [ "${chip_root}/data_model/1.4/device_types/ModeSelectDeviceType.xml", "${chip_root}/data_model/1.4/device_types/MountedDimmableLoadControl.xml", "${chip_root}/data_model/1.4/device_types/MountedOnOffControl.xml", - "${chip_root}/data_model/1.4/device_types/NetworkInfraIntro.xml", "${chip_root}/data_model/1.4/device_types/NetworkInfraManager.xml", "${chip_root}/data_model/1.4/device_types/OccupancySensor.xml", "${chip_root}/data_model/1.4/device_types/OnOffLight.xml", From 2ce3daf293974746876810733ee068719e10d72c Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Wed, 29 Jan 2025 16:55:30 +0100 Subject: [PATCH 4/8] [nrfconnect] Fix ZEPHYR_SDK_INSTALL_DIR in chip-build-vscode (#37302) Signed-off-by: Adrian Gielniewski --- integrations/docker/images/base/chip-build/version | 2 +- integrations/docker/images/vscode/chip-build-vscode/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 60379853bb..db931482d4 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -101 : [Silabs] Update Silabs docker to support MG26 Modules. +102 : [nrfconnect] Fix ZEPHYR_SDK_INSTALL_DIR in chip-build-vscode diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index a9a2c9d690..45834408fd 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -129,7 +129,7 @@ ENV TELINK_ZEPHYR_BASE=/opt/telink/zephyrproject/zephyr ENV TELINK_ZEPHYR_SDK_DIR=/opt/telink/zephyr-sdk-0.16.1 ENV TI_SYSCONFIG_ROOT=/opt/ti/sysconfig_1.18.1 ENV ZEPHYR_BASE=/opt/NordicSemiconductor/nrfconnect/zephyr -ENV ZEPHYR_SDK_INSTALL_DIR=/opt/NordicSemiconductor/nRF5_tools/zephyr-sdk-0.16.5 +ENV ZEPHYR_SDK_INSTALL_DIR=/opt/NordicSemiconductor/nRF5_tools/zephyr-sdk-0.17.0 ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ENV ZEPHYR_NXP_BASE=/opt/nxp-zephyr/zephyrproject/zephyr ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.17.0 From 2399e4279a4e2615f27e5249359e282c75b75013 Mon Sep 17 00:00:00 2001 From: "Olivier LORENTE [ST]" <34505085+OlivierGre@users.noreply.github.com> Date: Wed, 29 Jan 2025 16:57:16 +0100 Subject: [PATCH 5/8] Changed Dockerfile for crosscompile image. (#37300) * Changed Dockerfile for crosscompile image. Now pointing to a new sysroot. Changed needed for NFC Commissioning. * Bumped version --------- Co-authored-by: Andrei Litvin --- integrations/docker/images/base/chip-build/version | 2 +- .../docker/images/stage-1/chip-build-crosscompile/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index db931482d4..e760cfdf5e 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -102 : [nrfconnect] Fix ZEPHYR_SDK_INSTALL_DIR in chip-build-vscode +103 : Changed sysroot for crosscompile image (new ubuntu version and includes NFC libs) diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile index 5fa709e30d..24c7280f5d 100644 --- a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile @@ -17,7 +17,7 @@ WORKDIR /opt RUN set -x \ && git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools \ # TODO: Remove experimental solution to create the sysroot file in cross-compile image - && echo 'experimental/matter/sysroot/ubuntu-22.04.1-aarch64 latest' > ensure_file.txt \ + && echo 'experimental/matter/sysroot/ubuntu-24.04-aarch64 version:build-2025.01.28' > ensure_file.txt \ && ./depot_tools/cipd ensure -ensure-file ensure_file.txt -root ./ \ && tar xfvJ ubuntu-22.04.1-aarch64-sysroot.tar.xz \ && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/usr/lib/firmware \ From bb4ba895a64e450130b875a520aa25ca4334a369 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 29 Jan 2025 11:02:40 -0500 Subject: [PATCH 6/8] Fix sysroot paths (#37303) --- .../chip-build-crosscompile/Dockerfile | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile index 24c7280f5d..bcf8ac55dd 100644 --- a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile @@ -3,34 +3,34 @@ FROM ghcr.io/project-chip/chip-build:${VERSION} as build LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - git \ - xz-utils \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/ \ - && : # last line + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ + git \ + xz-utils \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/ \ + && : # last line WORKDIR /opt # Unpack the sysroot, while also removing some rather large items in it that # are generally not required for compilation RUN set -x \ - && git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools \ - # TODO: Remove experimental solution to create the sysroot file in cross-compile image - && echo 'experimental/matter/sysroot/ubuntu-24.04-aarch64 version:build-2025.01.28' > ensure_file.txt \ - && ./depot_tools/cipd ensure -ensure-file ensure_file.txt -root ./ \ - && tar xfvJ ubuntu-22.04.1-aarch64-sysroot.tar.xz \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/usr/lib/firmware \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/usr/lib/git-core \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/usr/lib/modules \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/lib/firmware \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/lib/git-core \ - && rm -rf /opt/ubuntu-22.04.1-aarch64-sysroot/lib/modules \ - && : # last line + && git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools \ + # TODO: Remove experimental solution to create the sysroot file in cross-compile image + && echo 'experimental/matter/sysroot/ubuntu-24.04-aarch64 version:build-2025.01.28' > ensure_file.txt \ + && ./depot_tools/cipd ensure -ensure-file ensure_file.txt -root ./ \ + && tar xfvJ ubuntu-24.04.1-aarch64-sysroot.tar.xz \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/firmware \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/git-core \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/modules \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/firmware \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/git-core \ + && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/modules \ + && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip -COPY --from=build /opt/ubuntu-22.04.1-aarch64-sysroot/ /opt/ubuntu-22.04.1-aarch64-sysroot/ +COPY --from=build /opt/ubuntu-24.04.1-aarch64-sysroot/ /opt/ubuntu-24.04.1-aarch64-sysroot/ -ENV SYSROOT_AARCH64=/opt/ubuntu-22.04.1-aarch64-sysroot +ENV SYSROOT_AARCH64=/opt/ubuntu-24.04.1-aarch64-sysroot From 2ca3a4957d78f23f00a67bc140613de4d905b46e Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 29 Jan 2025 11:08:25 -0500 Subject: [PATCH 7/8] Fix paths again (#37304) --- .../stage-1/chip-build-crosscompile/Dockerfile | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile index bcf8ac55dd..8bc3f0c4df 100644 --- a/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile +++ b/integrations/docker/images/stage-1/chip-build-crosscompile/Dockerfile @@ -19,18 +19,17 @@ RUN set -x \ # TODO: Remove experimental solution to create the sysroot file in cross-compile image && echo 'experimental/matter/sysroot/ubuntu-24.04-aarch64 version:build-2025.01.28' > ensure_file.txt \ && ./depot_tools/cipd ensure -ensure-file ensure_file.txt -root ./ \ - && tar xfvJ ubuntu-24.04.1-aarch64-sysroot.tar.xz \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/firmware \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/git-core \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/usr/lib/modules \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/firmware \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/git-core \ - && rm -rf /opt/ubuntu-24.04.1-aarch64-sysroot/lib/modules \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/usr/lib/firmware \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/usr/lib/git-core \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/usr/lib/modules \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/lib/firmware \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/lib/git-core \ + && rm -rf /opt/ubuntu-24.04-aarch64-sysroot/lib/modules \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip -COPY --from=build /opt/ubuntu-24.04.1-aarch64-sysroot/ /opt/ubuntu-24.04.1-aarch64-sysroot/ +COPY --from=build /opt/ubuntu-24.04-aarch64-sysroot/ /opt/ubuntu-24.04-aarch64-sysroot/ -ENV SYSROOT_AARCH64=/opt/ubuntu-24.04.1-aarch64-sysroot +ENV SYSROOT_AARCH64=/opt/ubuntu-24.04-aarch64-sysroot From e80451c0d2c6a27ca56ec6d4dd74a82ff3413372 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 29 Jan 2025 18:45:33 +0100 Subject: [PATCH 8/8] [chip-tool] Add Enhanced Commissioning Support (T&C Flow via Local DCL) to chip-tool (#37049) * [chip-tool] Add chip-tool dcl fake cluster commands * [chip-tool] Add a fake local dcl server script for testing/developement purposes * [chip-tool] Add chip-tool dcl tc-display and tc-display-by-payload commands * [General Commissioning Server] Dynamically encode the feature map 'GeneralCommissioning::Feature::kTermsAndConditions' if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED is set * [Examples/platform/linux] Set default TermsAndConditions if requested from the command line * [chip-tool] Add TermsAndConditions support to chip-tool pairing code command --- examples/chip-tool/BUILD.gn | 15 + examples/chip-tool/commands/dcl/Commands.h | 37 ++ examples/chip-tool/commands/dcl/DCLClient.cpp | 241 +++++++++++++ examples/chip-tool/commands/dcl/DCLClient.h | 100 ++++++ examples/chip-tool/commands/dcl/DCLCommands.h | 202 +++++++++++ .../dcl/DisplayTermsAndConditions.cpp | 230 ++++++++++++ .../commands/dcl/DisplayTermsAndConditions.h | 44 +++ .../chip-tool/commands/dcl/HTTPSRequest.cpp | 339 ++++++++++++++++++ .../chip-tool/commands/dcl/HTTPSRequest.h | 39 ++ .../commands/dcl/JsonSchemaMacros.cpp | 64 ++++ .../chip-tool/commands/dcl/JsonSchemaMacros.h | 41 +++ .../chip-tool/commands/dcl/test_dcl_server.py | 245 +++++++++++++ .../commands/pairing/PairingCommand.cpp | 27 ++ .../commands/pairing/PairingCommand.h | 8 + examples/chip-tool/main.cpp | 2 + examples/platform/linux/AppMain.cpp | 14 + examples/platform/linux/Options.cpp | 28 ++ examples/platform/linux/Options.h | 5 + .../general-commissioning-server.cpp | 8 + third_party/boringssl/repo/BUILD.gn | 16 + 20 files changed, 1705 insertions(+) create mode 100644 examples/chip-tool/commands/dcl/Commands.h create mode 100644 examples/chip-tool/commands/dcl/DCLClient.cpp create mode 100644 examples/chip-tool/commands/dcl/DCLClient.h create mode 100644 examples/chip-tool/commands/dcl/DCLCommands.h create mode 100644 examples/chip-tool/commands/dcl/DisplayTermsAndConditions.cpp create mode 100644 examples/chip-tool/commands/dcl/DisplayTermsAndConditions.h create mode 100644 examples/chip-tool/commands/dcl/HTTPSRequest.cpp create mode 100644 examples/chip-tool/commands/dcl/HTTPSRequest.h create mode 100644 examples/chip-tool/commands/dcl/JsonSchemaMacros.cpp create mode 100644 examples/chip-tool/commands/dcl/JsonSchemaMacros.h create mode 100755 examples/chip-tool/commands/dcl/test_dcl_server.py diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index acacbc70e8..992fbd53e4 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -23,6 +23,9 @@ if (config_use_interactive_mode) { import("//build_overrides/editline.gni") } +import("${chip_root}/build_overrides/boringssl.gni") +import("${chip_root}/src/crypto/crypto.gni") + assert(chip_build_tools) config("config") { @@ -67,6 +70,14 @@ static_library("chip-tool-utils") { "commands/common/HexConversion.h", "commands/common/RemoteDataModelLogger.cpp", "commands/common/RemoteDataModelLogger.h", + "commands/dcl/DCLClient.cpp", + "commands/dcl/DCLClient.h", + "commands/dcl/DisplayTermsAndConditions.cpp", + "commands/dcl/DisplayTermsAndConditions.h", + "commands/dcl/HTTPSRequest.cpp", + "commands/dcl/HTTPSRequest.h", + "commands/dcl/JsonSchemaMacros.cpp", + "commands/dcl/JsonSchemaMacros.h", "commands/delay/SleepCommand.cpp", "commands/delay/WaitForCommissioneeCommand.cpp", "commands/discover/DiscoverCommand.cpp", @@ -102,6 +113,10 @@ static_library("chip-tool-utils") { sources += [ "commands/common/DeviceScanner.cpp" ] } + if (chip_device_platform == "darwin" || chip_crypto == "boringssl") { + deps += [ "${boringssl_root}:boringssl_with_ssl_sources" ] + } + public_deps = [ "${chip_root}/examples/common/tracing:commandline", "${chip_root}/src/app/icd/client:handler", diff --git a/examples/chip-tool/commands/dcl/Commands.h b/examples/chip-tool/commands/dcl/Commands.h new file mode 100644 index 0000000000..05220771fc --- /dev/null +++ b/examples/chip-tool/commands/dcl/Commands.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "commands/common/Commands.h" +#include "commands/dcl/DCLCommands.h" + +void registerCommandsDCL(Commands & commands) +{ + const char * clusterName = "DCL"; + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.RegisterCommandSet(clusterName, clusterCommands, "Commands to interact with the DCL."); +} diff --git a/examples/chip-tool/commands/dcl/DCLClient.cpp b/examples/chip-tool/commands/dcl/DCLClient.cpp new file mode 100644 index 0000000000..ada5d8113d --- /dev/null +++ b/examples/chip-tool/commands/dcl/DCLClient.cpp @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "DCLClient.h" + +#include +#include +#include +#include + +#include "HTTPSRequest.h" +#include "JsonSchemaMacros.h" + +namespace { +constexpr const char * kDefaultDCLHostName = "on.dcl.csa-iot.org"; +constexpr const char * kErrorSchemaValidation = "Model schema validation failed for response content: "; +constexpr const char * kErrorVendorIdIsZero = "Invalid argument: Vendor ID should not be 0"; +constexpr const char * kErrorProductIdIsZero = "Invalid argument: Product ID should not be 0"; +constexpr const char * kErrorOrdinalValueTooLarge = "Ordinal value exceeds the maximum allowable bits: "; +constexpr const char * kRequestModelVendorProductPath = "/dcl/model/models/%u/%u"; +constexpr uint8_t kRequestPathBufferSize = 64; +constexpr uint16_t kTermsAndConditionSchemaVersion = 1; +} // namespace + +namespace chip { +namespace tool { +namespace dcl { + +namespace { +CHIP_ERROR ValidateModelSchema(const Json::Value & json) +{ + CHECK_REQUIRED_TYPE(json, model, Object) + auto model = json["model"]; + + CHECK_REQUIRED_TYPE(model, commissioningCustomFlow, UInt); + + // The "enhancedSetupFlowOptions" field is theoretically required by the schema. + // However, the current DCL implementation does not include it. + // To handle this gracefully, we inject the field and set its value to 0 if it is missing. + if (!model.isMember("enhancedSetupFlowOptions")) + { + model["enhancedSetupFlowOptions"] = 0; + } + + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowOptions, UInt) + + // Check if enhancedSetupFlowOptions has bit 0 set. + // Bit 0 indicates that enhanced setup flow is enabled. + auto enhancedSetupFlowOptions = model["enhancedSetupFlowOptions"]; + VerifyOrReturnError((enhancedSetupFlowOptions.asUInt() & 0x01) != 0, CHIP_NO_ERROR); + + // List of required keys in the "model" object if enhancedSetupFlowOptions has bit 0 set. + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowTCUrl, String) + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowTCDigest, String) + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowTCFileSize, UInt) + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowTCRevision, UInt) + CHECK_REQUIRED_TYPE(model, enhancedSetupFlowMaintenanceUrl, String) + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ValidateModelCustomFlow(const Json::Value & json, CommissioningFlow payloadCommissioningFlow) +{ + auto model = json["model"]; + CHECK_REQUIRED_VALUE(model, commissioningCustomFlow, to_underlying(payloadCommissioningFlow)) + return CHIP_NO_ERROR; +} + +CHIP_ERROR ValidateTCLanguageEntries(const Json::Value & languageEntries) +{ + for (Json::Value::const_iterator it = languageEntries.begin(); it != languageEntries.end(); it++) + { + const Json::Value & languageArray = *it; + + CHECK_TYPE(languageArray, languageArray, Array); + + for (Json::ArrayIndex i = 0; i < languageArray.size(); i++) + { + const Json::Value & term = languageArray[i]; + CHECK_REQUIRED_TYPE(term, title, String); + CHECK_REQUIRED_TYPE(term, text, String); + CHECK_REQUIRED_TYPE(term, required, Bool); + CHECK_REQUIRED_TYPE(term, ordinal, UInt); + + auto ordinal = term["ordinal"].asUInt(); + VerifyOrReturnError(ordinal < 16, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(chipTool, "%s%u", kErrorOrdinalValueTooLarge, ordinal)); + } + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ValidateTCCountryEntries(const Json::Value & countryEntries) +{ + for (Json::Value::const_iterator it = countryEntries.begin(); it != countryEntries.end(); it++) + { + const Json::Value & countryEntry = *it; + + CHECK_REQUIRED_TYPE(countryEntry, defaultLanguage, String); + CHECK_REQUIRED_TYPE(countryEntry, languageEntries, Object); + + ReturnErrorOnFailure(ValidateTCLanguageEntries(countryEntry["languageEntries"])); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ValidateTermsAndConditionsSchema(const Json::Value & tc, unsigned int expectedEnhancedSetupFlowTCRevision) +{ + CHECK_REQUIRED_VALUE(tc, schemaVersion, kTermsAndConditionSchemaVersion) + CHECK_REQUIRED_TYPE(tc, esfRevision, UInt) + CHECK_REQUIRED_TYPE(tc, defaultCountry, String) + CHECK_REQUIRED_TYPE(tc, countryEntries, Object) + CHECK_REQUIRED_VALUE(tc, esfRevision, expectedEnhancedSetupFlowTCRevision) + return ValidateTCCountryEntries(tc["countryEntries"]); +} + +CHIP_ERROR RequestTermsAndConditions(const Json::Value & json, Json::Value & tc) +{ + auto & model = json["model"]; + if ((model["enhancedSetupFlowOptions"].asUInt() & 0x01) == 0) + { + ChipLogProgress(chipTool, + "Enhanced setup flow is not enabled for this model (bit 0 of enhancedSetupFlowOptions is not set). No " + "Terms and Conditions are required for this configuration."); + tc = Json::nullValue; + return CHIP_NO_ERROR; + } + + auto & enhancedSetupFlowTCUrl = model["enhancedSetupFlowTCUrl"]; + auto & enhancedSetupFlowTCFileSize = model["enhancedSetupFlowTCFileSize"]; + auto & enhancedSetupFlowTCDigest = model["enhancedSetupFlowTCDigest"]; + auto & enhancedSetupFlowTCRevision = model["enhancedSetupFlowTCRevision"]; + + auto * tcUrl = enhancedSetupFlowTCUrl.asCString(); + const auto optionalFileSize = MakeOptional(static_cast(enhancedSetupFlowTCFileSize.asUInt())); + const auto optionalDigest = MakeOptional(enhancedSetupFlowTCDigest.asCString()); + ReturnErrorOnFailure(https::Request(tcUrl, tc, optionalFileSize, optionalDigest)); + ReturnErrorOnFailure(ValidateTermsAndConditionsSchema(tc, enhancedSetupFlowTCRevision.asUInt())); + + return CHIP_NO_ERROR; +} + +} // namespace + +DCLClient::DCLClient(Optional hostname, Optional port) +{ + mHostName = hostname.ValueOr(kDefaultDCLHostName); + mPort = port.ValueOr(0); +} + +CHIP_ERROR DCLClient::Model(const char * onboardingPayload, Json::Value & outModel) +{ + SetupPayload payload; + bool isQRCode = strncmp(onboardingPayload, kQRCodePrefix, strlen(kQRCodePrefix)) == 0; + if (isQRCode) + { + ReturnErrorOnFailure(QRCodeSetupPayloadParser(onboardingPayload).populatePayload(payload)); + VerifyOrReturnError(payload.isValidQRCodePayload(), CHIP_ERROR_INVALID_ARGUMENT); + } + else + { + ReturnErrorOnFailure(ManualSetupPayloadParser(onboardingPayload).populatePayload(payload)); + VerifyOrReturnError(payload.isValidManualCode(), CHIP_ERROR_INVALID_ARGUMENT); + } + + auto vendorId = static_cast(payload.vendorID); + auto productId = payload.productID; + + // If both vendorId and productId are zero, return a null model without error. + if (vendorId == 0 && productId == 0) + { + ChipLogProgress(chipTool, "Vendor ID and Product ID not found in the provided payload. DCL lookup will not be used."); + outModel = Json::nullValue; + return CHIP_NO_ERROR; + } + + ReturnErrorOnFailure(Model(vendorId, productId, outModel)); + + auto commissioningFlow = payload.commissioningFlow; + CHIP_ERROR error = ValidateModelCustomFlow(outModel, commissioningFlow); + VerifyOrReturnError(CHIP_NO_ERROR == error, error, + ChipLogError(chipTool, "%s%s", kErrorSchemaValidation, outModel.toStyledString().c_str())); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DCLClient::Model(const chip::VendorId vendorId, const uint16_t productId, Json::Value & outModel) +{ + VerifyOrReturnError(0 != vendorId, CHIP_ERROR_INVALID_ARGUMENT, ChipLogError(chipTool, "%s", kErrorVendorIdIsZero)); + VerifyOrReturnError(0 != productId, CHIP_ERROR_INVALID_ARGUMENT, ChipLogError(chipTool, "%s", kErrorProductIdIsZero)); + + char path[kRequestPathBufferSize]; + VerifyOrReturnError(snprintf(path, sizeof(path), kRequestModelVendorProductPath, to_underlying(vendorId), productId) >= 0, + CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(https::Request(mHostName, mPort, path, outModel)); + + CHIP_ERROR error = ValidateModelSchema(outModel); + VerifyOrReturnError(CHIP_NO_ERROR == error, error, + ChipLogError(chipTool, "%s%s", kErrorSchemaValidation, outModel.toStyledString().c_str())); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DCLClient::TermsAndConditions(const char * onboardingPayload, Json::Value & outTc) +{ + Json::Value json; + ReturnErrorOnFailure(Model(onboardingPayload, json)); + VerifyOrReturnError(Json::nullValue != json.type(), CHIP_NO_ERROR, outTc = Json::nullValue); + ReturnErrorOnFailure(RequestTermsAndConditions(json, outTc)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DCLClient::TermsAndConditions(const chip::VendorId vendorId, const uint16_t productId, Json::Value & outTc) +{ + Json::Value json; + ReturnErrorOnFailure(Model(vendorId, productId, json)); + VerifyOrReturnError(Json::nullValue != json.type(), CHIP_NO_ERROR, outTc = Json::nullValue); + ReturnErrorOnFailure(RequestTermsAndConditions(json, outTc)); + return CHIP_NO_ERROR; +} + +} // namespace dcl +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/DCLClient.h b/examples/chip-tool/commands/dcl/DCLClient.h new file mode 100644 index 0000000000..d4ce72c38f --- /dev/null +++ b/examples/chip-tool/commands/dcl/DCLClient.h @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include + +#include +#include + +namespace chip { +namespace tool { +namespace dcl { +class DCLClient +{ +public: + DCLClient(Optional hostname, Optional port); + + /** + * @brief Retrieves the model information from the DCL based on the onboarding payload. + * + * This function uses the onboarding payload (a QR Code or Manual Code) to fetch the model information. + * It constructs an HTTPS request to retrieve the model data associated with the specified vendor ID and product ID from the + * payload. + * + * @param[in] onboardingPayload A null-terminated string containing the onboarding payload. + * This can either start with a QR Code prefix or be a Manual Code. + * @param[out] outModel A Json::Value object to store the retrieved model information. + * If the vendor and product IDs are missing, this will be set to null. + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, error code otherwise. + */ + CHIP_ERROR Model(const char * onboardingPayload, Json::Value & outModel); + + /** + * @brief Retrieves the model information from the DCL using vendor ID and product ID. + * + * This function constructs an HTTPS request to retrieve the model data associated with the specified vendor ID and product ID. + * + * @param[in] vendorId The vendor ID of the model (must not be 0). + * @param[in] productId The product ID of the model (must not be 0). + * @param[out] outModel A Json::Value object to store the retrieved model information. + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, error code otherwise. + */ + CHIP_ERROR Model(const VendorId vendorId, const uint16_t productId, Json::Value & outModel); + + /** + * @brief Retrieves the Terms and Conditions from the DCL based on the onboarding payload. + * + * This function uses the onboarding payload (a QR Code or Manual Code) to fetch the model information. + * If the model includes enhanced setup flow options, it requests and validates the associated Terms + * and Conditions data. If enhanced setup flow is not enabled, the output `tc` is set to null. + * + * @param[in] onboardingPayload A null-terminated string containing the onboarding payload. + * This can either start with a QR Code prefix or be a Manual Code. + * @param[out] outTc A Json::Value object to store the retrieved Terms and Conditions data. + * If enhanced setup flow options are not enabled, this will be set to null. + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, error code otherwise. + */ + CHIP_ERROR TermsAndConditions(const char * onboardingPayload, Json::Value & outTc); + + /** + * @brief Retrieves the Terms and Conditions from the DCL using vendor ID and product ID. + * + * This function first retrieves the model information using the specified vendor ID and product ID. + * If the model includes enhanced setup flow options, it fetches the Terms and Conditions, validates the data, and returns it. + * + * @param[in] vendorId The vendor ID of the model (must not be 0). + * @param[in] productId The product ID of the model (must not be 0). + * @param[out] outTc A Json::Value object to store the retrieved Terms and Conditions data. + * If enhanced setup flow options are not enabled, this will be set to null. + * + * @return CHIP_ERROR CHIP_NO_ERROR on success, error code otherwise. + */ + CHIP_ERROR TermsAndConditions(const chip::VendorId vendorId, const uint16_t productId, Json::Value & outTc); + +private: + std::string mHostName; + uint16_t mPort; +}; +} // namespace dcl +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/DCLCommands.h b/examples/chip-tool/commands/dcl/DCLCommands.h new file mode 100644 index 0000000000..7fc910aa72 --- /dev/null +++ b/examples/chip-tool/commands/dcl/DCLCommands.h @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "../common/Command.h" + +#include "DCLClient.h" +#include "DisplayTermsAndConditions.h" + +class DCLCommandBase : public Command +{ +public: + DCLCommandBase(const char * name) : Command(name) {} + + void AddArguments() + { + AddArgument("hostname", &mHostName, + "Hostname of the DCL server to fetch information from. Defaults to 'on.dcl.csa-iot.org'."); + AddArgument("port", 0, UINT16_MAX, &mPort, "Port number for connecting to the DCL server. Defaults to '443'."); + } + + CHIP_ERROR Run() + { + auto client = chip::tool::dcl::DCLClient(mHostName, mPort); + return RunCommand(client); + + return CHIP_NO_ERROR; + } + + virtual CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) = 0; + +private: + chip::Optional mHostName; + chip::Optional mPort; +}; + +class DCLPayloadCommandBase : public DCLCommandBase +{ +public: + DCLPayloadCommandBase(const char * name) : DCLCommandBase(name) + { + AddArgument("payload", &mPayload); + DCLCommandBase::AddArguments(); + } + +protected: + char * mPayload; +}; + +class DCLIdsCommandBase : public DCLCommandBase +{ +public: + DCLIdsCommandBase(const char * name) : DCLCommandBase(name) + { + AddArgument("vendor-id", 0, UINT16_MAX, &mVendorId); + AddArgument("product-id", 0, UINT16_MAX, &mProductId); + DCLCommandBase::AddArguments(); + } + +protected: + uint16_t mVendorId; + uint16_t mProductId; +}; + +class DCLModelByPayloadCommand : public DCLPayloadCommandBase +{ +public: + DCLModelByPayloadCommand() : DCLPayloadCommandBase("model-by-payload") {} + + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value model; + ReturnErrorOnFailure(client.Model(mPayload, model)); + VerifyOrReturnError(model != Json::nullValue, CHIP_NO_ERROR); + + ChipLogProgress(chipTool, "%s", model.toStyledString().c_str()); + return CHIP_NO_ERROR; + } +}; + +class DCLModelCommand : public DCLIdsCommandBase +{ +public: + DCLModelCommand() : DCLIdsCommandBase("model") {} + + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value model; + ReturnErrorOnFailure(client.Model(static_cast(mVendorId), mProductId, model)); + VerifyOrReturnError(model != Json::nullValue, CHIP_NO_ERROR); + + ChipLogProgress(chipTool, "%s", model.toStyledString().c_str()); + return CHIP_NO_ERROR; + } +}; + +class DCLTCByPayloadCommand : public DCLPayloadCommandBase +{ +public: + DCLTCByPayloadCommand() : DCLPayloadCommandBase("tc-by-payload") {} + + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value tc; + ReturnErrorOnFailure(client.TermsAndConditions(mPayload, tc)); + VerifyOrReturnError(tc != Json::nullValue, CHIP_NO_ERROR); + + ChipLogProgress(chipTool, "%s", tc.toStyledString().c_str()); + return CHIP_NO_ERROR; + } +}; + +class DCLTCCommand : public DCLIdsCommandBase +{ +public: + DCLTCCommand() : DCLIdsCommandBase("tc") {} + + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value tc; + ReturnErrorOnFailure(client.TermsAndConditions(static_cast(mVendorId), mProductId, tc)); + VerifyOrReturnError(tc != Json::nullValue, CHIP_NO_ERROR); + + ChipLogProgress(chipTool, "%s", tc.toStyledString().c_str()); + return CHIP_NO_ERROR; + } +}; + +class DCLTCDisplayByPayloadCommand : public DCLPayloadCommandBase +{ +public: + DCLTCDisplayByPayloadCommand() : DCLPayloadCommandBase("tc-display-by-payload") + { + AddArgument("country-code", &mCountryCode, + "The country code to retrieve terms and conditions for. Defaults to the country configured in the DCL."); + AddArgument("language-code", &mLanguageCode, + "The language code to retrieve terms and conditions for. Defaults to the language configured for the chosen " + "country in the DCL."); + } + + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value tc; + ReturnErrorOnFailure(client.TermsAndConditions(mPayload, tc)); + VerifyOrReturnError(tc != Json::nullValue, CHIP_NO_ERROR); + + uint16_t version = 0; + uint16_t userResponse = 0; + ReturnErrorOnFailure(chip::tool::dcl::DisplayTermsAndConditions(tc, version, userResponse, mCountryCode, mLanguageCode)); + + ChipLogProgress(chipTool, "\nTerms and conditions\n\tRevision : %u\n\tUserResponse: %u", version, userResponse); + return CHIP_NO_ERROR; + } + +private: + chip::Optional mCountryCode; + chip::Optional mLanguageCode; +}; + +class DCLTCDisplayCommand : public DCLIdsCommandBase +{ +public: + DCLTCDisplayCommand() : DCLIdsCommandBase("tc-display") + { + AddArgument("country-code", &mCountryCode, + "The country code to retrieve terms and conditions for. Defaults to the country configured in the DCL."); + AddArgument("language-code", &mLanguageCode, + "The language code to retrieve terms and conditions for. Defaults to the language configured for the chosen " + "country in the DCL."); + } + CHIP_ERROR RunCommand(chip::tool::dcl::DCLClient & client) + { + Json::Value tc; + ReturnErrorOnFailure(client.TermsAndConditions(static_cast(mVendorId), mProductId, tc)); + VerifyOrReturnError(tc != Json::nullValue, CHIP_NO_ERROR); + + uint16_t version = 0; + uint16_t userResponse = 0; + ReturnErrorOnFailure(chip::tool::dcl::DisplayTermsAndConditions(tc, version, userResponse, mCountryCode, mLanguageCode)); + + ChipLogProgress(chipTool, "\nTerms and conditions\n\tRevision : %u\n\tUserResponse: %u", version, userResponse); + return CHIP_NO_ERROR; + } + +private: + chip::Optional mCountryCode; + chip::Optional mLanguageCode; +}; diff --git a/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.cpp b/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.cpp new file mode 100644 index 0000000000..8745db90c6 --- /dev/null +++ b/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.cpp @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "DisplayTermsAndConditions.h" + +#include +#include + +#include +#include +#include + +namespace chip { +namespace tool { +namespace dcl { +namespace { +constexpr const char * kAcceptTerms = "Do you accept these terms? [Y/n]: "; +constexpr const char * kRequiredTerms = "Required"; +constexpr const char * kOptionalTerms = "Optional"; +constexpr const char * kTitleAllowedTags = R"(<(/?)(b|em|i|small|strong|u)>)"; +constexpr const char * kTextAllowedTags = R"(<(/?)(b|br|em|h1|h2|h3|h4|h5|h6|hr|i|li|ol|p|small|strong|u|ul)>)"; +constexpr const char * kAnsiCodeReset = "\033[0m"; +constexpr const char * kAnsiCodeBold = "\033[1m"; +constexpr const char * kAnsiCodeFaint = "\033[2m"; +constexpr const char * kAnsiCodeItalics = "\033[3m"; +constexpr const char * kAnsiCodeUnderline = "\033[4m"; +constexpr const char * kLineBreak = "\n"; +constexpr const char * kListItem = " - "; +constexpr const char * kHorizontalLine = "\n==========================================\n"; +constexpr const char * kErrorInvalidInput = "Invalid input. Please enter 'Y' (yes) or 'N' (no). Default is 'Y'."; + +// Fields names for the ESF JSON schema +constexpr const char * kFieldCountryEntries = "countryEntries"; +constexpr const char * kFieldDefaultCountry = "defaultCountry"; +constexpr const char * kFieldLanguageEntries = "languageEntries"; +constexpr const char * kFieldDefaultLanguage = "defaultLanguage"; +constexpr const char * kFieldOrdinal = "ordinal"; +constexpr const char * kFieldRequired = "required"; +constexpr const char * kFieldSchemaVersion = "schemaVersion"; +constexpr const char * kFieldText = "text"; +constexpr const char * kFieldTitle = "title"; + +const std::unordered_map kHtmlToAnsiCodes = { + { "b", kAnsiCodeBold }, // + { "br", kLineBreak }, // + { "em", kAnsiCodeItalics }, // + { "h1", kAnsiCodeBold }, // + { "h2", kAnsiCodeBold }, // + { "h3", kAnsiCodeBold }, // + { "h4", kAnsiCodeBold }, // + { "h5", kAnsiCodeBold }, // + { "h6", kAnsiCodeBold }, // + { "hr", kHorizontalLine }, // + { "i", kAnsiCodeItalics }, // + { "li", kListItem }, // + { "ol", kLineBreak }, // + { "p", kLineBreak }, // + { "small", kAnsiCodeFaint }, // + { "strong", kAnsiCodeBold }, // + { "u", kAnsiCodeUnderline }, // + { "ul", kLineBreak }, // +}; + +std::string ToUpperCase(const std::string & input) +{ + std::string output = input; + std::transform(output.begin(), output.end(), output.begin(), [](unsigned char c) { return std::toupper(c); }); + return output; +} + +std::string ToLowerCase(const std::string & input) +{ + std::string output = input; + std::transform(output.begin(), output.end(), output.begin(), [](unsigned char c) { return std::tolower(c); }); + return output; +} + +std::string Center(const std::string & text) +{ + size_t lineWidth = strlen(kHorizontalLine) - 1; + if (text.length() >= lineWidth) + { + return text; // No padding if the text is longer than the width + } + + size_t totalPadding = lineWidth - text.length(); + size_t paddingLeft = totalPadding / 2; + size_t paddingRight = totalPadding - paddingLeft; + + return std::string(paddingLeft, ' ') + text + std::string(paddingRight, ' '); +} + +std::string HTMLTagToAnsiCode(const std::smatch & match) +{ + if (match[1] == "/") + { + return kAnsiCodeReset; + } + + std::string tag = match[2]; + auto ansiCode = kHtmlToAnsiCodes.find(ToLowerCase(tag)); + if (ansiCode == kHtmlToAnsiCodes.end()) + { + return "<" + tag + ">"; + } + + return ansiCode->second; +} + +std::string renderHTMLInTerminal(const std::string & html, const std::string & allowedTags = kTextAllowedTags) +{ + std::string formattedText; + std::string::const_iterator current = html.cbegin(); + + std::regex regex(allowedTags, std::regex_constants::icase); + for (std::sregex_iterator it(html.cbegin(), html.cend(), regex), end; it != end; ++it) + { + const auto & match = *it; + + formattedText += std::string(current, html.cbegin() + match.position()); + formattedText += HTMLTagToAnsiCode(match); + + current = html.cbegin() + match.position() + match.length(); + } + + formattedText += std::string(current, html.cend()); + formattedText += kAnsiCodeReset; + return formattedText; +} + +const char * ResolveValueOrDefault(const Json::Value & entries, const Optional & userValue, const char * defaultValue, + const char * valueType) +{ + const char * resolvedValue = userValue.ValueOr(defaultValue); + + if (userValue.HasValue() && !entries.isMember(resolvedValue)) + { + ChipLogProgress(chipTool, "User-chosen %s ('%s') not found. Defaulting to '%s'", valueType, userValue.Value(), + defaultValue); + resolvedValue = defaultValue; + } + + return resolvedValue; +} + +const Json::Value & GetTexts(const Json::Value & tc, Optional optionalCountryCode, + Optional optionalLanguageCode) +{ + const char * defaultCountry = tc[kFieldDefaultCountry].asCString(); + const char * chosenCountry = ResolveValueOrDefault(tc[kFieldCountryEntries], optionalCountryCode, defaultCountry, "country"); + auto & countryEntry = tc[kFieldCountryEntries][chosenCountry]; + + const char * defaultLanguage = countryEntry[kFieldDefaultLanguage].asCString(); + const char * chosenLanguage = + ResolveValueOrDefault(countryEntry[kFieldLanguageEntries], optionalLanguageCode, defaultLanguage, "language"); + auto & languageEntry = countryEntry[kFieldLanguageEntries][chosenLanguage]; + + return languageEntry; +} + +void PrintText(const Json::Value & json) +{ + auto title = renderHTMLInTerminal(Center(ToUpperCase(json[kFieldTitle].asCString())), kTitleAllowedTags); + auto text = renderHTMLInTerminal(json[kFieldText].asCString()); + auto userQuestion = renderHTMLInTerminal(kAcceptTerms); + auto required = json[kFieldRequired].asBool() ? kRequiredTerms : kOptionalTerms; + + printf("%s", kHorizontalLine); + printf("%s", title.c_str()); + printf("%s", kHorizontalLine); + printf("%s", text.c_str()); + printf("%s", kHorizontalLine); + printf("[%s] %s", required, userQuestion.c_str()); +} + +bool AcknowledgeText() +{ + while (true) + { + std::string userInput; + std::getline(std::cin, userInput); + + VerifyOrReturnValue(!userInput.empty() && userInput != "Y" && userInput != "y", true); + VerifyOrReturnValue(userInput != "N" && userInput != "n", false); + + ChipLogError(chipTool, "%s", kErrorInvalidInput); + } +} + +} // namespace + +CHIP_ERROR DisplayTermsAndConditions(const Json::Value & tc, uint16_t & outVersion, uint16_t & outUserResponse, + Optional countryCode, Optional languageCode) +{ + VerifyOrReturnError(CanCastTo(tc[kFieldSchemaVersion].asUInt()), CHIP_ERROR_INVALID_ARGUMENT); + outVersion = static_cast(tc[kFieldSchemaVersion].asUInt()); + + auto texts = GetTexts(tc, countryCode, languageCode); + for (const auto & text : texts) + { + PrintText(text); + + if (AcknowledgeText()) + { + auto ordinal = text[kFieldOrdinal].asUInt(); + VerifyOrReturnError(ordinal < 16, CHIP_ERROR_INVALID_ARGUMENT); // Only 16 bits are available for user response + uint16_t shiftedValue = static_cast((1U << (ordinal & 0x0F)) & 0xFFFF); + outUserResponse |= shiftedValue; + } + } + return CHIP_NO_ERROR; +} +} // namespace dcl +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.h b/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.h new file mode 100644 index 0000000000..49a68e3a6e --- /dev/null +++ b/examples/chip-tool/commands/dcl/DisplayTermsAndConditions.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include + +#include + +namespace chip { +namespace tool { +namespace dcl { +/** + * Display the terms and conditions to the user and prompt for acceptance. + * + * @param[in] tc The terms and conditions JSON object. + * @param[out] outVersion The schema version of the terms and conditions. + * @param[out] outUserResponse The user response as a bitfield where each bit corresponds to the ordinal of the text. + * @param[in] countryCode The country code to use for the terms and conditions. If not provided, the default country will be used. + * @param[in] languageCode The language code to use for the terms and conditions. If not provided, the default language will be + * used. + * + * @return CHIP_NO_ERROR on success, error code otherwise. + */ +CHIP_ERROR DisplayTermsAndConditions(const Json::Value & tc, uint16_t & outVersion, uint16_t & outUserResponse, + Optional countryCode = NullOptional, + Optional languageCode = NullOptional); +} // namespace dcl +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/HTTPSRequest.cpp b/examples/chip-tool/commands/dcl/HTTPSRequest.cpp new file mode 100644 index 0000000000..29b0ed8f27 --- /dev/null +++ b/examples/chip-tool/commands/dcl/HTTPSRequest.cpp @@ -0,0 +1,339 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "HTTPSRequest.h" + +#include +#include +#include +#include +#include +#include + +#if (CHIP_CRYPTO_OPENSSL || CHIP_CRYPTO_BORINGSSL) +#include +#include +#include +#ifdef SHA256_DIGEST_LENGTH +#define USE_CHIP_CRYPTO 1 +#endif +#endif //(CHIP_CRYPTO_OPENSSL || CHIP_CRYPTO_BORINGSSL) + +namespace { +constexpr const char * kHttpsPrefix = "https://"; +constexpr uint16_t kHttpsPort = 443; +constexpr const char * kErrorJsonParse = "Failed to parse JSON: "; +constexpr const char * kErrorHTTPSPrefix = "URL must start with 'https://': "; +constexpr const char * kErrorHTTPSPort = "Invalid port: 0"; +constexpr const char * kErrorHTTPSHostName = "Invalid hostname: empty"; +constexpr const char * kErrorBase64Decode = "Error while decoding base64 data"; +constexpr const char * kErrorSizeMismatch = "The response size does not match the expected size: "; +} // namespace + +namespace chip { +namespace tool { +namespace https { +namespace { +#ifndef USE_CHIP_CRYPTO +/** + * @brief Stub implementation of HTTPSSessionHolder when neither OpenSSL nor BoringSSL is enabled. + * + * This class provides placeholder methods that log errors indicating the lack of SSL library support + * and encourages contributions for new implementations. + */ +class HTTPSSessionHolder +{ +public: + CHIP_ERROR Init(std::string & hostname, uint16_t port) { return LogNotImplementedError(); } + + CHIP_ERROR SendRequest(std::string & request) { return LogNotImplementedError(); } + + CHIP_ERROR ReceiveResponse(std::string & response) { return LogNotImplementedError(); } + +private: + CHIP_ERROR LogNotImplementedError() const + { + ChipLogError(chipTool, + "HTTPS requests are not available because neither OpenSSL nor BoringSSL is enabled. Contributions for " + "alternative implementations are welcome!"); + return CHIP_ERROR_NOT_IMPLEMENTED; + } +}; +#else // USE_CHIP_CRYPTO +constexpr uint16_t kResponseBufferSize = 4096; +constexpr const char * kErrorSendHTTPRequest = "Failed to send HTTP request"; +constexpr const char * kErrorReceiveHTTPResponse = "Failed to read HTTP response"; +constexpr const char * kErrorConnection = "Failed to connect to: "; +constexpr const char * kErrorSSLContextCreate = "Failed to create SSL context"; +constexpr const char * kErrorSSLObjectCreate = "Failed to create SSL object"; +constexpr const char * kErrorSSLHandshake = "SSL handshake failed"; +constexpr const char * kErrorDigestMismatch = "The response digest does not match the expected digest"; +class HTTPSSessionHolder +{ +public: + HTTPSSessionHolder(){}; + + ~HTTPSSessionHolder() + { + VerifyOrReturn(nullptr != mContext); + SSL_free(mSSL); + SSL_CTX_free(mContext); + close(mSock); + +#if !defined(OPENSSL_IS_BORINGSSL) + EVP_cleanup(); +#endif + } + + CHIP_ERROR Init(std::string & hostname, uint16_t port) + { + int sock; + ReturnErrorOnFailure(InitSocket(hostname, port, sock)); + ReturnErrorOnFailure(InitSSL(sock)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR SendRequest(std::string & request) + { + int written = SSL_write(mSSL, request.c_str(), (int) request.size()); + VerifyOrReturnError(written > 0, CHIP_ERROR_BAD_REQUEST, ChipLogError(chipTool, "%s", kErrorSendHTTPRequest)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR ReceiveResponse(std::string & response) + { + char buffer[kResponseBufferSize]; + + ssize_t n = -1; + while ((n = SSL_read(mSSL, buffer, sizeof(buffer))) > 0) + { + VerifyOrReturnError(CanCastTo(n), CHIP_ERROR_INVALID_ARGUMENT); + response.append(buffer, static_cast(n)); + } + + VerifyOrReturnError(n >= 0, CHIP_ERROR_INTERNAL, ChipLogError(chipTool, "%s", kErrorReceiveHTTPResponse)); + + return CHIP_NO_ERROR; + } + +private: + CHIP_ERROR InitSocket(std::string & hostname, uint16_t port, int & sock) + { + auto * server = gethostbyname(hostname.c_str()); + VerifyOrReturnError(nullptr != server, CHIP_ERROR_NOT_CONNECTED); + + sock = socket(AF_INET, SOCK_STREAM, 0); + VerifyOrReturnError(sock >= 0, CHIP_ERROR_NOT_CONNECTED); + + struct sockaddr_in server_addr; + memset(&server_addr, 0, sizeof(server_addr)); + server_addr.sin_family = AF_INET; + server_addr.sin_port = htons(port); + memcpy(&server_addr.sin_addr.s_addr, server->h_addr, (size_t) server->h_length); + + int rv = connect(sock, (struct sockaddr *) &server_addr, sizeof(server_addr)); + VerifyOrReturnError(rv >= 0, CHIP_ERROR_POSIX(errno), + ChipLogError(chipTool, "%s%s:%u", kErrorConnection, hostname.c_str(), port)); + + return CHIP_NO_ERROR; + } + + CHIP_ERROR InitSSL(int sock) + { + SSL_load_error_strings(); + OpenSSL_add_ssl_algorithms(); + + auto * context = SSL_CTX_new(TLS_client_method()); + VerifyOrReturnError(nullptr != context, CHIP_ERROR_NOT_CONNECTED, ChipLogError(chipTool, "%s", kErrorSSLContextCreate)); + + auto * ssl = SSL_new(context); + VerifyOrReturnError(nullptr != ssl, CHIP_ERROR_NOT_CONNECTED, ChipLogError(chipTool, "%s", kErrorSSLObjectCreate)); + + SSL_set_fd(ssl, sock); + VerifyOrReturnError(SSL_connect(ssl) > 0, CHIP_ERROR_NOT_CONNECTED, ChipLogError(chipTool, "%s", kErrorSSLHandshake)); + + mContext = context; + mSSL = ssl; + mSock = sock; + return CHIP_NO_ERROR; + } + + SSL_CTX * mContext = nullptr; + SSL * mSSL = nullptr; + int mSock = -1; +}; +#endif // USE_CHIP_CRYPTO + +std::string BuildRequest(std::string & hostname, std::string & path) +{ + return "GET " + path + " HTTP/1.1\r\n" + // + "Host: " + hostname + "\r\n" + // + "Accept: application/json\r\n" + // + "Connection: close\r\n\r\n"; // +} + +CHIP_ERROR RemoveHeader(std::string & response) +{ + size_t headerEnd = response.find("\r\n\r\n"); + VerifyOrReturnError(std::string::npos != headerEnd, CHIP_ERROR_INVALID_ARGUMENT); + + auto body = response.substr(headerEnd + 4); + response = body; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR MaybeCheckResponseSize(const std::string & response, const chip::Optional & optionalExpectedSize) +{ + VerifyOrReturnError(optionalExpectedSize.HasValue(), CHIP_NO_ERROR); + VerifyOrReturnError(chip::CanCastTo(response.size()), CHIP_ERROR_INVALID_ARGUMENT); + + uint32_t responseSize = static_cast(response.size()); + uint32_t expectedSize = optionalExpectedSize.Value(); + VerifyOrReturnError(expectedSize == responseSize, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(chipTool, "%s%u != %u", kErrorSizeMismatch, responseSize, expectedSize)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR MaybeCheckResponseDigest(const std::string & response, const chip::Optional & optionalExpectedDigest) +{ + VerifyOrReturnError(optionalExpectedDigest.HasValue(), CHIP_NO_ERROR); + VerifyOrReturnError(CanCastTo(strlen(optionalExpectedDigest.Value())), CHIP_ERROR_INVALID_ARGUMENT); + + const char * encodedData = optionalExpectedDigest.Value(); + uint16_t encodedDataSize = static_cast(strlen(encodedData)); + + size_t expectedMaxDecodedSize = BASE64_MAX_DECODED_LEN(encodedDataSize); + chip::Platform::ScopedMemoryBuffer decodedData; + VerifyOrReturnError(decodedData.Calloc(expectedMaxDecodedSize + 1 /* for null */), CHIP_ERROR_INVALID_ARGUMENT); + + size_t decodedDataSize = chip::Base64Decode(encodedData, encodedDataSize, decodedData.Get()); + VerifyOrReturnError(0 != decodedDataSize, CHIP_ERROR_INVALID_ARGUMENT, ChipLogError(chipTool, "%s", kErrorBase64Decode)); + +#ifdef USE_CHIP_CRYPTO + // Compute the SHA-256 hash of the response + unsigned char responseDigest[SHA256_DIGEST_LENGTH]; + SHA256(reinterpret_cast(response.c_str()), response.size(), responseDigest); + + VerifyOrReturnError(memcmp(responseDigest, decodedData.Get(), SHA256_DIGEST_LENGTH) == 0, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(chipTool, "%s", kErrorDigestMismatch)); +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif // USE_CHIP_CRYPTO + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConvertResponseToJSON(std::string & body, Json::Value & jsonResponse) +{ + + Json::CharReaderBuilder readerBuilder; + std::string errors; + std::istringstream jsonStream(body); + bool success = Json::parseFromStream(readerBuilder, jsonStream, &jsonResponse, &errors); + VerifyOrReturnError(success, CHIP_ERROR_INTERNAL, ChipLogError(chipTool, "%s%s", kErrorJsonParse, errors.c_str())); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ExtractHostAndPath(const std::string & url, std::string & hostAndPort, std::string & outPath) +{ + VerifyOrReturnError(url.compare(0, strlen(kHttpsPrefix), kHttpsPrefix) == 0, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(chipTool, "%s%s", kErrorHTTPSPrefix, url.c_str())); + + auto strippedUrl = url.substr(strlen(kHttpsPrefix)); + VerifyOrReturnError("" != strippedUrl, CHIP_ERROR_INVALID_ARGUMENT, ChipLogError(chipTool, "%s", kErrorHTTPSHostName)); + + size_t position = strippedUrl.find('/'); + if (position == std::string::npos) + { + hostAndPort = strippedUrl; + outPath = "/"; + } + else + { + hostAndPort = strippedUrl.substr(0, position); + outPath = strippedUrl.substr(position); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ExtractHostAndPort(const std::string & hostAndPort, std::string & outHostName, uint16_t & outPort) +{ + size_t position = hostAndPort.find(':'); + if (position == std::string::npos) + { + outHostName = hostAndPort; + outPort = kHttpsPort; + } + else + { + outHostName = hostAndPort.substr(0, position); + auto portString = hostAndPort.substr(position + 1); + outPort = static_cast(std::atoi(portString.c_str())); + VerifyOrReturnError(0 != outPort, CHIP_ERROR_INVALID_ARGUMENT, ChipLogError(chipTool, "%s", kErrorHTTPSPort)); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ExtractHostNamePortPath(std::string url, std::string & outHostName, uint16_t & outPort, std::string & outPath) +{ + std::string hostAndPort; + ReturnErrorOnFailure(ExtractHostAndPath(url, hostAndPort, outPath)); + ReturnErrorOnFailure(ExtractHostAndPort(hostAndPort, outHostName, outPort)); + + return CHIP_NO_ERROR; +} +} // namespace + +CHIP_ERROR Request(std::string url, Json::Value & jsonResponse, const Optional & optionalExpectedSize, + const Optional & optionalExpectedDigest) +{ + std::string hostname; + uint16_t port; + std::string path; + ReturnErrorOnFailure(ExtractHostNamePortPath(url, hostname, port, path)); + return Request(hostname, port, path, jsonResponse, optionalExpectedSize, optionalExpectedDigest); +} + +CHIP_ERROR Request(std::string hostname, uint16_t port, std::string path, Json::Value & jsonResponse, + const Optional & optionalExpectedSize, const Optional & optionalExpectedDigest) +{ + VerifyOrDo(port != 0, port = kHttpsPort); + + ChipLogDetail(chipTool, "HTTPS request to %s:%u%s", hostname.c_str(), port, path.c_str()); + + std::string request = BuildRequest(hostname, path); + std::string response; + + HTTPSSessionHolder session; + ReturnErrorOnFailure(session.Init(hostname, port)); + ReturnErrorOnFailure(session.SendRequest(request)); + ReturnErrorOnFailure(session.ReceiveResponse(response)); + ReturnErrorOnFailure(RemoveHeader(response)); + ReturnErrorOnFailure(MaybeCheckResponseSize(response, optionalExpectedSize)); + ReturnErrorOnFailure(MaybeCheckResponseDigest(response, optionalExpectedDigest)); + ReturnErrorOnFailure(ConvertResponseToJSON(response, jsonResponse)); + return CHIP_NO_ERROR; +} + +} // namespace https +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/HTTPSRequest.h b/examples/chip-tool/commands/dcl/HTTPSRequest.h new file mode 100644 index 0000000000..f11e3b33d3 --- /dev/null +++ b/examples/chip-tool/commands/dcl/HTTPSRequest.h @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include + +#include +#include + +namespace chip { +namespace tool { +namespace https { + +CHIP_ERROR Request(std::string url, Json::Value & jsonResponse, + const chip::Optional & optionalExpectedSize = chip::NullOptional, + const chip::Optional & optionalExpectedDigest = chip::NullOptional); + +CHIP_ERROR Request(std::string hostname, uint16_t port, std::string path, Json::Value & jsonResponse, + const chip::Optional & optionalExpectedSize = chip::NullOptional, + const chip::Optional & optionalExpectedDigest = chip::NullOptional); + +} // namespace https +} // namespace tool +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/JsonSchemaMacros.cpp b/examples/chip-tool/commands/dcl/JsonSchemaMacros.cpp new file mode 100644 index 0000000000..f73fb4dac9 --- /dev/null +++ b/examples/chip-tool/commands/dcl/JsonSchemaMacros.cpp @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "JsonSchemaMacros.h" + +namespace { +constexpr const char * kJsonTypeNull = "Null"; +constexpr const char * kJsonTypeInt = "Int"; +constexpr const char * kJsonTypeUInt = "UInt"; +constexpr const char * kJsonTypeReal = "Real"; +constexpr const char * kJsonTypeString = "String"; +constexpr const char * kJsonTypeBool = "Bool"; +constexpr const char * kJsonTypeArray = "Array"; +constexpr const char * kJsonTypeObject = "Object"; +constexpr const char * kJsonTypeUnknown = "Unknown"; +} // namespace + +namespace chip { +namespace json { +const char * GetTypeName(const Json::Value & value) +{ + const char * type = kJsonTypeUnknown; + + switch (value.type()) + { + case Json::nullValue: + return kJsonTypeNull; + case Json::intValue: + return kJsonTypeInt; + case Json::uintValue: + return kJsonTypeUInt; + case Json::realValue: + return kJsonTypeReal; + case Json::stringValue: + return kJsonTypeString; + case Json::booleanValue: + return kJsonTypeBool; + case Json::arrayValue: + return kJsonTypeArray; + case Json::objectValue: + return kJsonTypeObject; + default: + return kJsonTypeUnknown; + } + + return type; +} +} // namespace json +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/JsonSchemaMacros.h b/examples/chip-tool/commands/dcl/JsonSchemaMacros.h new file mode 100644 index 0000000000..812cf51678 --- /dev/null +++ b/examples/chip-tool/commands/dcl/JsonSchemaMacros.h @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#define CHECK_TYPE(source, fieldName, fieldType) \ + VerifyOrReturnError(source.is##fieldType(), CHIP_ERROR_SCHEMA_MISMATCH, \ + ChipLogError(chipTool, "Type mismatch for field '%s': expected '%s', got '%s'", #fieldName, #fieldType, \ + chip::json::GetTypeName(source))); + +#define CHECK_REQUIRED_TYPE(source, fieldName, fieldType) \ + VerifyOrReturnError(source.isMember(#fieldName), CHIP_ERROR_SCHEMA_MISMATCH, \ + ChipLogError(chipTool, "Missing required field: '%s'", #fieldName)); \ + CHECK_TYPE(source[#fieldName], fieldName, fieldType) + +#define CHECK_REQUIRED_VALUE(source, fieldName, expectedValue) \ + CHECK_REQUIRED_TYPE(source, fieldName, UInt); \ + VerifyOrReturnError(source[#fieldName].asUInt() == expectedValue, CHIP_ERROR_INCORRECT_STATE, \ + ChipLogError(chipTool, "Value mismatch for '%s': expected '%u', got '%u'", #fieldName, expectedValue, \ + source[#fieldName].asUInt())); + +namespace chip { +namespace json { +const char * GetTypeName(const Json::Value & value); +} // namespace json +} // namespace chip diff --git a/examples/chip-tool/commands/dcl/test_dcl_server.py b/examples/chip-tool/commands/dcl/test_dcl_server.py new file mode 100755 index 0000000000..f22f2d2a8e --- /dev/null +++ b/examples/chip-tool/commands/dcl/test_dcl_server.py @@ -0,0 +1,245 @@ +#!/usr/bin/env -S python3 -B + +# Copyright (c) 2025 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import base64 +import hashlib +import http.server +import json +import os +import re +import ssl + +DEFAULT_HOSTNAME = "localhost" +DEFAULT_PORT = 4443 + + +TC = { + 0XFFF1: { + 0x8001: { + "schemaVersion": 1, + "esfRevision": 1, + "defaultCountry": "US", + "countryEntries": { + "US": { + "defaultLanguage": "en", + "languageEntries": { + "en": [ + { + "ordinal": 0, + "required": True, + "title": "Terms and Conditions", + "text": "

Feature 1 Text

Please accept these.

" + }, + { + "ordinal": 1, + "required": False, + "title": "Privacy Policy", + "text": "

Feature 2 Text

" + } + ], + "es": [ + { + "ordinal": 0, + "required": True, + "title": "Términos y condiciones", + "text": "

Característica 1 Texto

Por favor acéptelos.

" + }, + { + "ordinal": 1, + "required": False, + "title": "Política de privacidad", + "text": "

Característica 2 Texto

" + } + ] + } + }, + "MX": { + "defaultLanguage": "es", + "languageEntries": { + "es": [ + { + "ordinal": 0, + "required": True, + "title": "Términos y condiciones", + "text": "

Característica 1 Texto

Por favor acéptelos.

" + } + ] + } + }, + "CN": { + "defaultLanguage": "zh", + "languageEntries": { + "zh": [ + { + "ordinal": 0, + "required": True, + "title": "条款和条件", + "text": "

产品1文字

" + }, + { + "ordinal": 1, + "required": False, + "title": "隐私条款", + "text": "

产品2文字

" + } + ] + } + }, + "RU": { + "defaultLanguage": "ru", + "languageEntries": { + "ru": [ + { + "ordinal": 0, + "required": True, + "title": "Условия и положения", + "text": "

Текст функции 1

Пожалуйста, примите эти условия пользования.

" + }, + { + "ordinal": 1, + "required": False, + "title": "Положение о конфиденциальности", + "text": "

Текст функции 2

" + } + ] + } + } + } + } + } +} + +MODELS = { + 0XFFF1: { + 0x8001: { + "model": + { + "vid": 65521, + "pid": 32769, + "deviceTypeId": 65535, + "productName": "TEST_PRODUCT", + "productLabel": "All Clusters App", + "partNumber": "", + "commissioningCustomFlow": 2, + "commissioningCustomFlowUrl": "", + "commissioningModeInitialStepsHint": 0, + "commissioningModeInitialStepsInstruction": "", + "commissioningModeSecondaryStepsHint": 0, + "commissioningModeSecondaryStepsInstruction": "", + "creator": "chip project", + "lsfRevision": 0, + "lsfUrl": "", + "productUrl": "https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app", + "supportUrl": "https://github.com/project-chip/connectedhomeip/", + "userManualUrl": "", + "enhancedSetupFlowOptions": 1, + "enhancedSetupFlowTCUrl": f"https://{DEFAULT_HOSTNAME}:{DEFAULT_PORT}/tc/65521/32769", + "enhancedSetupFlowTCRevision": 1, + "enhancedSetupFlowTCDigest": "", + "enhancedSetupFlowTCFileSize": 0, + "enhancedSetupFlowMaintenanceUrl": "" + } + } + } +} + + +class RESTRequestHandler(http.server.BaseHTTPRequestHandler): + def __init__(self, *args, **kwargs): + self.routes = { + r"/dcl/model/models/(\d+)/(\d+)": self.handle_model_request, + r"/tc/(\d+)/(\d+)": self.handle_tc_request, + } + super().__init__(*args, **kwargs) + + def do_GET(self): + for pattern, handler in self.routes.items(): + match = re.match(pattern, self.path) + if match: + response = handler(*match.groups()) + if response: + self.send_response(200) + self.send_header("Content-Type", "application/json") + self.end_headers() + self.wfile.write(json.dumps(response).encode("utf-8")) + return + + # Handle 404 for unmatched paths + self.send_response(404) + self.send_header("Content-Type", "application/json") + self.end_headers() + self.wfile.write(json.dumps({"error": "Not found"}).encode("utf-8")) + + def handle_model_request(self, vendor_id, product_id): + vendor_id = int(vendor_id) + product_id = int(product_id) + if vendor_id in MODELS and product_id in MODELS[vendor_id]: + model = MODELS[int(vendor_id)][int(product_id)] + # We will return a model that contains the file size and the digest of the TC. + # Instead of manually setting them, it is calculated on the fly. + tc = TC[int(vendor_id)][int(product_id)] + tc_encoded = json.dumps(tc).encode("utf-8") + sha256_hash = hashlib.sha256(tc_encoded).digest() + model['model']['enhancedSetupFlowTCFileSize'] = len(tc_encoded) + model['model']['enhancedSetupFlowTCDigest'] = base64.b64encode( + sha256_hash).decode("utf-8") + + return model + + return None + + def handle_tc_request(self, vendor_id, product_id): + vendor_id = int(vendor_id) + product_id = int(product_id) + if vendor_id in TC and product_id in TC[vendor_id]: + return TC[int(vendor_id)][int(product_id)] + + return None + + +def run_https_server(cert_file="cert.pem", key_file="key.pem"): + httpd = http.server.HTTPServer( + (DEFAULT_HOSTNAME, DEFAULT_PORT), RESTRequestHandler) + + httpd.socket = ssl.wrap_socket( + httpd.socket, + server_side=True, + certfile=cert_file, + keyfile=key_file, + ssl_version=ssl.PROTOCOL_TLS, + ) + + print(f"Serving on https://{DEFAULT_HOSTNAME}:{DEFAULT_PORT}") + httpd.serve_forever() + + +# Generate self-signed certificates if needed +def generate_self_signed_cert(cert_file="cert.pem", key_file="key.pem"): + from subprocess import run + run([ + "openssl", "req", "-x509", "-nodes", "-days", "365", "-newkey", "rsa:2048", + "-keyout", key_file, "-out", cert_file, + "-subj", f"/C=US/ST=Test/L=Test/O=Test/OU=Test/CN={DEFAULT_HOSTNAME}" + ]) + + +# Check if certificates exist; if not, generate them +if not os.path.exists("cert.pem") or not os.path.exists("key.pem"): + print("Generating self-signed certificates...") + generate_self_signed_cert() + +# Run the server +run_https_server() diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 96ccd6965d..7ebf74433a 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -28,6 +28,9 @@ #include #include +#include "../dcl/DCLClient.h" +#include "../dcl/DisplayTermsAndConditions.h" + #include using namespace ::chip; @@ -232,6 +235,7 @@ CHIP_ERROR PairingCommand::PairWithCode(NodeId remoteId) discoveryType = DiscoveryType::kDiscoveryNetworkOnlyWithoutPASEAutoRetry; } + ReturnErrorOnFailure(MaybeDisplayTermsAndConditions(commissioningParams)); return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload, commissioningParams, discoveryType); } @@ -585,3 +589,26 @@ void PairingCommand::OnDeviceAttestationCompleted(Controller::DeviceCommissioner SetCommandExitStatus(err); } } + +CHIP_ERROR PairingCommand::MaybeDisplayTermsAndConditions(CommissioningParameters & params) +{ + VerifyOrReturnError(mUseDCL.ValueOr(false), CHIP_NO_ERROR); + + Json::Value tc; + auto client = tool::dcl::DCLClient(mDCLHostName, mDCLPort); + ReturnErrorOnFailure(client.TermsAndConditions(mOnboardingPayload, tc)); + if (tc != Json::nullValue) + { + uint16_t version = 0; + uint16_t userResponse = 0; + ReturnErrorOnFailure(tool::dcl::DisplayTermsAndConditions(tc, version, userResponse, mCountryCode)); + + TermsAndConditionsAcknowledgement termsAndConditionsAcknowledgement = { + .acceptedTermsAndConditions = userResponse, + .acceptedTermsAndConditionsVersion = version, + }; + params.SetTermsAndConditionsAcknowledgement(termsAndConditionsAcknowledgement); + } + + return CHIP_NO_ERROR; +} diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 5572a724e9..3b0f58936c 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -106,6 +106,10 @@ class PairingCommand : public CHIPCommand, break; case PairingMode::Code: AddArgument("skip-commissioning-complete", 0, 1, &mSkipCommissioningComplete); + AddArgument("dcl-hostname", &mDCLHostName, + "Hostname of the DCL server to fetch information from. Defaults to 'on.dcl.csa-iot.org'."); + AddArgument("dcl-port", 0, UINT16_MAX, &mDCLPort, "Port number for connecting to the DCL server. Defaults to '443'."); + AddArgument("use-dcl", 0, 1, &mUseDCL, "Use DCL to fetch onboarding information"); FALLTHROUGH; case PairingMode::CodePaseOnly: AddArgument("payload", &mOnboardingPayload); @@ -247,6 +251,7 @@ class PairingCommand : public CHIPCommand, CHIP_ERROR PairWithMdnsOrBleByIndexWithCode(NodeId remoteId, uint16_t index); CHIP_ERROR Unpair(NodeId remoteId); chip::Controller::CommissioningParameters GetCommissioningParameters(); + CHIP_ERROR MaybeDisplayTermsAndConditions(chip::Controller::CommissioningParameters & params); const PairingMode mPairingMode; const PairingNetworkType mNetworkType; @@ -269,6 +274,9 @@ class PairingCommand : public CHIPCommand, chip::Optional mICDStayActiveDurationMsec; chip::Optional mTCAcknowledgements; chip::Optional mTCAcknowledgementVersion; + chip::Optional mDCLHostName; + chip::Optional mDCLPort; + chip::Optional mUseDCL; chip::app::DataModel::List mTimeZoneList; TypedComplexArgument> mComplex_TimeZones; diff --git a/examples/chip-tool/main.cpp b/examples/chip-tool/main.cpp index 6a52941e8b..cb296f3f31 100644 --- a/examples/chip-tool/main.cpp +++ b/examples/chip-tool/main.cpp @@ -20,6 +20,7 @@ #include "commands/example/ExampleCredentialIssuerCommands.h" #include "commands/clusters/SubscriptionsCommands.h" +#include "commands/dcl/Commands.h" #include "commands/delay/Commands.h" #include "commands/discover/Commands.h" #include "commands/group/Commands.h" @@ -39,6 +40,7 @@ int main(int argc, char * argv[]) { ExampleCredentialIssuerCommands credIssuerCommands; Commands commands; + registerCommandsDCL(commands); registerCommandsDelay(commands, &credIssuerCommands); registerCommandsDiscover(commands, &credIssuerCommands); registerCommandsICD(commands, &credIssuerCommands); diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 07ac781f35..b4fb0cb13b 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -111,6 +111,10 @@ #include "ExampleAccessRestrictionProvider.h" #endif +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED +#include // nogncheck +#endif + #if CHIP_DEVICE_LAYER_TARGET_DARWIN #include #if CHIP_DEVICE_CONFIG_ENABLE_WIFI @@ -542,6 +546,16 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) VerifyOrDie(initParams.InitializeStaticResourcesBeforeServerInit() == CHIP_NO_ERROR); initParams.dataModelProvider = app::CodegenDataModelProviderInstance(initParams.persistentStorageDelegate); +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + if (LinuxDeviceOptions::GetInstance().tcVersion.HasValue() && LinuxDeviceOptions::GetInstance().tcRequired.HasValue()) + { + uint16_t version = LinuxDeviceOptions::GetInstance().tcVersion.Value(); + uint16_t required = LinuxDeviceOptions::GetInstance().tcRequired.Value(); + Optional requiredAcknowledgements(app::TermsAndConditions(required, version)); + app::TermsAndConditionsManager::GetInstance()->Init(initParams.persistentStorageDelegate, requiredAcknowledgements); + } +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + #if defined(ENABLE_CHIP_SHELL) Engine::Root().Init(); Shell::RegisterCommissioneeCommands(); diff --git a/examples/platform/linux/Options.cpp b/examples/platform/linux/Options.cpp index e3b7ba4267..fa56b62fea 100644 --- a/examples/platform/linux/Options.cpp +++ b/examples/platform/linux/Options.cpp @@ -128,6 +128,10 @@ enum kDeviceOption_WiFi_PAF, #endif kDeviceOption_DacProvider, +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + kDeviceOption_TermsAndConditions_Version, + kDeviceOption_TermsAndConditions_Required, +#endif }; constexpr unsigned kAppUsageLength = 64; @@ -204,6 +208,10 @@ OptionDef sDeviceOptionDefs[] = { { "faults", kArgumentRequired, kDeviceOption_FaultInjection }, #endif { "dac_provider", kArgumentRequired, kDeviceOption_DacProvider }, +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + { "tc-version", kArgumentRequired, kDeviceOption_TermsAndConditions_Version }, + { "tc-required", kArgumentRequired, kDeviceOption_TermsAndConditions_Required }, +#endif {} }; @@ -362,6 +370,15 @@ const char * sDeviceOptionHelp = " Specifies the time after which the device transitions from active to idle.\n" "\n" #endif +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + " --tc-version\n" + " Sets the minimum required version of the Terms and Conditions\n" + "\n" + " --tc-required\n" + " Sets the required acknowledgements for the Terms and Conditions as a 16-bit enumeration.\n" + " Each bit represents an ordinal corresponding to a specific acknowledgment requirement.\n" + "\n" +#endif #if CHIP_WITH_NLFAULTINJECTION " --faults \n" " Inject specified fault(s) at runtime.\n" @@ -747,6 +764,17 @@ bool HandleOption(const char * aProgram, OptionSet * aOptions, int aIdentifier, LinuxDeviceOptions::GetInstance().dacProvider = &testDacProvider; break; } +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + case kDeviceOption_TermsAndConditions_Version: { + LinuxDeviceOptions::GetInstance().tcVersion.SetValue(static_cast(atoi(aValue))); + break; + } + + case kDeviceOption_TermsAndConditions_Required: { + LinuxDeviceOptions::GetInstance().tcRequired.SetValue(static_cast(atoi(aValue))); + break; + } +#endif default: PrintArgError("%s: INTERNAL ERROR: Unhandled option: %s\n", aProgram, aName); retval = false; diff --git a/examples/platform/linux/Options.h b/examples/platform/linux/Options.h index d9b1716bd3..6cad0469e0 100644 --- a/examples/platform/linux/Options.h +++ b/examples/platform/linux/Options.h @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -91,6 +92,10 @@ struct LinuxDeviceOptions #if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS chip::Optional> commissioningArlEntries; chip::Optional> arlEntries; +#endif +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + chip::Optional tcVersion; + chip::Optional tcRequired; #endif static LinuxDeviceOptions & GetInstance(); }; diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index 4defc79e91..04f7e4e5df 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -107,6 +107,14 @@ CHIP_ERROR GeneralCommissioningGlobalInstance::Read(const ConcreteReadAttributeP switch (aPath.mAttributeId) { + case FeatureMap::Id: { + BitFlags features; +#if CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + features.Set(GeneralCommissioning::Feature::kTermsAndConditions); +#endif // CHIP_CONFIG_TERMS_AND_CONDITIONS_REQUIRED + return aEncoder.Encode(features); + } + case RegulatoryConfig::Id: { return ReadIfSupported(&ConfigurationManager::GetRegulatoryLocation, aEncoder); } diff --git a/third_party/boringssl/repo/BUILD.gn b/third_party/boringssl/repo/BUILD.gn index a57807f52b..bb315cde98 100644 --- a/third_party/boringssl/repo/BUILD.gn +++ b/third_party/boringssl/repo/BUILD.gn @@ -41,6 +41,7 @@ all_sources = crypto_sources all_headers = crypto_headers +# Core BoringSSL library used by the SDK static_library("boringssl") { cflags = [ "-O2" ] @@ -55,3 +56,18 @@ static_library("boringssl") { # on boringssl, not just boringssl itself. configs += [ ":boringssl_config_disable_warnings" ] } + +# Extended version of BoringSSL with additional SSL sources (for optional tools) +static_library("boringssl_with_ssl_sources") { + cflags = [ "-O2" ] + + public = crypto_headers + ssl_headers + sources = crypto_sources + ssl_sources + + public_configs = [ ":boringssl_config" ] + + # The disable-warnings config should not be a public config, since + # that would make it apply to compilations of anything that depends + # on boringssl, not just boringssl itself. + configs += [ ":boringssl_config_disable_warnings" ] +}