Blog > Embedded Engineering

Over-the-Air Firmware Updates: How to Design a Safe OTA System

Connected industrial devices receiving over-the-air updates

Introduction: Updates Are a Feature, Not an Afterthought

Connected devices need updates after they ship: security patches, bug fixes, new features and, increasingly, new AI models. Over-the-air (OTA) updates make that possible without a technician visit, but a poorly designed update system can do more harm than good. A single failed update can leave thousands of devices unusable.

This article explains how to design an OTA update system that is secure, recoverable and safe to roll out across a device fleet.

Why OTA Updates Fail

  • Power loss during writing to flash.
  • Network interruptions that leave a partial or corrupted download.
  • Incompatible images, such as firmware built for a different hardware revision.
  • Insufficient storage to hold the new image safely.
  • New firmware that boots but does not work, for example because it cannot reconnect to the network.

A good OTA design assumes all of these will happen at some point, and makes sure the device can always recover.

Choose an Update Architecture

A/B (dual-bank) updates keep two copies of the firmware. The new image is written to the inactive slot while the device keeps running from the active one. After verification, the bootloader switches slots, and it can switch back if the new image fails. This is the most robust approach, at the cost of extra storage.

Recovery-partition updates keep a small, stable recovery image that can always reinstall the main firmware. They use less storage but take longer to recover.

In-place updates overwrite the running firmware and depend heavily on the bootloader to recover from interruptions. They suit very storage-constrained microcontrollers but carry the most risk.

The right choice depends on your flash size, your operating system, whether an RTOS or embedded Linux, and how costly a failed device would be.

Secure the Update Chain

  • Sign every image and verify the signature on the device before installing it.
  • Use secure boot so the bootloader only runs firmware that passes verification.
  • Prevent rollback attacks by refusing older, vulnerable versions unless explicitly allowed.
  • Protect the transport with encrypted, authenticated connections, and encrypt images when they contain sensitive code or data.
  • Protect signing keys carefully, ideally in hardware security modules or equivalent controls.

Make Every Update Recoverable

A safe update follows a clear sequence: download to an inactive location, verify integrity and signature, switch to the new image, run a health check and only then confirm the update as permanent. If the health check fails, or the device does not confirm within a set time, a watchdog or bootloader rule returns it to the previous working version automatically.

Define what “healthy” means for your product: for example, the device boots, its main application starts and it reconnects to your cloud platform.

Roll Out in Stages

Never update an entire fleet at once. Release to a small group of internal or test devices first, then to a small percentage of the field fleet, and expand only while health metrics stay normal. Target updates by hardware revision and current version, and make it possible to pause or stop a roll-out instantly. The same discipline applies to AI model updates on edge devices.

Design for Your Constraints

Plan storage for OTA during hardware design, not after: A/B updates need room for two images. For devices on slow or metered connections, consider delta updates that only send what changed. For battery-powered devices, check the battery level before starting and schedule updates for times when the device is idle.

Test the Update Path Like Any Other Feature

Automate tests that cut power at different points during an update, interrupt the network, skip versions, attempt downgrades and install images built for the wrong hardware. Run these tests on real devices as part of your CI pipeline. The update path is the one feature you cannot fix in the field if it breaks.

Table of Contents

Conclusion: Design the Update System Before You Ship

A reliable OTA system combines the right update architecture, a secure chain of trust, automatic recovery, staged roll-outs and thorough testing. Building these into the first release costs far less than repairing devices that failed in the field.

Build Firmware You Can Update Safely

Our firmware engineers design bootloaders and OTA update systems that keep devices secure and recoverable in the field.

Blogs

Related Blogs

Engineer reviewing a circuit board design for manufacturing

PCB Design for Manufacturing: A DFM Checklist Before You Send Your Board to Fab

A practical design-for-manufacturing checklist for PCB designers: stack-up, footprints, assembly, test access, panelization and output...