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/.flake8 b/.flake8 index 95261687837818..c2a1ce2c574fa0 100644 --- a/.flake8 +++ b/.flake8 @@ -8,7 +8,6 @@ exclude = third_party # temporarily scan only directories with fixed files # TODO: Remove the paths below when all bugs are fixed src/tools/chip-cert/* - src/test_driver/openiotsdk/* src/test_driver/mbed/* src/test_driver/linux-cirque/* build/chip/java/tests/* 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 5d38038d3aea3b..fed502b34d7530 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -35,11 +35,11 @@ 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: - - uses: Wandalen/wretry.action@v1.0.15 + - uses: Wandalen/wretry.action@v1.0.36 name: Checkout with: action: actions/checkout@v3 @@ -67,7 +67,7 @@ jobs: timeout-minutes: 25 run: scripts/build/gn_bootstrap.sh - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ always() && !env.ACT }} with: name: bootstrap-logs @@ -92,7 +92,7 @@ jobs: /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: ${{ !env.ACT }} with: name: Size,cc32xx-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} 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-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 0ae8124f5a0cee..4f0efb889359c8 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -38,7 +38,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 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" 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 137b19b51829d4..f26f0a3c7313da 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" @@ -79,6 +79,9 @@ jobs: out/telink-tlsr9518adk80d-all-clusters/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink All Clusters Minimal App run: | ./scripts/run_in_build_env.sh \ @@ -88,6 +91,9 @@ jobs: out/telink-tlsr9518adk80d-all-clusters-minimal/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Contact Sensor App run: | ./scripts/run_in_build_env.sh \ @@ -97,6 +103,9 @@ jobs: out/telink-tlsr9518adk80d-contact-sensor/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Lighting App run: | ./scripts/run_in_build_env.sh \ @@ -106,15 +115,21 @@ jobs: out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Lighting App with RPC run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ telink tlsr9518adk80d lighting-app-rpc \ - out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ + out/telink-tlsr9518adk80d-light-rpc/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Light Switch App run: | ./scripts/run_in_build_env.sh \ @@ -124,6 +139,9 @@ jobs: out/telink-tlsr9518adk80d-light-switch/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Lock App run: | ./scripts/run_in_build_env.sh \ @@ -133,6 +151,9 @@ jobs: out/telink-tlsr9518adk80d-lock/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink OTA Requestor App run: | ./scripts/run_in_build_env.sh \ @@ -142,6 +163,9 @@ jobs: out/telink-tlsr9518adk80d-ota-requestor/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Pump App run: | ./scripts/run_in_build_env.sh \ @@ -151,6 +175,9 @@ jobs: out/telink-tlsr9518adk80d-pump/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Pump Controller App run: | ./scripts/run_in_build_env.sh \ @@ -160,6 +187,9 @@ jobs: out/telink-tlsr9518adk80d-pump-controller/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Temperature Measurement App run: | ./scripts/run_in_build_env.sh \ @@ -169,6 +199,9 @@ jobs: out/telink-tlsr9518adk80d-temperature-measurement/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + - name: Build example Telink Thermostat App run: | ./scripts/run_in_build_env.sh \ @@ -178,6 +211,21 @@ jobs: out/telink-tlsr9518adk80d-thermostat/zephyr/zephyr.elf \ /tmp/bloat_reports/ + - name: clean out build output + run: rm -rf ./out + + - name: Build example Telink Window Covering App + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-window-covering' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d window-covering \ + out/telink-tlsr9518adk80d-window-covering/zephyr/zephyr.elf \ + /tmp/bloat_reports/ + + - name: clean out build output + run: rm -rf ./out + - name: Uploading Size Reports uses: actions/upload-artifact@v3 if: ${{ !env.ACT }} 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 f1a36facba7bb2..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" @@ -69,7 +69,7 @@ jobs: .environment/pigweed-venv/*.log - name: Artifact suffix id: outsuffix - uses: haya14busa/action-cond@v1.0.0 + uses: haya14busa/action-cond@v1 if: ${{ !env.ACT }} with: cond: ${{ github.event.pull_request.number == '' }} 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/.vscode/tasks.json b/.vscode/tasks.json index bd3c7821934dd5..f73966cddf7c22 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -647,6 +647,7 @@ "telink-tlsr9518adk80d-pump-controller-app", "telink-tlsr9518adk80d-temperature-measurement", "telink-tlsr9518adk80d-thermostat", + "telink-tlsr9518adk80d-window-covering", "tizen-arm-light" ] }, diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index fcd62b8757a36c..2b983e36a0761f 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -33,7 +33,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake) set(CHIP_REQUIRE_COMPONENTS freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash spi_flash) -if((NOT "${IDF_TARGET}" STREQUAL "esp32h2") AND (NOT "${IDF_TARGET}" STREQUAL "esp32c2")) +if(NOT "${IDF_TARGET}" STREQUAL "esp32h2") list(APPEND CHIP_REQUIRE_COMPONENTS mdns) endif() @@ -314,8 +314,15 @@ if(CONFIG_OPENTHREAD_ENABLED) list(APPEND chip_libraries $) endif() -if((NOT CONFIG_USE_MINIMAL_MDNS) AND (NOT CONFIG_IDF_TARGET_ESP32H2) AND (NOT CONFIG_IDF_TARGET_ESP32C2)) - idf_component_get_property(mdns_lib mdns COMPONENT_LIB) +if((NOT CONFIG_USE_MINIMAL_MDNS) AND (NOT CONFIG_IDF_TARGET_ESP32H2)) + idf_build_get_property(build_components BUILD_COMPONENTS) + # For IDF v5.x, the mdns component was moved to idf_managed_components. + # We should use 'espressif__mdns' for 'idf_component_get_property'. + if("espressif__mdns" IN_LIST build_components) + idf_component_get_property(mdns_lib espressif__mdns COMPONENT_LIB) + elseif("mdns" IN_LIST build_components) + idf_component_get_property(mdns_lib mdns COMPONENT_LIB) + endif() list(APPEND chip_libraries $) endif() diff --git a/config/nrfconnect/.nrfconnect-recommended-revision b/config/nrfconnect/.nrfconnect-recommended-revision index a4b6ac3ded6d12..b1d18bc43f08ca 100644 --- a/config/nrfconnect/.nrfconnect-recommended-revision +++ b/config/nrfconnect/.nrfconnect-recommended-revision @@ -1 +1 @@ -v2.2.0 +v2.3.0 diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index c48d18c13bee02..4ef9feb7de4c26 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -114,6 +114,9 @@ if (CONFIG_NORDIC_SECURITY_BACKEND) zephyr_include_directories($) endif() list(APPEND CHIP_CFLAGS -DMBEDTLS_CONFIG_FILE=) +elseif(CONFIG_MBEDTLS) + zephyr_include_directories($) + zephyr_compile_definitions($) endif() if (CONFIG_NRF_802154_RADIO_DRIVER) diff --git a/config/nrfconnect/chip-module/Kconfig b/config/nrfconnect/chip-module/Kconfig index b0ab15b75a9f4e..390a99b1556e77 100644 --- a/config/nrfconnect/chip-module/Kconfig +++ b/config/nrfconnect/chip-module/Kconfig @@ -88,6 +88,9 @@ config CHIP_DEBUG_SYMBOLS help Enables building the application with debug symbols. +config CHIP_MALLOC_SYS_HEAP + default y if !ARCH_POSIX + config CHIP_FACTORY_DATA bool "Factory data provider" select ZCBOR diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index a2a26ca591bed9..bf7b494e7050d5 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -161,6 +161,11 @@ config BT_DEVICE_NAME_GATT_WRITABLE config CHIP_NFC_COMMISSIONING default y +# Disable not needed NFC callback to save flash +config NFC_THREAD_CALLBACK + bool + default n + config CHIP_OTA_REQUESTOR default y @@ -230,6 +235,9 @@ config NET_IF_MCAST_IPV6_ADDR_COUNT config NET_SOCKETS_POSIX_NAMES default n +config NET_SOCKETS_POLL_MAX + default 4 + config MBEDTLS_SSL_OUT_CONTENT_LEN default 900 @@ -247,6 +255,9 @@ config SHELL_STACK_SIZE config HEAP_MEM_POOL_SIZE default 200000 +config CHIP_MALLOC_SYS_HEAP_SIZE + default 28672 # 28 kB + endif @@ -368,6 +379,18 @@ config PSA_WANT_ALG_OFB # Disable not used shell modules +config SHELL_WILDCARD + default n + +config SHELL_VT100_COLORS + default n + +config SHELL_STATS + default n + +config KERNEL_SHELL + default n + config SENSOR_SHELL default n @@ -389,6 +412,18 @@ config CLOCK_CONTROL_NRF_SHELL config FLASH_SHELL default n +if MPSL_FEM + +config MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL + default y + +endif # MPSL_FEM + +config OPENTHREAD_DEFAULT_TX_POWER + default 20 if MPSL_FEM + default 3 if SOC_SERIES_NRF53X && !MPSL_FEM + default 8 if SOC_SERIES_NRF52X && !MPSL_FEM + # SoC series related configuration if SOC_SERIES_NRF52X diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index 1a1bf027267601..99d13e9d56aa59 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -98,6 +98,18 @@ config MCUMGR_SMP_BT_AUTHEN config MCUMGR_BUF_COUNT default 6 +config MCUMGR_MGMT_NOTIFICATION_HOOKS + bool + default y + +config MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK + bool + default y + +config MCUMGR_SMP_COMMAND_STATUS_HOOKS + bool + default y + # Increase BT MTU and RX buffer for big size DFU messages config BT_L2CAP_TX_MTU default 498 @@ -126,4 +138,37 @@ endif # SOC_SERIES_NRF53X endif # CHIP_DFU_OVER_BT_SMP +config CHIP_WIFI_CONNECTION_RECOVERY_MINIMUM_INTERVAL + int "Define the minimum connection recovery time interval in milliseconds" + depends on CHIP_WIFI + default 500 + help + Specifies the minimum connection recovery interval (in milliseconds). + +config CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL + int "Define the maximum connection recovery time interval in milliseconds" + depends on CHIP_WIFI + default 3600000 # 1 hour + help + Specifies the maximum connection recovery interval (in milliseconds). + +config CHIP_WIFI_CONNECTION_RECOVERY_MAX_RETRIES_NUMBER + int "Define the maximum amount of connection recovery occurrences" + depends on CHIP_WIFI + default 0 + help + Specifies the maximum number of connection recovery attempts. + If set to 0, no limitation is applied and attempts + to recover the connection are performed indefinitely. + +config CHIP_WIFI_CONNECTION_RECOVERY_JITTER + int "Define the connection recovery jitter in milliseconds" + depends on CHIP_WIFI + default 2000 + help + Specifies the maximum connection recovery jitter interval (in milliseconds). + Once the wait time reaches the current maximum value (defined by CHIP_WIFI_CONNECTION_RECOVERY_MAXIMUM_INTERVAL), + a random jitter interval is added to it to avoid periodicity. The random jitter is selected + within range [-JITTER; +JITTER]. + endif # CHIP diff --git a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults index 173766a44941c1..83290b2b492f28 100644 --- a/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults +++ b/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults @@ -63,10 +63,6 @@ config BT_HCI_RAW_RESERVE config BT_BUF_CMD_TX_COUNT default 10 -# Enable support for Wi-Fi and Bluetooth LE coexistance -config MPSL_CX - default y - config ASSERT default y diff --git a/config/nrfconnect/chip-module/make_gn_args.py b/config/nrfconnect/chip-module/make_gn_args.py index f30cd459a6e7d4..3c3f611c00b437 100755 --- a/config/nrfconnect/chip-module/make_gn_args.py +++ b/config/nrfconnect/chip-module/make_gn_args.py @@ -29,7 +29,11 @@ '-fno-reorder-functions', '-ffunction-sections', '-fdata-sections', - '-g*', + '-g', + '-g0', + '-g1', + '-g2', + '-g3', '-O*', '-W*', ] diff --git a/config/python/CHIPProjectConfig.h b/config/python/CHIPProjectConfig.h index c9bb77021fa1e4..87940a900ce991 100644 --- a/config/python/CHIPProjectConfig.h +++ b/config/python/CHIPProjectConfig.h @@ -25,8 +25,6 @@ #define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 -#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1 - // Uncomment this for a large Tunnel MTU. //#define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000) diff --git a/config/standalone/CHIPProjectConfig.h b/config/standalone/CHIPProjectConfig.h index 101bdec25e1cd4..27abcbb247b322 100644 --- a/config/standalone/CHIPProjectConfig.h +++ b/config/standalone/CHIPProjectConfig.h @@ -26,8 +26,6 @@ #define CHIP_CONFIG_EVENT_LOGGING_NUM_EXTERNAL_CALLBACKS 2 -#define CHIP_CONFIG_EVENT_LOGGING_EXTERNAL_EVENT_SUPPORT 1 - // Uncomment this for a large Tunnel MTU. // #define CHIP_CONFIG_TUNNEL_INTERFACE_MTU (9000) 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/config/zephyr/Kconfig b/config/zephyr/Kconfig index 54717d7e3b80ca..b1edad054824c7 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -394,7 +394,7 @@ config CHIP_MALLOC_SYS_HEAP_OVERRIDE config CHIP_MALLOC_SYS_HEAP_SIZE int "Heap size used by memory allocator based on Zephyr sys_heap" - default 16384 # 16kB + default 12288 # 12kB help Provides a value that controls how much of the device RAM is reserved for the heap used by the memory allocation functions based on sys_heap from diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index ea28805f5921a4..fa888fe0423a56 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -40,8 +40,8 @@ step. ``` - For ESP32H2, please checkout tag - [v5.0-beta1](https://github.com/espressif/esp-idf/tree/v5.0-beta1), - currently only lighting-app is supported on H2 + [v5.0](https://github.com/espressif/esp-idf/tree/v5.0), currently only + lighting-app is supported on H2 ``` $ cd esp-idf diff --git a/examples/all-clusters-app/esp32/main/OpenThreadLaunch.cpp b/examples/all-clusters-app/esp32/main/OpenThreadLaunch.cpp deleted file mode 100644 index e3372456226e0b..00000000000000 --- a/examples/all-clusters-app/esp32/main/OpenThreadLaunch.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "OpenThreadLaunch.h" - -#include "sdkconfig.h" - -#if CONFIG_OPENTHREAD_ENABLED - -#include -#include - -#include "driver/uart.h" -#include "esp_err.h" -#include "esp_event.h" -#include "esp_log.h" -#include "esp_netif.h" -#include "esp_netif_types.h" -#include "esp_openthread.h" -#include "esp_openthread_lock.h" -#include "esp_openthread_netif_glue.h" -#include "esp_openthread_types.h" -#include "esp_vfs_eventfd.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "hal/uart_types.h" -#include "openthread/instance.h" -#include "openthread/logging.h" -#include "openthread/platform/logging.h" -#include "sdkconfig.h" - -#if CONFIG_IDF_TARGET_ESP32H2 -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_NATIVE, \ - } -#else -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_UART_RCP, \ - .radio_uart_config = { \ - .port = 1, \ - .uart_config = \ - { \ - .baud_rate = 115200, \ - .data_bits = UART_DATA_8_BITS, \ - .parity = UART_PARITY_DISABLE, \ - .stop_bits = UART_STOP_BITS_1, \ - .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ - .rx_flow_ctrl_thresh = 0, \ - .source_clk = UART_SCLK_APB, \ - }, \ - .rx_pin = 4, \ - .tx_pin = 5, \ - }, \ - } -#endif - -#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ - { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ - } - -#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ - { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ - } - -static void OpenThreadTask(void * aContext) -{ - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - - // Initialize the OpenThread stack - ESP_ERROR_CHECK(esp_openthread_init(&config)); - (void) otLoggingSetLevel(OT_LOG_LEVEL_INFO); - - // Run the main loop - esp_openthread_launch_mainloop(); - - esp_vfs_eventfd_unregister(); - vTaskDelete(NULL); -} - -void LaunchOpenThread() -{ - esp_vfs_eventfd_config_t eventfd_config = { - .max_fds = 3, - }; - ESP_ERROR_CHECK(esp_vfs_eventfd_register(&eventfd_config)); - xTaskCreate(OpenThreadTask, "ot", 10240, xTaskGetCurrentTaskHandle(), 5, NULL); -} - -#endif // CONFIG_OPENTHREAD_ENABLED diff --git a/examples/all-clusters-app/esp32/main/include/OpenThreadLaunch.h b/examples/all-clusters-app/esp32/main/include/OpenThreadLaunch.h deleted file mode 100644 index 86b02d6328fdb5..00000000000000 --- a/examples/all-clusters-app/esp32/main/include/OpenThreadLaunch.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -void LaunchOpenThread(); diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 507fb3349a960d..2393488befa017 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -21,7 +21,6 @@ #include "DeviceCallbacks.h" #include "Globals.h" #include "LEDWidget.h" -#include "OpenThreadLaunch.h" #include "QRCodeScreen.h" #include "ShellCommands.h" #include "WiFiWidget.h" @@ -41,6 +40,7 @@ #include #include #include +#include #if CONFIG_HAVE_DISPLAY #include "DeviceWithDisplay.h" @@ -136,6 +136,12 @@ extern "C" void app_main() ESP_LOGE(TAG, "nvs_flash_init() failed: %s", esp_err_to_name(err)); return; } + err = esp_event_loop_create_default(); + if (err != ESP_OK) + { + ESP_LOGE(TAG, "esp_event_loop_create_default() failed: %s", esp_err_to_name(err)); + return; + } #if CONFIG_ENABLE_PW_RPC chip::rpc::Init(); #endif @@ -150,10 +156,13 @@ extern "C" void app_main() CASECommands::GetInstance().Register(); #endif // CONFIG_ENABLE_CHIP_SHELL -#if CONFIG_OPENTHREAD_ENABLED - LaunchOpenThread(); - ThreadStackMgr().InitThreadStack(); -#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + if (DeviceLayer::Internal::ESP32Utils::InitWiFiStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize the Wi-Fi stack"); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); @@ -182,6 +191,18 @@ extern "C" void app_main() { ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize Thread stack"); + return; + } + if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to launch Thread task"); + return; + } +#endif chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 3fa8dace395131..86568566378149 100644 --- a/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/all-clusters-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,18 +14,12 @@ * limitations under the License. */ -#include - / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h b/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h index 952693439ea5a5..a966f6407dba3a 100644 --- a/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h +++ b/examples/all-clusters-app/nxp/mw320/include/CHIPProjectConfig.h @@ -174,6 +174,13 @@ */ #define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1 +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + /** * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE * diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp index aed35e8f3950b8..333ec5886baba4 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceCallbacks.cpp @@ -27,6 +27,7 @@ #include "Globals.h" #include "LEDWidget.h" #include "WiFiWidget.h" +#include #include #include #include @@ -154,7 +155,7 @@ void AppDeviceCallbacks::OnLevelControlAttributeChangeCallback(EndpointId endpoi #if CONFIG_DEVICE_TYPE_ESP32_C3_DEVKITM void AppDeviceCallbacks::OnColorControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { - using namespace Clusters::ColorControl::Attributes; + using namespace chip::app::Clusters::ColorControl::Attributes; VerifyOrExit(attributeId == CurrentHue::Id || attributeId == CurrentSaturation::Id, ESP_LOGI(TAG, "Unhandled AttributeId ID: '0x%" PRIx32 "'", attributeId)); diff --git a/examples/all-clusters-minimal-app/esp32/main/OpenThreadLaunch.cpp b/examples/all-clusters-minimal-app/esp32/main/OpenThreadLaunch.cpp deleted file mode 100644 index e3372456226e0b..00000000000000 --- a/examples/all-clusters-minimal-app/esp32/main/OpenThreadLaunch.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "OpenThreadLaunch.h" - -#include "sdkconfig.h" - -#if CONFIG_OPENTHREAD_ENABLED - -#include -#include - -#include "driver/uart.h" -#include "esp_err.h" -#include "esp_event.h" -#include "esp_log.h" -#include "esp_netif.h" -#include "esp_netif_types.h" -#include "esp_openthread.h" -#include "esp_openthread_lock.h" -#include "esp_openthread_netif_glue.h" -#include "esp_openthread_types.h" -#include "esp_vfs_eventfd.h" -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "hal/uart_types.h" -#include "openthread/instance.h" -#include "openthread/logging.h" -#include "openthread/platform/logging.h" -#include "sdkconfig.h" - -#if CONFIG_IDF_TARGET_ESP32H2 -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_NATIVE, \ - } -#else -#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ - { \ - .radio_mode = RADIO_MODE_UART_RCP, \ - .radio_uart_config = { \ - .port = 1, \ - .uart_config = \ - { \ - .baud_rate = 115200, \ - .data_bits = UART_DATA_8_BITS, \ - .parity = UART_PARITY_DISABLE, \ - .stop_bits = UART_STOP_BITS_1, \ - .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ - .rx_flow_ctrl_thresh = 0, \ - .source_clk = UART_SCLK_APB, \ - }, \ - .rx_pin = 4, \ - .tx_pin = 5, \ - }, \ - } -#endif - -#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ - { \ - .host_connection_mode = HOST_CONNECTION_MODE_NONE, \ - } - -#define ESP_OPENTHREAD_DEFAULT_PORT_CONFIG() \ - { \ - .storage_partition_name = "ot_storage", .netif_queue_size = 10, .task_queue_size = 10, \ - } - -static void OpenThreadTask(void * aContext) -{ - esp_openthread_platform_config_t config = { - .radio_config = ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG(), - .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), - .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), - }; - - // Initialize the OpenThread stack - ESP_ERROR_CHECK(esp_openthread_init(&config)); - (void) otLoggingSetLevel(OT_LOG_LEVEL_INFO); - - // Run the main loop - esp_openthread_launch_mainloop(); - - esp_vfs_eventfd_unregister(); - vTaskDelete(NULL); -} - -void LaunchOpenThread() -{ - esp_vfs_eventfd_config_t eventfd_config = { - .max_fds = 3, - }; - ESP_ERROR_CHECK(esp_vfs_eventfd_register(&eventfd_config)); - xTaskCreate(OpenThreadTask, "ot", 10240, xTaskGetCurrentTaskHandle(), 5, NULL); -} - -#endif // CONFIG_OPENTHREAD_ENABLED diff --git a/examples/all-clusters-minimal-app/esp32/main/include/OpenThreadLaunch.h b/examples/all-clusters-minimal-app/esp32/main/include/OpenThreadLaunch.h deleted file mode 100644 index 86b02d6328fdb5..00000000000000 --- a/examples/all-clusters-minimal-app/esp32/main/include/OpenThreadLaunch.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -void LaunchOpenThread(); diff --git a/examples/all-clusters-minimal-app/esp32/main/main.cpp b/examples/all-clusters-minimal-app/esp32/main/main.cpp index 69bb15ee91d326..ad4c3ee09d4374 100644 --- a/examples/all-clusters-minimal-app/esp32/main/main.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/main.cpp @@ -21,7 +21,6 @@ #include "DeviceCallbacks.h" #include "Globals.h" #include "LEDWidget.h" -#include "OpenThreadLaunch.h" #include "QRCodeScreen.h" #include "ShellCommands.h" #include "WiFiWidget.h" @@ -42,6 +41,7 @@ #include #include #include +#include #if CONFIG_HAVE_DISPLAY #include "DeviceWithDisplay.h" @@ -130,6 +130,12 @@ extern "C" void app_main() ESP_LOGE(TAG, "nvs_flash_init() failed: %s", esp_err_to_name(err)); return; } + err = esp_event_loop_create_default(); + if (err != ESP_OK) + { + ESP_LOGE(TAG, "esp_event_loop_create_default() failed: %s", esp_err_to_name(err)); + return; + } #if CONFIG_ENABLE_PW_RPC chip::rpc::Init(); #endif @@ -144,10 +150,13 @@ extern "C" void app_main() CASECommands::GetInstance().Register(); #endif // CONFIG_ENABLE_CHIP_SHELL -#if CONFIG_OPENTHREAD_ENABLED - LaunchOpenThread(); - ThreadStackMgr().InitThreadStack(); -#endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + if (DeviceLayer::Internal::ESP32Utils::InitWiFiStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize Wi-Fi stack"); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); @@ -177,6 +186,18 @@ extern "C" void app_main() ESP_LOGE(TAG, "GetAppTask().StartAppTask() failed : %" CHIP_ERROR_FORMAT, error.Format()); } +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + if (DeviceLayer::ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize Thread stack"); + return; + } + if (DeviceLayer::ThreadStackMgr().StartThreadTask() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to launch Thread task"); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); } diff --git a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay index 3fa8dace395131..86568566378149 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/examples/all-clusters-minimal-app/nrfconnect/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -14,18 +14,12 @@ * limitations under the License. */ -#include - / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/examples/android/CHIPTool/app/build.gradle b/examples/android/CHIPTool/app/build.gradle index fc57fc86e67aee..3150e344c91ab5 100644 --- a/examples/android/CHIPTool/app/build.gradle +++ b/examples/android/CHIPTool/app/build.gradle @@ -107,6 +107,8 @@ dependencies { implementation "androidx.camera:camera-camera2:${camerax_version}" implementation "androidx.camera:camera-lifecycle:${camerax_version}" implementation "androidx.camera:camera-view:${camerax_version}" + + implementation 'com.google.protobuf:protobuf-java:3.22.0' } repositories { diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt index 6e3833820716a3..3d130f835de459 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt @@ -30,6 +30,7 @@ import chip.platform.NsdManagerServiceBrowser import chip.platform.NsdManagerServiceResolver import chip.platform.PreferencesConfigurationManager import chip.platform.PreferencesKeyValueStoreManager +import com.google.chip.chiptool.attestation.ExampleAttestationTrustStoreDelegate import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine @@ -47,7 +48,12 @@ object ChipClient { if (!this::chipDeviceController.isInitialized) { chipDeviceController = ChipDeviceController(ControllerParams.newBuilder().setControllerVendorId(VENDOR_ID).build()) + + // Set delegate for attestation trust store for device attestation verifier. + // It will replace the default attestation trust store. + chipDeviceController.setAttestationTrustStoreDelegate(ExampleAttestationTrustStoreDelegate(chipDeviceController)) } + return chipDeviceController } @@ -57,6 +63,7 @@ object ChipClient { ChipDeviceController.loadJni() androidPlatform = AndroidChipPlatform(AndroidBleManager(), PreferencesKeyValueStoreManager(context), PreferencesConfigurationManager(context), NsdManagerServiceResolver(context), NsdManagerServiceBrowser(context), ChipMdnsCallbackImpl(), DiagnosticDataProviderImpl(context)) } + return androidPlatform } diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt new file mode 100644 index 00000000000000..4e723faeffecd3 --- /dev/null +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/attestation/ExampleAttestationTrustStoreDelegate.kt @@ -0,0 +1,43 @@ +package com.google.chip.chiptool.attestation + +import android.util.Base64 +import chip.devicecontroller.AttestationTrustStoreDelegate +import chip.devicecontroller.ChipDeviceController +import java.util.* + +class ExampleAttestationTrustStoreDelegate(val chipDeviceController: ChipDeviceController) : + AttestationTrustStoreDelegate { + + private val paaCerts = arrayListOf(TEST_PAA_FFF1_Cert, TEST_PAA_NOVID_CERT) + + override fun getProductAttestationAuthorityCert(skid: ByteArray): ByteArray? { + return paaCerts + .map { Base64.decode(it, Base64.DEFAULT) } + .firstOrNull { cert -> chipDeviceController.extractSkidFromPaaCert(cert) == skid } + } + + companion object { + const val TEST_PAA_FFF1_Cert = + "MIIBvTCCAWSgAwIBAgIITqjoMYLUHBwwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP\n" + + "TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMTA2Mjgx\n" + + "NDIzNDNaGA85OTk5MTIzMTIzNTk1OVowMDEYMBYGA1UEAwwPTWF0dGVyIFRlc3Qg\n" + + "UEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTBZMBMGByqGSM49AgEGCCqGSM49AwEH\n" + + "A0IABLbLY3KIfyko9brIGqnZOuJDHK2p154kL2UXfvnO2TKijs0Duq9qj8oYShpQ\n" + + "NUKWDUU/MD8fGUIddR6Pjxqam3WjZjBkMBIGA1UdEwEB/wQIMAYBAf8CAQEwDgYD\n" + + "VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRq/SJ3H1Ef7L8WQZdnENzcMaFxfjAfBgNV\n" + + "HSMEGDAWgBRq/SJ3H1Ef7L8WQZdnENzcMaFxfjAKBggqhkjOPQQDAgNHADBEAiBQ\n" + + "qoAC9NkyqaAFOPZTaK0P/8jvu8m+t9pWmDXPmqdRDgIgI7rI/g8j51RFtlM5CBpH\n" + + "mUkpxyqvChVI1A0DTVFLJd4=" + + const val TEST_PAA_NOVID_CERT = + "MIIBkTCCATegAwIBAgIHC4+6qN2G7jAKBggqhkjOPQQDAjAaMRgwFgYDVQQDDA9N\n" + + "YXR0ZXIgVGVzdCBQQUEwIBcNMjEwNjI4MTQyMzQzWhgPOTk5OTEyMzEyMzU5NTla\n" + + "MBoxGDAWBgNVBAMMD01hdHRlciBUZXN0IFBBQTBZMBMGByqGSM49AgEGCCqGSM49\n" + + "AwEHA0IABBDvAqgah7aBIfuo0xl4+AejF+UKqKgoRGgokUuTPejt1KXDnJ/3Gkzj\n" + + "ZH/X9iZTt9JJX8ukwPR/h2iAA54HIEqjZjBkMBIGA1UdEwEB/wQIMAYBAf8CAQEw\n" + + "DgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR4XOcFuGuPTm/Hk6pgy0PqaWiC1TAf\n" + + "BgNVHSMEGDAWgBR4XOcFuGuPTm/Hk6pgy0PqaWiC1TAKBggqhkjOPQQDAgNIADBF\n" + + "AiEAue/bPqBqUuwL8B5h2u0sLRVt22zwFBAdq3mPrAX6R+UCIGAGHT411g2dSw1E\n" + + "ja12EvfoXFguP8MS3Bh5TdNzcV5d" + } +} diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt index 64948f2a2c76f4..0651c6103631c8 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/WildcardFragment.kt @@ -6,6 +6,7 @@ import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.ArrayAdapter import android.widget.Button import android.widget.EditText import android.widget.Spinner @@ -17,14 +18,20 @@ import chip.devicecontroller.ChipIdLookup import chip.devicecontroller.ReportCallback import chip.devicecontroller.ResubscriptionAttemptCallback import chip.devicecontroller.SubscriptionEstablishedCallback +import chip.devicecontroller.WriteAttributesCallback +import chip.devicecontroller.model.AttributeWriteRequest import chip.devicecontroller.model.ChipAttributePath import chip.devicecontroller.model.ChipEventPath import chip.devicecontroller.model.ChipPathId import chip.devicecontroller.model.NodeState +import chip.tlv.AnonymousTag +import chip.tlv.TlvWriter import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.R import com.google.chip.chiptool.databinding.WildcardFragmentBinding +import com.google.protobuf.ByteString import java.lang.StringBuilder +import java.util.Optional import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -64,6 +71,21 @@ class WildcardFragment : Fragment() { } } + private val writeAttributeCallback = object : WriteAttributesCallback { + override fun onError(attributePath: ChipAttributePath?, ex: Exception?) { + Log.e(TAG, "Report error for $attributePath: $ex") + } + + override fun onResponse(attributePath: ChipAttributePath?) { + val text = "$attributePath : Write Success" + requireActivity().runOnUiThread { binding.outputTv.text = text } + } + + override fun onDone() { + Log.i(TAG, "write attribute Done") + } + } + override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, @@ -73,6 +95,7 @@ class WildcardFragment : Fragment() { scope = viewLifecycleOwner.lifecycleScope binding.subscribeBtn.setOnClickListener { scope.launch { showSubscribeDialog(ATTRIBUTE) } } binding.readBtn.setOnClickListener { scope.launch { showReadDialog(ATTRIBUTE) } } + binding.writeBtn.setOnClickListener { scope.launch { showWriteDialog() } } binding.subscribeEventBtn.setOnClickListener { scope.launch { showSubscribeDialog(EVENT) } } binding.readEventBtn.setOnClickListener { scope.launch { showReadDialog(EVENT) } } @@ -182,6 +205,35 @@ class WildcardFragment : Fragment() { } } + private suspend fun write(writeValueType: String, writeValue: String, dataVersion: Int?, timedRequestTimeoutMs: Int, imTimeoutMs: Int) { + val endpointId = getChipPathIdForText(binding.endpointIdEd.text.toString()) + val clusterId = getChipPathIdForText(binding.clusterIdEd.text.toString()) + val attributeId = getChipPathIdForText(binding.attributeIdEd.text.toString()) + val tlvWriter = TlvWriter() + val values = writeValue.split(",") + + if (values.size > 1) tlvWriter.startArray(AnonymousTag) + for (value in values) { + try { + TLV_MAP[writeValueType]?.generate(tlvWriter, value.trim()) + } catch (ex: Exception) { + Log.e(TAG, "Invalid Data Type", ex) + return + } + } + if (values.size > 1) tlvWriter.endArray() + + val version = if (dataVersion == null) { Optional.empty() } else { Optional.of(dataVersion) } + + val writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlvWriter.getEncoded(), version) + deviceController.write(writeAttributeCallback, + ChipClient.getConnectedDevicePointer(requireContext(), + addressUpdateFragment.deviceId), + listOf(writeRequest), + timedRequestTimeoutMs, + imTimeoutMs) + } + private fun showReadDialog(type: Int) { val dialogView = requireActivity().layoutInflater.inflate(R.layout.read_dialog, null) val dialog = AlertDialog.Builder(requireContext()).apply { @@ -198,6 +250,33 @@ class WildcardFragment : Fragment() { dialog.show() } + private fun showWriteDialog() { + binding.outputTv.text = "" + val dialogView = requireActivity().layoutInflater.inflate(R.layout.write_dialog, null) + val writeValueTypeSp = dialogView.findViewById(R.id.writeValueTypeSp) + val spinnerAdapter = ArrayAdapter(requireActivity(), android.R.layout.simple_spinner_item, TLV_MAP.keys.toList()) + writeValueTypeSp.adapter = spinnerAdapter + val dialog = AlertDialog.Builder(requireContext()).apply { + setView(dialogView) + }.create() + + dialogView.findViewById