Code: Select all
>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
>>> ap_if = network.WLAN(network.AP_IF)
>>> sta_if.active()
False
>>> ap_if.active()
False
>>> sta_if.active(True)
#4 ets_task(4020f4d8, 28, 3fff9428, 10)
>>> sta_if.isconnected()
False
>>> sta_if.connect('My WiFI', 'My Password')
>>> sta_if.isconnected()
True
>>> sta_if.disconnect()
>>> sta_if.active(False)
>>> ap_if.active(True)
#5 ets_task(4020f510, 29, 3fff9050, 10)
>>>
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x40100000, len 31088, room 16
tail 0
chksum 0x44
load 0x3ffe8000, len 1028, room 8
tail 12
chksum 0x1e
ho 0 tail 12 room 4
load 0x3ffe8410, len 824, room 12
tail 12
chksum 0x89
csum 0x89
MicroPython v1.12 on 2019-12-20; ESP module with ESP8266
Type "help()" for more information.
>>>