Skip to content

Commit b011b8c

Browse files
authored
Merge branch 'project-chip:master' into SDP011-1244
2 parents a120fd7 + 87994ad commit b011b8c

File tree

151 files changed

+3620
-2151
lines changed

Some content is hidden

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

151 files changed

+3620
-2151
lines changed

.github/labeler.yml

+4
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,7 @@ zephyr:
216216
telink:
217217
- src/platform/telink/*
218218
- src/platform/telink/**/*
219+
220+
tizen:
221+
- src/platform/Tizen/*
222+
- src/platform/Tizen/**/*

.github/workflows/examples-nrfconnect.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,41 @@ jobs:
192192
nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \
193193
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
194194
/tmp/bloat_reports/
195+
- name: Build example nRF Connect SDK Lock App on nRF7002 PDK
196+
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
197+
timeout-minutes: 20
198+
run: |
199+
scripts/examples/nrfconnect_example.sh lock-app nrf7002dk_nrf5340_cpuapp
200+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
201+
nrfconnect nrf7002dk_nrf5340_cpuapp lock-app \
202+
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
203+
/tmp/bloat_reports/
204+
- name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK
205+
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
206+
timeout-minutes: 20
207+
run: |
208+
scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk_nrf5340_cpuapp
209+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
210+
nrfconnect nrf7002dk_nrf5340_cpuapp light-switch-app \
211+
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
212+
/tmp/bloat_reports/
213+
- name: Build example nRF Connect SDK Lighting App on nRF7002 PDK
214+
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
215+
timeout-minutes: 20
216+
run: |
217+
scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk_nrf5340_cpuapp
218+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
219+
nrfconnect nrf7002dk_nrf5340_cpuapp lighting-app \
220+
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
221+
/tmp/bloat_reports/
222+
- name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK
223+
timeout-minutes: 20
224+
run: |
225+
scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp
226+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
227+
nrfconnect nrf7002dk_nrf5340_cpuapp all-clusters-app \
228+
examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \
229+
/tmp/bloat_reports/
195230
- name: Run unit tests for Zephyr native_posix_64 platform
196231
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true'
197232
timeout-minutes: 15

config/nrfconnect/chip-module/Kconfig

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ rsource "../../zephyr/Kconfig"
1818

1919
if CHIP
2020

21+
config CHIP_APP_LOG_LEVEL
22+
int "Set logging level in application"
23+
default LOG_DEFAULT_LEVEL
24+
help
25+
Sets the logging level in Matter application.
26+
This config should be used only within application.
27+
To set the logging level for Matter stack use MATTER_LOG_LEVEL
28+
config.
29+
2130
config CHIP_NFC_COMMISSIONING
2231
bool "Enable NFC commissioning support"
2332
default n

config/zephyr/Kconfig

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ config CHIP_SED_ACTIVE_INTERVAL
154154
endif # CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
155155

156156
config CHIP_THREAD_SSED
157-
bool "Enable Thread Synchronized Sleepy End Device support"
158-
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
159-
help
160-
Enables Thread Synchronized Sleepy End Device support in Matter.
157+
bool "Enable Thread Synchronized Sleepy End Device support"
158+
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
159+
help
160+
Enables Thread Synchronized Sleepy End Device support in Matter.
161161

162162
config CHIP_OTA_REQUESTOR
163163
bool "Enable OTA requestor"

docs/guides/nrfconnect_android_commissioning.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ example for the nRF Connect platform into a Matter fabric.
66

77
This guide references the nRF52840 DK and Matter nRF Connect Lighting Example
88
Application that communicates with other nodes over a Thread network, but the
9-
instructions can be adapted to other platforms and applications. In particular,
10-
some sections of this guide include deviations from the original procedure that
11-
are needed to test a Wi-Fi device.
9+
instructions can be adapted to other platforms and applications. For instance,
10+
some sections of this guide include steps for testing a Wi-Fi device, which are
11+
adapted from the original Thread-based procedure.
1212

1313
<hr>
1414

@@ -68,6 +68,7 @@ accessory using Android CHIPTool:
6868
replace this DK with another compatible device, such as the nRF5340 DK or
6969
nRF7002 DK. nRF52840 DK and nRF5340 DK can be used to test Matter over
7070
Thread, and nRF7002 DK can be used to test Matter over Wi-Fi.
71+
7172
- 1x nRF52840 DK for running the
7273
[OpenThread Radio Co-Processor](https://openthread.io/platforms/co-processor)
7374
firmware. You can replace this DK with another compatible device, such as

examples/all-clusters-app/esp32/sdkconfig.defaults

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
3131
CONFIG_BT_ENABLED=y
3232
CONFIG_BT_NIMBLE_ENABLED=y
3333

34+
#disable BT connection reattempt
35+
CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n
36+
3437
#enable lwip ipv6 autoconfig
3538
CONFIG_LWIP_IPV6_AUTOCONFIG=y
3639

examples/all-clusters-app/nrfconnect/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
2525
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
2626
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
2727
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
28+
set(hci_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.hci_rpmsg.root)
2829

2930
if(DEFINED CONF_FILE AND NOT CONF_FILE STREQUAL "prj.conf")
3031
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)

examples/all-clusters-app/nrfconnect/Kconfig

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ config STATE_LEDS
2222
Use LEDs to render the current state of the device such as the progress of commissioning of
2323
the device into a network or the factory reset initiation.
2424

25+
# Sample configuration used for Thread networking
26+
if NET_L2_OPENTHREAD
27+
28+
choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION
29+
default OPENTHREAD_NORDIC_LIBRARY_MTD
30+
endchoice
31+
32+
choice OPENTHREAD_DEVICE_TYPE
33+
default OPENTHREAD_MTD
34+
endchoice
35+
36+
endif # NET_L2_OPENTHREAD
37+
2538
rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
2639
rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
2740
source "Kconfig.zephyr"

examples/all-clusters-app/nrfconnect/README.md

+76-30
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ creating your own application.
1010
The example is based on
1111
[Matter](https://github.com/project-chip/connectedhomeip) and Nordic
1212
Semiconductor's nRF Connect SDK, and was created to facilitate testing and
13-
certification of a Matter device communicating over a low-power, 802.15.4 Thread
14-
network.
13+
certification of a Matter device communicating over a low-power 802.15.4 Thread
14+
network, or Wi-Fi network.
1515

1616
The example behaves as a Matter accessory, that is a device that can be paired
17-
into an existing Matter network and can be controlled by this network. The
18-
device works as a Thread Minimal End Device.
17+
into an existing Matter network and can be controlled by this network. In the
18+
case of Thread, this device works as a Thread Sleepy End Device. Support for
19+
both Thread and Wi-Fi is mutually exclusive and depends on the hardware
20+
platform, so only one protocol can be supported for a specific device.
1921

2022
<hr>
2123

@@ -24,6 +26,7 @@ device works as a Thread Minimal End Device.
2426
- [Bluetooth LE rendezvous](#bluetooth-le-rendezvous)
2527
- [Requirements](#requirements)
2628
- [Supported devices](#supported_devices)
29+
- [IPv6 network support](#ipv6-network-support)
2730
- [Device UI](#device-ui)
2831
- [Setting up the environment](#setting-up-the-environment)
2932
- [Using Docker container for setup](#using-docker-container-for-setup)
@@ -55,17 +58,27 @@ and [Zephyr RTOS](https://zephyrproject.org/). Visit Matter's
5558
[nRF Connect platform overview](../../../docs/guides/nrfconnect_platform_overview.md)
5659
to read more about the platform structure and dependencies.
5760

58-
The Matter device that runs the all clusters application is controlled by the
59-
Matter controller device over the Thread protocol. By default, the Matter device
60-
has Thread disabled, and it should be paired with Matter controller and get
61-
configuration from it. Some actions required before establishing full
62-
communication are described below.
61+
By default, the Matter accessory device has IPv6 networking disabled. You must
62+
pair it with the Matter controller over Bluetooth® LE to get the configuration
63+
from the controller to use the device within a Thread or Wi-Fi network. You have
64+
to make the device discoverable manually (for security reasons). See
65+
[Bluetooth LE advertising](#bluetooth-le-advertising) to learn how to do this.
66+
The controller must get the commissioning information from the Matter accessory
67+
device and provision the device into the network.
68+
69+
You can test this application remotely over the Thread or the Wi-Fi protocol,
70+
which in either case requires more devices, including a Matter controller that
71+
you can configure either on a PC or a mobile device.
6372

6473
### Bluetooth LE advertising
6574

6675
In this example, to commission the device onto a Matter network, it must be
6776
discoverable over Bluetooth LE. For security reasons, you must start Bluetooth
68-
LE advertising manually after powering up the device by pressing **Button 4**.
77+
LE advertising manually after powering up the device by pressing:
78+
79+
- On nRF52840 DK, nRF5340 DK, and nRF21540 DK: **Button 4**.
80+
81+
- On nRF7002 DK: **Button 2**.
6982

7083
### Bluetooth LE rendezvous
7184

@@ -75,14 +88,16 @@ commissioner role.
7588

7689
To start the rendezvous, the controller must get the commissioning information
7790
from the Matter device. The data payload is encoded within a QR code, printed to
78-
the UART console.
91+
the UART console, and shared using an NFC tag. The emulation of the NFC tag
92+
starts automatically when Bluetooth LE advertising is started and stays enabled
93+
until Bluetooth LE advertising timeout expires.
7994

80-
#### Thread provisioning
95+
#### Thread or Wi-Fi provisioning
8196

8297
Last part of the rendezvous procedure, the provisioning operation involves
83-
sending the Thread network credentials from the Matter controller to the Matter
84-
device. As a result, device is able to join the Thread network and communicate
85-
with other Thread devices in the network.
98+
sending the Thread or Wi-Fi network credentials from the Matter controller to
99+
the Matter device. As a result, the device joins the Thread or Wi-Fi network and
100+
can communicate with other devices in the network.
86101

87102
<hr>
88103

@@ -100,14 +115,24 @@ more information.
100115

101116
The example supports building and running on the following devices:
102117

103-
| Hardware platform | Build target | Platform image |
104-
| ------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
105-
| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` | <details><summary>nRF52840 DK</summary><img src="../../platform/nrfconnect/doc/images/nRF52840_DK_info-medium.jpg" alt="nRF52840 DK"/></details> |
106-
| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` | <details><summary>nRF5340 DK</summary><img src="../../platform/nrfconnect/doc/images/nRF5340_DK_info-medium.jpg" alt="nRF5340 DK"/></details> |
107-
| [nRF52840 Dongle](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle) | `nrf52840dongle_nrf52840` | <details><summary>nRF52840 Dongle</summary><img src="../../platform/nrfconnect/doc/images/nRF52840_Dongle-medium.jpg" alt="nRF52840 Dongle"/></details> |
118+
| Hardware platform | Build target | Platform image |
119+
| --------------------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
120+
| [nRF52840 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) | `nrf52840dk_nrf52840` | <details><summary>nRF52840 DK</summary><img src="../../platform/nrfconnect/doc/images/nRF52840_DK_info-medium.jpg" alt="nRF52840 DK"/></details> |
121+
| [nRF5340 DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF5340-DK) | `nrf5340dk_nrf5340_cpuapp` | <details><summary>nRF5340 DK</summary><img src="../../platform/nrfconnect/doc/images/nRF5340_DK_info-medium.jpg" alt="nRF5340 DK"/></details> |
122+
| [nRF52840 Dongle](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle) | `nrf52840dongle_nrf52840` | <details><summary>nRF52840 Dongle</summary><img src="../../platform/nrfconnect/doc/images/nRF52840_Dongle-medium.jpg" alt="nRF52840 Dongle"/></details> |
123+
| [nRF7002 DK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf7002.html#nrf7002dk-nrf5340) | `nrf7002dk_nrf5340_cpuapp` | <details><summary>nRF7002DK</summary><img src="../../platform/nrfconnect/doc/images/nrf7002dk.jpg" alt="nRF7002 DK"/></details> |
108124

109125
<hr>
110126

127+
### IPv6 network support
128+
129+
The development kits for this sample offer the following IPv6 network support
130+
for Matter:
131+
132+
- Matter over Thread is supported for `nrf52840dk_nrf52840` and
133+
`nrf5340dk_nrf5340_cpuapp`.
134+
- Matter over Wi-Fi is supported for `nrf7002dk_nrf5340_cpuapp`.
135+
111136
<a name="device-ui"></a>
112137

113138
## Device UI
@@ -137,21 +162,42 @@ following states are possible:
137162
Bluetooth LE.
138163

139164
- _Short Flash Off (950ms on/50ms off)_ &mdash; The device is fully
140-
provisioned, but does not yet have full Thread network or service
141-
connectivity.
165+
provisioned, but does not yet have full connectivity for Thread or Wi-Fi
166+
network.
142167

143-
- _Solid On_ &mdash; The device is fully provisioned and has full Thread
144-
network and service connectivity.
168+
- _Solid On_ &mdash; The device is fully provisioned.
145169

146170
**Button 1** can be used for the following purposes:
147171

148-
- _Pressed for 6 s_ &mdash; Initiates the factory reset of the device.
149-
Releasing the button within the 6-second window cancels the factory reset
150-
procedure. **LEDs 1-4** blink in unison when the factory reset procedure is
151-
initiated.
172+
- _Pressed for less than 3 s_ &mdash; Initiates the OTA software update
173+
process. This feature is disabled by default, but can be enabled by
174+
following the
175+
[Building with Device Firmware Upgrade support](#building-with-device-firmware-upgrade-support)
176+
instructions.
177+
178+
- _Pressed for more than 3 s_ &mdash; initiates the factory reset of the
179+
device. Releasing the button within the 3-second window cancels the factory
180+
reset procedure.
181+
182+
**Button 2**:
183+
184+
- On nRF52840 DK, nRF5340 DK, and nRF21540 DK: Not available.
185+
186+
- On nRF7002 DK:
187+
188+
- If pressed for more than three seconds, it starts the NFC tag emulation,
189+
enables Bluetooth LE advertising for the predefined period of time (15
190+
minutes by default), and makes the device discoverable over Bluetooth
191+
LE.
192+
193+
**Button 4**:
194+
195+
- On nRF52840 DK, nRF5340 DK, and nRF21540 DK: Starts the NFC tag emulation,
196+
enables Bluetooth LE advertising for the predefined period of time (15
197+
minutes by default), and makes the device discoverable over Bluetooth LE.
198+
This button is used during the commissioning procedure.
152199

153-
**Button 4** &mdash; Pressing the button once starts Bluetooth LE advertising
154-
for the predefined period of time (15 minutes by default).
200+
- On nRF7002 DK: Not available.
155201

156202
**SEGGER J-Link USB port** can be used to get logs from the device or
157203
communicate with it using the

examples/all-clusters-app/nrfconnect/boards/nrf52840dk_nrf52840.overlay

-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
&uart1 {
3838
status = "disabled";
3939
};
40-
&gpio1 {
41-
status = "disabled";
42-
};
4340
&i2c0 {
4441
status = "disabled";
4542
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2022 Project CHIP Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/ {
18+
chosen {
19+
nordic,pm-ext-flash = &mx25r64;
20+
};
21+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# This target uses Kconfig.hci_rpmsg.defaults to set options common for all
18+
# samples using hci_rpmsg. This file should contain only options specific for this sample
19+
# hci_rpmsg configuration or overrides of default values.
20+
21+
# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding
22+
# in board files.
23+
24+
CONFIG_SERIAL=n
25+
CONFIG_UART_CONSOLE=n
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2022 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# This target uses Kconfig.hci_rpmsg.defaults to set options common for all
18+
# samples using hci_rpmsg. This file should contain only options specific for this sample
19+
# hci_rpmsg configuration or overrides of default values.
20+
21+
# Disable not used modules that cannot be set in Kconfig.hci_rpmsg.defaults due to overriding
22+
# in board files.
23+
24+
CONFIG_SERIAL=n
25+
CONFIG_UART_CONSOLE=n

0 commit comments

Comments
 (0)