arduino-esp32/libraries/WiFi/src
Jiri Drozd 3253de8792
added scan_method = WIFI_ALL_CHANNEL_SCAN into wifi config in WiFi.begin() to let the scan choose the nearest / strongest AP in case that there are multiple APs with the same SSID (#4947)
In case you have multiple APs with the same SSID/password and WiFi.begin(ssid, pwd) is called, ESP32 defaults to connect to THE FIRST AP FOUND matching ssid - according to:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#_CPPv418wifi_scan_method_t

This can cause situations that ESP32 is trying to connect to AP which is far away from it (weak signal) even there is AP close to it, just as in my house - I have AP on channel 6 which is in the 1st floor (quite far from room where I do the programming) and AP on channel 13 in the same room I do the programming (which is in the 2nd floor) - result: ESP32 is trying to connect to the AP on channel 6 because it finds it first and never try the AP on channel 13 in the same room, result of this is very unreliable WiFi connection.

When scan_method is set to WIFI_ALL_CHANNEL_SCAN, ESP32 scans all channels and choose the nearest / strongest AP (matching the ssid of course) as expected - result is no connection problems at all.

Therefore I propose adding this parameter into WiFi.begin, connection problems as described above are quite confusing (especially for beginners), I can imagine that for example Schools there are usually using mutliple APs and this can cause intermittent connection problems without obvious reason.
2021-03-15 13:21:43 +02:00
..
ETH.cpp Add IP101 support (#4620) 2021-01-11 12:00:35 +02:00
ETH.h Add IP101 support (#4620) 2021-01-11 12:00:35 +02:00
WiFi.cpp Separate Provisioning library from WiFi library (#4547) 2020-11-19 00:12:16 +02:00
WiFi.h Separate Provisioning library from WiFi library (#4547) 2020-11-19 00:12:16 +02:00
WiFiAP.cpp Add WiFi.softAPSSID() 2021-03-10 16:36:51 +02:00
WiFiAP.h Add WiFi.softAPSSID() 2021-03-10 16:36:51 +02:00
WiFiClient.cpp Update WiFiClient.cpp (#4573) 2020-12-01 16:35:12 +02:00
WiFiClient.h Fix HTTP Client with SSL (#3216) 2019-09-16 19:14:32 +03:00
WiFiGeneric.cpp Rework setHostname for WiFi STA 2021-02-03 13:17:49 +02:00
WiFiGeneric.h WIFI_PS_MAX_MODEM feature requested #3896 (#3900) 2020-09-30 15:06:58 +03:00
WiFiMulti.cpp fix typo in WiFiMulti (#3737) 2020-09-30 14:37:21 +03:00
WiFiMulti.h Cleanup WiFiMulti (#2955) 2019-07-09 19:21:01 +03:00
WiFiScan.cpp Added the channel parameter to the scan fucntion in order to select which channel to scan. (#3638) 2020-01-20 16:13:10 +02:00
WiFiScan.h Added the channel parameter to the scan fucntion in order to select which channel to scan. (#3638) 2020-01-20 16:13:10 +02:00
WiFiServer.cpp Allow faster reuse of socket, to be able to restart WifiServer. (#4306) 2020-11-06 14:16:50 +02:00
WiFiServer.h Allow faster reuse of socket, to be able to restart WifiServer. (#4306) 2020-11-06 14:16:50 +02:00
WiFiSTA.cpp added scan_method = WIFI_ALL_CHANNEL_SCAN into wifi config in WiFi.begin() to let the scan choose the nearest / strongest AP in case that there are multiple APs with the same SSID (#4947) 2021-03-15 13:21:43 +02:00
WiFiSTA.h adds esp8266-style hostname setting (#4938) 2021-03-15 10:10:30 +02:00
WiFiType.h std::functioanl for WFIF event + Minor fix (#1366) 2018-05-14 13:05:49 +02:00
WiFiUdp.cpp Memory leak (#1672) 2018-07-25 12:56:41 +02:00
WiFiUdp.h Add Server and UDP and fix WiFi.hostByName 2016-12-30 02:44:45 +02:00