summaryrefslogtreecommitdiff
path: root/docs/esp8266/quickref.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/esp8266/quickref.rst')
-rw-r--r--docs/esp8266/quickref.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst
index b130ce65d..6f02da95d 100644
--- a/docs/esp8266/quickref.rst
+++ b/docs/esp8266/quickref.rst
@@ -49,11 +49,11 @@ The :mod:`esp` module::
Networking
----------
-The :mod:`network` module::
+The :class:`network.WLAN` class in the :mod:`network` module::
import network
- wlan = network.WLAN(network.STA_IF) # create station interface
+ wlan = network.WLAN(network.WLAN.IF_STA) # create station interface
wlan.active(True) # activate the interface
wlan.scan() # scan for access points
wlan.isconnected() # check if the station is connected to an AP
@@ -61,7 +61,7 @@ The :mod:`network` module::
wlan.config('mac') # get the interface's MAC address
wlan.ipconfig('addr4') # get the interface's IPv4 addresses
- ap = network.WLAN(network.AP_IF) # create access-point interface
+ ap = network.WLAN(network.WLAN.IF_AP) # create access-point interface
ap.active(True) # activate the interface
ap.config(ssid='ESP-AP') # set the SSID of the access point
@@ -69,7 +69,7 @@ A useful function for connecting to your local WiFi network is::
def do_connect():
import network
- wlan = network.WLAN(network.STA_IF)
+ wlan = network.WLAN(network.WLAN.IF_STA)
wlan.active(True)
if not wlan.isconnected():
print('connecting to network...')