diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 838e19e75a5c64..dc47f2772e8b55 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.6.35" + "BUILD_VERSION": "0.6.47" } }, "remoteUser": "vscode", diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 4c29d07b5b4c2b..b5de443569d2e6 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 75c38ca1c6b4a4..d0daa83fc2fd35 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -148,7 +148,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -318,7 +318,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -485,7 +485,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 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 6c916fab9e4ef6..ab8622f64be6c4 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -30,7 +30,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 options: --user root steps: @@ -66,7 +66,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.44 + image: connectedhomeip/chip-build-esp32:0.6.47 options: --user root steps: @@ -102,7 +102,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.6.44 + image: connectedhomeip/chip-build-nrf-platform:0.6.47 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 6dfffa7f49c750..ea5d4c3755c56d 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -30,7 +30,7 @@ jobs: timeout-minutes: 90 env: - DOCKER_RUN_VERSION: 0.6.44 + DOCKER_RUN_VERSION: 0.6.47 GITHUB_CACHE_PATH: /tmp/cirque-cache runs-on: ubuntu-latest @@ -39,7 +39,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: connectedhomeip/chip-build-cirque:0.6.44 + # image: connectedhomeip/chip-build-cirque:0.6.47 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 08950f4da02ab1..692ab763340db7 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -82,7 +82,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-doxygen:0.6.44 + image: connectedhomeip/chip-build-doxygen:0.6.47 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index c5a6f25ec5a6b2..3ed0d5a866bc15 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: connectedhomeip/chip-build-ameba:0.6.44 + image: connectedhomeip/chip-build-ameba:0.6.47 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 9314fd37d4d153..1760458c2b03ab 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-bouffalolab:0.6.44 + image: connectedhomeip/chip-build-bouffalolab:0.6.47 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 b68b91307edd04..254c4a041c8ccf 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.44 + image: connectedhomeip/chip-build-ti:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 55df64b1c8f852..fed502b34d7530 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ti:0.6.44 + image: connectedhomeip/chip-build-ti:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index a143d172cd3f42..90b925786afed8 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.6.44 + image: connectedhomeip/chip-build-efr32:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 9fdc43e199dcff..74dee213b71be8 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.44 + image: connectedhomeip/chip-build-esp32:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -158,7 +158,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.6.44 + image: connectedhomeip/chip-build-esp32:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index e9dacbf14777d5..46db43bca68fa7 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.6.44 + image: connectedhomeip/chip-build-infineon:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 57ee094adc052e..77b9826f6f8231 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.6.44 + image: connectedhomeip/chip-build-k32w:0.6.47 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 76733159326c2d..f0b78a5b46b383 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.6.44 + image: connectedhomeip/chip-build-crosscompile:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 3fe60a104a511c..ded33cb5756ae9 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-imx:0.6.44 + image: connectedhomeip/chip-build-imx:0.6.47 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index bdee1f8644b461..8d2d87f067b916 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 916a245aa58625..53da5ba28ba613 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -41,7 +41,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.6.44 + image: connectedhomeip/chip-build-mbed-os:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 53fdf00d65abf8..1aea2f34557a52 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 3d14afe8847384..ddf3868d878cc1 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-openiotsdk:0.6.44 + image: connectedhomeip/chip-build-openiotsdk:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index ef9ca97121e5a8..65376a17a86490 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 28138d3dc33711..cb3adc7c426bb4 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: connectedhomeip/chip-build-telink:0.6.44 + image: connectedhomeip/chip-build-telink:0.6.47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 531e646ff067d6..b5d4c33ece6542 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: connectedhomeip/chip-build-tizen:0.6.44 + image: connectedhomeip/chip-build-tizen:0.6.47 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index b32479cec23df4..ae4658086ced6b 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 483cc443008a8f..caac210d7dfa91 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 steps: - uses: Wandalen/wretry.action@v1.0.36 diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 56a11cee92760b..c91e378691d976 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.6.44 + image: connectedhomeip/chip-build-esp32-qemu:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -103,7 +103,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen-qemu:0.6.44 + image: connectedhomeip/chip-build-tizen-qemu:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index c64d2232b3c5d5..b43247453230fb 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.6.44 + image: connectedhomeip/chip-build-esp32:0.6.47 steps: - uses: Wandalen/wretry.action@v1.0.36 @@ -85,7 +85,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.6.44 + image: connectedhomeip/chip-build-efr32:0.6.47 steps: - uses: Wandalen/wretry.action@v1.0.36 name: Checkout diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 22c41997ed36d4..769fa93f2530a8 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.6.46 + image: connectedhomeip/chip-build-android:0.6.47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 07c9f8447177fa..5686eb04e38fc5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -445,7 +445,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" @@ -531,7 +531,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-java:0.6.46 + image: connectedhomeip/chip-build-java:0.6.47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 7a7fc4ff96e600..540e4a9563f283 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 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 f9372831f11d1f..257b86e81914a7 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index edcc2b1356ab17..d1a846b9968cb0 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build:0.6.44 + image: connectedhomeip/chip-build:0.6.47 defaults: run: shell: sh diff --git a/config/telink/app/zephyr.conf b/config/telink/app/zephyr.conf index 9d02f8f06d4b31..ddef211ffa0c86 100644 --- a/config/telink/app/zephyr.conf +++ b/config/telink/app/zephyr.conf @@ -25,23 +25,22 @@ CONFIG_PRINTK=y CONFIG_ASSERT=y CONFIG_CBPRINTF_LIBC_SUBSTS=y -# Setting the INFO log level (uncomment INFO log level configs and comment DEBUG log level configs) -CONFIG_LOG_DEFAULT_LEVEL=3 -CONFIG_MATTER_LOG_LEVEL_INF=y -CONFIG_MCUBOOT_UTIL_LOG_LEVEL_INF=y -CONFIG_IEEE802154_DRIVER_LOG_LEVEL_INF=y -CONFIG_NVS_LOG_LEVEL_INF=y -CONFIG_OPENTHREAD_LOG_LEVEL_INFO=y -CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y - -# Setting the DEBUG log level (uncomment DEBUG log level configs) -# CONFIG_LOG_DEFAULT_LEVEL=4 -# CONFIG_MATTER_LOG_LEVEL_DBG=y -# CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y -# CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y -# CONFIG_NVS_LOG_LEVEL_DBG=y -# CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y -# CONFIG_OPENTHREAD_L2_LOG_LEVEL_DBG=y +# Set the maximum log level (DEBUG) +CONFIG_LOG_DEFAULT_LEVEL=4 +CONFIG_MATTER_LOG_LEVEL_DBG=y +CONFIG_MCUBOOT_UTIL_LOG_LEVEL_DBG=y +CONFIG_IEEE802154_DRIVER_LOG_LEVEL_DBG=y +CONFIG_NVS_LOG_LEVEL_DBG=y +CONFIG_OPENTHREAD_LOG_LEVEL_DEBG=y +CONFIG_OPENTHREAD_L2_LOG_LEVEL_DBG=y + +# Set the actual log level +# - 0 OFF, logging is turned off +# - 1 ERROR, maximal level set to LOG_LEVEL_ERR +# - 2 WARNING, maximal level set to LOG_LEVEL_WRN +# - 3 INFO, maximal level set to LOG_LEVEL_INFO +# - 4 DEBUG, maximal level set to LOG_LEVEL_DBG +CONFIG_LOG_MAX_LEVEL=3 # Generic networking options CONFIG_NETWORKING=y diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 38cb327f288191..fb4d3eb885152a 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -76,7 +76,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 48f556fcfc8adf..3209c6ef4f42fe 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -26,7 +26,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 5b2a39ae9322a2..1ee1aa7b7cc431 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -40,7 +40,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -61,7 +61,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -83,7 +83,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -143,7 +143,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.6.44" + - name: "connectedhomeip/chip-build-vscode:0.6.47" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/platform/telink/BLEManagerImpl.cpp b/src/platform/telink/BLEManagerImpl.cpp index fdb120ef9414e6..dd330a743a1066 100644 --- a/src/platform/telink/BLEManagerImpl.cpp +++ b/src/platform/telink/BLEManagerImpl.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -42,6 +43,8 @@ #include #include +#include + // Includes for ieee802154 switchings #include @@ -55,6 +58,9 @@ namespace Internal { namespace { +constexpr uint32_t kAdvertisingOptions = BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME; +constexpr uint8_t kAdvertisingFlags = BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR; + const bt_uuid_128 UUID128_CHIPoBLEChar_RX = BT_UUID_INIT_128(0x11, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18); const bt_uuid_128 UUID128_CHIPoBLEChar_TX = @@ -76,7 +82,7 @@ _bt_gatt_ccc CHIPoBLEChar_TX_CCC = BT_GATT_CCC_INITIALIZER(nullptr, BLEManagerIm // clang-format off -struct bt_gatt_attr sChipoBleAttributes[] = { +bt_gatt_attr sChipoBleAttributes[] = { BT_GATT_PRIMARY_SERVICE(&UUID16_CHIPoBLEService.uuid), BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_RX.uuid, BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, @@ -95,7 +101,7 @@ struct bt_gatt_attr sChipoBleAttributes[] = { #endif }; -struct bt_gatt_service sChipoBleService = BT_GATT_SERVICE(sChipoBleAttributes); +bt_gatt_service sChipoBleService = BT_GATT_SERVICE(sChipoBleAttributes); // clang-format on @@ -141,7 +147,7 @@ BLEManagerImpl BLEManagerImpl::sInstance; bool ThreadConnectivityReady; bool BLERadioInitialized; -CHIP_ERROR BLEManagerImpl::_Init() +CHIP_ERROR BLEManagerImpl::_Init(void) { ThreadConnectivityReady = false; BLERadioInitialized = false; @@ -242,15 +248,51 @@ struct BLEManagerImpl::ServiceData ChipBLEDeviceIdentificationInfo deviceIdInfo; } __attribute__((packed)); -CHIP_ERROR BLEManagerImpl::StartAdvertising(void) +inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest(void) { - int err = 0; + static ServiceData serviceData; + static std::array advertisingData; + static std::array scanResponseData; + static_assert(sizeof(serviceData) == 10, "Unexpected size of BLE advertising data!"); + + const char * name = bt_get_name(); + const uint8_t nameSize = static_cast(strlen(name)); + + Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); + ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); + + advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); + advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); + scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); + + mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; + mAdvertisingRequest.options = kAdvertisingOptions; + mAdvertisingRequest.minInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) + ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN + : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) + ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX + : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + mAdvertisingRequest.advertisingData = Span(advertisingData); + mAdvertisingRequest.scanResponseData = nameSize ? Span(scanResponseData) : Span{}; + + mAdvertisingRequest.onStarted = [](int rc) { + if (rc == 0) + { + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising started"); + } + else + { + ChipLogError(DeviceLayer, "Failed to start CHIPoBLE advertising: %d", rc); + } + }; + + return CHIP_NO_ERROR; +} - // At first run always select fast advertising, on the next attempt slow down interval. - const uint32_t intervalMin = mFlags.Has(Flags::kFastAdvertisingEnabled) ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; - const uint32_t intervalMax = mFlags.Has(Flags::kFastAdvertisingEnabled) ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; +CHIP_ERROR BLEManagerImpl::StartAdvertising(void) +{ + int err; if (ConnectivityMgr().IsThreadProvisioned()) { @@ -276,20 +318,8 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) BLERadioInitialized = true; } - bt_le_adv_param advParams = - BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, intervalMin, intervalMax, nullptr); - - // Define advertising and, if BLE device name is set, scan response data - ServiceData serviceData; - const uint8_t advFlags = BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR; - const bt_data advertisingData[] = { BT_DATA(BT_DATA_FLAGS, &advFlags, sizeof(advFlags)), - BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)) }; - - const char * deviceName = bt_get_name(); - const uint8_t deviceNameSize = static_cast(strlen(deviceName)); - const bt_data scanResponseData[] = { BT_DATA(BT_DATA_NAME_COMPLETE, deviceName, deviceNameSize) }; - const bt_data * scanResponseDataPtr = deviceNameSize > 0 ? scanResponseData : nullptr; - const size_t scanResponseDataLen = deviceNameSize > 0 ? ARRAY_SIZE(scanResponseData) : 0u; + // Prepare advertising request + ReturnErrorOnFailure(PrepareAdvertisingRequest()); // Register dynamically CHIPoBLE GATT service if (!mFlags.Has(Flags::kChipoBleGattServiceRegister)) @@ -304,27 +334,17 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) mFlags.Set(Flags::kChipoBleGattServiceRegister); } - // Initialize service data - static_assert(sizeof(serviceData) == 10, "Size of BLE advertisement data changed! Was that intentional?"); - chip::Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); - ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); - + // Initialize C3 characteristic data #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING ReturnErrorOnFailure(PrepareC3CharData()); #endif - // Restart advertising - err = bt_le_adv_stop(); - VerifyOrReturnError(err == 0, MapErrorZephyr(err)); - - err = bt_le_adv_start(&advParams, advertisingData, ARRAY_SIZE(advertisingData), scanResponseDataPtr, scanResponseDataLen); - VerifyOrReturnError(err == 0, MapErrorZephyr(err)); + // Request advertising + ReturnErrorOnFailure(BLEAdvertisingArbiter::InsertRequest(mAdvertisingRequest)); // Transition to the Advertising state... if (!mFlags.Has(Flags::kAdvertising)) { - ChipLogProgress(DeviceLayer, "CHIPoBLE advertising started"); - mFlags.Set(Flags::kAdvertising); // Post a CHIPoBLEAdvertisingChange(Started) event. @@ -356,8 +376,7 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) return CHIP_ERROR_INCORRECT_STATE; } - int err = bt_le_adv_stop(); - VerifyOrReturnError(err == 0, MapErrorZephyr(err)); + BLEAdvertisingArbiter::CancelRequest(mAdvertisingRequest); // Transition to the not Advertising state... if (mFlags.Has(Flags::kAdvertising)) @@ -384,9 +403,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) { - VerifyOrReturnError(mServiceMode != ConnectivityManager::kCHIPoBLEServiceMode_NotSupported, - CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); - if (mFlags.Has(Flags::kAdvertisingEnabled) != val) { ChipLogDetail(DeviceLayer, "CHIPoBLE advertising set to %s", val ? "on" : "off"); @@ -425,11 +441,6 @@ CHIP_ERROR BLEManagerImpl::_GetDeviceName(char * buf, size_t bufSize) CHIP_ERROR BLEManagerImpl::_SetDeviceName(const char * deviceName) { - if (mServiceMode == ConnectivityManager::kCHIPoBLEServiceMode_NotSupported) - { - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; - } - ChipLogDetail(DeviceLayer, "Device name set to: %s", deviceName); return MapErrorZephyr(bt_set_name(deviceName)); } @@ -571,7 +582,7 @@ CHIP_ERROR BLEManagerImpl::HandleTXCharComplete(const ChipDeviceEvent * event) } #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING -CHIP_ERROR BLEManagerImpl::PrepareC3CharData() +CHIP_ERROR BLEManagerImpl::PrepareC3CharData(void) { CHIP_ERROR err = CHIP_NO_ERROR; BitFlags additionalDataFields; @@ -676,14 +687,14 @@ uint16_t BLEManagerImpl::GetMTU(BLE_CONNECTION_OBJECT conId) const bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) { - ChipLogError(DeviceLayer, "%s: NOT IMPLEMENTED", __PRETTY_FUNCTION__); - return true; + ChipLogDetail(DeviceLayer, "BLE central not implemented"); + return false; } bool BLEManagerImpl::UnsubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId) { - ChipLogError(DeviceLayer, "%s: NOT IMPLEMENTED", __PRETTY_FUNCTION__); - return true; + ChipLogDetail(DeviceLayer, "BLE central not implemented"); + return false; } bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, @@ -720,22 +731,22 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU bool BLEManagerImpl::SendWriteRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, PacketBufferHandle pBuf) { - ChipLogError(DeviceLayer, "%s: NOT IMPLEMENTED", __PRETTY_FUNCTION__); - return true; + ChipLogDetail(DeviceLayer, "BLE central not implemented"); + return false; } bool BLEManagerImpl::SendReadRequest(BLE_CONNECTION_OBJECT conId, const ChipBleUUID * svcId, const ChipBleUUID * charId, PacketBufferHandle pBuf) { - ChipLogError(DeviceLayer, "%s: NOT IMPLEMENTED", __PRETTY_FUNCTION__); - return true; + ChipLogDetail(DeviceLayer, "BLE central not implemented"); + return false; } bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQUEST_CONTEXT requestContext, const ChipBleUUID * svcId, const ChipBleUUID * charId) { - ChipLogError(DeviceLayer, "%s: NOT IMPLEMENTED", __PRETTY_FUNCTION__); - return true; + ChipLogDetail(DeviceLayer, "BLE central not implemented"); + return false; } void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) @@ -821,7 +832,7 @@ ssize_t BLEManagerImpl::HandleTXCCCWrite(struct bt_conn * conId, const struct bt return sizeof(value); } -void BLEManagerImpl::HandleTXIndicated(struct bt_conn * conId, struct bt_gatt_indicate_params * attr, uint8_t err) +void BLEManagerImpl::HandleTXIndicated(struct bt_conn * conId, bt_gatt_indicate_params *, uint8_t err) { ChipDeviceEvent event; diff --git a/src/platform/telink/BLEManagerImpl.h b/src/platform/telink/BLEManagerImpl.h index 9937e1212724e2..2ec09aeea04dce 100644 --- a/src/platform/telink/BLEManagerImpl.h +++ b/src/platform/telink/BLEManagerImpl.h @@ -26,12 +26,12 @@ #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include + #include #include #include -#include - namespace chip { namespace DeviceLayer { namespace Internal { @@ -103,12 +103,13 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla bt_gatt_indicate_params mIndicateParams[CONFIG_BT_MAX_CONN]; bt_conn_cb mConnCallbacks; bt_conn * mconId; + BLEAdvertisingArbiter::Request mAdvertisingRequest = {}; #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING PacketBufferHandle c3CharDataBufferHandle; #endif void DriveBLEState(void); - CHIP_ERROR ConfigureAdvertising(void); + CHIP_ERROR PrepareAdvertisingRequest(void); CHIP_ERROR StartAdvertising(void); CHIP_ERROR StopAdvertising(void); CHIP_ERROR HandleGAPConnect(const ChipDeviceEvent * event); @@ -129,7 +130,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla CHIP_ERROR HandleOperationalNetworkEnabled(const ChipDeviceEvent * event); #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - CHIP_ERROR PrepareC3CharData(); + CHIP_ERROR PrepareC3CharData(void); #endif bool IsSubscribed(bt_conn * conn); bool SetSubscribed(bt_conn * conn); diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index da7e1f39e57d0d..5c54ccba3e3bb8 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -22,6 +22,8 @@ assert(chip_device_platform == "telink") static_library("telink") { sources = [ "../SingletonConfigurationManager.cpp", + "../Zephyr/BLEAdvertisingArbiter.cpp", + "../Zephyr/BLEAdvertisingArbiter.h", "../Zephyr/ConfigurationManagerImpl.cpp", "../Zephyr/DiagnosticDataProviderImpl.cpp", "../Zephyr/DiagnosticDataProviderImpl.h", diff --git a/src/platform/telink/CHIPDevicePlatformConfig.h b/src/platform/telink/CHIPDevicePlatformConfig.h index f4d25b7ce5dfd9..1b218875aae8e4 100644 --- a/src/platform/telink/CHIPDevicePlatformConfig.h +++ b/src/platform/telink/CHIPDevicePlatformConfig.h @@ -122,6 +122,12 @@ #endif // !defined(CONFIG_CHIP_MALLOC_SYS_HEAP) && defined(CONFIG_NEWLIB_LIBC) #endif // CHIP_DEVICE_CONFIG_HEAP_STATISTICS_MALLINFO +#ifndef CHIP_DEVICE_BLE_ADVERTISING_PRIORITY +/// Priority of the Matter BLE advertising when there are multiple application +/// components that compete for the BLE advertising. +#define CHIP_DEVICE_BLE_ADVERTISING_PRIORITY 0 +#endif // CHIP_DEVICE_BLE_ADVERTISING_PRIORITY + #ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION //-> format_version = 1 //-> vendor_id = 0xFFF1