kopia lustrzana https://github.com/tayfunulu/WiFiManager
Porównaj commity
4 Commity
b86a900cf5
...
8c2c3b1acf
Autor | SHA1 | Data |
---|---|---|
Tayfun ULU | 8c2c3b1acf | |
Tayfun ULU | f60cf8f5bb | |
Tayfun ULU | 92594fc085 | |
Colin Ng | 8e92966aec |
|
@ -94,6 +94,7 @@ def do_connect(ssid, password):
|
|||
print('.', end='')
|
||||
if connected:
|
||||
print('\nConnected. Network config: ', wlan_sta.ifconfig())
|
||||
wlan_ap.active(False)
|
||||
else:
|
||||
print('\nFailed. Not Connected to: ' + ssid)
|
||||
return connected
|
||||
|
@ -275,6 +276,7 @@ def start(port=80):
|
|||
|
||||
while True:
|
||||
if wlan_sta.isconnected():
|
||||
wlan_ap.active(False)
|
||||
return True
|
||||
|
||||
client, addr = server_socket.accept()
|
||||
|
@ -289,6 +291,13 @@ def start(port=80):
|
|||
except OSError:
|
||||
pass
|
||||
|
||||
# Handle form data from Safari on macOS and iOS; it sends \r\n\r\nssid=<ssid>&password=<password>
|
||||
try:
|
||||
request += client.recv(1024)
|
||||
print("Received form data after \\r\\n\\r\\n(i.e. from Safari on macOS or iOS)")
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
print("Request is: {}".format(request))
|
||||
if "HTTP" not in request: # skip invalid requests
|
||||
continue
|
||||
|
|
Ładowanie…
Reference in New Issue