IOTAfy: An ESP32-Based OTA Firmware Management Platform for Scalable IoT Deployments †
Abstract
1. Introduction
1.1. The Challenge of Current Solutions
1.2. Contribution
2. Materials and Methods
2.1. System Architecture
2.1.1. The Central Management Server
- Database Design: To ensure portability, SQLite3 was selected [8]. The schema consists of three core tables: devices (storing identity and state), firmware_repo (storing binaries and checksums), and groups (orchestration for batch management).
2.1.2. Device-Side Implementation
2.1.3. Partition Table Design
2.2. Asynchronous OTA Workflow
- 1.
- Trigger/Polling: The update process is initiated either by a periodic timer or a manual event triggered by the authorized user. By default, the device is configured to poll the IOTAfy Server every 60 min, though users can enable or disable this automatic procedure via the server’s web interface. The system supports holistic remote device management, enabling targeted firmware control for individual devices or entire groups. Furthermore, the version control logic is agnostic to release chronology, supporting both upgrades and downgrades.
- 2.
- Handshake: The device sends a request containing its MAC address and current firmware version. This serves as a basic authentication mechanism, allowing the server to identify the device and determine if a specific update target exists in the database.
- 3.
- Response: The server verifies the device status. If an update is queued, it responds with the binary URL and an MD5 checksum for integrity verification.
- 4.
- Downloading: Upon receiving a valid update response, the application downloads the binary payload in chunks. This process is asynchronous; the device writes the data to the passive partition (e.g., app1) while continuing to execute critical tasks on the active partition (e.g., app0).
- 5.
- Verification: After the download completes, the firmware calculates the MD5 checksum of the written data and compares it with the signature provided by the server to ensure integrity [3].
- 6.
- Reboot & Switch: If validation succeeds, the otadata partition is updated to point to the new boot slot, and a system reboot is triggered.
- 7.
- Confirmation: Upon booting the new firmware, a self-test is performed. If successful, the firmware explicitly marks the new application as valid. If the WDT resets the device before this confirmation (due to a crash), the bootloader automatically reverts to the previous known-good firmware. Furthermore, in such an event, the system automatically disables the automatic update procedure to prevent recursive boot loops.
3. Results
3.1. Update Success Rate
3.2. Performance Metrics and Dual Core Analysis
Data Analysis
- Core 0 bore the burden of the network overhead (TCP/IP stack), peaking at 32% usage.
- Core 1, where the user application resides, maintained a low average load of 12%. This demonstrates that the device remained responsive to sensor inputs and local control logic even during the critical firmware download phase.
3.3. Comparative Cost and Time Analysis
- Manual Scenario: A technician must travel so as to get to the device, open the enclosure, connect his equipment via USB, flash the firmware, and verify the boot sequence. We estimate that the update/verification process takes an average of 3 min per device, excluding travel time.
- IOTAfy Scenario: The administrator uploads the firmware file once. The devices are being updated autonomously and in parallel.
4. Discussion
4.1. Scalability and Performance
4.2. Security Implications
4.3. Cost Analysis vs. Cloud Platforms
5. Conclusions
Future Work
- 1.
- Enhanced Security Chain of Trust: Integrating Secure Boot V2 and Flash Encryption to ensure that only digitally signed binaries from authorized administrators can be executed, thereby mitigating the risk of supply-chain attacks.
- 2.
- Protocol Optimization: Transitioning from the current HTTP-polling model to an MQTT-based “Push” architecture. This will significantly reduce bandwidth consumption and server load by eliminating unnecessary check-ins when no updates are pending.
- 3.
- Hardware Agnosticism: Abstracting the device-side library to support a wider range of microcontrollers, such as the STMicroelectronics STM32 series and the Raspberry Pi RP2040, enabling the management of heterogeneous IoT fleets within a single, unified user’s interface.
- 4.
- BLE-to-Cloud OTA Gateway: Expanding connectivity options to support ultra-low-power Bluetooth Low Energy (BLE) devices. Following the architectural insights provided by [14], we aim to develop a specialized BLE gateway. This gateway will bridge resource-constrained BLE sensors to the IOTAfy platform, enabling secure OTA capabilities for devices that lack native Wi-Fi or cellular connectivity while maintaining the power-efficiency benefits of the BLE protocol.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AWS | Amazon Web Services |
| BLE | Bluetooth Low Energy |
| CMS | Content Management System |
| CPU | Central Processing Unit |
| DIY | Do It Yourself |
| DSF | Context-dependent: often Distributed Service Framework |
| ESP-IDF | Espressif IoT Development Framework |
| HTTP | Hypertext Transfer Protocol |
| HTTPS | HyperText Transfer Protocol Secure |
| IoT | Internet of Things |
| LAMP | Linux + Apache + MySQL + PHP |
| MAC | Media Access Control Address |
| MD5 | Message-Digest Algorithm 5 |
| MQTT | Message Queuing Telemetry Transport |
| MQTTS | Message Queuing Telemetry Transport Secured |
| mTLS | mutual Transport Layer Security |
| NVS | Non-Volatile Storage |
| OTA | Over-the-Air |
| TCP/IP | Transmission Control Protocol / Internet Protocol |
| TLS | Transport Layer Security |
| UART | Universal Asynchronous Receiver-Transmitter |
| URL | Uniform Resource Locator |
| USB | Universal Serial Bus |
| vCPU | Virtual Central Processing Unit |
| WDT | Watchdog Timer |
| Wi-Fi | Wireless Fidelity |
References
- Din, I.U.; Guizani, M.; Hassan, S.; Kim, B.S.; Khan, M.K.; Atiquzzaman, M.; Ahmed, S.H. The Internet of Things: A review of enabled technologies and future challenges. IEEE Access 2018, 7, 7606–7640. [Google Scholar] [CrossRef]
- Eclipse Foundation. 2024 IoT & Embedded Developer Survey Report; Technical Report; Eclipse Foundation: Brussels, Belgium, 2024. [Google Scholar]
- Malumbres, V.; Saldana, J.; Berné, G.; Modrego, J. Firmware updates over the air via lora: Unicast and broadcast combination for boosting update speed. Sensors 2024, 24, 2104. [Google Scholar] [CrossRef] [PubMed]
- El Jaouhari, S.; Bouvet, E. Secure firmware Over-The-Air updates for IoT: Survey, challenges, and discussions. Internet Things 2022, 18, 100508. [Google Scholar] [CrossRef]
- Panagou, I.C.; Katsoulis, S.; Nannos, E.; Zantalis, F.; Koulouras, G. A comprehensive evaluation of IoT cloud platforms: A feature-driven review with a decision-making tool. Sensors 2025, 25, 5124. [Google Scholar] [CrossRef] [PubMed]
- Park, C.Y.; Lee, S.J.; Lee, I.G. Secure and Lightweight Firmware Over-the-Air Update Mechanism for Internet of Things. Electronics 2025, 14, 1583. [Google Scholar] [CrossRef]
- Chang, Y.H.; Wu, F.C.; Lin, H.W. Design and implementation of esp32-based edge computing for object detection. Sensors 2025, 25, 1656. [Google Scholar] [CrossRef]
- SQLite. SQLite. 2026. Available online: https://www.sqlite.org (accessed on 20 January 2026).
- PHP Group. PHP: Hypertext Preprocessor. 2026. Available online: http://www.php.net (accessed on 20 January 2026).
- Bootstrap Team. Bootstrap: The Most Popular HTML, CSS, and JS Library in the World. 2026. Available online: https://getbootstrap.com (accessed on 20 January 2026).
- Espressif Systems. ESP32 Technical Reference Manual (Version 5.6). 2025. Available online: https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf (accessed on 20 January 2026).
- Espressif Systems. ESP-IDF Programming Guide: Partition Tables. 2026. Available online: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/partition-tables.html (accessed on 20 January 2026).
- Barker, E. Recommendation for Key Management: Part 1–General; Technical Report NIST Special Publication 800-57 Part 1, Revision 5; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2020. [CrossRef]
- Koulouras, G.; Katsoulis, S.; Zantalis, F. Evolution of Bluetooth Technology: BLE in the IoT Ecosystem. Sensors 2025, 25, 996. [Google Scholar] [CrossRef]





| Name | Type | SubType | Offset | Size | Description |
|---|---|---|---|---|---|
| nvs | data | nvs | 0x009000 | 0x005000 | Non-Volatile Storage (WiFi credentials, configuration) |
| otadata | data | ota | 0x00E000 | 0x002000 | OTA data (boot slot selection flags) |
| app0 | app | ota_0 | 0x010000 | 0x1C0000 | Application Slot A (Active/Passive) |
| app1 | app | ota_1 | 0x1D0000 | 0x1C0000 | Application Slot B (Active/Passive) |
| spiffs | data | spiffs | 0x390000 | 0x070000 | File System (Static Data/Assets) |
| Cycle | Attempts | Successful | Failed | Failure Reason |
|---|---|---|---|---|
| 1 | 50 | 50 | 0 | - |
| 2 | 50 | 49 | 1 | Network Timeout |
| 3 | 50 | 48 | 2 | Power Loss (Simulated) |
| 4 | 50 | 49 | 1 | Network Timeout |
| 5 | 50 | 49 | 1 | Network Timeout |
| Metric | Value |
|---|---|
| Firmware Binary Size | 1.2 MB |
| Average Network Throughput | ∼180 KB/s |
| Download Time (HTTP Stream) | 6.8 s |
| Flash Writing & Validation Time | ∼11.0 s |
| Total Update Time per Device | 17.8 s |
| ESP32 Resource Utilization: | |
| Core 0 Load (Wi-Fi/IOTAfy Stack) | 32% (Peak) |
| Core 1 Load (Application/Sensors) | 12% (Average) |
| Server-Side Metrics: | |
| Server CPU Load (50 concurrent) | 16% (Single vCPU) |
| Database Query Time (SQLite3) | <5 ms |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Panagou, I.C.; Katsoulis, S.; Nannos, E.; Zantalis, F.; Koulouras, G. IOTAfy: An ESP32-Based OTA Firmware Management Platform for Scalable IoT Deployments. Eng. Proc. 2026, 124, 40. https://doi.org/10.3390/engproc2026124040
Panagou IC, Katsoulis S, Nannos E, Zantalis F, Koulouras G. IOTAfy: An ESP32-Based OTA Firmware Management Platform for Scalable IoT Deployments. Engineering Proceedings. 2026; 124(1):40. https://doi.org/10.3390/engproc2026124040
Chicago/Turabian StylePanagou, Ioannis Chrysovalantis, Stylianos Katsoulis, Evangelos Nannos, Fotios Zantalis, and Grigorios Koulouras. 2026. "IOTAfy: An ESP32-Based OTA Firmware Management Platform for Scalable IoT Deployments" Engineering Proceedings 124, no. 1: 40. https://doi.org/10.3390/engproc2026124040
APA StylePanagou, I. C., Katsoulis, S., Nannos, E., Zantalis, F., & Koulouras, G. (2026). IOTAfy: An ESP32-Based OTA Firmware Management Platform for Scalable IoT Deployments. Engineering Proceedings, 124(1), 40. https://doi.org/10.3390/engproc2026124040

