Firmware and OTA updates: what to plan before production
Firmware is the part of a product that keeps changing after launch. This guide explains what to agree about the code, how firmware gets onto each unit in the factory, how over-the-air (OTA) updates work, and which security rules now apply to connected products.
Short answer: agree in writing who owns the firmware source code and the build tools, plan how every unit is programmed and given its own keys or serial number on the line, and design OTA updates with a safe fallback so a failed update cannot leave a product dead. If the product connects to the internet, plan for unique passwords, a way to report security problems and a stated support period: the UK and EU already require these or will soon.
Agree who owns what
- Source code and build environment: who receives them, when, and in what form. A repository you can build yourself is worth more than a binary file.
- Third-party code: chip vendor SDKs, open-source libraries and their licences, listed so you know your obligations.
- Signing keys: who holds the keys that sign production firmware, and how they are stored. Whoever holds them controls updates.
- Changes after launch: who fixes bugs, how changes are requested and how a new version is approved.
See how to protect your design for how to put this into the contract.
Firmware on the production line
Every unit has to be loaded with firmware and often given something unique. Plan this before the board layout is fixed:
- A programming connector or pads that a fixture can reach, so the product does not have to be opened.
- Unique data per unit: serial number, MAC address, device certificate or password, written and recorded during the functional test.
- Version control on the line: the test station checks that each unit runs the approved version.
- Read-out protection switched on, so the code cannot simply be copied from a finished product.
See production testing for electronics for how programming fits into the functional test.
Designing OTA updates
OTA updates let you fix bugs and add features after the product is sold, through a phone app, Wi-Fi or a cellular connection. A safe design has:
- Two firmware slots (A/B), or a protected bootloader, so the old version still runs if an update is interrupted.
- Signed updates and secure boot, checked by the device before installing and at every start, so only your firmware can run.
- Enough memory for two images plus growth. Choosing a chip with too little flash is the most common reason OTA is dropped late.
- Battery and power checks before an update starts.
- A staged rollout: update a small share of devices first and watch for problems.
- ARunning version 1The device works from slot A
- BDownload version 2Written to slot B while A keeps running
- Check the signatureOnly firmware signed with your key is accepted
- BRestart from slot BIf it starts correctly, version 2 is kept
If version 2 fails to start, the device goes back to version 1 in slot A by itself.
Security rules for connected products
| Market | Rule | What it asks for |
|---|---|---|
| United Kingdom | PSTI regime, since 29 April 2024 | No universal default passwords, a published way to report security issues, and a published minimum period of security updates |
| European Union | Radio Equipment Directive, since 1 August 2025 | Cybersecurity requirements for internet-connected radio equipment |
| European Union | Cyber Resilience Act | Reporting of actively exploited vulnerabilities and severe incidents since 11 September 2026; the main security requirements from 11 December 2027 |
These rules affect the hardware too: unique passwords and keys need secure storage, and a support period means you need a way to deliver updates. See electronics for wireless products for the radio side.
Common mistakes
- No update path at all on a connected product.
- One password or key for every unit.
- Leaving debug ports open in production firmware.
- Receiving only a binary and no way to rebuild it.
How we handle firmware
We write firmware for the product's controller and bring up the board, as agreed in the scope of work, and plan programming and test steps before the pilot run. Design and production stay in one company in Dongguan, so the firmware that is tested is the firmware that ships. If you are choosing a radio, try the wireless technology selector.
This guide is a planning aid, not legal advice. Confirm the requirements for your product with a test laboratory or compliance specialist.
Tell us about your product
Send a short description and an engineer replies within 1 business day after we confirm we have your request. Orders from 1 board.
Send your inquiry