File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff 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 -------
You can’t perform that action at this time.
0 commit comments