diff --git a/networkconfig.py b/networkconfig.py index 03b64a9..f2b8bf6 100644 --- a/networkconfig.py +++ b/networkconfig.py @@ -45,6 +45,9 @@ def send_response(client, payload, status_code=200): def handle_root(client): global wlan_sta + wlan_sta.active(True) + ssids = sorted(ssid.decode('utf-8') for ssid, *_ in wlan_sta.scan()) + response_header = """\

@@ -55,25 +58,22 @@ def handle_root(client):
- - - + + """.format(ssid)) + response_variable = "\n".join(response_variable) + + response_footer = """\ - +
- WiFi Name - - + response_variable = [] + for ssid in ssids: + response_variable.append("""\ +
+ {0}
PasswordPassword: