From 34ededb9d8822328f3d9e4e5b6d3a59e440f65fa Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:01:09 +0100 Subject: [PATCH] Add comment for future use --- tasmota/tasmota_support/support_wifi.ino | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index 98f11ee90..cb0e2abaa 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -210,13 +210,20 @@ void WifiBegin(uint8_t flag, uint8_t channel) #endif // USE_EMULATION WiFi.persistent(false); // Solve possible wifi init errors (re-add at 6.2.1.16 #4044, #4083) - if (WiFi.getMode() != WIFI_AP_STA) // Preserve range extender connections - { - WiFi.disconnect(true); // Delete SDK wifi config + +/* + // Replaced by below code (20221117) + WiFi.disconnect(true); // Delete SDK wifi config + delay(200); + WifiSetMode(WIFI_STA); // Disable AP mode +*/ + if (WiFi.getMode() != WIFI_AP_STA) { // Preserve range extender connections (#17103) + WiFi.disconnect(true); // Delete SDK wifi config delay(200); - WifiSetMode(WIFI_STA); // Disable AP mode + WifiSetMode(WIFI_STA); // Disable AP mode } + WiFiSetSleepMode(); // if (WiFi.getPhyMode() != WIFI_PHY_MODE_11N) { WiFi.setPhyMode(WIFI_PHY_MODE_11N); } // B/G/N // if (WiFi.getPhyMode() != WIFI_PHY_MODE_11G) { WiFi.setPhyMode(WIFI_PHY_MODE_11G); } // B/G