From de59d5d0cd48c39dbf8820e76d03c8fb262e3c20 Mon Sep 17 00:00:00 2001 From: Erik Fleckstein Date: Fri, 16 Jul 2021 11:11:31 +0200 Subject: [PATCH] Remove undocumented and uncontrollable WiFI RSSI filter. Commit d15e1b0e [1] in the 2.0.0 pull request #4996 introduced a filter to connect only to WiFi networks with a RSSI of -75 or better. This results in strage behaviour, as a scan still shows networks, that can't be connected to, even though with older versions, connecting to those networks was possible and the connection (albeit slow) was stable. Remove the RSSI filter for now by setting the threshold to -127, i.e. the lowest possible value. Maybe in the future the filter threshold could be exposed to users, to allow filtering out nearly unreachable networks. [1] github.com/espressif/arduino-esp32/pull/4996/commits/d15e1b0 --- libraries/WiFi/src/WiFiSTA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/WiFi/src/WiFiSTA.cpp b/libraries/WiFi/src/WiFiSTA.cpp index 9d14ce58aa7..92a318aecbb 100644 --- a/libraries/WiFi/src/WiFiSTA.cpp +++ b/libraries/WiFi/src/WiFiSTA.cpp @@ -73,7 +73,7 @@ static void wifi_sta_config(wifi_config_t * wifi_config, const char * ssid=NULL, wifi_config->sta.listen_interval = listen_interval; wifi_config->sta.scan_method = scan_method;//WIFI_ALL_CHANNEL_SCAN or WIFI_FAST_SCAN wifi_config->sta.sort_method = sort_method;//WIFI_CONNECT_AP_BY_SIGNAL or WIFI_CONNECT_AP_BY_SECURITY - wifi_config->sta.threshold.rssi = -75; + wifi_config->sta.threshold.rssi = -127; wifi_config->sta.pmf_cfg.capable = true; wifi_config->sta.pmf_cfg.required = pmf_required; wifi_config->sta.bssid_set = 0;