.. | |||
ESP8266 | 2 years ago | ||
CMakeLists.txt | 1 year ago | ||
ESP8266Interface.cpp | 2 years ago | ||
ESP8266Interface.h | 3 years ago | ||
README.md | 3 years ago | ||
mbed_lib.json | 3 years ago | ||
nucleo_esp8266_hw_fc1.jpg | 3 years ago | ||
nucleo_esp8266_hw_fc2.jpg | 3 years ago |
The Mbed OS driver for the ESP8266 WiFi module.
ESP8266 modules come in different shapes and formats, but the firmware version is the most important factor. To make sure that the firmware in your module is compatible with Mbed OS, follow the Update guide.
This driver supports AT firmware versions 1.3.0 to 1.7.0. We advise updating the AT firmware to at least version 1.7.0.
mbed_lib.json configuration assumes Arduino form factor. Please adjust according to your board. You can override parameters from your app config file.
At minimum, check the following configuration parameters:
{ "name": "esp8266", "config": { "tx": { "help": "TX pin for serial connection", "value": null <- 'D1' by default if Arduino, adjust based on your board }, "rx": { "help": "RX pin for serial connection", "value": null <- 'D0' by default if Arduino, adjust based on your board }, "provide-default": { "help": "Provide default WifiInterface. [true/false]", "value": false <- Set to 'true' if this is the interface you are using }, "socket-bufsize": { "help": "Max socket data heap usage", "value": 8192 <- Without HW flow control more is better. Once the limit is reached packets are dropped - does not matter is it TCP or UDP. } } }
UART HW flow control requires you to additionally wire the CTS and RTS flow control pins between your board and your ESP8266 module. After this, remember to add the configuration option for flow control to your app configuration file. This example uses the ST NUCLEO-F429ZI board and ESPBee XBee Module.
Note: Not all modules expose ESP8266's RTS and CTS pins, so choose modules carefully.
Once you have your hardware set up, add a configuration like the following to your app configuration file. Arduino pins D1 and D0 are used as TX and RX:
"target_overrides": { "NUCLEO_F429ZI": { "esp8266.rts": "PG_12", "esp8266.cts": "PG_15" }
With these pictures only consider the green and yellow wires which are connected to ESP8266. The pink wire is for reset and the rest are for firmware update. TX and RX go through Arduino pins D1 and D0.
Note: Pull down GPIO15(ESPBee RTS) during startup to boot from flash, instead of firmware update or boot from SD card. Once the software is running, the same pin is used as the RTS pin: