Skip to content

Device OTA Upgrade Design: From Chunking to Canary Release ​

OTA firmware upgrade diagram

Once devices are deployed in the field, firmware upgrade becomes an unavoidable challenge hanging overhead. A reliable OTA solution must answer three questions at once: the upgrade can be delivered, it won't brick the device, and a bad upgrade can be rolled back.

OTA Basic Flow ​

Key Design Points ​

  • Dual partition (A/B): the new firmware is written to the backup partition, and the boot partition is switched only after verification passes, so an interrupted upgrade won't brick the device;
  • Chunking and resumable transfer: under weak network conditions, download in fixed-size blocks and record completed block numbers, resuming from the breakpoint after a disconnection;
  • Signature verification: the firmware package must carry a hash and signature; the device discards it immediately if verification fails, preventing tampered firmware from being flashed;
  • Version negotiation: the device reports its current version, and the platform decides whether an upgrade is needed, supporting cross-version and forced upgrade policies.

Canary Release ​

Full-scale rollout is the main source of OTA incidents. The recommended cadence is staged pushes — "internal test devices → 5% → 30% → full rollout" — observing the failure rate and device reboot rate for each batch, with one-click pause when anomalies appear.

Implementation in FastBee ​

FastBee device-side firmware has built-in OTA capability: after a single-file firmware is uploaded on the platform, upgrade tasks are dispatched per device, and the device automatically completes download, verification, and reboot, with progress trackable in the device logs. For the partition table and boot logic on the ESP32/ESP8266 side, see the Device Development Documentation.

Last updated:

Recent Update

FastBee | fastbee.cn