docs/network: esp8266: Update docs on WLAN constructor.

This commit is contained in:
Paul Sokolovsky 2016-03-25 16:30:06 +02:00
parent ee6fcc6f91
commit 4b5606bc09
1 changed files with 10 additions and 5 deletions

View File

@ -235,16 +235,21 @@ For example::
This class provides a driver for WiFi network processor in the ESP8266. Example usage:: This class provides a driver for WiFi network processor in the ESP8266. Example usage::
import network import network
# setup as a station # enable station interface and connect to WiFi access point
nic = network.WLAN() nic = network.WLAN(network.STA_IF)
nic.active(True)
nic.connect('your-ssid', 'your-password') nic.connect('your-ssid', 'your-password')
# now use socket as usual # now use sockets as usual
Constructors Constructors
------------ ------------
.. class:: WLAN() .. class:: WLAN(interface_id)
Create a WLAN driver object. Create a WLAN network interface object. Supported interfaces are
``network.STA_IF`` (station aka client, connects to upstream WiFi access
points) and ``network.AP_IF`` (access point, allows other WiFi clients to
connect). Availability of the methods below depends on interface type.
For example, only STA interface may ``connect()`` to an access point.
Methods Methods
------- -------