Skip to content

Commit

Permalink
Merge branch 'master' into value_encode_decode_interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
andreilitvin committed Apr 26, 2024
2 parents e1d22c6 + 10886ac commit bda32ac
Show file tree
Hide file tree
Showing 501 changed files with 16,019 additions and 19,743 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ jobs:
build_darwin:
name: Build on Darwin (clang, python_lib, simulated)
runs-on: macos-latest
runs-on: macos-13
if: github.actor != 'restyled-io[bot]'

steps:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/check-data-model-directory-updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check for changes to data_model directory without a sha update

on:
pull_request:
paths:
- "data_model/**"

jobs:
check-submodule-update-label:
name: Check for changes to data_model directory without a sha update
runs-on: ubuntu-latest
if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha"
steps:
- name: Error Message
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.
- name: Fail Job
run: exit 1
8 changes: 7 additions & 1 deletion .github/workflows/examples-linux-tv-casting-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Test TV Casting Example
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
merge_group:

Expand Down Expand Up @@ -63,6 +63,12 @@ jobs:
./scripts/run_in_build_env.sh \
"scripts/examples/gn_build_example.sh examples/tv-casting-app/linux/ out/tv-casting-app"
- name: Test casting from Linux tv-casting-app to Linux tv-app
run: |
./scripts/run_in_build_env.sh \
"python3 ./scripts/tests/run_tv_casting_test.py"
timeout-minutes: 1

- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzing-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

build_darwin_fuzzing:
name: Build on Darwin
runs-on: macos-latest
runs-on: macos-13
if: github.actor != 'restyled-io[bot]'

steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ jobs:
build \
"
- name: Run all tests
# Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/32587
if: false
run: |
src/test_driver/esp32/run_qemu_image.py \
--verbose \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ jobs:
LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt

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

steps:
- name: Checkout
Expand Down Expand Up @@ -588,7 +588,7 @@ jobs:
TSAN_OPTIONS: "halt_on_error=1"

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

steps:
- name: Checkout
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/third-party-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check for Unintentional Submodule Updates

on:
pull_request:
branches-ignore:
- 'dependabot/**'
paths:
- "third_party/**"
- ".gitmodules"

jobs:
check-submodule-update-label:
name: Check For Submodule Update Label
runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose')"
steps:
- name: Error Message
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.
- name: Fail Job
run: exit 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Build System
out/
/examples/virtual-device-app/android/App/buildSrc/build/
/src/test_driver/nrfconnect/build/
/src/darwin/Framework/build/

Expand Down
13 changes: 7 additions & 6 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,13 @@ menu "CHIP Device Layer"
should not start advertising automatically after power-up.

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

endmenu

Expand Down
3 changes: 1 addition & 2 deletions config/nrfconnect/app/enable-gnu-std.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
add_library(gnu17 INTERFACE)
target_compile_options(gnu17
INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
-D_SYS__PTHREADTYPES_H_)
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>)
target_link_libraries(app PRIVATE gnu17)
3 changes: 2 additions & 1 deletion config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ else()
endif()

if (CONFIG_CHIP_CRYPTO_PSA)
matter_add_gn_arg_string("chip_crypto" "psa")
matter_add_gn_arg_string("chip_crypto" "psa")
matter_add_gn_arg_bool ("chip_crypto_psa_spake2p" CONFIG_PSA_WANT_ALG_SPAKE2P_MATTER)
endif()

if (BOARD STREQUAL "native_posix")
Expand Down
5 changes: 5 additions & 0 deletions config/nrfconnect/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,9 @@ config CHIP_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE
Perform factory reset of the device if the operational key for Fabric has not been migrated
properly to PSA ITS storage.

config CHIP_PERSISTENT_SUBSCRIPTIONS
default n
# selecting experimental for this feature since there is an issue with multiple controllers.
select EXPERIMENTAL

endif # CHIP
13 changes: 9 additions & 4 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if CHIP
# System configuration
# ==============================================================================

choice LIBC_IMPLEMENTATION
default NEWLIB_LIBC
endchoice

config ASSERT
default y

Expand Down Expand Up @@ -298,6 +302,7 @@ config MBEDTLS_HEAP_SIZE

config CHIP_CRYPTO_PSA
default y if !CHIP_WIFI
imply PSA_WANT_ALG_SPAKE2P_MATTER

if CHIP_CRYPTO_PSA

Expand All @@ -317,13 +322,13 @@ if PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON
config PSA_USE_CC3XX_HASH_DRIVER
default n

endif
endif # PSA_CRYPTO_DRIVER_CC3XX && PSA_CRYPTO_DRIVER_OBERON

# Spake2+ support
config MBEDTLS_MD_C
default y

endif
endif # CHIP_CRYPTO_PSA

if !CHIP_CRYPTO_PSA

Expand Down Expand Up @@ -366,7 +371,7 @@ config MBEDTLS_ECP_C
config MBEDTLS_ECP_DP_SECP256R1_ENABLED
default y

endif
endif # !CHIP_CRYPTO_PSA

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
default n if CHIP_WIFI
Expand Down Expand Up @@ -486,4 +491,4 @@ config OPENTHREAD_SHELL

endif # SHELL

endif
endif # CHIP
4 changes: 1 addition & 3 deletions config/nrfconnect/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ config CHIP_WIFI

config CHIP_QSPI_NOR
bool "Enable QSPI NOR feature set"
imply NORDIC_QSPI_NOR
help
Enables QSPI NOR flash with a set of options for configuring pages and
buffer sizes.

if CHIP_QSPI_NOR

config NORDIC_QSPI_NOR
default y

config NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE
default 16

Expand Down
17 changes: 1 addition & 16 deletions config/nrfconnect/chip-module/Kconfig.mcuboot.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,7 @@
config MAIN_STACK_SIZE
default 10240

config BOOT_SWAP_SAVE_ENCTLV
default n

config BOOT_ENCRYPT_RSA
default n

config BOOT_ENCRYPT_EC256
default n

config BOOT_ENCRYPT_X25519
config BOOT_ENCRYPT_IMAGE
default n

config BOOT_BOOTSTRAP
Expand All @@ -53,9 +44,6 @@ if BOARD_NRF7002DK_NRF5340_CPUAPP
config SPI
default y

config SPI_NOR
default y

choice SPI_NOR_SFDP
default SPI_NOR_SFDP_DEVICETREE
endchoice
Expand All @@ -74,9 +62,6 @@ endif
# All boards beside nRF7002DK use QSPI NOR external flash
if BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF52840DK_NRF52840

config NORDIC_QSPI_NOR
default y

config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE
default 4096

Expand Down
7 changes: 5 additions & 2 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ config CHIP_PROJECT_CONFIG

config CHIP_ENABLE_DNSSD_SRP
bool "OpenThread Service Registration Protocol"
default y if NET_L2_OPENTHREAD
default y
depends on NET_L2_OPENTHREAD
imply OPENTHREAD_ECDSA
imply OPENTHREAD_SRP_CLIENT
help
Expand All @@ -318,7 +319,8 @@ config CHIP_ENABLE_DNSSD_SRP

config CHIP_ENABLE_DNS_CLIENT
bool "OpenThread DNS client"
default y if NET_L2_OPENTHREAD
default y
depends on NET_L2_OPENTHREAD
imply OPENTHREAD_DNS_CLIENT
help
Enables using the OpenThread DNS client for the Matter service discovery.
Expand Down Expand Up @@ -413,6 +415,7 @@ config CHIP_THREAD_SSED

config CHIP_OPENTHREAD_CONFIG
string "Custom OpenThread configuration file"
depends on NET_L2_OPENTHREAD
help
Provides a path to an OpenThread configuration file. The path can be
either absolute or relative to the application directory. When this option
Expand Down
40 changes: 26 additions & 14 deletions docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,20 @@ Complete the following steps:
1. Reboot your Raspberry Pi after installing `pi-bluetooth`.
#### Enable experimental Bluetooth support in BlueZ
#### Enable experimental Bluetooth support and disable battery plugin in BlueZ
The Matter application on Linux uses BlueZ to communicate with the Bluetooth
controller. The BlueZ version that comes with Ubuntu 22.04 does not support all
the features required by the Matter application by default. To enable these
features, you need to enable experimental Bluetooth support in BlueZ.
Also disable the battery plugin from BlueZ, because iOS devices advertises a
battery service via BLE, which requires pairing if accessed. BlueZ includes a
battery plugin by default which tries to connect to the battery service. The
authentication fails, because in this case no BLE pairing has been done. If the
BlueZ battery plugin is not disabled, the BLE connection will be terminated
during the Matter commissioning process.
1. Edit the `bluetooth.service` unit by running the following command:
```sh
Expand All @@ -153,7 +160,7 @@ features, you need to enable experimental Bluetooth support in BlueZ.
```ini
[Service]
ExecStart=
ExecStart=/usr/lib/bluetooth/bluetoothd -E
ExecStart=/usr/lib/bluetooth/bluetoothd -E -P battery
```
1. Restart the Bluetooth service by running the following command:
Expand Down Expand Up @@ -199,22 +206,27 @@ permanently, you need to make the following changes:
## Installing ZAP tool
`bootstrap.sh` will download a compatible ZAP tool version and set it up in
`$PATH`. If you want to install or use a different version of the tool, you may
download one from the ZAP project's
[Releases](https://github.com/project-chip/zap/releases) page.
For platforms defined in [`scripts/setup/zap.json`](/scripts/setup/zap.json),
`bootstrap.sh` will download a compatible ZAP tool version from CIPD and set it
up in `$PATH`.
ZAP releases are copied to CIPD by an automated bot. You can check if a release
was copied by looking at tags created for
[ZAP CIPD Packages](https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/zap)
in various platforms.
### Linux ARM
### Custom ZAP
Zap does not provide binary releases for arm. Rosetta solves this for Darwin,
however for linux arm you will have to use a local ZAP, generally through
setting `$ZAP_DEVELOPMENT_PATH` (see the section `Which zap to use` below).
If you want to install or use a different version of the tool, you may download
one from the [ZAP releases](https://github.com/project-chip/zap/releases) or
build it from source.
The file `scripts/setup/zap.json` contains the version that CIPD would download,
so you can download a compatible version from the zap project
[Releases](https://github.com/project-chip/zap/releases). To checkout as source
code the corresponding tag should exist in the zap
[repository tags](https://github.com/project-chip/zap/tags) list.
so you can refer to it to find a compatible version. The version is also
maintained at [`scripts/setup/zap.version`](/scripts/setup/zap.version).
To check out as source code, the corresponding tag should exist in the
[ZAP repository tags](https://github.com/project-chip/zap/tags) list.
Example commands:
Expand Down
Loading

0 comments on commit bda32ac

Please sign in to comment.