closing AP after connection

disable AP mode after connection
master
Tayfun ULU 2022-12-31 12:10:22 +03:00 zatwierdzone przez GitHub
rodzic f60cf8f5bb
commit 8c2c3b1acf
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -94,6 +94,7 @@ def do_connect(ssid, password):
print('.', end='') print('.', end='')
if connected: if connected:
print('\nConnected. Network config: ', wlan_sta.ifconfig()) print('\nConnected. Network config: ', wlan_sta.ifconfig())
wlan_ap.active(False)
else: else:
print('\nFailed. Not Connected to: ' + ssid) print('\nFailed. Not Connected to: ' + ssid)
return connected return connected
@ -275,6 +276,7 @@ def start(port=80):
while True: while True:
if wlan_sta.isconnected(): if wlan_sta.isconnected():
wlan_ap.active(False)
return True return True
client, addr = server_socket.accept() client, addr = server_socket.accept()