Robust / (un)stable WiFi connection

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 15
Joined: Sat Oct 29, 2016 2:29 pm

Robust / (un)stable WiFi connection

Post by BigMan » Sat Dec 17, 2016 10:31 am


with the following code I can successfully establish a WiFi connection between my ESP8266 and my home Wlan.

Code: Select all

def WLan_verbinden(SSID, passwort):
    sta_wlan = network.WLAN(network.STA_IF)
    if not sta_wlan.isconnected():
        sta_wlan.connect(SSID, passwort)
        while not sta_wlan.isconnected():
    return sta_wlan.isconnected()
However, it SEEMS to happen that after a certain time the WiFi connection gets lost.
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.

Post Reply