From d32378ccd45082546d8c2d408f477e1bb437cb15 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Tue, 1 Apr 2025 12:33:04 +0200 Subject: [PATCH] do not scan methode for arduino 3 --- src/ESP32React/NetworkSettingsService.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ESP32React/NetworkSettingsService.cpp b/src/ESP32React/NetworkSettingsService.cpp index e91ce401a..7d5d48bb2 100644 --- a/src/ESP32React/NetworkSettingsService.cpp +++ b/src/ESP32React/NetworkSettingsService.cpp @@ -37,9 +37,11 @@ void NetworkSettingsService::begin() { WiFi.mode(WIFI_MODE_MAX); WiFi.mode(WIFI_MODE_NULL); - WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN, connect issues in 2.0.14 - // WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set - +// scan settings give connect issues with arduino 2.0.14 and arduino 3.x.x +#if ESP_ARDUINO_VERSION_MAJOR < 3 + WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); // default is FAST_SCAN +// WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL); // is default, no need to set +#endif _fsPersistence.readFromFS(); }