IoT Worlds
iot over the air update
Software Development

Let’s start with IoT Over The Air Update (OTA)

When it comes to the OTA update process, the first thing that you need to understand is that there are three phases to it. The first phase is to define the model, and then you have the second phase of the process that deals with the development, and then the third phase is to implement the model in your code.

Processes and design

Over the Air (OTA) update technology is one of the most widely used ways to upgrade software on embedded devices. It enables firmware upgrades and other software updates to be installed on devices in the field. The process is generally carried out by sending data via wireless network to a cloud-based server.

There are many aspects of an OTA system that need to be considered. In addition to communication, an OTA system needs to be able to adapt to changing requirements, a process known as context awareness. Some components to consider are:

Security

As smart devices become more complex and more connected, they require more sophisticated security. One way to protect firmware updates over the air is to use a versioning system. This protects against firmware downgrades and enables multiple hardware models to use the same version.

Adaptability

Smart devices must be able to be updated in the field and be able to handle new standards, trends, and security concerns. For example, a smart watch must be able to detect user activities, detect routines, and detect user behaviors to help provide a more responsive experience.

Storage and communication

Flash memory is often used to store the software application. It contains the read-only data, and also modifiable portions of the program. When the OTA update process is complete, the table of contents (ToC) is updated to contain the new application information.

Compression

To improve performance, OTA update software may compress the binary file, which reduces the number of packets sent. However, this adds extra processing time. During the update process, a client device may need to write to flash memory. An OTA update framework provided by the vendor can simplify this task.

Caching

OTA update software can take three different approaches to caching. Full caching stores the entire new application in SRAM during the update process, minimizing the number of writes to flash memory. Other methods, such as no caching, eliminate the need for complex caching logic.

SSBL (Simple Link)

SimpleLink framework is an example of an OTA framework that leverages an existing software framework. During the OTA process, a SSBL program will verify the current application, determine the address, and branch to the application’s address.

Model consists of three phases

The Internet of Things (IoT) is an emerging technology that is capable of interconnecting massive numbers of heterogeneous smart devices. It is a potential solution for smart-cities, healthcare, industrial automation and complex data-driven applications. But to take advantage of IoT, IoT-based software and firmware updates are required.

The update process varies from node to node and from environment to environment. In some cases, nodes are implanted in humans or embedded in their surroundings. Other nodes are distributed over large geographic regions. This leads to a variety of challenges. For instance, the battery capacity of an IoT device is usually limited. Furthermore, the IoT nodes often communicate in low bandwidth channels. Consequently, they have to be designed in a way that does not waste energy.

Several over-the-air (OTA) techniques have been proposed. These include secure and reliable software and code updates, software extensions, and data dissemination. Among these, a particular model consists of three phases.

First, the base station creates a new firmware image. Next, the base station transmits the delta script to all nodes. Third, the nodes read the script and interpret it. Finally, the node executes the new firmware.

However, the delta script is only as useful as its distribution protocol. The most interesting part of the process is the multi-hop protocol used to distribute the script to all nodes.

To avoid redundant transmissions, OTAP protocols should employ energy-aware routing and other techniques. Moreover, a properly designed OTAP protocol should also address security. A faulty OTA program can adversely affect network performance. And in the long run, a failure to implement an OTA program could lead to a decrease in the lifespan of an IoT deployment.

Finally, the OTAO model should be able to deliver a new software app to the host. Moreover, a proper OTAO mechanism should be able to support simultaneous updating of different firmware versions. If a compression based approach is used, the decompression phase at the receiving node will consume a significant amount of energy. Therefore, the best OTAO solution should be able to reduce the number of nodes to update.

Memory requirements of the OTA library

In order to successfully implement an OTA update, a mechanism is needed to handle the diverse hardware and capabilities of IoT devices. The process also needs to be secure, and the system must accommodate different requirements for firmware updates over the air. Various approaches are possible.

For example, an OTA solution may use a dual copy approach. This method uses two copies of the application to ensure that no version is installed without the other. However, this strategy has a huge bandwidth and storage overhead, and requires a great amount of space. Another alternative is to deploy applications in containerized form.

For many embedded systems, an OTA update is a necessary part of the overall system design. These devices are often deployed in difficult locations, with limited power and features. When an OTA update fails, it is important to be able to roll back to the previous stable version.

Aside from ensuring that an update is atomic, it is also important to address the challenge of secure communications. An OTA solution should leverage cryptographic code signing, which assures that the new software only arrives from a trusted source. Hardware security modules can be used to store keys inside the device.

In an OTA update process, a new application is transferred from a server to the client device. The incoming application is then organized in memory. Some of the new application is pushed to SSBL, while other portions are stored in the flash memory. During an OTA update, the portion of the new application that is pushed to SSBL can be updated or removed.

To minimize the impact of a failed update on the device, it is important to perform an atomic update. Moreover, the OTA update software must be able to decrypt the bytes sent over the air. It will also need to perform packetizing. Using compression can reduce the number of packets, but this will add processing time.

Whether or not an OTA update is secure will depend on the overall architecture of the device. For example, sensors are highly constrained in both memory and transmission range.

Migrating to v3.0.0

Over the Air (OTA) update is a wireless delivery method of software upgrades for IoT devices. It allows users to select the devices they want to update and gives them the ability to manage the firmware updates from the AWS IoT platform for example. OTA updates can be performed on individual devices or in a group of devices.

The AWS IoT Over the Air Update Library enables you to define the application logic for firmware updates. The library provides HTTP and MQTT support, as well as Message Queumetry Transport and cryptographic verification.

Using the IoT over the air update is a quick and efficient way to deliver new firmware to a device. However, mishandling the OTA process can cause a temporary disruption, or it can put a device in an unrecoverable state. Therefore, it is important to be able to troubleshoot OTA updates and ensure they are functioning properly.

OTA is an essential component of an IoT system. However, sending OTA updates can be one of the riskiest actions a connected device can perform. Thankfully, Device Cloud helps to make OTA updates smooth and secure.

The Device Cloud tightly integrates with the Device OS. In addition to updating the Device OS, users can upgrade the firmware by USB or OTA. By using the simple APIs provided by the Device OS, you can tell the Device Cloud that your device is available to receive updates.

The device will receive the OTA update from the AWS IoT console. You can then monitor the status of the OTA job by navigating to Manage > Jobs in the AWS IoT console. If the OTA job is successfully executed, you will see a pop-up message.

To handle OTA updates, you can use the coreMQTT agent. This agent enables OTA Update functionality to run in the background. You can also create custom jobs with the OTA library.

You can choose to sign the firmware using Code Signing for AWS IoT. Alternatively, you can use mbedTLS. mbedTLS is a security feature included in the Amazon FreeRTOS SDK. There is also an updated version of DNS caching and TCP hang protection in the FreeRTOS library.

Do you need any help to implement OTA in IoT projects? Contact us!

Related Articles

WP Radio
WP Radio
OFFLINE LIVE