From c9b3efff191280598190cfcf195c91d66e33f871 Mon Sep 17 00:00:00 2001 From: Hpsaturn Date: Mon, 13 Jan 2025 22:57:28 +0100 Subject: [PATCH] restored workaround for some ESP32C3 WiFi connection issue: https://github.com/espressif/arduino-esp32/issues/6767 --- src/ESP32WifiCLI.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ESP32WifiCLI.cpp b/src/ESP32WifiCLI.cpp index 86c2252..59bb3c7 100644 --- a/src/ESP32WifiCLI.cpp +++ b/src/ESP32WifiCLI.cpp @@ -143,6 +143,10 @@ void ESP32WifiCLI::wifiAPConnect(bool save) { int retry = 0; WiFi.begin(temp_ssid.c_str(), temp_pasw.c_str()); + #if CONFIG_IDF_TARGET_ESP32C3 + WiFi.setTxPower(WIFI_POWER_8_5dBm); + #endif + while (WiFi.status() != WL_CONNECTED && retry++ < 20) { // M5Atom will connect automatically delay(1000); if (!silent) Serial.print(".");