Over-the-air updates that can fail safely
An update path is the one feature you cannot add after the devices leave the building. We build it first, test it by breaking it, and hand it over documented.
Key characteristics
- You provide
- A board that boots and access to your cloud account
- You receive
- Bootloader, signing, update agent and rollout plan
- Tested by
- Pulling power mid-update and forcing failed self-tests
- Works with
- Bluetooth LE, Wi-Fi, cellular and wired links
Every connected product ships with bugs nobody has found yet, and some of them will matter: a sensor that drifts in one soil type, a radio setting that drains batteries in the cold, a security fix in a library you depend on. An over-the-air update path decides whether those become a release on a Tuesday or a truck roll to every customer. It also has to be in the first units you ship. A device that left the factory without a way to accept, verify and undo an update will never gain one.
We design and build that path for your device: the bootloader, the image signing, the agent that downloads and stores new images, the rules for testing and confirming them, and the rollout plan that decides which devices get a release first. Then we try hard to break it before your customers do.
What an update path has to do
An update is more than copying bytes into flash. A safe path does five things, and each one has to survive a power cut at any moment.
- Get the image to the device. Over Bluetooth LE from a phone or gateway, over Wi-Fi or cellular from a server, or over a wired link in the factory. The transport changes the time and cost of an update, not the rules below.
- Store it without touching the running version. The new image goes into a second slot while the device keeps working on the current one.
- Prove it came from you. The bootloader checks a cryptographic signature before it will run anything. An image signed with any other key is refused.
- Try it, then keep it or undo it. The device boots the new image in a test state. The application runs its self-test and confirms the image. If it never confirms, for example because it crashes on start, the bootloader goes back to the version that worked.
- Refuse to go backwards. Version and security counters stop someone from loading an older image that still has a vulnerability you fixed.
How we usually build it
For products built on microcontrollers our usual starting point is MCUboot, the open-source secure bootloader that the Zephyr RTOS and several vendor SDKs use. MCUboot supports images held in a primary and a secondary slot, swapping or overwriting between them, a test-then-confirm step with automatic revert, and downgrade prevention. Its imgtool signs images and stamps a version into the image header. On embedded Linux products the same ideas apply with A/B root file systems; see embedded Linux.
The choices that matter are specific to your hardware and your customers, so we make them with you and write them down:
| Decision | What drives it |
|---|---|
| Swap or overwrite | Swap keeps the old image for rollback; overwrite needs less time and flash but cannot revert on its own |
| Where the second slot lives | Internal flash if the image fits twice with room to grow, otherwise an external flash chip |
| Full or delta images | Delta images cut cellular data costs but add complexity on the device and in your build pipeline |
| Who triggers the update | The device on a schedule, a phone app, a gateway or your server |
| What counts as a healthy boot | Usually: the radio connects, sensors read sane values and the watchdog stays quiet for a set time |
Run your own numbers with the flash budget calculator and the over-the-air data cost calculator before you commit to a part or a data plan.
Rollouts, not releases
A signed image is only half the job. The other half is deciding which devices get it, and when. We set up staged rollouts: a small first wave on devices you can reach easily, a soak period while you watch update success, reconnects, crashes and battery readings, then larger waves until the whole fleet is offered the update. A halt rule is written down before the first wave starts, so nobody has to argue about it at 11 p.m. The staged rollout planner shows how wave sizes and soak times turn into days and devices at risk.
Example (fictional). Loamwick, a two-founder Denver startup, ships 40 LW-1 soil probes to a field trial. Each probe has 1 MB of flash split into a 48 KB bootloader, two 448 KB image slots and 80 KB of settings and logs. Version 1.1.0 fixes moisture readings that drift upward after 30 days in wet clay. It goes to Loamwick’s own 4 bench probes first, then 12 trial probes, then the remaining 24, with 48 hours between waves and a rule to halt if any probe rolls back or goes silent. Follow the whole story on the example project page.
How we test it
We do not call an update path finished because one update worked on a desk. Before handover we run, and record:
- Updates from the oldest version you still support, not only from the last one.
- Power pulled at points during the download, during the swap and during the first boot of the new image.
- A deliberately broken image that fails its self-test, to watch the device revert.
- Images signed with the wrong key and images with older version numbers, which must be refused.
- A slow or dropping link, to confirm downloads resume or restart cleanly.
These tests become part of your release checklist, so they run for every release after we leave. Our firmware release checklist is a free version of it.
What you receive
- A bootloader configuration and flash layout for each board revision you ship.
- A signing setup that keeps production keys off laptops, with a written procedure for releases and for a lost key. See firmware security.
- The on-device update agent and the server, gateway or phone side it talks to, or the integration with the update service you choose.
- A rollout plan with wave sizes, soak times, the signals to watch and the halt rule.
- Test records from the failure cases above, and documentation your own engineers can maintain. When you are ready to run releases yourself, documentation and onboarding covers the handover; if you would rather we keep shipping them, see sustaining releases.
Where to start
If your product already ships without an update path, start with a firmware review: we read your schematics, flash layout and code and tell you, in writing, what it would take to add one safely to new units and whether anything can be done for units already in the field. If you are still on prototypes, the update path becomes part of the build from week one. Either way, request a firmware review, or read more in the updates and releases section of Field Update.
Send us your board and your plan.
A firmware review reads your schematics, code, flash layout and update plan, and ends with a written plan: what to build first, what could go wrong in the field and how updates will reach your devices.
Or email sales@fumbar.com, or call (720) 675-4202.