Summary
Support firmware self-update from an SD card at boot. Place airhound.bin on the SD card, insert it, and the device flashes itself. Simple but effective for field-deployed sensors without network connectivity.
Inspired by ESP32DualBandWardriver's SD card OTA update mechanism.
Design
- On boot, check SD card root for
airhound.bin (or versioned: airhound-v1.2.3.bin)
- Verify firmware image integrity (SHA-256 checksum, or signature for supply-chain safety)
- Flash to the inactive OTA partition (ESP-IDF A/B partition scheme for rollback safety)
- Mark new partition as boot target
- Delete or rename the
.bin file to prevent reflash loop
- Reboot into new firmware
Progress Indication
- M5StickC: Display flash progress (percentage bar)
- XIAO: LED blink pattern during flash
- Both: Serial log output for debugging
Hardware Requirements
- Requires SD card slot — not all boards have one natively
- XIAO ESP32-S3 has microSD via expansion board
- M5StickC Plus2 does not have SD (would need external SPI SD module)
- SPI SD card driver needed (or SDMMC on supported chips)
Safety
- A/B OTA partitions ensure rollback if new firmware fails to boot
- Checksum verification prevents flashing corrupt images
- Optional: require a signature file (
airhound.bin.sig) for verified updates
- Boot count watchdog: if new firmware crashes N times, revert to previous
Relates To
Summary
Support firmware self-update from an SD card at boot. Place
airhound.binon the SD card, insert it, and the device flashes itself. Simple but effective for field-deployed sensors without network connectivity.Inspired by ESP32DualBandWardriver's SD card OTA update mechanism.
Design
airhound.bin(or versioned:airhound-v1.2.3.bin).binfile to prevent reflash loopProgress Indication
Hardware Requirements
Safety
airhound.bin.sig) for verified updatesRelates To