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.
A good OTA design assumes all of these will happen at some point, and makes sure the device can always recover.
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.
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.
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.
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.
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.
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.