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: doc/esp8266wifi/readme.rst
+4-4
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ The last line will then print out the IP address assigned to the ESP module by `
78
78
79
79
Serial.println(WiFi.localIP());
80
80
81
-
If you don't see the last line but just more and more dots ``.........``, then likely name or password to the Wi-Fi network is entered incorrectl in the sketchy. Verify the name and password by connecting from scratch to this Wi-Fi network with a PC or a mobile phone.
81
+
If you don't see the last line but just more and more dots ``.........``, then likely name or password to the Wi-Fi network is entered incorrectly in the sketch. Verify the name and password by connecting from scratch to this Wi-Fi network with a PC or a mobile phone.
82
82
83
83
*Note:* if connection is established, and then lost for some reason, ESP will automatically reconnect to the last used access point once it is again back on-line. This will be done automatically by Wi-Fi library, without any user intervention.
84
84
@@ -165,7 +165,7 @@ BearSSL Client Secure and Server Secure
165
165
.. figure:: pictures/esp8266-client-secure.png
166
166
:alt:ESP8266 operating as the Client Secure
167
167
168
-
Secure clients and servers require siginificant amounts of additional memory and processing to enable their cryptographic algorithms. In general, only a single secure client or server connection at a time can be processed given the little RAM present on the ESP8266, but there are methods of reducing this RAM requirement detailed in the relevant sections.
168
+
Secure clients and servers require significant amounts of additional memory and processing to enable their cryptographic algorithms. In general, only a single secure client or server connection at a time can be processed given the little RAM present on the ESP8266, but there are methods of reducing this RAM requirement detailed in the relevant sections.
169
169
170
170
`BearSSL::WiFiClientSecure <bearssl-client-secure-class.rst>`__ contains more information on using and configuring TLS connections.
171
171
@@ -309,11 +309,11 @@ The tool crawls through all header and source files collecting information from
309
309
:alt:Example of documentation for station begin method by Doxygen
:alt:Example of documentation for station hostname propert by Doxygen
312
+
:alt:Example of documentation for station hostname property by Doxygen
313
313
314
314
If code is not annotated, you will still see the function prototype including types of arguments, and can use provided links to jump straight to the source code to check it out on your own. Doxygen provides really excellent navigation between members of library.
:alt:Example of documentation for UDP begin method (not annotaed in code)by Doxygen
317
+
:alt:Example of documentation for UDP begin method (not annotated in code)by Doxygen
318
318
319
319
Several classes of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ are not annotated. When preparing this document, `Doxygen <https://www.doxygen.nl/>`__ has been tremendous help to quickly navigate through almost 30 files that make this library.
Copy file name to clipboardExpand all lines: doc/esp8266wifi/station-examples.rst
+13-13
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
Station
4
4
-------
5
5
6
-
Example of connecting to an access point has been shown in chapter `Quick Start <readme.rst#quick-start>`__. In case connection is lost, ESP8266 will automatically reconnect to the last used access point, once it is again available.
6
+
Example of connecting to an access point has been shown in chapter `Quick Start <readme.rst#quick-start>`__. In case connection is lost, ESP8266 will automatically reconnect to the last used access point, once it is available again.
7
7
8
-
Can we provide more robust connection to Wi-Fi than that?
8
+
Can we provide a more robust connection to Wi-Fi than that?
9
9
10
10
Table of Contents
11
11
-----------------
@@ -19,7 +19,7 @@ Table of Contents
19
19
Introduction
20
20
~~~~~~~~~~~~
21
21
22
-
Following the example in `Quick Start <readme.rst#quick-start>`__, we would like to go one step further and made ESP connect to next available access point if current connection is lost. This functionality is provided with 'ESP8266WiFiMulti' class and demonstrated in sketch below.
22
+
Following the example in `Quick Start <readme.rst#quick-start>`__, we would like to go one step further and make the ESP connect to the next available access point if the current connection is lost. This functionality is provided with the 'ESP8266WiFiMulti' class and demonstrated in the sketch below.
23
23
24
24
.. code:: cpp
25
25
@@ -66,7 +66,7 @@ Following the example in `Quick Start <readme.rst#quick-start>`__, we would like
66
66
Prepare Access Points
67
67
~~~~~~~~~~~~~~~~~~~~~
68
68
69
-
To try this sketch in action you need two (or more) access points. In lines below replace ``primary-network-name`` and ``pass-to-primary-network`` with name and password to your primary network. Do the same for secondary network.
69
+
To try this sketch in action you need two (or more) access points. In the lines below replace ``primary-network-name`` and ``pass-to-primary-network`` with the name and password to your primary network. Do the same for the secondary network.
70
70
71
71
.. code:: cpp
72
72
@@ -83,7 +83,7 @@ You may add more networks if you have more access points.
83
83
Try it Out
84
84
~~~~~~~~~~
85
85
86
-
Now upload updated sketch to ESP module and open serial monitor. Module will first scan for available networks. Then it will select and connect to the network with stronger signal. In case connection is lost, module will connect to next one available.
86
+
Now upload the updated sketch to the ESP module and open a serial monitor. The module will first scan for available networks. Then it will select and connect to the network with a stronger signal. In case the connection is lost, the module will connect to the next one available.
87
87
88
88
This process may look something like:
89
89
@@ -93,14 +93,14 @@ This process may look something like:
93
93
Looking for WiFi ....... connected to sensor-net-2
94
94
Looking for WiFi .... connected to sensor-net-1
95
95
96
-
In above example ESP connected first to ``sensor-net-1``. ThenI have switched ``sensor-net-1`` off. ESP discovered that connection is lost and started searching for another configured network. That happened to be ``sensor-net-2`` so ESP connected to it. Then I have switched ``sensor-net-1`` back on and shut down ``sensor-net-2``. ESP reconnected automatically to ``sensor-net-1``.
96
+
In the above example the ESP connects first to ``sensor-net-1``. Then, after I have switched ``sensor-net-1`` off. The ESP discovers that the connection is lost and starts searching for another configured network. That happened to be ``sensor-net-2`` so the ESP connected to it. Then after I have switched ``sensor-net-1`` back on and shut down ``sensor-net-2``. The ESP reconnected automatically to ``sensor-net-1``.
97
97
98
-
Function ``monitorWiFi()`` is in place to show when connection is lost by displaying ``Looking for WiFi``. Dots ``....`` are displayed during process of searching for another configured access point. Then a message like ``connected to sensor-net-2`` is shown when connection is established.
98
+
Function ``monitorWiFi()`` is in place to show when connection is lost by displaying ``Looking for WiFi``. Dots ``....`` are displayed during the process of searching for another configured access point. Then a message like ``connected to sensor-net-2`` is shown when a connection is established.
99
99
100
100
Can we Make it Simpler?
101
101
~~~~~~~~~~~~~~~~~~~~~~~
102
102
103
-
Please note that you may simplify this sketch by removing function ``monitorWiFi()`` and putting inside ``loop()`` only ``wifiMulti.run()``. ESP will still reconnect between configured access points if required. Now you won't be able to see it on serial monitor unless you add ``Serial.setDebugOutput(true)`` as described in point `Enable Wi-Fi Diagnostic <readme.rst#enable-wi-fi-diagnostic>`__.
103
+
Please note that you may simplify this sketch by removing the function ``monitorWiFi()`` and putting inside ``loop()`` only ``wifiMulti.run()``. ESP will still reconnect between configured access points if required. Now you won't be able to see it on serial monitor unless you add ``Serial.setDebugOutput(true)`` as described in point `Enable Wi-Fi Diagnostic <readme.rst#enable-wi-fi-diagnostic>`__.
104
104
105
105
Updated sketch for such scenario will look as follows:
106
106
@@ -127,9 +127,9 @@ Updated sketch for such scenario will look as follows:
127
127
wifiMulti.run();
128
128
}
129
129
130
-
That's it! This is really all the code you need to make ESP automatically reconnecting between available networks.
130
+
That's it! This is really all the code you need to make ESP automatically reconnect between available networks.
131
131
132
-
After uploading sketch and opening the serial monitor, the messages will look as below.
132
+
After uploading the sketch and opening the serial monitor, the messages will look as below.
133
133
134
134
*Initial connection to sensor-net-1 on power up:*
135
135
@@ -198,8 +198,8 @@ After uploading sketch and opening the serial monitor, the messages will look as
198
198
Conclusion
199
199
~~~~~~~~~~
200
200
201
-
I believe the minimalist sketch with ``ESP8266WiFiMulti`` class is a cool example what ESP8266 can do for us behind the scenes with just couple lines of code.
201
+
I believe the minimalist sketch with ``ESP8266WiFiMulti`` class is a cool example of what the ESP8266 can do for us behind the scenes with just couple lines of code.
202
202
203
-
As shown in above example, reconnecting between access points takes time and is not seamless. Therefore, in practical applications, you will likely need to monitor connection status to decide e.g. if you can send the data to external system or should wait until connection is back.
203
+
As shown in the above example, reconnecting between access points takes time and is not seamless. Therefore, in practical applications, you will likely need to monitor connection status to decide e.g. if you can send the data to an external system or should wait until the connection is back.
204
204
205
-
For detailed review of functions provided to manage station mode please refer to the `Station Class <station-class.rst>`__ documentation.
205
+
For a detailed review of functions provided to manage station mode please refer to the `Station Class <station-class.rst>`__ documentation.
0 commit comments