Most, if not all, WiFi hardware relies on closed-source binary blobs including ESP32 wireless MCU, but there’s now work underway to reverse engineer a WiFi MAC layer for the ESP32 to make it a truly open-source platform.
Espressif ESP32 wireless microcontrollers already have an open-source framework (ESP-IDF) and toolchain, people can customize the code to some extent, but this excludes the wireless bits (Wi-Fi, Bluetooth, low-level RF functions) that are distributed as closed-source precompiled libraries integrated into the firmware. There were some efforts to provide an open-source stack for the BL602 chip but it never went anywhere, and the ESP32 may become the first target with an open-source driver without any blobs, excluding FPGA-based projects such as OpenWiFi.
The early-stage implementation currently supports the following features:
- Sending WiFi frames
- Receiving WiFi frames
- Send an ACK packet as a reply to packets that are sent to the ESP32
- Connect to an open access point & send UDP packets
- Hardware packet filtering based on MAC address
Note that the initialization (setup) code still relies on the closed-source proprietary code, but that’s still good progress, Other features that should be implemented soon include switching channels, changing the data rate, adjusting Tx power, and implementing an open-source WiFi hardware initialization sequence. Once it’s done the driver will be integrated into an open-source 802.11 MAC implementation.
Longer term, the following features would be worked on:
- Modem power saving: turning off the modem when not in use
- AMSDU, AMPDU, HT40, QoS
- Cryptography needed for WPA2 done in hardware instead of in software
- Bluetooth support
- Write SVD documentation for all reverse-engineered registers. An SVD file is an XML file that describes the hardware features of a microcontroller and makes it possible to automatically generate an API from the hardware description.
The project will enable developers to introduce new features and could be especially useful for WiFi Mesh (IEEE 802.11s) since the current implementation by Espressif Systems is rather limited. If you want to find out more about the reverse-engineering work, read the relevant blog post by Jasper Devreker (that’s a long read), and you’ll find the source code on GitHub as well.
Thanks to Zoobab for the tip.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.