diff options
author | Thomas Wenrich <twenrich@gmail.com> | 2021-06-13 16:23:53 +0200 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-06-17 18:48:17 +1000 |
commit | 364670ecf10b2f31e9a207bc440cfb731dcfa603 (patch) | |
tree | bc1abe1819e1d583da66a466c586d22e2402280e /docs/esp32 | |
parent | 060066804a4543e79c0bdc60a1221bb8628982e9 (diff) | |
download | micropython-364670ecf10b2f31e9a207bc440cfb731dcfa603.tar.gz micropython-364670ecf10b2f31e9a207bc440cfb731dcfa603.zip |
docs/esp32: Document WLAN "reconnects" config option.
Diffstat (limited to 'docs/esp32')
-rw-r--r-- | docs/esp32/quickref.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst index 1709891265..77c7027c40 100644 --- a/docs/esp32/quickref.rst +++ b/docs/esp32/quickref.rst @@ -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 ---------------- |