DFU SMP service
The Door Lock DFU Simple Management Protocol (SMP) service is a wrapper around the nRF Connect SDK GATT DFU SMP Service. It controls on-demand SMP advertising so a client can connect over Bluetooth LE and upload a firmware image. For details on the SMP protocol, see the nRF Connect SDK documentation.
For transport context and how SMP DFU fits alongside other Bluetooth LE services, see Device Firmware Update over SMP. For step-by-step update procedures, see DFU over Bluetooth LE SMP (Aliro Access Control Application) and DFU over Bluetooth LE SMP (Matter and Aliro Door Lock Application).
Source
The module is located in the subsys/dfu_smp_service/ directory.
The public API is declared in the subsys/dfu_smp_service/include/dfu_smp_service/dfu_smp_service.h file.
Shell and development kit controls
When shell commands are enabled (CONFIG_DOOR_LOCK_DFU_SMP_SERVICE_SHELL=y, default when the shell is available), use the dfu_smp on command to start SMP advertising and the dfu_smp off command to stop it.
uart:~$ dfu_smp on
uart:~$ dfu_smp off
In reference applications, a development kit button can also toggle SMP advertising when the dfu_smp snippet is enabled.
See the User interface section in Application guide (Button 1) or User interface (Button 3).
In Matter release builds, the UART shell is disabled by default, so use the button or re-enable the shell if you rely on dfu_smp commands.
Kconfig options
Configure the DFU SMP service through Kconfig options in prj.conf as listed below.
The dfu_smp snippet sets the wrapper options and the MCUmgr and Bluetooth LE transport options in snippets/dfu_smp/dfu_smp.conf.
Kconfig option |
Description |
|---|---|
|
Enables the Door Lock DFU SMP service wrapper.
Requires MCUboot ( |
|
Enables shell commands to start and stop SMP advertising (default |
|
Log level for the module. |
Option definitions and defaults are in subsys/dfu_smp_service/Kconfig.
Usage
Enable the module by building the application with the dfu_smp snippet.
Pass the snippet to west build using the application-specific symbol:
west build -p -b <build_target> applications/aliro-access-control-app -- \
-Daliro-access-control-app_SNIPPET=dfu_smp
west build -p -b <build_target> applications/matter-aliro-door-lock-app -- \
-Dmatter-aliro-door-lock-app_SNIPPET=dfu_smp
To combine with other snippets, separate their names with semicolons, for example:
-Daliro-access-control-app_SNIPPET='uwb_qm35;dfu_smp'
After flashing, enable SMP advertising, then follow the update steps in Firmware update or Firmware update.