diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 36908d97d06385..fe3876435755d0 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1fdec87ac8a696..66ae3a04488447 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -135,7 +135,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -283,7 +283,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -343,7 +343,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index e1de11ca0becb1..abb438c004fa76 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 options: --user root steps: @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:24 + image: ghcr.io/project-chip/chip-build-esp32:25 options: --user root steps: @@ -75,7 +75,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:24 + image: ghcr.io/project-chip/chip-build-nrf-platform:25 options: --user root steps: @@ -96,7 +96,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:24 + image: ghcr.io/project-chip/chip-build-telink:25 options: --user root steps: @@ -106,6 +106,9 @@ jobs: uses: ./.github/actions/checkout-submodules-and-bootstrap with: platform: telink + # - name: Update Zephyr to specific revision (for developers purpose) + # shell: bash + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py e6a32f41ccec55c2233631406842b71ff270089d" - name: CI Examples Telink shell: bash run: | diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 5338ed27e4c2fe..8a869f9577928f 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -40,7 +40,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:24 + # image: ghcr.io/project-chip/chip-build-cirque:25 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 04648f4da135ee..50ab4e0142eed5 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -113,8 +113,6 @@ jobs: TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'> >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2) # And the same thing, but with MTR_PER_CONTROLLER_STORAGE_ENABLED turned off, so we test that it does not break for now. TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 MTR_PER_CONTROLLER_STORAGE_ENABLED=0' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-controller-storage-err.log >&2) - # And the same thing, but with MTR_ENABLE_PROVISIONAL also turned on. - TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 MTR_PER_CONTROLLER_STORAGE_ENABLED=1 MTR_ENABLE_PROVISIONAL=1' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-provisional.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-provisional-err.log >&2) # And the same thing, but with MTR_NO_AVAILABILITY not turned on. This requires -Wno-unguarded-availability-new to avoid availability errors. TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited}' > >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-with-availability-annotations-err.log >&2) # -enableThreadSanitizer instruments the code in Matter.framework, diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 0480d013741b85..4dcee19d7ee344 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:24 + image: ghcr.io/project-chip/chip-build-doxygen:25 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 95ed4e23999c76..90d707b2a6ccc4 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:24 + image: ghcr.io/project-chip/chip-build-ameba:25 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 93c26450b01c85..f49c6d10f86dfd 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:24 + image: ghcr.io/project-chip/chip-build-asr:25 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index e0aa45bf677c50..fdaba18c3a06a0 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:24 + image: ghcr.io/project-chip/chip-build-bouffalolab:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index ea90b8729766f9..77371b836fe571 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:24 + image: ghcr.io/project-chip/chip-build-ti:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index f45559e5d173f2..5e8ac6d3f5809d 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:24 + image: ghcr.io/project-chip/chip-build-ti:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index c4d29e501a62c7..65cec1c0fc5200 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:24 + image: ghcr.io/project-chip/chip-build-efr32:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 111c28ccfd2d10..11a808306a33e9 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:24 + image: ghcr.io/project-chip/chip-build-esp32:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -130,7 +130,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:24 + image: ghcr.io/project-chip/chip-build-esp32:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index f225a4fba5867f..783d13352aa8c8 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:24 + image: ghcr.io/project-chip/chip-build-infineon:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 58e366b6cfeca5..53bfc177199839 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:24 + image: ghcr.io/project-chip/chip-build-k32w:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index f0f62060f0930e..589069998d6e69 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:24 + image: ghcr.io/project-chip/chip-build-crosscompile:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index d64409d1146a66..69b64649d20451 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:24 + image: ghcr.io/project-chip/chip-build-imx:25 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 98061009dc4fd9..76391d188a219c 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 9863d8f3f89703..8d680b52bdb31f 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:24 + image: ghcr.io/project-chip/chip-build-mbed-os:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 233a6f4fe9d540..16ac5114070c5e 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 3c22eaa79a0825..dc09d6f433abba 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:24 + image: ghcr.io/project-chip/chip-build-nrf-platform:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 5dc15c4ca2ec62..a61d68d8d4f9e8 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:24 + image: ghcr.io/project-chip/chip-build-openiotsdk:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 0f950134d2ff45..a1bc1d47dffad4 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 8f59b06aa50e4e..f9455c54b38d83 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 994d6b5d78a325..92cb016442b6df 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:24 + image: ghcr.io/project-chip/chip-build-telink:25 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -54,13 +54,16 @@ jobs: with: gh-context: ${{ toJson(github) }} - - name: Build example Telink (B92) Air Quality Sensor App + # - name: Update Zephyr to specific revision (for developers purpose) + # run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py e6a32f41ccec55c2233631406842b71ff270089d" + + - name: Build example Telink (B92 retention) Air Quality Sensor App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-air-quality-sensor' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-air-quality-sensor' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a air-quality-sensor-app \ - out/telink-tlsr9528a-air-quality-sensor/zephyr/zephyr.elf \ + telink tlsr9528a_retention air-quality-sensor-app \ + out/telink-tlsr9528a_retention-air-quality-sensor/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output @@ -102,13 +105,13 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92) Contact Sensor App + - name: Build example Telink (B92 retention) Contact Sensor App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-contact-sensor' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-contact-sensor' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a contact-sensor-app \ - out/telink-tlsr9528a-contact-sensor/zephyr/zephyr.elf \ + telink tlsr9528a_retention contact-sensor-app \ + out/telink-tlsr9528a_retention-contact-sensor/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output @@ -148,13 +151,13 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92) Lock App with DFU + - name: Build example Telink (B92 retention) Lock App with DFU run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock-dfu' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-lock-dfu' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a lock-app-dfu \ - out/telink-tlsr9528a-lock-dfu/zephyr/zephyr.elf \ + telink tlsr9528a_retention lock-app-dfu \ + out/telink-tlsr9528a_retention-lock-dfu/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output @@ -220,25 +223,25 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92) Smoke CO Alarm App + - name: Build example Telink (B92 retention) Smoke CO Alarm App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-smoke-co-alarm' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-smoke-co-alarm' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a smoke_co_alarm-app \ - out/telink-tlsr9528a-smoke-co-alarm/zephyr/zephyr.elf \ + telink tlsr9528a_retention smoke_co_alarm-app \ + out/telink-tlsr9528a_retention-smoke-co-alarm/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92) Temperature Measurement App + - name: Build example Telink (B92 retention) Temperature Measurement App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a-temperature-measurement' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-temperature-measurement' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a temperature-measurement-app \ - out/telink-tlsr9528a-temperature-measurement/zephyr/zephyr.elf \ + telink tlsr9528a_retention temperature-measurement-app \ + out/telink-tlsr9528a_retention-temperature-measurement/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index f01153240ffac6..ed3886f31b2b43 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:24 + image: ghcr.io/project-chip/chip-build-tizen:25 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 20ba8990ed93f0..d34876e1f5f4f4 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:24 + image: ghcr.io/project-chip/chip-build-android:25 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index adbe225b88fe4c..007fde6ec94a9a 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:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/issue-labeler.yaml b/.github/workflows/issue-labeler.yaml index b1c8e2304469bd..e7819c57f20b84 100644 --- a/.github/workflows/issue-labeler.yaml +++ b/.github/workflows/issue-labeler.yaml @@ -11,7 +11,7 @@ jobs: triage: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v3.2 #May not be the latest version + - uses: github/issue-labeler@v3.3 #May not be the latest version with: configuration-path: .github/issue-labeler.yml not-before: 2020-01-15T02:54:32Z diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 9cd1dea0447d04..69d81fedb80224 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:24 + image: ghcr.io/project-chip/chip-build-java:25 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/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 9cd6717f800943..ba8d242d6552ea 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.1 + uses: natiginfo/action-detekt-all@1.23.3 # Detekt seems not to like circular symlinks, so we set up # explicit paths below with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9db99f6461f459..1be3fe8d2a3c10 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index ff520e9e308fca..82f6667c95f54d 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:24 + image: ghcr.io/project-chip/chip-build-minimal:25 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 6a61aa520f6ce4..e1e221ab2d5b7e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:24 + image: ghcr.io/project-chip/chip-build-esp32-qemu:25 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -76,7 +76,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:24 + image: ghcr.io/project-chip/chip-build-tizen-qemu:25 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index dbe98f9666f6a6..c3feed075eb27e 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:24 + image: ghcr.io/project-chip/chip-build-esp32:25 steps: - name: Checkout @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:24 + image: ghcr.io/project-chip/chip-build-efr32:25 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 2ff570884f3a1c..969f6c6fd72da3 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:24 + image: ghcr.io/project-chip/chip-build-android:25 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d610edef1dc623..cf81c997065c0c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -169,6 +169,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/thread-network-diagnostics-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \ @@ -196,6 +197,7 @@ jobs: --target linux-x64-ota-requestor-${BUILD_VARIANT} \ --target linux-x64-tv-app-${BUILD_VARIANT} \ --target linux-x64-bridge-${BUILD_VARIANT} \ + --target linux-x64-lit-icd-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -215,6 +217,7 @@ jobs: --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ " - name: Run purposeful failure tests using the python parser sending commands to chip-tool @@ -253,6 +256,7 @@ jobs: --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ " - name: Run Tests using chip-repl (including slow) if: github.event_name == 'push' @@ -269,6 +273,7 @@ jobs: --ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/linux-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ " - name: Uploading core files uses: actions/upload-artifact@v3 @@ -334,6 +339,7 @@ jobs: --target darwin-x64-ota-requestor-${BUILD_VARIANT} \ --target darwin-x64-tv-app-${BUILD_VARIANT} \ --target darwin-x64-bridge-${BUILD_VARIANT} \ + --target darwin-x64-lit-icd-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ " @@ -354,6 +360,7 @@ jobs: --ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \ --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ + --lit-icd-app ./out/darwin-x64-lit-icd-${BUILD_VARIANT}/lit-icd-app \ " - name: Run purposeful failure tests using the python parser sending commands to chip-tool @@ -404,7 +411,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -430,6 +437,7 @@ jobs: "./scripts/build/build_examples.py \ --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-python-bindings \ build \ --copy-artifacts-to objdir-clone \ @@ -448,6 +456,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TestGroupTableReports.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_2.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_4.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' @@ -461,7 +470,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_12.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_13.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_3_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index e3c39f21438aec..ae2bdb82fc0b65 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 68b8782f576a43..02994409014617 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:24 + image: ghcr.io/project-chip/chip-build:25 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index bf1e305c4c9d51..0747c1da0f877d 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:24 + image: ghcr.io/project-chip/chip-build:25 defaults: run: shell: sh diff --git a/build/toolchain/flashable_executable.gni b/build/toolchain/flashable_executable.gni index 97b2b44f1ac51c..6233d58382b43d 100644 --- a/build/toolchain/flashable_executable.gni +++ b/build/toolchain/flashable_executable.gni @@ -147,6 +147,12 @@ template("flashable_executable") { } else { flashing_options = [] } + + # Allows to set a different image name in the flasher script + if (defined(invoker.flashing_image_name)) { + image_name = invoker.flashing_image_name + } + flashing_options += [ "--application", rebase_path(image_name, root_out_dir, root_out_dir), diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 43a766b7dbf8dd..b73398bca4c2bf 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -640,6 +640,16 @@ menu "CHIP Device Layer" When set, WoBLE advertisements will stop while a WoBLE connection is active. + config CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART + int "Enable CHIPoBLE advertising start automatically after device power-up" + range 0 1 + default 0 + depends on ENABLE_CHIPOBLE + help + CHIPs device may start advertising automatically only if its all primary device + functions are within a CHIP network. Device providing unrelated to CHIP functionalities + should not start advertising automatically after power-up. + config USE_BLE_ONLY_FOR_COMMISSIONING bool "Use BLE only for commissioning" default y diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index e9d506e538f131..8e798c058525c6 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -143,10 +143,11 @@ set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) # Define 'chip-ota-image' target for building CHIP OTA image # ============================================================================== +string(REPLACE "_retention" "" BASE_BOARD ${BOARD}) if(${TLNK_USB_DONGLE} MATCHES y) - if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb_boot.overlay") - set(USB_BOOT_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_usb_boot.overlay") + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_usb_boot.overlay") + set(USB_BOOT_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_usb_boot.overlay") else() unset(USB_BOOT_DTC_OVERLAY_FILE) endif() @@ -154,8 +155,18 @@ else() unset(USB_BOOT_DTC_OVERLAY_FILE) endif() -if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") - set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}.overlay") +if(${TLNK_MARS_BOARD} MATCHES y) + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_mars_boot.overlay") + set(MARS_BOOT_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}_mars_boot.overlay") + else() + unset(MARS_BOOT_DTC_OVERLAY_FILE) + endif() +else() + unset(MARS_CONF_OVERLAY_FILE) +endif() + +if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}.overlay") + set(GLOBAL_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BASE_BOARD}.overlay") else() unset(GLOBAL_DTC_OVERLAY_FILE) endif() @@ -184,8 +195,8 @@ math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) if (CONFIG_BOOTLOADER_MCUBOOT) add_custom_target(build_mcuboot ALL COMMAND - west build -b ${BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr - -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE}" + west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr + -- -DOVERLAY_CONFIG=${GLOBAL_BOOTLOADER_CONF_OVERLAY_FILE} -DDTC_OVERLAY_FILE="${GLOBAL_DTC_OVERLAY_FILE};${FLASH_DTC_OVERLAY_FILE};${USB_BOOT_DTC_OVERLAY_FILE};${MARS_BOOT_DTC_OVERLAY_FILE}" COMMAND cp ${PROJECT_BINARY_DIR}/../modules/chip-module/build_mcuboot/zephyr/zephyr.bin ${PROJECT_BINARY_DIR}/zephyr.mcuboot.bin ) diff --git a/config/telink/chip-module/Kconfig b/config/telink/chip-module/Kconfig index b1bd07660937bd..93ebc31a0f426e 100644 --- a/config/telink/chip-module/Kconfig +++ b/config/telink/chip-module/Kconfig @@ -202,3 +202,8 @@ config CHIP_ENABLE_POWER_ON_FACTORY_RESET Enable power on factory reset sequence. If device power triggered off during first 5 seconds after power on and this sequence repeated 5 times - factory reset will be involved. + +config CHIP_USE_MARS_SENSOR + bool "Use Mars board sensor" + depends on SOC_SERIES_RISCV_TELINK_B9X && (BOARD_TLSR9518ADK80D || BOARD_TLSR9518ADK80D_RETENTION) + default n diff --git a/config/telink/chip-module/Kconfig.defaults b/config/telink/chip-module/Kconfig.defaults index f346a2c1eeb807..54137bc281562b 100644 --- a/config/telink/chip-module/Kconfig.defaults +++ b/config/telink/chip-module/Kconfig.defaults @@ -64,7 +64,7 @@ config INIT_STACKS default y config IDLE_STACK_SIZE - default 387 if PM + default 512 if PM config ISR_STACK_SIZE default 502 if PM @@ -73,7 +73,7 @@ config SYSTEM_WORKQUEUE_STACK_SIZE default 616 if PM config HEAP_MEM_POOL_SIZE - default 128 if PM + default 256 config COMMON_LIBC_MALLOC_ARENA_SIZE default 12288 @@ -98,6 +98,9 @@ config NET_BUF_TX_COUNT default 16 if PM default 32 +config GPIO + default y + # Bluetooth Low Energy configs config BT @@ -154,6 +157,24 @@ choice B9X_BLE_CTRL_MAC_TYPE default B9X_BLE_CTRL_MAC_TYPE_RANDOM_STATIC endchoice +# Board retention config +if BOARD_TLSR9528A_RETENTION || BOARD_TLSR9518ADK80D_RETENTION +config BOARD_TLSR9X_NON_RETENTION_RAM_CODE + default y if PM + +config TELINK_B9x_MATTER_RETENTION_LAYOUT + default y if PM + +config PWM + default n +endif + +# Board non-retention config +if BOARD_TLSR9528A || BOARD_TLSR9518ADK80D +config PWM + default y +endif + # Config dynamic interrupts to have posibility to switch between BLE/Thread radio drivers config DYNAMIC_INTERRUPTS default y diff --git a/data_model/clusters/AccountLogin.xml b/data_model/clusters/AccountLogin.xml index 4add6f4189d279..3cd5c02590ea0a 100644 --- a/data_model/clusters/AccountLogin.xml +++ b/data_model/clusters/AccountLogin.xml @@ -73,9 +73,8 @@ Davis, CA 95616, USA - - + diff --git a/data_model/clusters/AlarmBase.xml b/data_model/clusters/AlarmBase.xml index b169d4fe9be24a..834089869b21da 100644 --- a/data_model/clusters/AlarmBase.xml +++ b/data_model/clusters/AlarmBase.xml @@ -115,13 +115,13 @@ Davis, CA 95616, USA - + - + - + diff --git a/data_model/clusters/BallastConfiguration.xml b/data_model/clusters/BallastConfiguration.xml index a6d553ddcc6ead..416b8cd7014beb 100644 --- a/data_model/clusters/BallastConfiguration.xml +++ b/data_model/clusters/BallastConfiguration.xml @@ -124,12 +124,12 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/clusters/Channel.xml b/data_model/clusters/Channel.xml index 3227cf9a5a446e..b75540d94a6baf 100644 --- a/data_model/clusters/Channel.xml +++ b/data_model/clusters/Channel.xml @@ -129,8 +129,9 @@ Davis, CA 95616, USA - + + diff --git a/data_model/clusters/DiagnosticsThread.xml b/data_model/clusters/DiagnosticsThread.xml index 2f8e97b150ffc2..ddcf246e9c99c3 100644 --- a/data_model/clusters/DiagnosticsThread.xml +++ b/data_model/clusters/DiagnosticsThread.xml @@ -653,7 +653,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/KeypadInput.xml b/data_model/clusters/KeypadInput.xml index 81f16ec0830aef..7179ae676b65fe 100644 --- a/data_model/clusters/KeypadInput.xml +++ b/data_model/clusters/KeypadInput.xml @@ -72,6 +72,266 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -88,7 +348,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/LocalizationTimeFormat.xml b/data_model/clusters/LocalizationTimeFormat.xml index 9c0ffa062fec58..1a7b6976a69ec6 100644 --- a/data_model/clusters/LocalizationTimeFormat.xml +++ b/data_model/clusters/LocalizationTimeFormat.xml @@ -103,6 +103,9 @@ Davis, CA 95616, USA + + + @@ -111,17 +114,20 @@ Davis, CA 95616, USA + + + - + - + - + - + diff --git a/data_model/clusters/TargetNavigator.xml b/data_model/clusters/TargetNavigator.xml index 3a49e7b5c6c838..ffb6955d27bf3c 100644 --- a/data_model/clusters/TargetNavigator.xml +++ b/data_model/clusters/TargetNavigator.xml @@ -75,6 +75,7 @@ Davis, CA 95616, USA + @@ -86,9 +87,8 @@ Davis, CA 95616, USA - + - diff --git a/data_model/clusters/WakeOnLAN.xml b/data_model/clusters/WakeOnLAN.xml index eede336182e6dc..799c92a03fd9b8 100644 --- a/data_model/clusters/WakeOnLAN.xml +++ b/data_model/clusters/WakeOnLAN.xml @@ -61,11 +61,11 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/spec_sha b/data_model/spec_sha index d114fd3ddcace3..03c3b85baa2427 100644 --- a/data_model/spec_sha +++ b/data_model/spec_sha @@ -1 +1 @@ -17cfdc4a04397eec62f1bce7984cace268b28ab3 +49003c1b2337aa51dad227977981b763667d1f75 diff --git a/docs/ci-cd/index.md b/docs/ci-cd/index.md index 616c34ece1d43e..de54e466d8ce94 100644 --- a/docs/ci-cd/index.md +++ b/docs/ci-cd/index.md @@ -1,43 +1,26 @@ # CI/CD Documentation +```{toctree} +:glob: + +tools/* +``` + ## Known Issues - Python build running out of space + - [Fail example](https://github.com/project-chip/connectedhomeip/actions/runs/6239660536/job/16938053552?pr=29333) + - May need intermediate cleanup steps ## Tools -### Daily Fail Summary - -#### Source - -Workflow: -https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/recent_fail_summary.yaml - -Script: -https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/summarize_fail.py - -Fail Definitions: -https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/build_fail_definitions.yaml - -#### Summary - -Runs once per day; takes inventory of the previous day's workflow runs and -parses them for fail statistics. Creates temporarily cached artifacts for easy -data parsing. Also saves a daily pass percentage list of all workflows at -https://github.com/project-chip/connectedhomeip/blob/daily_pass_percentage/docs/daily_pass_percentage.md. -Fail definitions can be added to the file defined above to allow fast root cause -determination of any fail with an error message. - -#### Improvement Ideas - -- Keep fail signature list updated to track causes of all common fails -- Make script artifact more known and accessible so it can be easily shared - and used by everyone -- Deliver daily fail summaries in short form through a Slack bot for easy - access +- [Daily Fail Summary](tools/daily_fail_summary.md) ## To Do - Cert image auto build + - [Initial code](https://github.com/woody-apple/connectedhomeip/tree/build-cert-bins) + - Need to change chip-build image builds to cut down time + - Do multi-platform builds for ARM64 ## General Improvement Ideas diff --git a/docs/ci-cd/tools/daily_fail_summary.md b/docs/ci-cd/tools/daily_fail_summary.md new file mode 100644 index 00000000000000..8855a7a3de6086 --- /dev/null +++ b/docs/ci-cd/tools/daily_fail_summary.md @@ -0,0 +1,34 @@ +### Daily Fail Summary + +#### Source + +Workflow: +https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/recent_fail_summary.yaml + +Script: +https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/summarize_fail.py + +Fail Definitions: +https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/build_fail_definitions.yaml + +#### Summary + +Runs once per day; takes inventory of the previous day's workflow runs and +parses them for fail statistics. Creates temporarily cached artifacts for easy +data parsing. Also saves a daily pass percentage list of all workflows at +https://github.com/project-chip/connectedhomeip/blob/daily_pass_percentage/docs/daily_pass_percentage.md. +Fail definitions can be added to the file defined above to allow fast root cause +determination of any fail with an error message. + +#### To Do + +- Keep fail signature list updated to track causes of all common fails +- Include Darwin Test fail definitions in fail summary script - for starters, + Test Reliable Message Protocol + +#### Improvement Ideas + +- Make script artifact more known and accessible so it can be easily shared + and used by everyone +- Deliver daily fail summaries in short form through a Slack bot for easy + access diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index 4607a5f5f21274..8d419ff58b2efd 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -483,6 +483,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -499,11 +500,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -550,6 +554,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -584,6 +591,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { @@ -1127,8 +1136,8 @@ provisional server cluster FanControl = 514 { kOffLowHigh = 1; kOffLowMedHighAuto = 2; kOffLowHighAuto = 3; - kOffOnAuto = 4; - kOffOn = 5; + kOffHighAuto = 4; + kOffHigh = 5; } enum StepDirectionEnum : enum8 { @@ -1157,7 +1166,7 @@ provisional server cluster FanControl = 514 { } attribute FanModeEnum fanMode = 0; - attribute FanModeSequenceEnum fanModeSequence = 1; + readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; readonly attribute int8u speedMax = 4; diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap index 62293622ef43db..44f7fbb4327799 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap @@ -6886,7 +6886,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "temperature", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7559,5 +7559,6 @@ "endpointId": 4, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 4ee5d80575496f..8eb854e587e37b 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -477,6 +477,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -493,11 +494,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -544,6 +548,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -578,6 +585,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index 55241805cf8a25..440a130222bc83 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -1832,7 +1832,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1848,7 +1848,7 @@ "code": 11, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -1864,7 +1864,7 @@ "code": 12, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2660,7 +2660,7 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", + "name": "ActiveNetworkFaultsList", "code": 62, "mfgCode": null, "side": "server", diff --git a/examples/air-quality-sensor-app/linux/README.md b/examples/air-quality-sensor-app/linux/README.md index 51798c23ef441f..110c1fed58cd01 100644 --- a/examples/air-quality-sensor-app/linux/README.md +++ b/examples/air-quality-sensor-app/linux/README.md @@ -131,7 +131,7 @@ $ echo '{"Name":"AirQuality","NewValue":3}' > /tmp/chip_air_quality_fifo_ Generate event `TemperatureMeasurement`, to change the temperate value. ``` -$ echo '{"Name":"TemperatureMeasurement","NewValue":18}' > /tmp/chip_air_quality_fifo_ +$ echo '{"Name":"TemperatureMeasurement","NewValue":1800}' > /tmp/chip_air_quality_fifo_ ``` ### Trigger Humidity change event diff --git a/examples/air-quality-sensor-app/telink/CMakeLists.txt b/examples/air-quality-sensor-app/telink/CMakeLists.txt index fd5a5b14256426..908bea9eb73a98 100644 --- a/examples/air-quality-sensor-app/telink/CMakeLists.txt +++ b/examples/air-quality-sensor-app/telink/CMakeLists.txt @@ -19,6 +19,23 @@ get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connect get_filename_component(TELINK_COMMON ${CHIP_ROOT}/examples/platform/telink REALPATH) get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) +set(ignoreMe "${TLNK_MARS_BOARD}") + +if(${TLNK_MARS_BOARD} MATCHES y) + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_mars.overlay") + set(MARS_DTC_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_mars.overlay") + else() + unset(MARS_DTC_OVERLAY_FILE) + endif() + if(EXISTS "${CHIP_ROOT}/src/platform/telink/${BOARD}_mars.conf") + set(MARS_CONF_OVERLAY_FILE "${CHIP_ROOT}/src/platform/telink/${BOARD}_mars.conf") + else() + unset(MARS_CONF_OVERLAY_FILE) + endif() +else() + unset(MARS_CONF_OVERLAY_FILE) +endif() + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") set(LOCAL_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD}.overlay") else() @@ -41,14 +58,14 @@ endif() if(DTC_OVERLAY_FILE) set(DTC_OVERLAY_FILE - "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${FLASH_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" + "${DTC_OVERLAY_FILE} ${GLOBAL_DTC_OVERLAY_FILE} ${MARS_DTC_OVERLAY_FILE} ${FLASH_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}" CACHE STRING "" FORCE ) else() - set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${FLASH_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) + set(DTC_OVERLAY_FILE ${GLOBAL_DTC_OVERLAY_FILE} ${MARS_DTC_OVERLAY_FILE} ${FLASH_DTC_OVERLAY_FILE} ${LOCAL_DTC_OVERLAY_FILE}) endif() -set(CONF_FILE prj.conf) +set(CONF_FILE ${MARS_CONF_OVERLAY_FILE} prj.conf) # Load NCS/Zephyr build system list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/telink/chip-module) @@ -78,10 +95,12 @@ target_sources(app PRIVATE src/ZclCallbacks.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp + ${TELINK_COMMON}/common/src/SensorManagerCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp ${TELINK_COMMON}/util/src/ButtonManager.cpp ${TELINK_COMMON}/util/src/ThreadUtil.cpp ${TELINK_COMMON}/util/src/PWMDevice.cpp + ${TELINK_COMMON}/util/src/WS2812Device.cpp ${CHIP_ROOT}/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp) chip_configure_data_model(app diff --git a/examples/air-quality-sensor-app/telink/include/AppTask.h b/examples/air-quality-sensor-app/telink/include/AppTask.h index a1b55a9b83108f..659de081dbf01f 100644 --- a/examples/air-quality-sensor-app/telink/include/AppTask.h +++ b/examples/air-quality-sensor-app/telink/include/AppTask.h @@ -31,7 +31,8 @@ class AppTask : public AppTaskCommon CHIP_ERROR Init(void); - static void AirQualityActionEventHandler(AppEvent * aEvent); + static void AirQualitySensorUpdateTimerTimeoutCallback(k_timer * timer); + static void AirQualitySensorUpdateTimerEventHandler(AppEvent * aEvent); static AppTask sAppTask; }; diff --git a/examples/air-quality-sensor-app/telink/prj.conf b/examples/air-quality-sensor-app/telink/prj.conf index 703e78efb7ed4a..b43fbe9636d9aa 100644 --- a/examples/air-quality-sensor-app/telink/prj.conf +++ b/examples/air-quality-sensor-app/telink/prj.conf @@ -22,12 +22,6 @@ CONFIG_CHIP=y CONFIG_STD_CPP17=y -# enable GPIO -CONFIG_GPIO=y - -# enable PWM -CONFIG_PWM=y - # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="include/CHIPProjectConfig.h" CONFIG_CHIP_OPENTHREAD_CONFIG="../../platform/telink/project_include/OpenThreadConfig.h" diff --git a/examples/air-quality-sensor-app/telink/src/AppTask.cpp b/examples/air-quality-sensor-app/telink/src/AppTask.cpp index 94988ea8bbe5a0..ac2f61b3c06f52 100644 --- a/examples/air-quality-sensor-app/telink/src/AppTask.cpp +++ b/examples/air-quality-sensor-app/telink/src/AppTask.cpp @@ -17,50 +17,100 @@ */ #include "AppTask.h" +#include "SensorManagerCommon.h" #include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); +using namespace chip; using namespace ::chip::app::Clusters; using namespace ::chip::app::Clusters::AirQuality; -AppTask AppTask::sAppTask; +namespace { +k_timer sAirQualitySensorUpdateTimer; +constexpr uint16_t kAirQualitySensorUpdateTimerPeriod = 10000; // 10s timer period +} // namespace -constexpr EndpointId kAirQualityEndpoint = 1; +AppTask AppTask::sAppTask; CHIP_ERROR AppTask::Init(void) { + CHIP_ERROR err; + #if APP_USE_EXAMPLE_START_BUTTON - SetExampleButtonCallbacks(AirQualityActionEventHandler); + SetExampleButtonCallbacks(AirQualitySensorUpdateTimerEventHandler); #endif InitCommonParts(); - AirQualitySensorManager::InitInstance(kAirQualityEndpoint); + err = SensorMgr().Init(); + if (err != CHIP_NO_ERROR) + { + LOG_ERR("Init of the Sensor Manager failed"); + return err; + } + + // Initialize air quality sensor update timer + k_timer_init(&sAirQualitySensorUpdateTimer, &AppTask::AirQualitySensorUpdateTimerTimeoutCallback, nullptr); + k_timer_user_data_set(&sAirQualitySensorUpdateTimer, this); + k_timer_start(&sAirQualitySensorUpdateTimer, K_MSEC(kAirQualitySensorUpdateTimerPeriod), K_NO_WAIT); + + AirQualitySensorManager::InitInstance(kExampleEndpointId); return CHIP_NO_ERROR; } void AppTask::UpdateClusterState(void) { + CHIP_ERROR ret; AirQualitySensorManager * mInstance = AirQualitySensorManager::GetInstance(); + int16_t temperature; + uint16_t humidity; + + ret = SensorMgr().GetTempAndHumMeasurValue(&temperature, &humidity); + if (ret != CHIP_NO_ERROR) + { + LOG_ERR("Update of the Air Quality clusters failed"); + return; + } + + LOG_INF("Update Air Quality: temperature is (%d*0.01)°C, humidity is %d", temperature, humidity); // Update AirQuality value - mInstance->OnAirQualityChangeHandler(AirQualityEnum::kModerate); + mInstance->OnAirQualityChangeHandler(AirQualityEnum::kUnknown); // Update Carbon Dioxide - mInstance->OnCarbonDioxideMeasurementChangeHandler(400); + mInstance->OnCarbonDioxideMeasurementChangeHandler(0); // Update Temperature value - mInstance->OnTemperatureMeasurementChangeHandler(18); + mInstance->OnTemperatureMeasurementChangeHandler(temperature); // Update Humidity value - mInstance->OnHumidityMeasurementChangeHandler(60); + mInstance->OnHumidityMeasurementChangeHandler(humidity); +} + +void AppTask::AirQualitySensorUpdateTimerTimeoutCallback(k_timer * timer) +{ + if (!timer) + { + return; + } + + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.Handler = AirQualitySensorUpdateTimerEventHandler; + sAppTask.PostEvent(&event); } -void AppTask::AirQualityActionEventHandler(AppEvent * aEvent) +void AppTask::AirQualitySensorUpdateTimerEventHandler(AppEvent * aEvent) { - if (aEvent->Type == AppEvent::kEventType_Button) + if ((aEvent->Type == AppEvent::kEventType_Button) || (aEvent->Type == AppEvent::kEventType_Timer)) { sAppTask.UpdateClusterState(); } + + if (aEvent->Type == AppEvent::kEventType_Timer) + { + // Start next timer to measurement the air quality sensor + k_timer_start(&sAirQualitySensorUpdateTimer, K_MSEC(kAirQualitySensorUpdateTimerPeriod), K_NO_WAIT); + } } diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index aba3269cfb5614..8b390b8979b571 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -436,12 +436,12 @@ server cluster OnOffSwitchConfiguration = 7 { /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ server cluster LevelControl = 8 { - enum MoveMode : enum8 { + enum MoveModeEnum : enum8 { kUp = 0; kDown = 1; } - enum StepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 0; kDown = 1; } @@ -452,7 +452,7 @@ server cluster LevelControl = 8 { kFrequency = 0x4; } - bitmap LevelControlOptions : bitmap8 { + bitmap OptionsBitmap : bitmap8 { kExecuteIfOff = 0x1; kCoupleColorTempToLevel = 0x2; } @@ -464,7 +464,7 @@ server cluster LevelControl = 8 { readonly attribute int16u currentFrequency = 4; readonly attribute int16u minFrequency = 5; readonly attribute int16u maxFrequency = 6; - attribute LevelControlOptions options = 15; + attribute OptionsBitmap options = 15; attribute int16u onOffTransitionTime = 16; attribute nullable int8u onLevel = 17; attribute nullable int16u onTransitionTime = 18; @@ -481,55 +481,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { int8u level = 0; nullable int16u transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveRequest { - MoveMode moveMode = 0; + MoveModeEnum moveMode = 0; nullable int8u rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepRequest { - StepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; nullable int16u transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct StopRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { int8u level = 0; nullable int16u transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; + MoveModeEnum moveMode = 0; nullable int8u rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepWithOnOffRequest { - StepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; nullable int16u transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct StopWithOnOffRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -1419,6 +1419,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1435,11 +1436,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1486,6 +1490,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1520,6 +1527,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { @@ -2467,74 +2476,6 @@ server cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } -/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ -server cluster IcdManagement = 70 { - bitmap Feature : bitmap32 { - kCheckInProtocolSupport = 0x1; - kUserActiveModeTrigger = 0x2; - kLongIdleTimeSupport = 0x4; - } - - bitmap UserActiveModeTriggerBitmap : bitmap32 { - kPowerCycle = 0x1; - kSettingsMenu = 0x2; - kCustomInstruction = 0x4; - kDeviceManual = 0x8; - kActuateSensor = 0x10; - kActuateSensorSeconds = 0x20; - kActuateSensorTimes = 0x40; - kActuateSensorLightsBlink = 0x80; - kResetButton = 0x100; - kResetButtonLightsBlink = 0x200; - kResetButtonSeconds = 0x400; - kResetButtonTimes = 0x800; - kSetupButton = 0x1000; - kSetupButtonSeconds = 0x2000; - kSetupButtonLightsBlink = 0x4000; - kSetupButtonTimes = 0x8000; - kAppDefinedButton = 0x10000; - } - - fabric_scoped struct MonitoringRegistrationStruct { - fabric_sensitive node_id checkInNodeID = 1; - fabric_sensitive int64u monitoredSubject = 2; - fabric_idx fabricIndex = 254; - } - - readonly attribute int32u idleModeDuration = 0; - readonly attribute int32u activeModeDuration = 1; - readonly attribute int16u activeModeThreshold = 2; - readonly attribute access(read: administer) MonitoringRegistrationStruct registeredClients[] = 3; - readonly attribute access(read: administer) int32u ICDCounter = 4; - readonly attribute int16u clientsSupportedPerFabric = 5; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RegisterClientRequest { - node_id checkInNodeID = 0; - int64u monitoredSubject = 1; - octet_string<16> key = 2; - optional octet_string<16> verificationKey = 3; - } - - request struct UnregisterClientRequest { - node_id checkInNodeID = 0; - optional octet_string<16> verificationKey = 1; - } - - response struct RegisterClientResponse = 1 { - int32u ICDCounter = 0; - } - - fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; - fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; -} - /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster ModeSelect = 80 { bitmap Feature : bitmap32 { @@ -3705,8 +3646,8 @@ provisional server cluster FanControl = 514 { kOffLowHigh = 1; kOffLowMedHighAuto = 2; kOffLowHighAuto = 3; - kOffOnAuto = 4; - kOffOn = 5; + kOffHighAuto = 4; + kOffHigh = 5; } enum StepDirectionEnum : enum8 { @@ -3735,7 +3676,7 @@ provisional server cluster FanControl = 514 { } attribute FanModeEnum fanMode = 0; - attribute FanModeSequenceEnum fanModeSequence = 1; + readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; readonly attribute int8u speedMax = 4; @@ -3764,9 +3705,28 @@ provisional server cluster FanControl = 514 { /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ server cluster ThermostatUserInterfaceConfiguration = 516 { - attribute enum8 temperatureDisplayMode = 0; - attribute access(write: manage) enum8 keypadLockout = 1; - attribute access(write: manage) enum8 scheduleProgrammingVisibility = 2; + enum KeypadLockoutEnum : enum8 { + kNoLockout = 0; + kLockout1 = 1; + kLockout2 = 2; + kLockout3 = 3; + kLockout4 = 4; + kLockout5 = 5; + } + + enum ScheduleProgrammingVisibilityEnum : enum8 { + kScheduleProgrammingPermitted = 0; + kScheduleProgrammingDenied = 1; + } + + enum TemperatureDisplayModeEnum : enum8 { + kCelsius = 0; + kFahrenheit = 1; + } + + attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; + attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4768,7 +4728,7 @@ server cluster RadonConcentrationMeasurement = 1071 { /** This cluster provides an interface for managing low power mode on a device that supports the Wake On LAN protocol. */ server cluster WakeOnLan = 1283 { - readonly attribute char_string<32> MACAddress = 0; + readonly attribute char_string<12> MACAddress = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5647,25 +5607,6 @@ endpoint 0 { ram attribute clusterRevision default = 1; } - server cluster IcdManagement { - callback attribute idleModeDuration default = 500; - callback attribute activeModeDuration default = 300; - callback attribute activeModeThreshold default = 300; - callback attribute registeredClients; - callback attribute ICDCounter default = 0; - callback attribute clientsSupportedPerFabric default = 2; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 2; - - handle command RegisterClient; - handle command RegisterClientResponse; - handle command UnregisterClient; - handle command StayActiveRequest; - } - server cluster RelativeHumidityMeasurement { ram attribute measuredValue; ram attribute minMeasuredValue default = 0; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index bb61e8858ad011..0b6dbc2e7831b0 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -3294,7 +3294,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3310,7 +3310,7 @@ "code": 11, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3326,7 +3326,7 @@ "code": 12, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -4122,7 +4122,7 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", + "name": "ActiveNetworkFaultsList", "code": 62, "mfgCode": null, "side": "server", @@ -5835,226 +5835,6 @@ } ] }, - { - "name": "ICD Management", - "code": 70, - "mfgCode": null, - "define": "ICD_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "RegisterClient", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RegisterClientResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "UnregisterClient", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StayActiveRequest", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdleModeDuration", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "500", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeDuration", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "300", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveModeThreshold", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "300", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "RegisteredClients", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ICDCounter", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClientsSupportedPerFabric", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Relative Humidity Measurement", "code": 1029, @@ -6883,7 +6663,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7609,7 +7389,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "LevelControlOptions", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -14856,7 +14636,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "temperature", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -20475,7 +20255,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 139512593a0fef..8bd7bb532fcb89 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:24 + $ docker pull ghcr.io/project-chip/chip-build-ameba:25 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:24 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 - Setup build environment: diff --git a/examples/all-clusters-app/ameba/main/include/LevelControlCommands.h b/examples/all-clusters-app/ameba/main/include/LevelControlCommands.h index da82f0f6bbdaf9..f596534992e1bf 100644 --- a/examples/all-clusters-app/ameba/main/include/LevelControlCommands.h +++ b/examples/all-clusters-app/ameba/main/include/LevelControlCommands.h @@ -20,6 +20,8 @@ #include "controller/ReadInteraction.h" #include +#include + #if CONFIG_ENABLE_CHIP_SHELL #include "lib/shell/Engine.h" #include "lib/shell/commands/Help.h" @@ -27,7 +29,9 @@ using namespace chip; using namespace chip::app; -using chip::app::Clusters::LevelControl::LevelControlOptions; +using chip::app::Clusters::LevelControl::MoveModeEnum; +using chip::app::Clusters::LevelControl::OptionsBitmap; +using chip::app::Clusters::LevelControl::StepModeEnum; #if CONFIG_ENABLE_CHIP_SHELL using Shell::Engine; @@ -40,6 +44,16 @@ Engine sShellSwitchLevelControlReadSubCommands; Engine sShellSwitchGroupsLevelControlSubCommands; #endif // defined(ENABLE_CHIP_SHELL) +namespace { + +template +T from_underlying(std::underlying_type_t value) +{ + return static_cast(value); +} + +} // namespace + void ProcessLevelControlUnicastBindingRead(BindingCommandData * data, const EmberBindingTableEntry & binding, OperationalDeviceProxy * peer_device) { @@ -159,34 +173,34 @@ void ProcessLevelControlUnicastBindingCommand(BindingCommandData * data, const E case Clusters::LevelControl::Commands::MoveToLevel::Id: moveToLevelCommand.level = static_cast(data->args[0]); moveToLevelCommand.transitionTime = static_cast>(data->args[1]); - moveToLevelCommand.optionsMask = static_cast>(data->args[2]); - moveToLevelCommand.optionsOverride = static_cast>(data->args[3]); + moveToLevelCommand.optionsMask = static_cast>(data->args[2]); + moveToLevelCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToLevelCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::Move::Id: - moveCommand.moveMode = static_cast(data->args[0]); + moveCommand.moveMode = from_underlying(data->args[0]); moveCommand.rate = static_cast>(data->args[1]); - moveCommand.optionsMask = static_cast>(data->args[2]); - moveCommand.optionsOverride = static_cast>(data->args[3]); + moveCommand.optionsMask = static_cast>(data->args[2]); + moveCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::Step::Id: - stepCommand.stepMode = static_cast(data->args[0]); + stepCommand.stepMode = from_underlying(data->args[0]); stepCommand.stepSize = static_cast(data->args[1]); stepCommand.transitionTime = static_cast>(data->args[2]); - stepCommand.optionsMask = static_cast>(data->args[3]); - stepCommand.optionsOverride = static_cast>(data->args[4]); + stepCommand.optionsMask = static_cast>(data->args[3]); + stepCommand.optionsOverride = static_cast>(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::Stop::Id: - stopCommand.optionsMask = static_cast>(data->args[0]); - stopCommand.optionsOverride = static_cast>(data->args[1]); + stopCommand.optionsMask = static_cast>(data->args[0]); + stopCommand.optionsOverride = static_cast>(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stopCommand, onSuccess, onFailure); break; @@ -194,34 +208,34 @@ void ProcessLevelControlUnicastBindingCommand(BindingCommandData * data, const E case Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id: moveToLevelWithOnOffCommand.level = static_cast(data->args[0]); moveToLevelWithOnOffCommand.transitionTime = static_cast>(data->args[1]); - moveToLevelWithOnOffCommand.optionsMask = static_cast>(data->args[2]); - moveToLevelWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); + moveToLevelWithOnOffCommand.optionsMask = static_cast>(data->args[2]); + moveToLevelWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToLevelWithOnOffCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::MoveWithOnOff::Id: - moveWithOnOffCommand.moveMode = static_cast(data->args[0]); + moveWithOnOffCommand.moveMode = from_underlying(data->args[0]); moveWithOnOffCommand.rate = static_cast>(data->args[1]); - moveWithOnOffCommand.optionsMask = static_cast>(data->args[2]); - moveWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); + moveWithOnOffCommand.optionsMask = static_cast>(data->args[2]); + moveWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveWithOnOffCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::StepWithOnOff::Id: - stepWithOnOffCommand.stepMode = static_cast(data->args[0]); + stepWithOnOffCommand.stepMode = from_underlying(data->args[0]); stepWithOnOffCommand.stepSize = static_cast(data->args[1]); stepWithOnOffCommand.transitionTime = static_cast>(data->args[2]); - stepWithOnOffCommand.optionsMask = static_cast>(data->args[3]); - stepWithOnOffCommand.optionsOverride = static_cast>(data->args[4]); + stepWithOnOffCommand.optionsMask = static_cast>(data->args[3]); + stepWithOnOffCommand.optionsOverride = static_cast>(data->args[4]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stepWithOnOffCommand, onSuccess, onFailure); break; case Clusters::LevelControl::Commands::StopWithOnOff::Id: - stopWithOnOffCommand.optionsMask = static_cast>(data->args[0]); - stopWithOnOffCommand.optionsOverride = static_cast>(data->args[1]); + stopWithOnOffCommand.optionsMask = static_cast>(data->args[0]); + stopWithOnOffCommand.optionsOverride = static_cast>(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, stopWithOnOffCommand, onSuccess, onFailure); break; @@ -246,62 +260,62 @@ void ProcessLevelControlGroupBindingCommand(BindingCommandData * data, const Emb case Clusters::LevelControl::Commands::MoveToLevel::Id: moveToLevelCommand.level = static_cast(data->args[0]); moveToLevelCommand.transitionTime = static_cast>(data->args[1]); - moveToLevelCommand.optionsMask = static_cast>(data->args[2]); - moveToLevelCommand.optionsOverride = static_cast>(data->args[3]); + moveToLevelCommand.optionsMask = static_cast>(data->args[2]); + moveToLevelCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToLevelCommand); break; case Clusters::LevelControl::Commands::Move::Id: - moveCommand.moveMode = static_cast(data->args[0]); + moveCommand.moveMode = from_underlying(data->args[0]); moveCommand.rate = static_cast>(data->args[1]); - moveCommand.optionsMask = static_cast>(data->args[2]); - moveCommand.optionsOverride = static_cast>(data->args[3]); + moveCommand.optionsMask = static_cast>(data->args[2]); + moveCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveCommand); break; case Clusters::LevelControl::Commands::Step::Id: - stepCommand.stepMode = static_cast(data->args[0]); + stepCommand.stepMode = from_underlying(data->args[0]); stepCommand.stepSize = static_cast(data->args[1]); stepCommand.transitionTime = static_cast>(data->args[2]); - stepCommand.optionsMask = static_cast>(data->args[3]); - stepCommand.optionsOverride = static_cast>(data->args[4]); + stepCommand.optionsMask = static_cast>(data->args[3]); + stepCommand.optionsOverride = static_cast>(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepCommand); break; case Clusters::LevelControl::Commands::Stop::Id: - stopCommand.optionsMask = static_cast>(data->args[0]); - stopCommand.optionsOverride = static_cast>(data->args[1]); + stopCommand.optionsMask = static_cast>(data->args[0]); + stopCommand.optionsOverride = static_cast>(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stopCommand); break; case Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Id: moveToLevelWithOnOffCommand.level = static_cast(data->args[0]); moveToLevelWithOnOffCommand.transitionTime = static_cast>(data->args[1]); - moveToLevelWithOnOffCommand.optionsMask = static_cast>(data->args[2]); - moveToLevelWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); + moveToLevelWithOnOffCommand.optionsMask = static_cast>(data->args[2]); + moveToLevelWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToLevelWithOnOffCommand); break; case Clusters::LevelControl::Commands::MoveWithOnOff::Id: - moveWithOnOffCommand.moveMode = static_cast(data->args[0]); + moveWithOnOffCommand.moveMode = from_underlying(data->args[0]); moveWithOnOffCommand.rate = static_cast>(data->args[1]); - moveWithOnOffCommand.optionsMask = static_cast>(data->args[2]); - moveWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); + moveWithOnOffCommand.optionsMask = static_cast>(data->args[2]); + moveWithOnOffCommand.optionsOverride = static_cast>(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveWithOnOffCommand); break; case Clusters::LevelControl::Commands::StepWithOnOff::Id: - stepWithOnOffCommand.stepMode = static_cast(data->args[0]); + stepWithOnOffCommand.stepMode = from_underlying(data->args[0]); stepWithOnOffCommand.stepSize = static_cast(data->args[1]); stepWithOnOffCommand.transitionTime = static_cast>(data->args[2]); - stepWithOnOffCommand.optionsMask = static_cast>(data->args[3]); - stepWithOnOffCommand.optionsOverride = static_cast>(data->args[4]); + stepWithOnOffCommand.optionsMask = static_cast>(data->args[3]); + stepWithOnOffCommand.optionsOverride = static_cast>(data->args[4]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stepWithOnOffCommand); break; case Clusters::LevelControl::Commands::StopWithOnOff::Id: - stopWithOnOffCommand.optionsMask = static_cast>(data->args[0]); - stopWithOnOffCommand.optionsOverride = static_cast>(data->args[1]); + stopWithOnOffCommand.optionsMask = static_cast>(data->args[0]); + stopWithOnOffCommand.optionsOverride = static_cast>(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, stopWithOnOffCommand); break; } diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index e41cb9843c42c7..215f79f7540241 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -48,9 +48,6 @@ source_set("chip-all-clusters-common") { deps = [ "${chip_root}/examples/all-clusters-app/all-clusters-common", "${chip_root}/examples/platform/linux:app-main", - - # Issue 29397 for the icd:cluster dep - "${chip_root}/src/app/icd:cluster", "${chip_root}/src/app/tests/suites/credentials:dac_provider", "${chip_root}/src/lib", "${chip_root}/third_party/jsoncpp", diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index a6deafde128983..b477555a3643c3 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -27,6 +27,7 @@ #include "resource-monitoring-delegates.h" #include "rvc-modes.h" #include "tcc-mode.h" +#include #include #include #include @@ -46,10 +47,6 @@ #include #include -#include - -#include - using namespace chip; using namespace chip::app; using namespace chip::DeviceLayer; @@ -217,11 +214,6 @@ void ApplicationInit() #endif Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); - // Issue 29397 - // Somehow All-cluster-app test the ICDManagementServer cluster without having - // CHIP_CONFIG_ENABLE_ICD_SERVER set to 1. - ICDManagementServer::GetInstance().SetSymmetricKeystore(Server::GetInstance().GetSessionKeystore()); - SetTagList(/* endpoint= */ 0, Span(gEp0TagList)); SetTagList(/* endpoint= */ 1, Span(gEp1TagList)); SetTagList(/* endpoint= */ 2, Span(gEp2TagList)); diff --git a/examples/all-clusters-app/nrfconnect/README.md b/examples/all-clusters-app/nrfconnect/README.md index a3e2edb3deac69..18df16f5e11654 100644 --- a/examples/all-clusters-app/nrfconnect/README.md +++ b/examples/all-clusters-app/nrfconnect/README.md @@ -176,93 +176,63 @@ communicate with it using the Before building the example, check out the Matter repository and sync submodules using the following command: - $ git submodule update --init + $ python3 scripts/checkout_submodules.py --shallow --platform nrfconnect -The example requires a specific revision of the nRF Connect SDK. You can either -install it along with the related tools directly on your system or use a Docker -image that has the tools pre-installed. - -If you are a macOS user, you won't be able to use the Docker container to flash -the application onto a Nordic development kit due to -[certain limitations of Docker for macOS](https://docs.docker.com/docker-for-mac/faqs/#can-i-pass-through-a-usb-device-to-a-container). -Use the [native shell](#using-native-shell-for-setup) for building instead. - -### Using Docker container for setup - -To use the Docker container for setup, complete the following steps: - -1. If you do not have the nRF Connect SDK installed yet, create a directory for - it by running the following command: - - $ mkdir ~/nrfconnect - -2. Download the latest version of the nRF Connect SDK Docker image by running - the following command: +> **Note**: +> +> For Linux operating system install +> [SEGGER J-Link Software](https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack). - $ docker pull nordicsemi/nrfconnect-chip +### Install Command Line Tools -3. Start Docker with the downloaded image by running the following command, - customized to your needs as described below: +With admin permissions enabled, download and install the +[nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools). - $ docker run --rm -it -e RUNAS=$(id -u) -v ~/nrfconnect:/var/ncs -v ~/connectedhomeip:/var/chip \ - -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:* rmw" nordicsemi/nrfconnect-chip +### Install Toolchain Manager - In this command: +Toolchain Manager is available from +[nRF Connect for Desktop](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop), +a cross-platform tool that provides different applications that simplify +installing the nRF Connect SDK. Both the tool and the application are available +for Windows, Linux, and macOS. - - _~/nrfconnect_ can be replaced with an absolute path to the nRF Connect - SDK source directory. - - _~/connectedhomeip_ must be replaced with an absolute path to the CHIP - source directory. - - _-v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule "c 189:_ rmw"\* - parameters can be omitted if you are not planning to flash the example - onto hardware. These parameters give the container access to USB devices - connected to your computer such as the nRF52840 DK. - - _--rm_ can be omitted if you do not want the container to be - auto-removed when you exit the container shell session. - - _-e RUNAS=\$(id -u)_ is needed to start the container session as the - current user instead of root. +To install the Toolchain Manager app, complete the following steps: -4. Update the nRF Connect SDK to the most recent supported revision, by running - the following command: +1. [Download nRF Connect for Desktop](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop/download#infotabs) + for your operating system. - $ cd /var/chip - $ python3 scripts/setup/nrfconnect/update_ncs.py --update - -Now you can proceed with the [Building](#building) instruction. +2. Install and run the tool on your machine. -### Using native shell for setup +3. In the **APPS** section, click **Install** button on the Toolchain Manager + tab. -To use the native shell for setup, complete the following steps: +### Install nRF Connect SDK -1. Download and install the following additional software: +Complete the following steps to install the nRF Connect SDK: - - [nRF Command Line Tools](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Command-Line-Tools) - - [GN meta-build system](https://gn.googlesource.com/gn/) +1. Open Toolchain Manager in nRF Connect for Desktop. -2. If you do not have the nRF Connect SDK installed, follow the - [guide](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_assistant.html#) - in the nRF Connect SDK documentation to install the latest stable nRF - Connect SDK version. Since command-line tools will be used for building the - example, installing SEGGER Embedded Studio is not required. +2. Click the **Install** button next to the + [recommended](../../../config/nrfconnect/.nrfconnect-recommended-revision) + version of the nRF Connect SDK. - If you have the SDK already installed, continue to the next step and update - the nRF Connect SDK after initializing environment variables. +3. A pop-up window will inform you about the current installation directory. If + you want to change the directory, click the **Change directory** button. + Otherwise, click the **Continue installation** button. -3. Initialize environment variables referred to by the CHIP and the nRF Connect - SDK build scripts. Replace _nrfconnect-dir_ with the path to your nRF - Connect SDK installation directory, and _toolchain-dir_ with the path to GNU - Arm Embedded Toolchain. +4. When the nRF Connect SDK is installed on your machine, the **Install** + button changes to the **Open VS Code** button. - $ source nrfconnect-dir/zephyr/zephyr-env.sh - $ export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb - $ export GNUARMEMB_TOOLCHAIN_PATH=toolchain-dir +5. Click the dropdown menu next to the **Open VS Code** button for the + installed nRF Connect SDK version, and select **Open terminal**. -4. Update the nRF Connect SDK to the most recent supported revision by running - the following command (replace _matter-dir_ with the path to Matter - repository directory): +6. Make sure that the nRF Connect SDK version is compatible with the Matter SDK + version: - $ cd matter-dir + ``` + $ cd {connectedhomeip directory} $ python3 scripts/setup/nrfconnect/update_ncs.py --update + ``` Now you can proceed with the [Building](#building) instruction. @@ -270,8 +240,7 @@ Now you can proceed with the [Building](#building) instruction. ## Building -Complete the following steps, regardless of the method used for setting up the -environment: +Complete the following steps to build the sample: 1. Navigate to the example's directory: diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index 8344be7cda1b80..5e29a11cc9b290 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -172,7 +172,7 @@ void InitOTARequestor(void) // TODO: instatiate and initialize these values when QueryImageResponse tells us an image is available // TODO: add API for OTARequestor to pass QueryImageResponse info to the application to use for OTADownloader init // OTAImageProcessor ipParams; - // ipParams.imageFile = CharSpan("dnld_img.txt"); + // ipParams.imageFile = "dnld_img.txt"_span; // gImageProcessor.SetOTAImageProcessorParams(ipParams); gImageProcessor.SetOTADownloader(&gDownloader); diff --git a/examples/all-clusters-app/telink/prj.conf b/examples/all-clusters-app/telink/prj.conf index f0e82ad971d4d8..18b7edcc11f395 100644 --- a/examples/all-clusters-app/telink/prj.conf +++ b/examples/all-clusters-app/telink/prj.conf @@ -22,12 +22,6 @@ CONFIG_CHIP=y CONFIG_STD_CPP17=y -# enable GPIO -CONFIG_GPIO=y - -# enable PWM -CONFIG_PWM=y - # CHIP configuration CONFIG_CHIP_PROJECT_CONFIG="include/CHIPProjectConfig.h" CONFIG_CHIP_OPENTHREAD_CONFIG="../../platform/telink/project_include/OpenThreadConfig.h" diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 910b0f8ad577af..a91f01342e01ad 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -309,12 +309,12 @@ server cluster OnOff = 6 { /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ server cluster LevelControl = 8 { - enum MoveMode : enum8 { + enum MoveModeEnum : enum8 { kUp = 0; kDown = 1; } - enum StepMode : enum8 { + enum StepModeEnum : enum8 { kUp = 0; kDown = 1; } @@ -325,14 +325,14 @@ server cluster LevelControl = 8 { kFrequency = 0x4; } - bitmap LevelControlOptions : bitmap8 { + bitmap OptionsBitmap : bitmap8 { kExecuteIfOff = 0x1; kCoupleColorTempToLevel = 0x2; } readonly attribute nullable int8u currentLevel = 0; readonly attribute int16u remainingTime = 1; - attribute LevelControlOptions options = 15; + attribute OptionsBitmap options = 15; attribute nullable int8u onLevel = 17; attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; readonly attribute command_id generatedCommandList[] = 65528; @@ -345,55 +345,55 @@ server cluster LevelControl = 8 { request struct MoveToLevelRequest { int8u level = 0; nullable int16u transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveRequest { - MoveMode moveMode = 0; + MoveModeEnum moveMode = 0; nullable int8u rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepRequest { - StepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; nullable int16u transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct StopRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } request struct MoveToLevelWithOnOffRequest { int8u level = 0; nullable int16u transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; + MoveModeEnum moveMode = 0; nullable int8u rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; + OptionsBitmap optionsMask = 2; + OptionsBitmap optionsOverride = 3; } request struct StepWithOnOffRequest { - StepMode stepMode = 0; + StepModeEnum stepMode = 0; int8u stepSize = 1; nullable int16u transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; + OptionsBitmap optionsMask = 3; + OptionsBitmap optionsOverride = 4; } request struct StopWithOnOffRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; + OptionsBitmap optionsMask = 0; + OptionsBitmap optionsOverride = 1; } command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; @@ -1243,6 +1243,7 @@ server cluster NetworkCommissioning = 49 { kWiFiNetworkInterface = 0x1; kThreadNetworkInterface = 0x2; kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; } bitmap ThreadCapabilitiesBitmap : bitmap16 { @@ -1259,11 +1260,14 @@ server cluster NetworkCommissioning = 49 { kWPAPersonal = 0x4; kWPA2Personal = 0x8; kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; } struct NetworkInfoStruct { octet_string<32> networkID = 0; boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; } struct ThreadInterfaceScanResultStruct { @@ -1310,6 +1314,9 @@ server cluster NetworkCommissioning = 49 { octet_string<32> ssid = 0; octet_string<64> credentials = 1; optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; } request struct AddOrUpdateThreadNetworkRequest { @@ -1344,6 +1351,8 @@ server cluster NetworkCommissioning = 49 { NetworkCommissioningStatusEnum networkingStatus = 0; optional char_string<512> debugText = 1; optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; } response struct ConnectNetworkResponse = 7 { @@ -2864,8 +2873,8 @@ provisional server cluster FanControl = 514 { kOffLowHigh = 1; kOffLowMedHighAuto = 2; kOffLowHighAuto = 3; - kOffOnAuto = 4; - kOffOn = 5; + kOffHighAuto = 4; + kOffHigh = 5; } enum StepDirectionEnum : enum8 { @@ -2894,7 +2903,7 @@ provisional server cluster FanControl = 514 { } attribute FanModeEnum fanMode = 0; - attribute FanModeSequenceEnum fanModeSequence = 1; + readonly attribute FanModeSequenceEnum fanModeSequence = 1; attribute nullable percent percentSetting = 2; readonly attribute percent percentCurrent = 3; readonly attribute command_id generatedCommandList[] = 65528; @@ -2907,8 +2916,27 @@ provisional server cluster FanControl = 514 { /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ server cluster ThermostatUserInterfaceConfiguration = 516 { - attribute enum8 temperatureDisplayMode = 0; - attribute access(write: manage) enum8 keypadLockout = 1; + enum KeypadLockoutEnum : enum8 { + kNoLockout = 0; + kLockout1 = 1; + kLockout2 = 2; + kLockout3 = 3; + kLockout4 = 4; + kLockout5 = 5; + } + + enum ScheduleProgrammingVisibilityEnum : enum8 { + kScheduleProgrammingPermitted = 0; + kScheduleProgrammingDenied = 1; + } + + enum TemperatureDisplayModeEnum : enum8 { + kCelsius = 0; + kFahrenheit = 1; + } + + attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; + attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3193,7 +3221,7 @@ server cluster Channel = 1284 { /** This cluster provides an interface for UX navigation within a set of targets on a device or endpoint. */ server cluster TargetNavigator = 1285 { - enum TargetNavigatorStatusEnum : enum8 { + enum StatusEnum : enum8 { kSuccess = 0; kTargetNotFound = 1; kNotAllowed = 2; @@ -3201,7 +3229,7 @@ server cluster TargetNavigator = 1285 { struct TargetInfoStruct { int8u identifier = 0; - char_string<32> name = 1; + char_string name = 1; } readonly attribute TargetInfoStruct targetList[] = 0; @@ -3218,7 +3246,7 @@ server cluster TargetNavigator = 1285 { } response struct NavigateTargetResponse = 1 { - TargetNavigatorStatusEnum status = 0; + StatusEnum status = 0; optional char_string data = 1; } @@ -3420,7 +3448,7 @@ server cluster KeypadInput = 1289 { kData = 118; } - enum KeypadInputStatusEnum : enum8 { + enum StatusEnum : enum8 { kSuccess = 0; kUnsupportedKey = 1; kInvalidKeyInCurrentState = 2; @@ -3444,7 +3472,7 @@ server cluster KeypadInput = 1289 { } response struct SendKeyResponse = 1 { - KeypadInputStatusEnum status = 0; + StatusEnum status = 0; } command SendKey(SendKeyRequest): SendKeyResponse = 0; @@ -3452,12 +3480,6 @@ server cluster KeypadInput = 1289 { /** This cluster provides an interface for launching content on a media player device such as a TV or Speaker. */ server cluster ContentLauncher = 1290 { - enum ContentLaunchStatusEnum : enum8 { - kSuccess = 0; - kUrlNotAvailable = 1; - kAuthFailed = 2; - } - enum MetricTypeEnum : enum8 { kPixels = 0; kPercentage = 1; @@ -3480,12 +3502,18 @@ server cluster ContentLauncher = 1290 { kVideo = 13; } + enum StatusEnum : enum8 { + kSuccess = 0; + kURLNotAvailable = 1; + kAuthFailed = 2; + } + bitmap Feature : bitmap32 { kContentSearch = 0x1; kURLPlayback = 0x2; } - bitmap SupportedStreamingProtocol : bitmap32 { + bitmap SupportedProtocolsBitmap : bitmap32 { kDASH = 0x1; kHLS = 0x2; } @@ -3497,13 +3525,13 @@ server cluster ContentLauncher = 1290 { } struct AdditionalInfoStruct { - char_string name = 0; - char_string value = 1; + char_string<256> name = 0; + char_string<8192> value = 1; } struct ParameterStruct { ParameterEnum type = 0; - char_string value = 1; + char_string<1024> value = 1; optional AdditionalInfoStruct externalIDList[] = 2; } @@ -3512,13 +3540,13 @@ server cluster ContentLauncher = 1290 { } struct StyleInformationStruct { - optional char_string imageURL = 0; - optional char_string color = 1; + optional char_string<8192> imageURL = 0; + optional char_string<9> color = 1; optional DimensionStruct size = 2; } struct BrandingInformationStruct { - char_string providerName = 0; + char_string<256> providerName = 0; optional StyleInformationStruct background = 1; optional StyleInformationStruct logo = 2; optional StyleInformationStruct progressBar = 3; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 5fdadf6b7ec4d3..2773862326105b 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -2748,7 +2748,7 @@ "code": 10, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2764,7 +2764,7 @@ "code": 11, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2780,7 +2780,7 @@ "code": 12, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2856,7 +2856,7 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", + "name": "ActiveNetworkFaultsList", "code": 62, "mfgCode": null, "side": "server", @@ -4702,7 +4702,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5206,7 +5206,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "LevelControlOptions", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11002,7 +11002,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "NameSupportBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12348,5 +12348,6 @@ "endpointId": 65534, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 1583fe5fccea87..1735aa5530ac03 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:24 + $ docker pull ghcr.io/project-chip/chip-build-ameba:25 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:24 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 ``` - Setup build environment: diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/GroupSettingFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/GroupSettingFragment.kt index 9687237a814e0d..8943801c080c80 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/GroupSettingFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/GroupSettingFragment.kt @@ -12,19 +12,12 @@ import android.widget.EditText import android.widget.Spinner import androidx.fragment.app.Fragment import androidx.lifecycle.lifecycleScope +import chip.devicecontroller.ChipClusters import chip.devicecontroller.ChipDeviceController -import chip.devicecontroller.ClusterIDMapping +import chip.devicecontroller.ChipStructs +import chip.devicecontroller.ChipStructs.AccessControlClusterAccessControlEntryStruct +import chip.devicecontroller.ChipStructs.GroupKeyManagementClusterGroupKeySetStruct import chip.devicecontroller.GroupKeySecurityPolicy -import chip.devicecontroller.InvokeCallback -import chip.devicecontroller.ReportCallback -import chip.devicecontroller.WriteAttributesCallback -import chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct -import chip.devicecontroller.cluster.structs.GroupKeyManagementClusterGroupKeySetStruct -import chip.devicecontroller.model.AttributeWriteRequest -import chip.devicecontroller.model.ChipAttributePath -import chip.devicecontroller.model.ChipEventPath -import chip.devicecontroller.model.InvokeElement -import chip.devicecontroller.model.NodeState import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.GenericChipDeviceListener import com.google.chip.chiptool.R @@ -33,10 +26,6 @@ import com.google.chip.chiptool.util.DeviceIdUtil import java.lang.Exception import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch -import matter.tlv.AnonymousTag -import matter.tlv.ContextSpecificTag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter class GroupSettingFragment : Fragment() { private val deviceController: ChipDeviceController @@ -260,14 +249,17 @@ class GroupSettingFragment : Fragment() { scope.launch { val keySetWritestruct = GroupKeyManagementClusterGroupKeySetStruct( - keySetIdEd.text.toString().toUInt(), - GroupKeySecurityPolicy.valueOf(keySecurityPolicySp.selectedItem.toString()).id.toUInt(), + keySetIdEd.text.toString().toUInt().toInt(), + GroupKeySecurityPolicy.valueOf(keySecurityPolicySp.selectedItem.toString()) + .id + .toUInt() + .toInt(), hexStringToByteArray(epochKey0Ed.text.toString()), - epochStartTime0Ed.text.toString().toULong(), + epochStartTime0Ed.text.toString().toULong().toLong(), hexStringToByteArray(epochKey1Ed.text.toString()), - epochStartTime1Ed.text.toString().toULong(), + epochStartTime1Ed.text.toString().toULong().toLong(), hexStringToByteArray(epochKey2Ed.text.toString()), - epochStartTime2Ed.text.toString().toULong() + epochStartTime2Ed.text.toString().toULong().toLong() ) sendKeySetWrite(keySetWritestruct) requireActivity().runOnUiThread { dialog.dismiss() } @@ -279,41 +271,24 @@ class GroupSettingFragment : Fragment() { private suspend fun sendKeySetWrite( groupKeySetStruct: GroupKeyManagementClusterGroupKeySetStruct ) { - val tlvWriter = - TlvWriter() - .startStructure(AnonymousTag) - .apply { - groupKeySetStruct.toTlv( - ContextSpecificTag( - ClusterIDMapping.GroupKeyManagement.KeySetWriteCommandField.GroupKeySet.id - ), - this - ) - } - .endStructure() - - deviceController.invoke( - object : InvokeCallback { - override fun onError(e: java.lang.Exception?) { + val cluster = + ChipClusters.GroupKeyManagementCluster( + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), + 0 + ) + cluster.keySetWrite( + object : ChipClusters.DefaultClusterCallback { + override fun onError(e: Exception?) { Log.d(TAG, "onError : ", e) showMessage("onError : ${e.toString()}") } - override fun onResponse(invokeElement: InvokeElement?, successCode: Long) { + override fun onSuccess() { Log.d(TAG, "onResponse") - showMessage("onResponse : $successCode") + showMessage("onResponse") } }, - ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - InvokeElement.newInstance( - 0, - ClusterIDMapping.GroupKeyManagement.ID, - ClusterIDMapping.GroupKeyManagement.Command.KeySetWrite.id, - tlvWriter.getEncoded(), - null - ), - 0, - 0 + groupKeySetStruct ) } @@ -336,39 +311,30 @@ class GroupSettingFragment : Fragment() { } private suspend fun writeGroupKeyMap(groupId: UInt, groupKeySetId: UInt) { - val tlvWriter = - TlvWriter().apply { - startArray(AnonymousTag) - startStructure(AnonymousTag) - put(ContextSpecificTag(1), groupId) - put(ContextSpecificTag(2), groupKeySetId) - endStructure() - endArray() - } - - deviceController.write( - object : WriteAttributesCallback { - override fun onError(attributePath: ChipAttributePath?, e: Exception?) { + val cluster = + ChipClusters.GroupKeyManagementCluster( + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), + 0 + ) + cluster.writeGroupKeyMapAttribute( + object : ChipClusters.DefaultClusterCallback { + override fun onError(e: Exception?) { Log.d(TAG, "onError : ", e) showMessage("Error : ${e.toString()}") } - override fun onResponse(attributePath: ChipAttributePath?) { + override fun onSuccess() { Log.d(TAG, "onResponse") showMessage("write Success") } }, - ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - listOf( - AttributeWriteRequest.newInstance( - 0, - ClusterIDMapping.GroupKeyManagement.ID, - ClusterIDMapping.GroupKeyManagement.Attribute.GroupKeyMap.id, - tlvWriter.getEncoded() + arrayListOf( + ChipStructs.GroupKeyManagementClusterGroupKeyMapStruct( + groupId.toInt(), + groupKeySetId.toInt(), + deviceController.fabricIndex ) - ), - 0, - 0 + ) ) } @@ -390,75 +356,52 @@ class GroupSettingFragment : Fragment() { } private suspend fun sendAddGroup(groupId: UInt, groupName: String) { - val tlvWriter = - TlvWriter().apply { - startStructure(AnonymousTag) - put(ContextSpecificTag(0), groupId) - put(ContextSpecificTag(1), groupName) - endStructure() - } - - deviceController.invoke( - object : InvokeCallback { + val cluster = + ChipClusters.GroupsCluster( + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), + 0 + ) + cluster.addGroup( + object : ChipClusters.GroupsCluster.AddGroupResponseCallback { override fun onError(e: Exception?) { Log.d(TAG, "onError : ", e) showMessage("Error : ${e.toString()}") } - override fun onResponse(invokeElement: InvokeElement?, successCode: Long) { + override fun onSuccess(status: Int?, groupID: Int?) { Log.d(TAG, "onResponse") - showMessage("onResponse : $successCode") + showMessage("onResponse : $status, $groupID") } }, - ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - InvokeElement.newInstance( - 0, - ClusterIDMapping.Groups.ID, - ClusterIDMapping.Groups.Command.AddGroup.id, - tlvWriter.getEncoded(), - null - ), - 0, - 0 + groupId.toInt(), + groupName ) } private suspend fun readAccessControl() { - val endpointId = 0 - val clusterId = ClusterIDMapping.AccessControl.ID - val attributeId = ClusterIDMapping.AccessControl.Attribute.Acl.id - - val attributePath = ChipAttributePath.newInstance(endpointId, clusterId, attributeId) - deviceController.readAttributePath( - object : ReportCallback { - override fun onError( - attributePath: ChipAttributePath?, - eventPath: ChipEventPath?, - e: Exception - ) { + val cluster = + ChipClusters.AccessControlCluster( + ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), + 0 + ) + cluster.readAclAttribute( + object : ChipClusters.AccessControlCluster.AclAttributeCallback { + override fun onError(e: Exception?) { Log.d(TAG, "onError : ", e) showMessage("Error : $e") } - override fun onReport(nodeState: NodeState?) { - Log.d(TAG, "onResponse") - val tlv = - nodeState - ?.getEndpointState(endpointId) - ?.getClusterState(clusterId) - ?.getAttributeState(attributeId) - ?.tlv - requireActivity().runOnUiThread { showAddAccessControlDialog(tlv) } + override fun onSuccess(value: MutableList?) { + requireActivity().runOnUiThread { showAddAccessControlDialog(value) } } - }, - ChipClient.getConnectedDevicePointer(requireContext(), addressUpdateFragment.deviceId), - listOf(attributePath), - 0 + } ) } - private fun showAddAccessControlDialog(tlv: ByteArray?) { - if (tlv == null) { + private fun showAddAccessControlDialog( + value: List? + ) { + if (value == null) { Log.d(TAG, "Access Control read fail") showMessage("Access Control read fail") return @@ -479,7 +422,7 @@ class GroupSettingFragment : Fragment() { dialogView.findViewById