You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add DFU over Bluetooth SMP support for the light bulb sample
- Create a snippet for the Zigbee FOTA support, used by both
light bulb and light switch samples
- Update documentation with DFU over Bluetooth SMP support
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
You can update your device's firmware over the air using two methods, both enabled by default in the Matter extension builds:
5
+
6
+
* Matter OTA – Updates your device through MCUboot, satisfying the Matter specification's requirement to support at least one over-the-air software update method.
7
+
8
+
* Device Firmware Upgrade (DFU) over Bluetooth LE – Updates your device using the `Simple Management Protocol`_ (SMP).
9
+
To enable this method, select the :file:`prj_matter_fota.conf` configuration by setting the ``FILE_SUFFIX=matter_fota`` option.
10
+
11
+
Matter OTA and SMP DFU are independent transports.
12
+
SMP is not part of the Matter specification.
13
+
Use `mcumgr`_ or `nRF Connect Device Manager`_ to perform the update.
14
+
15
+
For step-by-step instructions on testing the update process, see |sample matter bt dfu testing ref|.
To test DFU over Bluetooth LE SMP, complete the following steps:
2
+
3
+
1. Build and flash the sample with the Matter extension (see |sample matter activating variants ref|).
4
+
#. Confirm the device is running the Matter stack (see |sample matter testing ref|).
5
+
#. Briefly press **Button 0** to start Bluetooth LE advertising for SMP.
6
+
7
+
The behavior depends on the device's commissioning state:
8
+
9
+
* If the device is not commissioned to a Matter fabric, this starts both Matter commissioning advertising and the SMP server.
10
+
* If the device is already commissioned, this re-enables only the SMP server for firmware transfer.
11
+
12
+
**LED 0** blinks while Bluetooth LE advertising for SMP is active.
13
+
The advertised device name is |bt device name|, set by the ``CONFIG_BT_DEVICE_NAME`` Kconfig option in the :file:`prj_matter_fota.conf` file.
14
+
15
+
#. Perform the update using one of the following methods:
16
+
17
+
.. tabs::
18
+
19
+
.. group-tab:: Smartphone
20
+
21
+
a. Install `nRF Connect Device Manager`_.
22
+
#. Use the :file:`dfu_application.zip` file from the build directory.
23
+
24
+
For detailed instructions, see `FOTA updates on nRF54L Series devices`_ (nRF54L15 and nRF54LM20 DKs) or `FOTA updates with nRF5340 DK`_ (nRF5340 DK) depending on the device you are using.
25
+
26
+
.. group-tab:: PC (mcumgr)
27
+
28
+
Upload the signed images from the build directory:
29
+
30
+
* On single-core SoCs (for example, nRF54L Series), upload the application image:
31
+
32
+
.. parsed-literal::
33
+
:class: highlight
34
+
35
+
|matter mcumgr smp upload|
36
+
37
+
* On dual-core SoCs (for example, nRF5340 DK), upload the application and network core images separately:
38
+
39
+
.. parsed-literal::
40
+
:class: highlight
41
+
42
+
|matter mcumgr smp upload|
43
+
44
+
|matter mcumgr net smp upload|
45
+
46
+
After uploading, list the images, mark each new slot as pending, and reset the device.
47
+
For the full procedure, see `Performing Device Firmware Upgrade in the nRF Connect examples`_.
48
+
49
+
After the update completes, MCUboot applies the new image on the next reboot.
To activate the :ref:`lib_zigbee_fota`, use the :file:`prj_fota.conf` configuration file together with the ``zigbee_fota_ext_flash`` snippet.
5
+
The snippet provides external-flash partition layouts, sysbuild MCUboot settings, and the matching MCUboot configuration (through ``zigbee_fota_mcuboot_ext_flash``).
6
+
For example, when building from the command line, use the following command:
7
+
8
+
.. parsed-literal::
9
+
:class: highlight
10
+
11
+
west build |sample dir| -b *board_target* -- -DFILE_SUFFIX=fota -DSNIPPET=zigbee_fota_ext_flash
12
+
13
+
The FOTA variant enables `MCUboot image compression`_.
14
+
The generated Zigbee update file contains a compressed MCUboot image, and MCUboot decompresses it while applying the update.
15
+
This setting reduces the size of the update image.
16
+
However, it requires MCUboot to run in overwrite-only mode, which means the device cannot revert to the previous image after an update is applied.
17
+
18
+
Alternatively, you can :ref:`configure Zigbee FOTA manually <ug_zigbee_configuring_components_ota>`.
19
+
20
+
.. note::
21
+
The decompression support increases the size of the MCUboot image.
22
+
When adapting this FOTA configuration to a custom board or application, make sure that the MCUboot partition is large enough for the generated bootloader image.
23
+
The FOTA variant uses devicetree-based partitioning with Partition Manager disabled; see :ref:`zigbee_ug_static_partition` for the partition layout requirements.
24
+
25
+
Device firmware upgrade over Bluetooth SMP (Zigbee-only builds)
To additionally enable Device Firmware Upgrade (DFU) over Bluetooth LE using the Simple Management Protocol (SMP) in a Zigbee-only build, add ``CONFIG_ZIGBEE_BT_DFU=y`` to the FOTA build command:
29
+
30
+
.. parsed-literal::
31
+
:class: highlight
32
+
33
+
west build |sample dir| -b *board_target* -- -DFILE_SUFFIX=fota -DSNIPPET=zigbee_fota_ext_flash -DCONFIG_ZIGBEE_BT_DFU=y
34
+
35
+
This option enables the MCUmgr SMP server over Bluetooth LE alongside :ref:`lib_zigbee_fota`.
36
+
It cannot be combined with the |sample matter ref| (``CONFIG_CHIP``).
37
+
For Matter extension builds, SMP DFU is provided through ``CONFIG_CHIP_DFU_OVER_BT_SMP`` instead.
38
+
39
+
See |sample zigbee bt dfu testing ref| for step-by-step testing instructions.
0 commit comments