with the following code I can successfully establish a WiFi connection between my ESP8266 and my home Wlan.
However, it SEEMS to happen that after a certain time the WiFi connection gets lost.
Code: Select all
def WLan_verbinden(SSID, passwort): sta_wlan = network.WLAN(network.STA_IF) if not sta_wlan.isconnected(): sta_wlan.active(True) sta_wlan.connect(SSID, passwort) while not sta_wlan.isconnected(): pass return sta_wlan.isconnected()
I am wondering, what solutions are you using to restore a WiFi connection?
One solution I am currently thinking of: to use a timer-interrupt to call my function above from time-to-time.