Device Firmware Updates

Device Firmware Update (DFU) is the procedure of upgrading the application firmware version on a device. It consists of two primary steps:

  1. Transferring the new firmware - A new firmware image is transferred to the device’s chip.

  2. Testing and booting - The bootloader then tests and boots the new firmware.

Note

The choice of bootloader affects how firmware updates can be performed (except for the nRF54H20 SoC where only the Software Updates for Internet of Things (SUIT) is supported). While bootloader features (such as out-of-the-box support) for various DFU methods may vary, it is recognized that:

  • MCUboot and its supporting libraries and middleware are flexible and support various protocols and methods for firmware updates. However, the extent of supported features, like USB-DFU class, may vary and should be confirmed with the latest MCUboot documentation or source code.

  • The nRF Secure Immutable Bootloader (NSIB) allows for firmware updates but might not include comprehensive support for all types of firmware updates compared to MCUboot.

This distinction is crucial for developing your firmware update strategy and selecting the appropriate bootloader for your device’s needs.

Regarding bootloader and application roles, the testing and booting process depends on the choice of bootloader and the application design. Generally, bootloaders support two types of updates:

  • Direct updates, with an in-place substitution of the image. In this case, the bootloader transfers the update image.

  • Background updates, where the updated image is obtained and stored by the application, but the update is completed by the bootloader after the device reboots.

In systems that use MCUboot, the application may be responsible for receiving update packages through Simple Management Protocol (SMP) and staging them for the bootloader. The relation can be explained as follows:

  • The bootloader manages the final steps of the DFU process and has ability to receive, verify, and activate either new or already-received firmware images.

  • The application manages firmware updates by receiving and staging new firmware or candidate images, especially when using SMP, and then prepares them for installation by the bootloader.

With DFUs, you can transfer the updated images to the device in two ways:

  • Wired, where updates are sent through a wired connection, like UART, or delivered by connecting a flash device.

  • Over-the-air (OTA), where updates are sent through a wireless connection, like Bluetooth® Low Energy.

Based on these criteria, the nRF Connect SDK offers support for the following DFU alternatives:

  • For sending updates to the receiving device:

    DFU methods for sending updates

    Method

    Description

    Supported transfer

    nRF Util

    Multi-purpose command line tool that can be used to send SMP-formatted updates to MCUmgr, among other things.

    Wired (SMP over UART or USB)

    Cloud interfaces

    Each cloud comes with its specific interface to send updates to devices from the cloud. See documentation for nRF Cloud, AWS FOTA or Azure FOTA.

    OTA (LTE, Wi-Fi)

    Command-line Tool

    Command line tool specifically for sending updates to the MCUmgr library.

    Wired (SMP over UART or USB) and OTA (SMP over Bluetooth LE)

    nRF Connect Device Manager

    Mobile application for sending SMP updates over Bluetooth LE; can also be used for other SMP functionality.

    OTA (SMP over Bluetooth LE)

    nRF Connect for Mobile

    General purpose mobile application that can be used for sending SMP updates over Bluetooth LE, among other things.

    OTA (SMP over Bluetooth LE)

    SMP Client

    SMP Client running on a microcontroller. For an example over Bluetooth LE, see Bluetooth: Central SMP Client. It can alternatively be implemented using the MCUmgr library.

    Wired (SMP over UART or USB) and OTA (SMP Client over Bluetooth LE)

  • For receiving updates on the device side:

    DFU methods for receiving updates

    Method

    Description

    Supported transfer

    MCUmgr

    Library in Zephyr that implements the Simple Management Protocol (SMP); used to receive or send updates over different protocols.

    Wired (SMP over UART or USB) and OTA (SMP over Bluetooth LE)

    DFU target

    Library in the nRF Connect SDK used to do DFU for data from any source.

    Data is provided by the application and it is up to the application to receive the updates. Transport is application-specific.

    FOTA download

    Library in the nRF Connect SDK that provides functions for downloading a firmware file as an upgrade candidate to the DFU target. The library is often used by IoT libraries, such as the nRF Cloud library.

    OTA (LTE, Wi-Fi)

For device-specific guides related to DFU, see the following pages:

Note

For the nRF54H20 SoC, see the SUIT: Device firmware update on the nRF54H20 SoC sample to perform a DFU over Bluetooth LE or UART. See the Device Firmware Update using SUIT page and its listed subpages for more information about the SUIT DFU procedure.

See the following user guides for an overview of topics related to general firmware updates with the nRF Connect SDK: