ESP8266 Arduino


I have the ESP32 version of the Arduino libraries working just fine, however I notice there is a src folder for the ESP8266.

If I try it, it fails with:

1970-01-01 08:00:03 wcb: WiFi connected, IP
2019-06-11 10:05:26 dopoll: Subscriptions changed, reconnecting…
2019-06-11 10:05:26 mdashconnect: reconnecting to at
2019-06-11 10:05:26 mdashconnect: reconnecting to at
2019-06-11 10:05:27 conn_handshake: err 0xffffffff
2019-06-11 10:05:27 mdashconnect: reconnecting to at
2019-06-11 10:05:27 rmsock: s 0x3ffeef48, state 0, pcb 0x3ffefc54
2019-06-11 10:05:27 error_cb: err -13, arg 0x3ffeef48
2019-06-11 10:05:27 rmsock: s 0x3ffeef48, state 2, pcb 0
2019-06-11 10:05:27 mdashconnect: connect() error: 9

And then it keeps repeating. Any chance of knowing what this means (error 9)?



Yeah, the ESP8266 Arduino support is under development.
The reconnection logic is flaky.

The -9 you’re seeing is EBADF, but that comes from the connect() implementation on top of the low-level lwip API. What happens is that Lwip tcp_connect() call fails.

Bear with us, ESP8266 support will improve soon.
We’ve pushed version 1.0.27 which should fix the connection issue.
However, TLS, OTA and filesystem support are still pending.
Remote control (ability to specify custom functions and call them), MQTT, shadow should work just fine.

Do you have a specific project on ESP8266 or just experimenting?

Failed to use mDash with NodeMCU 1.0 (ESP8266)

Thanks! I noticed there was very little talk of ESP8266 support for Arduino.

I am really just evaluating the Mdash platform. We need a managed way of doing firmware OTA for both the ESP32 and ESP8266 and this looks Ideal. Only our rapid prototypes are done on Arduino and this time just happens to be the ESP8266. Support for the ESP-IDF is more important, but this will mainly be the ESP32 however the ESP8266 does get used from time to time.



Great, thanks for the background!