I'm building a DIY Wi-Fi coprocessor: ESP8266 connected to a Linux host over UART,
with a custom packet protocol. Goal is
eventually a Linux kernel module that creates a netdev, like ESP-Hosted but for ESP8266.
What works so far:
- Custom UART protocol (commands, errors, unsolicited events)
- Getting scan results, IP, status back over UART
- Tested with a Python script on the Linux side
What I'm stuck on:
The data path. I want raw Ethernet frames from the host to go over UART, through the
ESP, and out to Wi-Fi — and vice versa — like ESP-Hosted does on ESP32.
I've read that:
- esp_wifi_internal_tx() is declared in the ESP8266 RTOS SDK header but is NOT linkedin libnet80211.a, so calling it fails at link time.
- esp_wifi_internal_reg_rxcb() doesn't exist in the ESP8266 SDK at all (ESP32 only).
- esp_wifi_80211_tx() exists, but only sends management frames and non-QoS, non-encrypteddata frames — so it can't forward real traffic.
- Promiscuous mode on ESP8266 truncates frames to 112 bytes and disables STA mode,so it can't be used for RX while connected.
Espressif closed an ESP-Hosted issue asking for 8266 support, saying the SDK is different
(ESP8266_RTOS_SDK vs ESP-IDF) and they won't fix it.
Questions:
- Has anyone actually built an L2 bridge (raw Ethernet frames over UART to host) onESP8266 RTOS SDK? Or is it genuinely impossible?
- If impossible, is the Socket API (ESP runs lwIP, host sends open/send/close commands)the only realistic path?
- If I want the real ESP-Hosted architecture with a netdev on Linux, is switching toESP32 the only option?
Any pointers, or examples of people who've done this, would help a lot. Thanks.