nRF9160: HTTP full modem update

The HTTP full modem update sample shows how to perform a full firmware update of the modem. The sample downloads a modem firmware signed by Nordic Semiconductor and then performs the firmware update of the modem.


An external flash memory with minimum 4MB of free space is required to perform a full modem update. Hence, only versions 0.14.0 and later of the nrf9160 DK support this sample as the prior versions do not have any external flash memory.

The sample proceeds as follows:

  1. It connects to a remote HTTP server to download a signed version of the modem firmware, using the FOTA download library.

  2. It writes the modem firmware to the external flash memory.

  3. It prevalidates the update if the firmware supports the prevalidation process.

  4. It then programs the update to the modem, using the Full modem firmware update from flash device library.

The current version of this sample downloads two different versions of the firmware, namely 1.2.1 and 1.2.2. The sample then selects the version which is currently not installed.


The sample supports the following development kit, version 0.14.0 or higher:

Hardware platforms


Board name

Build target

nRF9160 DK




The sample is configured to compile and run as a non-secure application on nRF91’s Cortex-M33. Therefore, it automatically includes the Secure Partition Manager that prepares the required peripherals to be available for the application.

You can also configure it to use TF-M instead of Secure Partition Manager.

Building and running

This sample can be found under samples/nrf9160/http_update/full_modem_update in the nRF Connect SDK folder structure.

See Building and programming an application for information about how to build and program the application.

The sample is built as a non-secure firmware image for the nrf9160dk_nrf9160_ns build target. Because of this, it automatically includes the Secure Partition Manager.

You can customize the firmware files downloaded by the sample through the following Kconfig options in the prj.conf file:


    It sets the hostname of the server where the updates are located.


    It sets the file name of the first firmware. It supports files encoded in the serialized .cbor format. See Serialization for additional information.


    It sets the version of the first firmware.


    It sets the file name of the second firmware. It supports files encoded in the serialized .cbor format. See Serialization for additional information.

See Configuring your application for more information on how to customize configuration options.


After programming the sample to the development kit, test it by performing the following steps:

  1. Start the application and wait for a prompt for pressing a button.

  2. Press the button to start the update procedure.

  3. Once the download is completed, the modem update procedure will begin automatically.

  4. Reset the development kit.

  5. Observe that the LED pattern has changed.


This sample uses the following nRF Connect SDK libraries:

It uses the following sdk-nrfxlib library:

It also uses the following Zephyr libraries: