Skip to content

Commit

Permalink
docs/esp32: Document WLAN "reconnects" config option.
Browse files Browse the repository at this point in the history
  • Loading branch information
twenrich authored and dpgeorge committed Jun 17, 2021
1 parent 0600668 commit 364670e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/esp32/quickref.rst
Expand Up @@ -102,6 +102,14 @@ Once the network is established the :mod:`socket <usocket>` module can be used
to create and use TCP/UDP sockets as usual, and the ``urequests`` module for
convenient HTTP requests.

After a call to ``wlan.connect()``, the device will by default retry to connect
**forever**, even when the authentication failed or no AP is in range.
``wlan.status()`` will return ``network.STAT_CONNECTING`` in this state until a
connection succeeds or the interface gets disabled. This can be changed by
calling ``wlan.config(reconnects=n)``, where n are the number of desired reconnect
attempts (0 means it won't retry, -1 will restore the default behaviour of trying
to reconnect forever).

Delay and timing
----------------

Expand Down
1 change: 1 addition & 0 deletions docs/library/network.WLAN.rst
Expand Up @@ -129,4 +129,5 @@ Methods
authmode Authentication mode supported (enumeration, see module constants)
password Access password (string)
dhcp_hostname The DHCP hostname to use
reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited)
============= ===========

0 comments on commit 364670e

Please sign in to comment.