Open ywz978020607 opened 1 year ago
I believe "None" is used to force the code to go into AP. I've been wrong in the past so...
import wifimgr
wlan = wifimgr.get_connection()
if wlan is None: # <=========
print("Could not initialize the network connection.")
while True:
pass # you shall not pass :D
# Main Code goes here, wlan is a working network.WLAN(STA_IF) instance.
print("ESP OK")
Don't you test on esp8266? """ def do_connect(ssid, password): wlan_sta.active(True) if wlan_sta.isconnected(): return *True** # not None!!!!!