Skip to main content

Getting Started with the FOTA Service

This guide helps you get started with our Firmware Over-the-Air (FOTA) Updates service.

Requirements#

This guide is written for devices using the nRF9160 SiP. Devices using the nRF Cloud FOTA Service must be provisioned, but are not required to use MQTT.

Thingy:91 and nRF9160-DK devices are factory programmed with older versions of Asset Tracker v1 and modem firmware. In order to be able to use the nRF Cloud FOTA service to update them, you must first flash a version of Asset Tracker v1 or v2 (or any other nRF Cloud FOTA-enabled application) which is based on nRF Connect SDK v1.5.0 or higher. Examples are these precompiled images for the Thingy:91 and nRF9160 DK.

note

Additionally, devices consuming the nRF Cloud FOTA service via the REST API must also use modem firmware v1.3.x, which has its own hardware requirements as described in the release notes.

caution

It is not possible to use the nRF Cloud FOTA service to upgrade to modem firmware v1.3.x from any previous version.

Steps for Getting Started#

Devices may consume the FOTA Service either via MQTT or REST.

ProtocolAuthenticationKey Differences
MQTTMutual TLSRequires certificate- and cloud-provisioning.
RESTJSON Web Token (JWT)Requires cloud-provisioning, but not certificate-provisioning if FOTA will be used via the REST API only.
  1. Create the device certificates. Flashing them to your devices is optional if using the REST API only.

  2. Provision the devices to your account.

  3. Follow the steps in the relevant nRF Connect SDK docs:

    1. MQTT: FOTA support is included in the nRF Cloud library
    2. REST: use the nRF Cloud REST library to call the FOTA endpoints applicable to devices, that is, those which list "JSON Web Token" in their Authorization section (for example, FetchCurrentPendingFOTAJobExecution). For creating JSON Web Tokens, see the Authentication section of the REST API documentation.
  4. Enable FOTA on your devices. Note:

    1. Each device must indicate in its shadow that it is enabled for FOTA operations, which is also explained in the nRF Connect SDK docs for FOTA.
    2. As these libraries evolve, it is possible that devices will automatically configure FOTA without your having to explicitly set it, whether through the ProvisionDevices endpoint or for each device through the UpdateDeviceState endpoint.
  5. On nRFCloud.com:

    1. Go to the Device Management > Devices page. Select one or more devices that have enabled for FOTA.
    2. In the Actions menu above your devices, select Add to Group. Follow the instructions in the dialog to create a group and add your devices to it.
    3. Go to the Device Management > Firmware Updates page.
    4. In the Bundles card, click the three-dot menu and select New Bundle. Follow the instructions to upload your firmware.
    5. In the upper right of the Firmware Updates page, click Create Update. This will allow you to select your device group and firmware bundle for a FOTA update.
    6. When completed, click the Apply button.
    7. Watch the progress indicators to track the FOTA job execution(s).
  6. Optionally you may use the FOTA endpoints applicable to the aforementioned nRFCloud.com steps, for it merely provides a user interface for the same API.

Additional Resources#