File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,14 @@ Once the network is established the :mod:`socket <usocket>` module can be used
102
102
to create and use TCP/UDP sockets as usual, and the ``urequests `` module for
103
103
convenient HTTP requests.
104
104
105
+ After a call to ``wlan.connect() ``, the device will by default retry to connect
106
+ **forever **, even when the authentication failed or no AP is in range.
107
+ ``wlan.status() `` will return ``network.STAT_CONNECTING `` in this state until a
108
+ connection succeeds or the interface gets disabled. This can be changed by
109
+ calling ``wlan.config(reconnects=n) ``, where n are the number of desired reconnect
110
+ attempts (0 means it won't retry, -1 will restore the default behaviour of trying
111
+ to reconnect forever).
112
+
105
113
Delay and timing
106
114
----------------
107
115
Original file line number Diff line number Diff line change @@ -129,4 +129,5 @@ Methods
129
129
authmode Authentication mode supported (enumeration, see module constants)
130
130
password Access password (string)
131
131
dhcp_hostname The DHCP hostname to use
132
+ reconnects Number of reconnect attempts to make (integer, 0=none, -1=unlimited)
132
133
============= ===========
You can’t perform that action at this time.
0 commit comments