Simple Management Protocol module

Use the Simple Management Protocol module to perform a Device Firmware Upgrade (DFU) over Bluetooth LE.

The DFU can be performed among others using the nRF Connect Android application. The DFU button appears in the Bluetooth connected device’s tab on the Android device. After pressing the button you can select the *.bin file that will be used for the firmware update.

Note

The SMP firmware update file is generated as zephyr/app_update.bin in the build directory when building the nRF Desktop application for configuration with the MCUboot bootloader and the SMP enabled. In contrast to Device Firmware Upgrade module, the SMP does not use the zephyr/dfu_application.zip file.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Source modules for module_state_event

module_state_event

smp

ble_smp_transfer_event

Bluetooth LE latency module

module_state_event

Sink modules for module_state_event

Note

See the Overview: Firmware architecture for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Configuration

Make sure that the following Kconfig options are enabled:

Enable the module using the CONFIG_DESKTOP_SMP_ENABLE Kconfig option.

Implementation details

During the initialization, the module registers the SMP Bluetooth service.

The module registers the upload_confirm() callback that is used to confirm or reject the image upload. The image upload is rejected only if the Device Firmware Upgrade module has called the dfu_lock() function. You can find the header file of the dfu_lock() at the following path: src/util/dfu_lock.h. Before the image is received through the SMP, the Simple Management Protocol application module calls the lock function. Also, firmware updates through the Device Firmware Upgrade module are disabled until the nRF Desktop device is rebooted. The modification of the data in the secondary image slot, by any other application module during the ongoing DFU, would result in a broken firmware image that would be rejected by the bootloader.

The module periodically submits ble_smp_transfer_event while the image is being uploaded. Bluetooth LE latency module decreases the connection slave latency when it receives this event. This is done to speed up the data transfer.