Skip to content

Commit 4b5606b

Browse files
committed
docs/network: esp8266: Update docs on WLAN constructor.
1 parent ee6fcc6 commit 4b5606b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/library/network.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,21 @@ For example::
235235
This class provides a driver for WiFi network processor in the ESP8266. Example usage::
236236

237237
import network
238-
# setup as a station
239-
nic = network.WLAN()
238+
# enable station interface and connect to WiFi access point
239+
nic = network.WLAN(network.STA_IF)
240+
nic.active(True)
240241
nic.connect('your-ssid', 'your-password')
241-
# now use socket as usual
242+
# now use sockets as usual
242243

243244
Constructors
244245
------------
245-
.. class:: WLAN()
246+
.. class:: WLAN(interface_id)
246247

247-
Create a WLAN driver object.
248+
Create a WLAN network interface object. Supported interfaces are
249+
``network.STA_IF`` (station aka client, connects to upstream WiFi access
250+
points) and ``network.AP_IF`` (access point, allows other WiFi clients to
251+
connect). Availability of the methods below depends on interface type.
252+
For example, only STA interface may ``connect()`` to an access point.
248253

249254
Methods
250255
-------

0 commit comments

Comments
 (0)