Skip to content

Commit f90952e

Browse files
samples: matter: add wifi support for manufacturer-specific
add wifi support for manufacturer-specific sample. Signed-off-by: Maciej Baczmanski <[email protected]>
1 parent 11beba8 commit f90952e

File tree

10 files changed

+198
-19
lines changed

10 files changed

+198
-19
lines changed

samples/matter/manufacturer_specific/Kconfig.sysbuild

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7+
config WIFI_NRF70
8+
default y if BOARD_NRF7002DK
9+
710
#### Radio core selection
811
config NRF_DEFAULT_IPC_RADIO
912
default y
1013

1114
# Enable IEEE802.15.4 serialization to network core
1215
# This config automatically pulls in the `overlay-802154.conf` in the ipc_radio image
1316
config NETCORE_IPC_RADIO_IEEE802154
14-
default y if SOC_SERIES_NRF53X
17+
default y if SOC_SERIES_NRF53X && !WIFI_NRF70
1518

1619
# Enable Bluetooth serialization to network core
1720
# This config automatically pulls in the `overlay-bt_hci_ipc.conf` in the ipc_radio image

samples/matter/manufacturer_specific/README.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ Matter: Manufacturer-specific
99

1010
This sample demonstrates an implementation of custom manufacturer-specific clusters used by the application layer.
1111
This sample uses development kit's buttons and LEDs to demonstrate the functionality of the custom ``NordicDevkit`` cluster.
12-
The device works as a Matter accessory device, meaning it can be paired and controlled remotely over a Matter network built on top of a low-power, 802.15.4 Thread network.
12+
The device works as a Matter accessory device, meaning it can be paired and controlled remotely over a Matter network built on top of a low-power, 802.15.4 Thread network or on top of a Wi-Fi® network.
13+
Support for both Thread and Wi-Fi is mutually exclusive and depends on the hardware platform, so only one protocol can be supported for a specific Matter device.
14+
In case of Thread, this device works as a Thread :ref:`Minimal End Device <thread_ot_device_types>`.
1315
You can use this sample as a reference for creating your own application.
1416

1517
Requirements
@@ -19,19 +21,27 @@ The sample supports the following development kits:
1921

2022
.. table-from-sample-yaml::
2123

22-
For testing purposes, that is to commission the device and :ref:`control it remotely <matter_manufacturer_specific_network_mode>` through a Thread network, you also need a Matter controller device :ref:`configured on PC or smartphone <ug_matter_configuring>`.
24+
For testing purposes, that is to commission the device and :ref:`control it remotely <matter_manufacturer_specific_network_mode>` through a Thread network or a Wi-Fi network, you also need a Matter controller device :ref:`configured on PC or smartphone <ug_matter_configuring>`.
2325
This requires additional hardware depending on the setup you choose.
2426

2527
.. note::
2628
|matter_gn_required_note|
2729

30+
IPv6 network support
31+
====================
32+
33+
The development kits for this sample offer the following IPv6 network support for Matter:
34+
35+
* Matter over Thread is supported for the ``nrf52840dk/nrf52840``, ``nrf5340dk/nrf5340/cpuapp``, ``nrf21540dk/nrf52840``, ``nrf54l15dk/nrf54l15/cpuapp``, and ``nrf54l15dk/nrf54l10/cpuapp`` board targets.
36+
* Matter over Wi-Fi is supported for the ``nrf5340dk/nrf5340/cpuapp`` board target with the ``nrf7002ek`` shield attached, or for the ``nrf7002dk/nrf5340/cpuapp`` board target.
37+
2838
Overview
2939
********
3040
.. tabs::
3141

32-
.. group-tab:: nRF52 and nRF53 DKs
42+
.. group-tab:: nRF52, nRF53 and nRF70 DKs
3343

34-
The sample starts the Bluetooth® LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled Thread network.
44+
The sample starts the Bluetooth® LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled IPv6 network.
3545
The sample uses the **LED 1** to show the state of the connection.
3646
You can press **Button 1** to start the factory reset when needed.
3747
**Button 2** is used to set the state of the ``NordicDevkit`` cluster's attribute, ``UserButton``.
@@ -42,7 +52,7 @@ Overview
4252

4353
.. group-tab:: nRF54 DKs
4454

45-
The sample starts the Bluetooth® LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled Thread network.
55+
The sample starts the Bluetooth LE advertising automatically and prepares the Matter device for commissioning into a Matter-enabled IPv6 network.
4656
The sample uses the **LED 0** to show the state of the connection.
4757
You can press **Button 0** to start the factory reset when needed.
4858
**Button 1** is used to set the state of the ``NordicDevkit`` cluster's attribute, ``UserButton``.
@@ -108,7 +118,7 @@ User interface
108118

109119
.. tabs::
110120

111-
.. group-tab:: nRF52 and nRF53 DKs
121+
.. group-tab:: nRF52, nRF53 and nRF70 DKs
112122

113123
LED 1:
114124
.. include:: /includes/matter_sample_state_led.txt
@@ -153,7 +163,7 @@ See `Configuration`_ for information about building the sample with the DFU supp
153163
Enabling remote control
154164
=======================
155165

156-
Remote control allows you to control the Matter manufacturer-specific device from a Thread network.
166+
Remote control allows you to control the Matter manufacturer-specific device from an IPv6 network.
157167

158168
`Commissioning the device`_ allows you to set up a testing environment and remotely control the sample over a Matter-enabled Thread network.
159169

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Enable LTO to decrease the flash usage.
8+
CONFIG_LTO=y
9+
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <zephyr/dt-bindings/ipc_service/static_vrings.h>
8+
9+
/ {
10+
chosen {
11+
nordic,pm-ext-flash = &mx25r64;
12+
};
13+
14+
aliases {
15+
watchdog0 = &wdt0;
16+
};
17+
18+
};
19+
20+
/* Set IPC thread priority to the highest value to not collide with other threads. */
21+
&ipc0 {
22+
zephyr,priority = <0 PRIO_COOP>;
23+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
mcuboot:
2+
address: 0x0
3+
size: 0xC000
4+
region: flash_primary
5+
mcuboot_pad:
6+
address: 0xC000
7+
size: 0x200
8+
app:
9+
address: 0xC200
10+
size: 0xeae00
11+
mcuboot_primary:
12+
orig_span: &id001
13+
- mcuboot_pad
14+
- app
15+
span: *id001
16+
address: 0xC000
17+
size: 0xeb000
18+
region: flash_primary
19+
mcuboot_primary_app:
20+
orig_span: &id002
21+
- app
22+
span: *id002
23+
address: 0xC200
24+
size: 0xeae00
25+
factory_data:
26+
address: 0xf7000
27+
size: 0x1000
28+
region: flash_primary
29+
settings_storage:
30+
address: 0xf8000
31+
size: 0x8000
32+
region: flash_primary
33+
mcuboot_primary_1:
34+
address: 0x0
35+
size: 0x40000
36+
device: flash_ctrl
37+
region: ram_flash
38+
mcuboot_secondary:
39+
address: 0x0
40+
size: 0xeb000
41+
device: MX25R64
42+
region: external_flash
43+
mcuboot_secondary_1:
44+
address: 0xeb000
45+
size: 0x40000
46+
device: MX25R64
47+
region: external_flash
48+
external_flash:
49+
address: 0x12b000
50+
size: 0x6D5000
51+
device: MX25R64
52+
region: external_flash
53+
pcd_sram:
54+
address: 0x20000000
55+
size: 0x2000
56+
region: sram_primary

samples/matter/manufacturer_specific/sample.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ tests:
1111
- nrf54l15dk/nrf54l15/cpuapp
1212
- nrf54l15dk/nrf54l15/cpuapp/ns
1313
- nrf54l15dk/nrf54l10/cpuapp
14+
- nrf7002dk/nrf5340/cpuapp
1415
platform_allow:
1516
- nrf52840dk/nrf52840
1617
- nrf5340dk/nrf5340/cpuapp
1718
- nrf54l15dk/nrf54l15/cpuapp
1819
- nrf54l15dk/nrf54l15/cpuapp/ns
1920
- nrf54l15dk/nrf54l10/cpuapp
21+
- nrf7002dk/nrf5340/cpuapp
2022
tags:
2123
- sysbuild
2224
- ci_samples_matter
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Copyright (c) 2023 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Disable serial and UART interface.
8+
CONFIG_SERIAL=n
9+
CONFIG_UART_CONSOLE=n
10+
CONFIG_LOG=n
11+
12+
# RAM usage configuration
13+
CONFIG_HEAP_MEM_POOL_SIZE=8192
14+
CONFIG_MAIN_STACK_SIZE=2048
15+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
16+
17+
# BT configuration
18+
CONFIG_BT=y
19+
CONFIG_BT_HCI_RAW=y
20+
CONFIG_BT_MAX_CONN=1
21+
CONFIG_BT_CTLR_ASSERT_HANDLER=y
22+
CONFIG_BT_PERIPHERAL=y
23+
CONFIG_BT_CENTRAL=n
24+
CONFIG_BT_BUF_ACL_RX_SIZE=502
25+
CONFIG_BT_BUF_ACL_TX_SIZE=251
26+
27+
# It is set based on BT_BUF_ACL_RX_COUNT_EXTRA = 6 - (BT_MAX_CONN + 1)
28+
CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA=4
29+
30+
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
31+
CONFIG_BT_CTLR_PHY_2M=n
32+
33+
# Debug and assert configuration
34+
CONFIG_ASSERT=y
35+
CONFIG_DEBUG_INFO=y
36+
CONFIG_RESET_ON_FATAL_ERROR=n
37+
CONFIG_REBOOT=n
38+
39+
# IPC
40+
CONFIG_MBOX=y
41+
CONFIG_IPC_SERVICE=y
42+
43+
# ipc_radio
44+
CONFIG_IPC_RADIO_BT=y
45+
CONFIG_IPC_RADIO_BT_HCI_IPC=y

samples/matter/manufacturer_specific/sysbuild/ipc_radio/prj_release.conf

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Copyright (c) 2023 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# nRF7002DK uses SPI NOR external flash
8+
CONFIG_GPIO=y
9+
CONFIG_SPI=y
10+
CONFIG_SPI_NOR=y
11+
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
12+
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
13+
14+
CONFIG_MULTITHREADING=y
15+
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
16+
17+
# The following configurations are required to support simultaneous multi image update
18+
CONFIG_PCD_APP=y
19+
CONFIG_UPDATEABLE_IMAGE_NUMBER=2
20+
21+
# Multi-image updates do not support image swapping yet.
22+
CONFIG_BOOT_UPGRADE_ONLY=y
23+
24+
# The network core cannot access external flash directly. The flash simulator must be used to
25+
# provide a memory region that is used to forward the new firmware to the network core.
26+
CONFIG_FLASH_SIMULATOR=y
27+
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
28+
CONFIG_FLASH_SIMULATOR_STATS=n
29+
30+
CONFIG_ZCBOR=y
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2023 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,code-partition = &boot_partition;
10+
nordic,pm-ext-flash = &mx25r64;
11+
};
12+
};

0 commit comments

Comments
 (0)