You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/wifi/esp8266-driver/README.md
+91-4Lines changed: 91 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,97 @@ The Mbed OS driver for the ESP8266 WiFi module.
4
4
5
5
## Firmware version
6
6
7
-
ESP8266 modules come in different shapes and formats, but the most important factor is the firmware version in it. To make sure that the firmware in your module is compatible with Mbed OS, follow the [Update guide](https://developer.mbed.org/teams/ESP8266/wiki/Firmware-Update).
7
+
ESP8266 modules come in different shapes and formats, but the firmware version is the most important factor. To
8
+
make sure that the firmware in your module is compatible with Mbed OS, follow the
This driver supports AT firmware versions 1.3.0 to 1.7.0. We advise updating the
12
+
[AT firmware](https://www.espressif.com/en/support/download/at?keys=) to at least version 1.7.0.
8
13
9
14
## Restrictions
10
15
11
-
- The ESP8266 WiFi module does not allow the TCP client to bind on a specific port.
12
-
- Setting up a UDP server is not possible.
13
-
- The serial port does not have hardware flow control enabled. The AT command set does not either have a way to limit the download rate. Therefore, downloading anything larger than the serial port input buffer is unreliable. An application should be able to read fast enough to stay ahead of the network. This affects mostly the TCP protocol where data would be lost with no notification. On UDP, this would lead to only packet losses which the higher layer protocol should recover from.
16
+
* The ESP8266 Wi-Fi module does not allow the TCP client to bind to a specific port.
17
+
* Setting up a UDP server is not possible.
18
+
* The serial port does not have hardware flow control enabled by default. Additionally, the AT command set does not have a method for limiting the download rate. Therefore, downloading anything larger than the serial port input buffer is unreliable
19
+
unless you use [AT firmware](https://www.espressif.com/en/support/download/at?keys=) version 1.7.0 or later. With older
20
+
firmware, an application should be able to read fast enough to stay ahead of the network. This applies mostly to TCP
21
+
protocol, where data would be lost without notification. On UDP using all firmware versions, the higher-layer protocol should recover from packet loss.
22
+
23
+
## Mandatory configuration
24
+
25
+
 configuration assumes Arduino form factor. Please adjust according to your board. You can override parameters from your app config file.
26
+
27
+
At minimum, check the following configuration parameters:
28
+
29
+
```javascript
30
+
{
31
+
"name":"esp8266",
32
+
"config": {
33
+
"tx": {
34
+
"help":"TX pin for serial connection",
35
+
"value":null<-'D1' by default if Arduino, adjust based on your board
36
+
},
37
+
"rx": {
38
+
"help":"RX pin for serial connection",
39
+
"value":null<-'D0' by default if Arduino, adjust based on your board
"value":false<-Set to 'true'ifthis is the interface you are using
44
+
},
45
+
"socket-bufsize": {
46
+
"help":"Max socket data heap usage",
47
+
"value":8192<- Without HW flow control more is better. Once the limit is reached packets are
48
+
dropped - does not matter is it TCP or UDP.
49
+
}
50
+
}
51
+
}
52
+
```
53
+
54
+
## UART HW flow control
55
+
56
+
UART HW flow control requires you to additionally wire the CTS and RTS flow control pins between your board and your
57
+
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](https://os.mbed.com/platforms/ST-Nucleo-F429ZI/) board and
**Note:** Not all modules expose ESP8266's RTS and CTS pins, so choose modules carefully.
61
+
62
+
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:
63
+
64
+
```javascript
65
+
"target_overrides": {
66
+
"NUCLEO_F429ZI": {
67
+
"esp8266.rts":"PG_12",
68
+
"esp8266.cts":"PG_15"
69
+
}
70
+
```
71
+
72
+
### Example board pins
73
+
74
+
* TX: D1 (Arduino Uno Revision 3 connectivity headers)
75
+
* RX: D0 (Arduino Uno Revision 3 connectivity headers)
0 commit comments