Skip to content

Commit bda32ac

Browse files
committed
Merge branch 'master' into value_encode_decode_interfaces
2 parents e1d22c6 + 10886ac commit bda32ac

File tree

501 files changed

+16019
-19743
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

501 files changed

+16019
-19743
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ jobs:
371371
372372
build_darwin:
373373
name: Build on Darwin (clang, python_lib, simulated)
374-
runs-on: macos-latest
374+
runs-on: macos-13
375375
if: github.actor != 'restyled-io[bot]'
376376

377377
steps:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Check for changes to data_model directory without a sha update
16+
17+
on:
18+
pull_request:
19+
paths:
20+
- "data_model/**"
21+
22+
jobs:
23+
check-submodule-update-label:
24+
name: Check for changes to data_model directory without a sha update
25+
runs-on: ubuntu-latest
26+
if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha"
27+
steps:
28+
- name: Error Message
29+
run: echo This pull request attempts to update data_model directory, but is missing updates to spec_sha file with the latest version of the sha. Files in the data_model directory are generated automatically and should not be updated manually.
30+
- name: Fail Job
31+
run: exit 1

.github/workflows/examples-linux-tv-casting-app.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Test TV Casting Example
1717
on:
1818
push:
1919
branches-ignore:
20-
- 'dependabot/**'
20+
- "dependabot/**"
2121
pull_request:
2222
merge_group:
2323

@@ -63,6 +63,12 @@ jobs:
6363
./scripts/run_in_build_env.sh \
6464
"scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app"
6565
66+
- name: Test casting from Linux tv-casting-app to Linux tv-app
67+
run: |
68+
./scripts/run_in_build_env.sh \
69+
"python3 ./scripts/tests/run_tv_casting_test.py"
70+
timeout-minutes: 1
71+
6672
- name: Uploading Size Reports
6773
uses: ./.github/actions/upload-size-reports
6874
if: ${{ !env.ACT }}

.github/workflows/fuzzing-build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868

6969
build_darwin_fuzzing:
7070
name: Build on Darwin
71-
runs-on: macos-latest
71+
runs-on: macos-13
7272
if: github.actor != 'restyled-io[bot]'
7373

7474
steps:

.github/workflows/qemu.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ jobs:
6060
build \
6161
"
6262
- name: Run all tests
63-
# Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/32587
64-
if: false
6563
run: |
6664
src/test_driver/esp32/run_qemu_image.py \
6765
--verbose \

.github/workflows/tests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ jobs:
330330
LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
331331

332332
if: github.actor != 'restyled-io[bot]'
333-
runs-on: macos-latest
333+
runs-on: macos-13
334334

335335
steps:
336336
- name: Checkout
@@ -588,7 +588,7 @@ jobs:
588588
TSAN_OPTIONS: "halt_on_error=1"
589589

590590
if: github.actor != 'restyled-io[bot]' && false
591-
runs-on: macos-latest
591+
runs-on: macos-13
592592

593593
steps:
594594
- name: Checkout
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Check for Unintentional Submodule Updates
16+
17+
on:
18+
pull_request:
19+
branches-ignore:
20+
- 'dependabot/**'
21+
paths:
22+
- "third_party/**"
23+
- ".gitmodules"
24+
25+
jobs:
26+
check-submodule-update-label:
27+
name: Check For Submodule Update Label
28+
runs-on: ubuntu-latest
29+
if: "!contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose')"
30+
steps:
31+
- name: Error Message
32+
run: echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes.
33+
- name: Fail Job
34+
run: exit 1

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Build System
1212
out/
13+
/examples/virtual-device-app/android/App/buildSrc/build/
1314
/src/test_driver/nrfconnect/build/
1415
/src/darwin/Framework/build/
1516

config/esp32/components/chip/Kconfig

+7-6
Original file line numberDiff line numberDiff line change
@@ -726,12 +726,13 @@ menu "CHIP Device Layer"
726726
should not start advertising automatically after power-up.
727727

728728
config USE_BLE_ONLY_FOR_COMMISSIONING
729-
bool "Use BLE only for commissioning"
730-
default y
731-
help
732-
Disable this flag if BLE is used for any other purpose than commissioning.
733-
When enabled, it deinitialized the BLE on successful commissioning, and on
734-
bootup do not initialize the BLE if device is already provisioned with Wi-Fi/Thread credentials.
729+
depends on BT_ENABLED
730+
bool "Use BLE only for commissioning"
731+
default y
732+
help
733+
Disable this flag if BLE is used for any other purpose than commissioning.
734+
When enabled, it deinitialized the BLE on successful commissioning, and on
735+
bootup do not initialize the BLE if device is already provisioned with Wi-Fi/Thread credentials.
735736

736737
endmenu
737738

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
add_library(gnu17 INTERFACE)
22
target_compile_options(gnu17
33
INTERFACE
4-
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
5-
-D_SYS__PTHREADTYPES_H_)
4+
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
65
target_link_libraries(app PRIVATE gnu17)

config/nrfconnect/chip-module/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ else()
168168
endif()
169169

170170
if (CONFIG_CHIP_CRYPTO_PSA)
171-
matter_add_gn_arg_string("chip_crypto" "psa")
171+
matter_add_gn_arg_string("chip_crypto" "psa")
172+
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
172173
endif()
173174

174175
if (BOARD STREQUAL "native_posix")

config/nrfconnect/chip-module/Kconfig

+5
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,9 @@ config CHIP_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE
302302
Perform factory reset of the device if the operational key for Fabric has not been migrated
303303
properly to PSA ITS storage.
304304

305+
config CHIP_PERSISTENT_SUBSCRIPTIONS
306+
default n
307+
# selecting experimental for this feature since there is an issue with multiple controllers.
308+
select EXPERIMENTAL
309+
305310
endif # CHIP

config/nrfconnect/chip-module/Kconfig.defaults

+9-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ if CHIP
2424
# System configuration
2525
# ==============================================================================
2626

27+
choice LIBC_IMPLEMENTATION
28+
default NEWLIB_LIBC
29+
endchoice
30+
2731
config ASSERT
2832
default y
2933

@@ -298,6 +302,7 @@ config MBEDTLS_HEAP_SIZE
298302

299303
config CHIP_CRYPTO_PSA
300304
default y if !CHIP_WIFI
305+
imply PSA_WANT_ALG_SPAKE2P_MATTER
301306

302307
if CHIP_CRYPTO_PSA
303308

@@ -317,13 +322,13 @@ if PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON
317322
config PSA_USE_CC3XX_HASH_DRIVER
318323
default n
319324

320-
endif
325+
endif # PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON
321326

322327
# Spake2+ support
323328
config MBEDTLS_MD_C
324329
default y
325330

326-
endif
331+
endif # CHIP_CRYPTO_PSA
327332

328333
if !CHIP_CRYPTO_PSA
329334

@@ -366,7 +371,7 @@ config MBEDTLS_ECP_C
366371
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
367372
default y
368373

369-
endif
374+
endif # !CHIP_CRYPTO_PSA
370375

371376
config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
372377
default n if CHIP_WIFI
@@ -486,4 +491,4 @@ config OPENTHREAD_SHELL
486491

487492
endif # SHELL
488493

489-
endif
494+
endif # CHIP

config/nrfconnect/chip-module/Kconfig.features

+1-3
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ config CHIP_WIFI
4242

4343
config CHIP_QSPI_NOR
4444
bool "Enable QSPI NOR feature set"
45+
imply NORDIC_QSPI_NOR
4546
help
4647
Enables QSPI NOR flash with a set of options for configuring pages and
4748
buffer sizes.
4849

4950
if CHIP_QSPI_NOR
5051

51-
config NORDIC_QSPI_NOR
52-
default y
53-
5452
config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE
5553
default 16
5654

config/nrfconnect/chip-module/Kconfig.mcuboot.defaults

+1-16
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@
1919
config MAIN_STACK_SIZE
2020
default 10240
2121

22-
config BOOT_SWAP_SAVE_ENCTLV
23-
default n
24-
25-
config BOOT_ENCRYPT_RSA
26-
default n
27-
28-
config BOOT_ENCRYPT_EC256
29-
default n
30-
31-
config BOOT_ENCRYPT_X25519
22+
config BOOT_ENCRYPT_IMAGE
3223
default n
3324

3425
config BOOT_BOOTSTRAP
@@ -53,9 +44,6 @@ if BOARD_NRF7002DK_NRF5340_CPUAPP
5344
config SPI
5445
default y
5546

56-
config SPI_NOR
57-
default y
58-
5947
choice SPI_NOR_SFDP
6048
default SPI_NOR_SFDP_DEVICETREE
6149
endchoice
@@ -74,9 +62,6 @@ endif
7462
# All boards beside nRF7002DK use QSPI NOR external flash
7563
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840
7664

77-
config NORDIC_QSPI_NOR
78-
default y
79-
8065
config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
8166
default 4096
8267

config/zephyr/Kconfig

+5-2
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ config CHIP_PROJECT_CONFIG
309309

310310
config CHIP_ENABLE_DNSSD_SRP
311311
bool "OpenThread Service Registration Protocol"
312-
default y if NET_L2_OPENTHREAD
312+
default y
313+
depends on NET_L2_OPENTHREAD
313314
imply OPENTHREAD_ECDSA
314315
imply OPENTHREAD_SRP_CLIENT
315316
help
@@ -318,7 +319,8 @@ config CHIP_ENABLE_DNSSD_SRP
318319

319320
config CHIP_ENABLE_DNS_CLIENT
320321
bool "OpenThread DNS client"
321-
default y if NET_L2_OPENTHREAD
322+
default y
323+
depends on NET_L2_OPENTHREAD
322324
imply OPENTHREAD_DNS_CLIENT
323325
help
324326
Enables using the OpenThread DNS client for the Matter service discovery.
@@ -413,6 +415,7 @@ config CHIP_THREAD_SSED
413415

414416
config CHIP_OPENTHREAD_CONFIG
415417
string "Custom OpenThread configuration file"
418+
depends on NET_L2_OPENTHREAD
416419
help
417420
Provides a path to an OpenThread configuration file. The path can be
418421
either absolute or relative to the application directory. When this option

docs/guides/BUILDING.md

+26-14
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,20 @@ Complete the following steps:
135135
136136
1. Reboot your Raspberry Pi after installing `pi-bluetooth`.
137137
138-
#### Enable experimental Bluetooth support in BlueZ
138+
#### Enable experimental Bluetooth support and disable battery plugin in BlueZ
139139
140140
The Matter application on Linux uses BlueZ to communicate with the Bluetooth
141141
controller. The BlueZ version that comes with Ubuntu 22.04 does not support all
142142
the features required by the Matter application by default. To enable these
143143
features, you need to enable experimental Bluetooth support in BlueZ.
144144
145+
Also disable the battery plugin from BlueZ, because iOS devices advertises a
146+
battery service via BLE, which requires pairing if accessed. BlueZ includes a
147+
battery plugin by default which tries to connect to the battery service. The
148+
authentication fails, because in this case no BLE pairing has been done. If the
149+
BlueZ battery plugin is not disabled, the BLE connection will be terminated
150+
during the Matter commissioning process.
151+
145152
1. Edit the `bluetooth.service` unit by running the following command:
146153
147154
```sh
@@ -153,7 +160,7 @@ features, you need to enable experimental Bluetooth support in BlueZ.
153160
```ini
154161
[Service]
155162
ExecStart=
156-
ExecStart=/usr/lib/bluetooth/bluetoothd -E
163+
ExecStart=/usr/lib/bluetooth/bluetoothd -E -P battery
157164
```
158165
159166
1. Restart the Bluetooth service by running the following command:
@@ -199,22 +206,27 @@ permanently, you need to make the following changes:
199206
200207
## Installing ZAP tool
201208
202-
`bootstrap.sh` will download a compatible ZAP tool version and set it up in
203-
`$PATH`. If you want to install or use a different version of the tool, you may
204-
download one from the ZAP project's
205-
[Releases](https://github.com/project-chip/zap/releases) page.
209+
For platforms defined in [`scripts/setup/zap.json`](/scripts/setup/zap.json),
210+
`bootstrap.sh` will download a compatible ZAP tool version from CIPD and set it
211+
up in `$PATH`.
212+
213+
ZAP releases are copied to CIPD by an automated bot. You can check if a release
214+
was copied by looking at tags created for
215+
[ZAP CIPD Packages](https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/zap)
216+
in various platforms.
206217
207-
### Linux ARM
218+
### Custom ZAP
208219
209-
Zap does not provide binary releases for arm. Rosetta solves this for Darwin,
210-
however for linux arm you will have to use a local ZAP, generally through
211-
setting `$ZAP_DEVELOPMENT_PATH` (see the section `Which zap to use` below).
220+
If you want to install or use a different version of the tool, you may download
221+
one from the [ZAP releases](https://github.com/project-chip/zap/releases) or
222+
build it from source.
212223
213224
The file `scripts/setup/zap.json` contains the version that CIPD would download,
214-
so you can download a compatible version from the zap project
215-
[Releases](https://github.com/project-chip/zap/releases). To checkout as source
216-
code the corresponding tag should exist in the zap
217-
[repository tags](https://github.com/project-chip/zap/tags) list.
225+
so you can refer to it to find a compatible version. The version is also
226+
maintained at [`scripts/setup/zap.version`](/scripts/setup/zap.version).
227+
228+
To check out as source code, the corresponding tag should exist in the
229+
[ZAP repository tags](https://github.com/project-chip/zap/tags) list.
218230
219231
Example commands:
220232

0 commit comments

Comments
 (0)