Skip to content

Commit 1eb0645

Browse files
lrmoreno007devyte
authored andcommitted
Improve the compatibility of the doc between Github and RTD... (esp8266#4800)
* Update requirements.txt * Update conf.py * Update libraries.rst * Update libraries.rst * Update libraries.rst * Update stack_dump.rst * Update client-examples.rst * Update readme.rst * Update readme.rst * Update server-class.rst * Update server-examples.rst * Update soft-access-point-class.rst * Update station-class.rst * Update station-examples.rst * Update udp-class.rst * Update udp-examples.rst * Update a04-board-generic-is-unknown.rst * Update readme.rst * Update readme.rst * Update readme.rst
1 parent 0f34bd8 commit 1eb0645

16 files changed

+40
-72
lines changed

doc/Troubleshooting/stack_dump.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Example:
5151
<<<stack<<<
5252

5353
The first number after ``Exception`` gives the cause of the reset. a
54-
full ist of all causes can be found :doc:`here <../exception_causes>`
54+
full ist of all causes can be found `here <../exception_causes.rst>`__
5555
the hex after are the stack dump.
5656

5757
Decode

doc/conf.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = []
34-
33+
extensions = [
34+
'nbsphinx',
35+
'sphinx.ext.mathjax',
36+
]
3537
# Add any paths that contain templates here, relative to this directory.
3638
templates_path = ['_templates']
3739

doc/esp8266wifi/client-examples.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ In case server's web address is incorrect, or server is not accessible, you shou
249249
Conclusion
250250
~~~~~~~~~~
251251

252-
With this simple example we have demonstrated how to set up a client program, connect it to a server, request a web page and retrieve it. Now you should be able to write your own client program for ESP8266 and move to more advanced dialogue with a server, like e.g. using `HTTPS <https://en.wikipedia.org/wiki/HTTPS>`__ protocol with the :doc:`Client Secure <client-secure-examples>` .
252+
With this simple example we have demonstrated how to set up a client program, connect it to a server, request a web page and retrieve it. Now you should be able to write your own client program for ESP8266 and move to more advanced dialogue with a server, like e.g. using `HTTPS <https://en.wikipedia.org/wiki/HTTPS>`__ protocol with the `Client Secure <client-secure-examples.rst>`__ .
253253

254254
For more client examples please check
255255

doc/esp8266wifi/readme.rst

+12-36
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ In the line ``WiFi.begin("network-name", "pass-to-network")`` replace ``network-
5151
.. figure:: pictures/wifi-simple-connect-terminal.png
5252
:alt: Connection log on Arduino IDE's Serial Monitor
5353

54-
alt text
5554

5655
How does it work? In the first line of sketch ``#include <ESP8266WiFi.h>`` we are including `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library. This library provides ESP8266 specific Wi-Fi routines we are calling to connect to network.
5756

@@ -95,8 +94,6 @@ ESP8266 module can operate as a station, so we can connect it to the Wi-Fi netwo
9594
.. figure:: pictures/esp8266-station-soft-access-point.png
9695
:alt: ESP8266 operating in the Station + Soft Access Point mode
9796

98-
alt text
99-
10097
The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ library provides wide collection of C++
10198
`methods <https://en.wikipedia.org/wiki/Method_(computer_programming)>`__ (functions) and `properties <https://en.wikipedia.org/wiki/Property_(programming)>`__ to configure and operate an ESP8266 module in station and / or soft access point mode. They are described in the following chapters.
10299

@@ -108,8 +105,6 @@ The `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP82
108105
.. figure:: pictures/doxygen-class-index.png
109106
:alt: Index of classes of ESP8266WiFi library
110107

111-
alt text
112-
113108
Chapters below describe all function calls (`methods <https://en.wikipedia.org/wiki/Method_(computer_programming)>`__ and `properties <https://en.wikipedia.org/wiki/Property_(programming)>`__ in C++ terms) listed in particular classes of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__. Description is illustrated with application examples and code snippets to show how to use functions in practice. Most of this information is broken up into separate documents. Please follow to access them.
114109

115110
Station
@@ -120,13 +115,11 @@ Station (STA) mode is used to get ESP module connected to a Wi-Fi network establ
120115
.. figure:: pictures/esp8266-station.png
121116
:alt: ESP8266 operating in the Station mode
122117

123-
alt text
124-
125118
Station class has several features to facilitate management of Wi-Fi connection. In case the connection is lost, ESP8266 will automatically reconnect to the last used access point, once it is again available. The same happens on module reboot. This is possible since ESP is saving credentials to last used access point in flash (non-volatile) memory. Using the saved data ESP will also reconnect if sketch has been changed but code does not alter the Wi-Fi mode or credentials.
126119

127-
:doc:`Station Class documentation <station-class>`
120+
`Station Class documentation <station-class.rst>`__
128121

129-
Check out separate section with :doc:`examples <station-examples>`.
122+
Check out separate section with `examples <station-examples.rst>`__.
130123

131124
Soft Access Point
132125
~~~~~~~~~~~~~~~~~
@@ -137,24 +130,22 @@ and connects them further to a wired network. ESP8266 can provide similar functi
137130
.. figure:: pictures/esp8266-soft-access-point.png
138131
:alt: ESP8266 operating in the Soft Access Point mode
139132

140-
alt text
141-
142133
The soft-AP mode is often used and an intermediate step before connecting ESP to a Wi-Fi in a station mode. This is when SSID and password to such network is not known upfront. ESP first boots in soft-AP mode, so we can connect to it using a laptop or a mobile phone. Then we are able to provide credentials to the target network. Once done ESP is switched to the station mode and can connect to the target Wi-Fi.
143134

144135
Another handy application of soft-AP mode is to set up `mesh networks <https://en.wikipedia.org/wiki/Mesh_networking>`__. ESP can operate in both soft-AP and Station mode so it can act as a node of a mesh network.
145136

146-
:doc:`Soft Access Point Class documentation <soft-access-point-class>`
137+
`Soft Access Point Class documentation <soft-access-point-class.rst>`__
147138

148-
Check out separate section with :doc:`examples <soft-access-point-examples>`.
139+
Check out separate section with `examples <soft-access-point-examples.rst>`__.
149140

150141
Scan
151142
~~~~
152143

153144
To connect a mobile phone to a hot spot, you typically open Wi-Fi settings app, list available networks and pick the hot spot you need. Then enter a password (or not) and you are in. You can do the same with ESP. Functionality of scanning for, and listing of available networks in range is implemented by the Scan Class.
154145

155-
:doc:`Scan Class documentation <scan-class>`.
146+
`Scan Class documentation <scan-class.rst>`__
156147

157-
Check out separate section with :doc:`examples <scan-examples>`.
148+
Check out separate section with `examples <scan-examples.rst>`__.
158149

159150
Client
160151
~~~~~~
@@ -164,10 +155,7 @@ The Client class creates `clients <https://en.wikipedia.org/wiki/Client_(computi
164155
.. figure:: pictures/esp8266-client.png
165156
:alt: ESP8266 operating as the Client
166157

167-
alt text
168-
169-
Check out separate section with :doc:`examples <client-examples>` / :doc:`list of functions
170-
<client-class>`
158+
Check out separate section with `examples <client-examples.rst>`__ / `list of functions <client-class.rst>`__
171159

172160
Client Secure
173161
~~~~~~~~~~~~~
@@ -177,11 +165,9 @@ The Client Secure is an extension of `Client Class <#client>`__ where connection
177165
.. figure:: pictures/esp8266-client-secure.png
178166
:alt: ESP8266 operating as the Client Secure
179167

180-
alt text
181-
182168
Secure applications have additional memory (and processing) overhead due to the need to run cryptography algorithms. The stronger the certificate's key, the more overhead is needed. In practice it is not possible to run more than a single secure client at a time. The problem concerns RAM memory we can not add, the flash memory size is usually not the issue. If you like to learn how `client secure library <https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/WiFiClientSecure.h>`__ has been developed, access to what servers have been tested, and how memory limitations have been overcame, read fascinating issue report `#43 <https://github.com/esp8266/Arduino/issues/43>`__.
183169

184-
Check out separate section with :doc:`examples <client-secure-examples>` / :doc:`list of functions <client-secure-class>`
170+
Check out separate section with `examples <client-secure-examples.rst>`__ / `list of functions <client-secure-class.rst>`__
185171

186172
Server
187173
~~~~~~
@@ -191,25 +177,23 @@ The Server Class creates `servers <https://en.wikipedia.org/wiki/Server_(computi
191177
.. figure:: pictures/esp8266-server.png
192178
:alt: ESP8266 operating as the Server
193179

194-
alt text
195-
196180
Clients connect to sever to send and receive data and access provided functionality.
197181

198-
Check out separate section with :doc:`examples <server-examples>` / :doc:`list of functions <server-class>`.
182+
Check out separate section with `examples <server-examples.rst>`__ / `list of functions <server-class.rst>`__.
199183

200184
UDP
201185
~~~
202186

203187
The UDP Class enables the `User Datagram Protocol (UDP) <https://en.wikipedia.org/wiki/User_Datagram_Protocol>`__ messages to be sent and received. The UDP uses a simple "fire and forget" transmission model with no guarantee of delivery, ordering, or duplicate protection. UDP provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
204188

205-
Check out separate section with :doc:`examples <udp-examples>` / :doc:`list of functions <udp-class>`.
189+
Check out separate section with `examples <udp-examples.rst>`__ / `list of functions <udp-class.rst>`__.
206190

207191
Generic
208192
~~~~~~~
209193

210194
There are several functions offered by ESP8266's `SDK <http://bbs.espressif.com/viewtopic.php?f=51&t=1023>`__ and not present in `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__. If such function does not fit into one of classes discussed above, it will likely be in Generic Class. Among them is handler to manage Wi-Fi events like connection, disconnection or obtaining an IP, Wi-Fi mode changes, functions to manage module sleep mode, hostname to an IP address resolution, etc.
211195

212-
Check out separate section with :doc:`examples <generic-examples>` / :doc:`list of functions <generic-class>`.
196+
Check out separate section with `examples <generic-examples.rst>`__ / `list of functions <generic-class.rst>`__.
213197

214198
Diagnostics
215199
-----------
@@ -271,7 +255,7 @@ Use this function to provide snapshot of Wi-Fi status in these parts of applicat
271255
Enable Wi-Fi Diagnostic
272256
~~~~~~~~~~~~~~~~~~~~~~~
273257

274-
By default the diagnostic output from Wi-Fi libraries is disabled when you call ``Serial.begin``. To enable debug output again, call ``Serial.setDebugOutput(true)``. To redirect debug output to ``Serial1`` instead, call ``Serial1.setDebugOutput(true)``. For additional details regarding diagnostics using serial ports please refer to :doc:`the documentation <../reference>`.
258+
By default the diagnostic output from Wi-Fi libraries is disabled when you call ``Serial.begin``. To enable debug output again, call ``Serial.setDebugOutput(true)``. To redirect debug output to ``Serial1`` instead, call ``Serial1.setDebugOutput(true)``. For additional details regarding diagnostics using serial ports please refer to `the documentation <../reference.rst>`__.
275259

276260
Below is an example of output for sample sketch discussed in `Quick Start <#quick-start>`__ above with ``Serial.setDebugOutput(true)``:
277261

@@ -314,25 +298,17 @@ To make the analysis easier, rather than looking into individual header or sourc
314298
.. figure:: pictures/doxygen-esp8266wifi-documentation.png
315299
:alt: Example of documentation prepared by Doxygen
316300

317-
alt text
318-
319301
The tool crawls through all header and source files collecting information from formatted comment blocks. If developer of particular class annotated the code, you will see it like in examples below.
320302

321303
.. figure:: pictures/doxygen-example-station-begin.png
322304
:alt: Example of documentation for station begin method by Doxygen
323305

324-
alt text
325-
326306
.. figure:: pictures/doxygen-example-station-hostname.png
327307
:alt: Example of documentation for station hostname propert by Doxygen
328308

329-
alt text
330-
331309
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.
332310

333311
.. figure:: pictures/doxygen-example-udp-begin.png
334312
:alt: Example of documentation for UDP begin method (not annotaed in code)by Doxygen
335313

336-
alt text
337-
338314
Several classes of `ESP8266WiFi <https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266WiFi>`__ are not annotated. When preparing this document, `Doxygen <http://www.stack.nl/~dimitri/doxygen/>`__ has been tremendous help to quickly navigate through almost 30 files that make this library.

doc/esp8266wifi/server-class.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ Other Function Calls
4646
4747
Documentation for the above functions is not yet prepared.
4848

49-
For code samples please refer to separate section with :doc:`examples <server-examples>` dedicated specifically to the Server Class.
49+
For code samples please refer to separate section with `examples <server-examples.rst>`__ dedicated specifically to the Server Class.

doc/esp8266wifi/server-examples.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ Enter provided IP address in a web browser. You should see the page served by ES
223223
.. figure:: pictures/server-browser-output.png
224224
:alt: Output from server in a web browser
225225

226-
alt text
227-
228226
The page would be refreshed every 5 seconds. Each time this happens, you should see a request from the client (your web browser) printed out on the serial monitor:
229227

230228
::
@@ -243,7 +241,7 @@ The page would be refreshed every 5 seconds. Each time this happens, you should
243241
What Else?
244242
~~~~~~~~~~
245243

246-
Looking on :doc:`client examples <client-examples>` you will quickly find out the similarities in protocol to the server. The protocol starts with a header that contains information what communication will be about. It contains what content type is communicated or accepted like ``text/html``. It states whether connection will be kept alive or closed after submission of the header. It contains identification of the sender like ``User-Agent: Mozilla/5.0 (Windows NT 6.1)``, etc.
244+
Looking on `client examples <client-examples.rst>`__ you will quickly find out the similarities in protocol to the server. The protocol starts with a header that contains information what communication will be about. It contains what content type is communicated or accepted like ``text/html``. It states whether connection will be kept alive or closed after submission of the header. It contains identification of the sender like ``User-Agent: Mozilla/5.0 (Windows NT 6.1)``, etc.
247245

248246
Conclusion
249247
~~~~~~~~~~
@@ -252,4 +250,4 @@ The above example shows that a web server on ESP8266 can be set up in almost no
252250

253251
If you like to try another server example, check out `WiFiWebServer.ino <https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiWebServer/WiFiWebServer.ino>`__, that provides functionality of toggling the GPIO pin on and off out of a web browser.
254252

255-
For the list of functions provided to implement and manage servers, please refer to the :doc:`Server Class <server-class>` documentation.
253+
For the list of functions provided to implement and manage servers, please refer to the `Server Class <server-class.rst>`__ documentation.

doc/esp8266wifi/soft-access-point-class.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,4 +224,4 @@ Optionally you can use function without any parameters that returns a ``String``
224224

225225
MAC address = 5E:CF:7F:8B:10:13
226226

227-
For code samples please refer to separate section with :doc:`examples <soft-access-point-examples>` dedicated specifically to the Soft Access Point Class.
227+
For code samples please refer to separate section with `examples <soft-access-point-examples.rst>`__ dedicated specifically to the Soft Access Point Class.

doc/esp8266wifi/station-class.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Table of Contents
4646

4747
Points below provide description and code snippets how to use particular methods.
4848

49-
For more code samples please refer to separate section with :doc:`examples <station-examples>` dedicated specifically to the Station Class.
49+
For more code samples please refer to separate section with `examples <station-examples.rst>`__ dedicated specifically to the Station Class.
5050

5151
Start Here
5252
~~~~~~~~~~

doc/esp8266wifi/station-examples.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Table of Contents
1919
Introduction
2020
~~~~~~~~~~~~
2121

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 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.
2323

2424
.. code:: cpp
2525
@@ -202,4 +202,4 @@ I believe the minimalist sketch with ``ESP8266WiFiMulti`` class is a cool exampl
202202

203203
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.
204204

205-
For detailed review of functions provided to manage station mode please refer to the :doc:`Station Class <station-class>` documentation.
205+
For detailed review of functions provided to manage station mode please refer to the `Station Class <station-class.rst>`__ documentation.

doc/esp8266wifi/udp-class.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ Multicast UDP
3333
3434
The ``WiFiUDP`` class supports sending and receiving multicast packets on STA interface. When sending a multicast packet, replace ``udp.beginPacket(addr, port)`` with ``udp.beginPacketMulticast(addr, port, WiFi.localIP())``. When listening to multicast packets, replace ``udp.begin(port)`` with ``udp.beginMulticast(WiFi.localIP(), multicast_ip_addr, port)``. You can use ``udp.destinationIP()`` to tell whether the packet received was sent to the multicast or unicast address.
3535

36-
For code samples please refer to separate section with :doc:`examples <udp-examples>` dedicated specifically to the UDP Class.
36+
For code samples please refer to separate section with `examples <udp-examples.rst>`__ dedicated specifically to the UDP Class.

doc/esp8266wifi/udp-examples.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ What I have entered is shown below:
171171
.. figure:: pictures/udp-packet-sender.png
172172
:alt: Testing UDP with packet sender
173173

174-
alt text
175-
176174
Now click *Send*.
177175

178176
Immediately after that you should see the following on ESP's serial monitor:
@@ -191,4 +189,4 @@ Conclusion
191189

192190
This simple example shows how to send and receive UDP packets between ESP and an external application. Once tested in this minimal set up, you should be able to program ESP to talk to any other UDP device. In case of issues to establish communication with a new device, use the `Packet Sender <https://packetsender.com>`__ or other similar program for troubleshooting
193191

194-
For review of functions provided to send and receive UDP packets, please refer to the :doc:`UDP Class <udp-class>` documentation.
192+
For review of functions provided to send and receive UDP packets, please refer to the `UDP Class <udp-class.rst>`__ documentation.

0 commit comments

Comments
 (0)