From 076019a0293c065fea2f3b4987e3271660f4556b Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 13 Jun 2022 17:28:13 +0200 Subject: [PATCH] Fix ESP32 wifi on command --- tasmota/tasmota_support/support_command.ino | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 524434559..8bf0ef967 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -2262,7 +2262,13 @@ void CmndWifi(void) { if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) { Settings->flag4.network_wifi = XdrvMailbox.payload; - if (Settings->flag4.network_wifi) { WifiEnable(); } + if (Settings->flag4.network_wifi) { +#ifdef ESP32 + WifiConnect(); +#else + WifiEnable(); +#endif + } #ifdef ESP8266 } else if ((XdrvMailbox.payload >= 2) && (XdrvMailbox.payload <= 4)) { WiFi.setPhyMode(WiFiPhyMode_t(XdrvMailbox.payload - 1)); // 1-B/2-BG/3-BGN