本来是能正常连接wifi的,突然就连不上了,报错run connect failed.
sta.isconnected()返回false
使用示例代码的sta.active(1),报错:network(rt_smart) not support set active state
用的是01Studio的k230
def Connect_WIFI(ID,PASSWORD):
sta=network.WLAN(0)
if(not sta.isconnected()):
# sta连接ap
sta.connect(ID,PASSWORD)
# 查看是否连接
return sta.isconnected()