Firmware Over-the-Air (FOTA) via Narrowband IoT (Part 1/2 - Basics)

Christian Pereira
Christian Pereira – Chief Operating Officer
In the Internet of Things “IoT,” the ability to subsequently update software on IoT devices is mandatory. By doing so, it is possible to retroactively fix bugs, roll out new functionalities, and last but not least, for cybersecurity reasons. This two-part article discusses the specifics of Firmware Over-the-Air (FOTA) in the Narrowband IoT (NB-IoT) mobile service.

Symbolization of FOTA: Blue globe with a visualization of connectivity

Why write this article?

FOTA is a regular, useful requirement in IoT systems. This article is intended to convey a good understanding of the systems involved in FOTA, as well as the challenges and implementation options.

What is firmware?

In the Internet of Things, “embedded systems” are used in a variety of application areas. For example, in electronic medical devices, washing machines, airplanes, automobiles, refrigerators, televisions, DVD players, set-top boxes, routers, cell phones, or in entertainment electronics devices in general. The term “embedded system” is used to describe electronic computers that are integrated (embedded) in a technical context. In this context, the computer either performs monitoring, control or regulation functions, or is responsible for some form of data or signal processing. This is the case, for example, with encryption and decryption, coding or decoding, or filtering. In practice, one finds a variety of otherwise autonomous embedded systems being connected, for example in vehicles or airplanes.

Embedded systems are often tailored for special tasks. An optimized, mixed hardware-software implementation is usually chosen for this. Here, the great flexibility of a software is combined with the performance of the hardware. The software is used both to control the system itself and to enable the system to interact with the outside world via defined interfaces or protocols (e.g. Modbus, CAN bus, ZigBee for wireless communication or IP via Ethernet).

As previously selected hardware, especially out in the field, cannot be easily modified, the embedded software, also known as firmware, is of particular importance. The firmware required for the device is usually flashed onto the device during the production process via interfaces designed for this purpose. So-called “bed of nails adapters” are used for this and are also used to support and carry out the final tests on the production line. This allows IoT devices to be tested in the manufacturing process with regard to the function of the overall system consisting of hardware and software.

It should be noted that further development and maintenance of the firmware normally takes place after the completion of product development. This is done in order to correct subsequently identified errors, to enable new or modified functions of the device or also to correct newly discovered security vulnerabilities - so-called zero day exploits. This usually results in a versioning of the firmware, which has to be rolled out, i.e. installed, on newly manufactured hardware and on hardware already in use.

Installing the new firmware is not a challenge for newly manufactured devices, because for these devices the latest version of the firmware is simply uploaded during the production process. However, no physical access is available to the devices in the field anymore, and this is where Firmware Over-the-Air (FOTA) for wirelessly connected devices comes into play.

What is FOTA?

Firmware Over-the-Air (FOTA) refers to the uploading of system software firmware to a terminal device. End devices that support this functionality are called “FOTA-compatible”. In this process, a new version of the firmware is provided centrally and transferred to the corresponding devices via a wireless connection. The new firmware is stored on the device in such a way that it runs on the device after a restart (“reboot”) of the hardware.

In order to be able to use FOTA, it is therefore not only necessary for the transmission to function error-free and completely, but the boot process must also be supported by the end device and the firmware that has already been uploaded. The systems must be able to ensure reception of the new firmware and the subsequent installation. Support from the mobile network operator is not necessary for this on-device process.

Various standards have already been developed and agreed for the over-the-air transmission of a new firmware, including OMA-DM from the Open Mobile Alliance (OMA).

After invoking a function called “update service”, for example, the new firmware is transferred via the radio interface and then installed. During this process, it may be necessary to reboot the terminal or re-register the SIM card.

What are the firmware components on NB-IoT modems?

On the NB-IoT modem there is software for different tasks:

  • First, the modem firmware, which enables the basic function of the modem. Here, primarily the protocols for communication via mobile connectivity and basic functions such as management of the overall system consisting of processor, radio modem and memory.
  • Second - usually - an operating system that supports and simplifies the use of functions.
  • And thirdly, the application software with which the specific device functions are programmed and produced.

When FOTA is discussed, in most cases it implicitly refers to the transfer of application firmware. Application firmware includes the device’s specific business program code, the Edge SDK, and other third-party components. For example, in the case of the Nordic NB-IoT modem we frequently use, these include NCS and Zephyr.

The modem firmware is not part of the application firmware and mostly not FOTA compliant. Updating the modem firmware often has to be handled differently according to fixed instructions from the manufacturer. For the Nordic modem used by grandcentrix, there are instructions for this “nRF9160Modem Updates”.

What are the challenges with FOTA updates in NB-IoT?

As described elsewhere, the many benefits of NB-IoT (global availability, high building penetration, low-power operation) are offset by the burdens of a narrowband radio link that allows only low transmission speeds. In particular, since the available bandwidth in a radio cell is shared by all NB-IoT participants in the cell. As a result, with many devices in a cell, the full, theoretical bandwidth is not always available. What is particularly challenging, however, is that NB-IoT devices are often deployed in a low-power manner. If the devices are in NB-IoT energy saving modes such as PSM or eDRX, these devices are not always accessible. In these modes, the devices are “sleeping” and cannot be easily accessed by the network. In these cases, it is necessary to monitor when the devices wake up, because only then are there corresponding time windows in which the devices can be addressed.

This circumstance requires appropriate device management, which determines the need for firmware updates for devices, monitors their status in terms of accessibility, then starts the FOTA process and ensures successful completion.

This article was dedicated to the systems involved and also the challenges of FOTA in NB-IoT in principle. In the second part of the article, we will address what needs to be considered in practice for FOTA and what support grandcentrix offers for FOTA in NB-IoT.