Commit 426f326d authored by Chris Liechti's avatar Chris Liechti Committed by danicampora
Browse files

docs/wipy: Make wifi/wlan naming consistent with tutorial.rst.

parent 9142179f
......@@ -184,16 +184,16 @@ See :ref:`network.WLAN <network.WLAN>` and :mod:`machine`. ::
from network import WLAN
# configure the WLAN subsystem in station mode (the default is AP)
wifi = WLAN(mode=WLAN.STA)
wlan = WLAN(mode=WLAN.STA)
# go for fixed IP settings
wifi.ifconfig(config=('', '', '', ''))
wifi.scan() # scan for available networks
wifi.connect(ssid='mynetwork', auth=(WLAN.WPA2, 'mynetworkkey'))
while not wifi.isconnected():
wlan.ifconfig(config=('', '', '', ''))
wlan.scan() # scan for available networks
wlan.connect(ssid='mynetwork', auth=(WLAN.WPA2, 'mynetworkkey'))
while not wlan.isconnected():
# enable wake on WLAN
wifi.irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
wlan.irq(trigger=WLAN.ANY_EVENT, wake=machine.SLEEP)
# go to sleep
# now, connect to the FTP or the Telnet server and the WiPy will wake-up
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment