bugfix: ensure that all WiFi channels are scanned

backport of upstream https://github.com/wled/WLED/pull/5351
This commit is contained in:
Frank
2026-02-06 12:06:56 +01:00
parent 71893cf00d
commit d727cfd3fe

View File

@@ -777,6 +777,11 @@ void WLED::setup()
if (strcmp(clientSSID, DEFAULT_CLIENT_SSID) == 0)
showWelcomePage = true;
#if !defined(ESP8266) && (ESP_IDF_VERSION_MAJOR >= 4)
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // bugfix: ensure that all channels are scanned, and the strongest signal is used
#endif
WiFi.persistent(false);
#ifdef WLED_USE_ETHERNET
WiFi.onEvent(WiFiEvent);