sta must be active for scanning, print exception

pull/3/head
Thomas Waldmann 2017-12-12 02:48:03 +01:00
rodzic d0b8fadd84
commit 5945702683
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -33,6 +33,7 @@ def get_connection():
profiles = read_profiles()
# Search WiFis in range
wlan_sta.active(True)
networks = wlan_sta.scan()
AUTHMODE = {0: "open", 1: "WEP", 2: "WPA-PSK", 3: "WPA2-PSK", 4: "WPA/WPA2-PSK"}
@ -51,8 +52,8 @@ def get_connection():
if connected:
break
except OSError:
pass
except OSError as e:
print("exception", str(e))
# start web server for connection manager:
if not connected: