diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index cb92b98f3ed0..33bdaf568843 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -465,6 +465,7 @@ Bluetooth Mesh samples that used the :ref:`zephyr:bluetooth-hci-ipc-sample` radi * Support for the :ref:`nRF54L15 PDK ` board. * Support for DFU over Bluetooth Low Energy for the :ref:`nRF54L15 PDK ` board. + * Support for DFU over Bluetooth Low Energy for the :ref:`nRF5340 DK ` board. * :ref:`ble_mesh_dfu_target` sample: diff --git a/samples/bluetooth/mesh/light/CMakeLists.txt b/samples/bluetooth/mesh/light/CMakeLists.txt index f47a7adeda8f..d3ce0b15ff8d 100644 --- a/samples/bluetooth/mesh/light/CMakeLists.txt +++ b/samples/bluetooth/mesh/light/CMakeLists.txt @@ -21,10 +21,8 @@ target_include_directories(app PRIVATE ${ZEPHYR_NRF_MODULE_DIR}/samples/bluetooth/mesh/common ) -# Preinitialization related to DFU over SMP for nRF52 series -if(CONFIG_SOC_SERIES_NRF52X) - target_sources_ifdef(CONFIG_MCUMGR_TRANSPORT_BT app PRIVATE - ${ZEPHYR_NRF_MODULE_DIR}/samples/bluetooth/mesh/common/smp_bt.c) -endif() +# Preinitialization related to DFU over SMP +target_sources_ifdef(CONFIG_MCUMGR_TRANSPORT_BT app PRIVATE + ${ZEPHYR_NRF_MODULE_DIR}/samples/bluetooth/mesh/common/smp_bt.c) # NORDIC SDK APP END diff --git a/samples/bluetooth/mesh/light/README.rst b/samples/bluetooth/mesh/light/README.rst index 866932d566d2..05d94bf83b87 100644 --- a/samples/bluetooth/mesh/light/README.rst +++ b/samples/bluetooth/mesh/light/README.rst @@ -132,15 +132,35 @@ This sample is split into the following source files: DFU configuration ================= -To enable the DFU feature for the supported development kits, set :makevar:`SB_CONF_FILE` to :file:`sysbuild-dfu.conf` and set :makevar:`EXTRA_CONF_FILE` to :file:`overlay-dfu.conf` when building the sample. -For example, when building from the command line, use the following command: +.. tabs:: - .. code-block:: console + .. tab:: nRF52840 DK and nRF54L15 PDK - west build -b -p -- -DSB_CONF_FILE="sysbuild-dfu.conf" -DEXTRA_CONF_FILE="overlay-dfu.conf" + To enable the DFU feature for the nRF52840 and nRF54L15 development kits, set :makevar:`SB_CONF_FILE` to :file:`sysbuild-dfu.conf` and :makevar:`EXTRA_CONF_FILE` to :file:`overlay-dfu.conf` when building the sample. + For example, when building from the command line, use the following command: + + .. code-block:: console + + west build -b -p -- -DSB_CONF_FILE="sysbuild-dfu.conf" -DEXTRA_CONF_FILE="overlay-dfu.conf" + + The configuration overlay file :file:`overlay-dfu.conf` and the sysbuild configuration file :file:`sysbuild-dfu.conf` enable the DFU feature. + To review the required configuration alterations, open and inspect the two files. + + .. tab:: nRF5340 DK + + To enable the DFU feature for the nRF5340 development kit, set :makevar:`SB_CONF_FILE` to :file:`sysbuild-dfu.conf` and :makevar:`EXTRA_CONF_FILE` to :file:`overlay-dfu.conf` when building the sample. + Additionally, you need to set the :makevar:`EXTRA_CONF_FILE` for the ipc_radio network image to :file:`overlay-dfu.conf` as well. + This is an additional network image specific configuration overlay file, which allocates the necessary resources to enable the DFU feature. + For example, when building from the command line, use the following command: + + .. code-block:: console + + west build -b -p -- -DSB_CONF_FILE="sysbuild-dfu.conf" -DEXTRA_CONF_FILE="overlay-dfu.conf" -Dipc_radio_EXTRA_CONF_FILE="overlay-dfu.conf" + + .. note:: + Currently, the nRF5340 development kit only supports DFU for the application core. + This implies that all application DFU images must be compatible with the network core image running on the device. -The configuration overlay file :file:`overlay-dfu.conf` and the sysbuild configuration file :file:`sysbuild-dfu.conf` enable the DFU feature. -To review the required configuration alterations, open and inspect the two files. For more information about using configuration overlay files, see :ref:`zephyr:important-build-vars` in the Zephyr documentation. For more information about selecting a sysbuild configuration file, see the Sysbuild Kconfig file section on the :ref:`zephyr:sysbuild` page in the Zephyr documentation. diff --git a/samples/bluetooth/mesh/light/src/main.c b/samples/bluetooth/mesh/light/src/main.c index ef1aa956256e..411f628d5fec 100644 --- a/samples/bluetooth/mesh/light/src/main.c +++ b/samples/bluetooth/mesh/light/src/main.c @@ -50,7 +50,7 @@ static void bt_ready(int err) printk("Mesh initialized\n"); - if (IS_ENABLED(CONFIG_SOC_SERIES_NRF52X) && IS_ENABLED(CONFIG_MCUMGR_TRANSPORT_BT)) { + if (IS_ENABLED(CONFIG_MCUMGR_TRANSPORT_BT)) { err = smp_dfu_init(); if (err) { printk("Unable to initialize DFU (err %d)\n", err); diff --git a/samples/bluetooth/mesh/light/sysbuild/ipc_radio/overlay-dfu.conf b/samples/bluetooth/mesh/light/sysbuild/ipc_radio/overlay-dfu.conf new file mode 100644 index 000000000000..a5f02791e892 --- /dev/null +++ b/samples/bluetooth/mesh/light/sysbuild/ipc_radio/overlay-dfu.conf @@ -0,0 +1,6 @@ +# One extra connection for mesh GATT/proxy and one for SMP BT. +CONFIG_BT_MAX_CONN=3 +CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=3 + +# Add one additional adv set for SMP +CONFIG_BT_EXT_ADV_MAX_ADV_SET=6