Skip to content

Commit

Permalink
Connect Wifi to strongest AP
Browse files Browse the repository at this point in the history
  * do full channel scan
  * connect to strongest AP
  • Loading branch information
helgeerbe committed Feb 20, 2023
1 parent cb7874a commit 09942e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ void NetworkSettingsClass::setupMode()
dnsServer->stop();
dnsServerStatus = false;
if (_networkMode == network_mode::WiFi) {
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
WiFi.mode(WIFI_STA);
} else {
WiFi.mode(WIFI_MODE_NULL);
Expand Down

0 comments on commit 09942e8

Please sign in to comment.