diff --git a/main.py b/main.py index 313472c..819aa15 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ import networkconfig -wlan = networkconfig.check_connection() +wlan = networkconfig.get_connection() if wlan is None: print("Could not initialize the network connection.") while True: diff --git a/networkconfig.py b/networkconfig.py index 16c3033..22af648 100644 --- a/networkconfig.py +++ b/networkconfig.py @@ -16,7 +16,8 @@ wlan_sta = network.WLAN(network.STA_IF) server_socket = None -def check_connection(): +def get_connection(): + """return a working WLAN(STA_IF) instance or None""" global wlan_sta # First check if there already is any connection: