The problem
Once an IoT deployment grows past a handful of devices, "plug in a USB cable and reflash" stops working. Real fleets update firmware over the air — but doing it safely is genuinely hard: a bad image can brick every device at once, an interrupted download can corrupt flash, and there is no technician on site to recover. ESP-IDF provides the building blocks (A/B OTA partitions, bootloader rollback, signature verification), yet students rarely see them orchestrated into a managed process. FirmwareFlow is that orchestration layer as a teaching and demonstration system. A device registry tracks firmware version, active partition (ota_0/ota_1), last check-in and update state per device. Releases live in a signed registry with pinned SHA-256 hashes. Rollouts proceed in canary phases with failure-rate gates, and if a device fails to boot the new image, the bootloader falls back to the previous partition automatically — the exact recovery behaviour production systems rely on. The dashboard makes every step visible: who is updating, who failed, who rolled back, and why a phase gate blocked.
Stores each release with version, size, changelog and its pinned SHA-256 hash; releases are signed with the ECDSA release key.
Follow the working sequence
How it works
- Firmware is built and signed with the release key; its SHA-256 hash is pinned in the registry alongside the changelog.
- The operator creates a campaign targeting a firmware version and the first canary phase (10% of the fleet) begins.
- Devices download the image in chunks over HTTP/MQTT; each device verifies the SHA-256 hash before marking the image valid.
- The device writes the image to the inactive OTA partition (ota_0 or ota_1) and reboots; the app must confirm itself after boot.
- If confirmation never arrives, the bootloader boots the previous partition instead — an automatic rollback, logged on the dashboard.
- Phase gates check the failure rate and soak time; only clean phases advance, and the operator can halt or roll back the fleet at any point.
- Interrupted downloads resume from the last chunk, so flaky links waste minimal airtime.
Tech stack:
- ESP-IDF OTA API (A/B partitions ota_0 · ota_1)
- HTML/CSS/JavaScript fleet dashboard
- HTTP chunked firmware delivery
- SHA-256 image verification
- ECDSA release signing (workflow)
- MQTT device status channel (design)
| Parameter | Value |
|---|---|
| OTA scheme | ESP-IDF A/B partitions (factory + ota_0 + ota_1) |
| Image verification | SHA-256 hash pinned in registry |
| Signing | ECDSA with offline release key (workflow documented) |
| Rollout phases | 10% → 50% → 100% (configurable) |
| Failure gate | Blocks advancement at ≥ 5% phase failures (design) |
| Demo fleet size | 26 devices (expandable schema) |
| Firmware sizes | Approximately 1.27–1.29 MB per release (design) |
| Rollback trigger | Failed boot confirmation → previous partition |
Project features
- [Fleet dashboard] Per-device table with firmware version, active OTA partition, last check-in, status (up-to-date / updating / failed / offline) and live progress bars.
- [Signed firmware registry] Releases with version, size, SHA-256 hash, changelog and signature state; release-candidate vs stable promotion workflow.
- [Staged rollouts] Canary phases (10% → 50% → 100%) with automatic failure-rate gates — a phase with ≥ 5% failures blocks advancement until resolved.
- [Automatic rollback] Failed boot verification reverts the device to its previous partition, matching ESP-IDF bootloader behaviour; the event log records it.
- [Halt and fleet rollback] Operator controls to stop a campaign mid-flight or roll the whole fleet back to the previous stable release.
- [Event log] Timestamped record of campaign creation, phase transitions, hash verifications, stalls, rollbacks and offline exclusions.
- [OTA resume] Interrupted downloads restart from the last received chunk instead of from zero, demonstrated in the device firmware.
- [Release pipeline guide] Documented six-step flow: build → sign → stage → rollout → verify → rollback.
What is included
- FirmwareFlow web app (fleet dashboard, registry, rollout console)
- ESP32 demo firmware with OTA update support and chunk-resume
- Device registry schema and seed data
- Release pipeline documentation (build → sign → stage → rollout → verify → rollback)
- Project report PDF (background, ESP-IDF OTA internals, rollout strategy, failure handling)
- PPT presentation for final review
- Viva Q&A preparation document (OTA partitions, rollback, signing, staged rollouts)
Limitations & prerequisites
- The demo runs against a simulated device fleet in the browser; connecting real ESP32 hardware needs the included firmware flashed and a reachable update server (procedure included).
- Signature verification is demonstrated as a workflow; production key management (HSM, key rotation) is out of scope.
- The 5% failure gate and soak times are design choices for teaching, not industry standards — the report says so.
- Delta updates (binary diffs) are not implemented; full images are transferred each release.
- No multi-tenant access control; it is a single-operator teaching console.
Frequently Asked Questions
How is this different from just uploading firmware with the Arduino IDE?
IDE upload is one device, one cable, no safety net. This manages a fleet: staged rollouts, hash verification, per-device state, failure gates, and automatic rollback when a device fails to boot the new image — the production OTA discipline.
What happens if a device loses power mid-update?
The new image is written to the inactive partition while the old one stays intact. On the next boot, if the new image never confirms itself, the bootloader falls back to the previous working partition automatically.
What does the signature actually protect against?
It proves the firmware came from the release key holder and was not modified in transit. The device checks the SHA-256 hash against the registry-pinned value before accepting the image.
Why staged rollouts instead of updating everything at once?
A bug that bricks devices is survivable at 10% and catastrophic at 100%. The canary phase plus the failure gate is how real fleets contain bad releases.
Can this manage my own ESP32 project?
Yes — the demo firmware's OTA client follows standard ESP-IDF patterns, and the documentation covers pointing it at your own update server.
Is this project suitable for a final-year project?
Yes — for Electronics, Computer Science and IoT programs. It demonstrates embedded systems, web dashboards, cryptography basics and release engineering in one build. Suitable for B.E./B.Tech final-year projects in Electronics, Computer Science and IoT & Embedded Systems.
Components & software requirements
- ESP-IDF OTA API (A/B partitions ota_0 · ota_1)
- HTML/CSS/JavaScript fleet dashboard
- HTTP chunked firmware delivery
- SHA-256 image verification
- ECDSA release signing (workflow)
- MQTT device status channel (design)
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.