Reverse Engineering the ESP32-C3 Wi-Fi Drivers for Static Worst-Case Analysis of Intermittently-Powered Systems
Ishwar Mudraje, Kai Vogelgesang, Jasper Devreker, Luis Gerhorst, Phillip Raffeck, Peter Wägemann, Thorsten Herfet
TL;DR
This work tackles the challenge of static worst-case energy analysis ($WCEC$) for intermittently powered devices by integrating an energy-aware networking stack with reverse-engineered ESP32-C3 Wi-Fi drivers. It develops a device-aware cost model and an ILP-based framework to bound energy and execution time, enabling provable progress even under power failures. The authors deliver an open-source ESP32-C3 Wi-Fi driver, combine it with the PfIP network stack, and demonstrate static analyzability using the Platin framework, illustrating that Wi‑Fi-based intermittent computing is feasible for batteryless devices. The results provide a concrete path toward reliable Wi-Fi communication in energy-harvesting IoT, with practical implications for resilient, power-constrained embedded systems.
Abstract
The Internet of Batteryless Things revolutionizes sustainable communication as it operates on harvested energy. This harvested energy is dependent on unpredictable environmental conditions; therefore, device operations, including those of its networking stack, must be resilient to power failures. Reactive intermittent computing provides an approach for solving this by notifications of impending power failures, which is implemented by monitoring the harvested energy buffered in a capacitor. However, to use this power-failure notification and guarantee forward progress, systems must break down tasks into atomic transactions that can be predictably finished before the energy runs out. Thus, static program-code analysis must determine the worst-case energy consumption (WCEC) of all transactions. In Wi-Fi-capable devices, drivers are often closed-source, which avoids the determination of WCEC bounds for transactions since static analysis requires all code along with its semantics. In this work, we integrate an energy-aware networking stack with reverse-engineered Wi-Fi drivers to enable full-stack WCEC analysis for physical transmission and reception of packets. Further, we extended a static worst-case analysis tool with a resource-consumption model of our Wi-Fi driver. Our evaluation with the RISC-V-based ESP32-C3 platform gives worst-case bounds with our static analysis approach for the transactions of the full communication stack, therefore showing that Wi-Fi-based reactive intermittent computing is feasible.
