Over-the-air (OTA) software updates in embedded MCU based applications

Many MCU based embedded systems are used in a variety of IoT applications which are typically deployed in the field on a large scale. These devices coupled with the rapid software development cycle, cause many systems to require support for over-the-air (OTA) updates. In this process, an OTA update replaces the software and firmware on the microcontroller (MCU) of the embedded system with a new software and firmware.

An example of an MCU based application that may require OTA updates is shown in the figure below. In this example, a microcontroller (MCU) is connected to a radio and sensor, which could be used as an environmental monitoring system using the sensor collecting data about its surroundings and reporting them periodically using the radio. This portion of the system can be referred to as the edge node and is the target of OTA update. The remaining portion can be referred to as the provider of the new software or the server.

MCUs are generally used for overall lower overhead operations where low cost, low power running at low clock rates enable more battery efficient and cost effective devices as compared to application processors used in the same system design. Many embedded software applications employ a real-time operating system (RTOS) that run on top of MCU based systems, which allows the software to split concurrent tasks with different responsibilities in the system. In the figure above, the system may have RTOS tasks for reading sensor data, running algorithms to process the sensor data, and interfacing with the radio communication. The RTOS is primarily responsible for coordinating these tasks based on specific time-based delays or events.

Mender addresses MCU based updates using Update Modules with peripheral devices as the target of OTA updates. As compared to the figure above, this means the external MCU is another software component in the system that could reside on the same board as the processor (server), or it could be an external component that is connected to the wired device (edge node), for example over USB or a serial line.

An Update Module is a piece of user-written code that defines how the Mender client installs an update to a device. They are customizable and can be written in any programming language, so it can be tailored to meet the specific needs of a device or environment. Mender comes with reference Update Modules for the most common application package types: Docker containsers, .deb packages, .rpm packages, .Files and directories.

Figure below illustrates rootfs image file, package and other custom updates for software and firmware deployment to peripheral components and/or devices such as microcontrollers (MCU), sensor processors, storage devices, cameras, etc.

The benefit of using Update Modules to do MCU based OTA updates as a connected peripheral device is to provide the flexibility in deploying various smaller size application based updates without the need for larger size full image system updates. So by only updating the application, the downtime and network usage during the update is kept to a minimum.

Learn more with a tutorial on How to do a proxy deployment to an FRDM-K64F device connected to a Raspberry Pi 3. Also, see how to use the Device Firmware Update (DFU) USB class in Zephyr Project 2 using a FRDM-K64F 1 board as target.

Recent articles

Enhancing Sustainability in Oil & Gas: Tackling Methane Emissions with Cutting-Edge Solutions

Enhancing Sustainability in Oil & Gas: Tackling Methane Emissions with Cutting-Edge Solutions

The oil and gas industry faces a crucial environmental challenge in pursuit of a greener and more sustainable future: reducing methane emissions.
CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 is an account-takeover vulnerability in Mender Enterprise which was fixed in versions 3.6.4 and 3.7.4.
The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The critical question for the automotive industry is: how can you shorten the time to market and innovate faster in software and AVs to meet more demanding customer requirements?
View more articles

Learn more about Mender

Explore our Resource Center to discover more about how Mender empowers both you and your customers with secure and reliable over-the-air updates for IoT devices.