[riot-notifications] [RIOT-OS/RIOT] esp8266: esp_wifi netdev driver (#10792)

Gunar Schorcht notifications at github.com
Sat Jan 19 15:24:50 CET 2019

Maybe, I give some more implementation details to understand why esp8266 WiFi cannot be used without the vendor `lwIP`.

Unfortunatly, esp8266 WiFi interface is a deep black bock, absolutely no API and no documentation. Even though there are some [experiments](https://github.com/ernacktob/esp8266_wifi_raw) from reverse enginieering to access the WiFi interface, there is no successful approach. Therefore, the WiFi interface can only be used with Espressif's SDK.

However, this SDK only provides only a high level API for WiFi access on top of the `TCP/IP` protocol stack which they realized with `lwIP` version 1.4. Their `lwIP` port realize the WiFi netif access. That's why their SDK completely depends  on their `lwIP` port.

That is, there is no chance to use the WiFi interface (neither module `esp_wifi` nor module `esp_now`) without using Espressif's SDK including their `lwIP` port which is incompatible with RIOT's `lwIP` package.

One further implementation detail. Since there are no low level API functions to send a frame or to receive a frame, the only chance to get module `esp_wifi` working was the trick to override the `lwIP`'s `ethernet_intput` function to catch incoming frames from the WiFi interface.
/** override lwIP ethernet_intput to get ethernet frames */
extern err_t __real_ethernet_input(struct pbuf *pb, struct netif* netif);

err_t __wrap_ethernet_input(struct pbuf *pb, struct netif* netif)
    ESP_WIFI_DEBUG("%p %p", pb, netif);
    _esp_wifi_recv_cb(pb, netif);
    return ERR_OK;
So what are the options:

1. We use the vendor scrap for esp8266 to be able to use the WiFi interface to get connectivity with the limitation that RIOT's `lwIP` package can't be used.

2. We keep the esp8266 implementation clean from the vendor scrap to avoid conflicts with RIOT's `lwIP` package but have no WiFi communication. But, using RIOT's `lwIP` package without network access has not worth.

IMHO, option 1 is much better than option 2.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190119/7153a03e/attachment-0001.html>

More information about the notifications mailing list