Building an open-source Wi-Fi MAC layer for the ESP32
The ESP32 is a low-cost microcontroller with Wi-Fi connectivity. Currently, the Wi-Fi MAC layer of the ESP32 is closed-source. This project aims to change that: by reverse engineering the hardware registers and software, we can build a networking stack that is open-source up to the hardware, instead of having to use the proprietary MAC layer.
This will improve security auditability, open up the possibility for features not supported in the proprietary implementation (for example, standards-compliant mesh networking), improve interoperability and make research into Wi-Fi networks with lots of nodes more affordable.
The source code is under the esp32-open-mac organisation on GitHub. There are currently two implementations:
- esp32-open-mac (we know it's confusing that one reference implementation has the same name as the overarching project, but bear with us) This is a reference implementation that demonstrates how the hardware works, written in C and Rust: the hardware abstraction and initialization is written in C; the MAC stack (parsing packets and deciding which packets to send when) is written in Rust. This relies on two FreeRTOS tasks; one to handle the hardware, one to handle the MAC stack.
- Ferris-on-Air (FoA): this is a reference implementation in pure async Rust. It builds on Embassy and the patches in the esp-hal we submitted to add support for the Wi-Fi peripheral.
If you want to help out with developing or want to contact us, feel free to join the Matrix room
- January 14, 2025 Entirely eliminating the FreeRTOS dependency
- December 27, 2024 'Liberating Wi-Fi on the ESP32 ' talk at 38th Chaos Communication Congress
- September 26, 2024 MAC RX filter on the ESP32
- August 6, 2024 'Reverse engineering the ESP32 Wi-Fi hardware' talk at the RIOT Summit 2024
- May 30, 2024 'Reversing the ESP32 Wi-Fi hardware' talk at Gulaschprogrammiernacht 22
- May 24, 2024 Reverse engineering ESP32 Wi-Fi driver: the road ahead
- March 29, 2024 Connecting the lwIP stack to our opensource ESP32 Wi-Fi driver
- December 23, 2023 Building a Faraday cage with data passthrough for ESP32 reverse engineering
- December 7, 2023 Unveiling secrets of the ESP32 part 2: reverse engineering RX
- December 6, 2023 Unveiling secrets of the ESP32: creating an open-source MAC layer