Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S2-Mini constantly reboots #4392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,13 @@ void WLED::initAP(bool resetAP)
WLED_SET_AP_SSID();
strcpy_P(apPass, PSTR(WLED_AP_PASS));
}
#ifdef ARDUINO_ARCH_ESP32
WiFi.setTxPower(wifi_power_t(txPower));
#endif
DEBUG_PRINT(F("Opening access point "));
DEBUG_PRINTLN(apSSID);
WiFi.softAPConfig(IPAddress(4, 3, 2, 1), IPAddress(4, 3, 2, 1), IPAddress(255, 255, 255, 0));
WiFi.softAP(apSSID, apPass, apChannel, apHide);
#ifdef ARDUINO_ARCH_ESP32
WiFi.setTxPower(wifi_power_t(txPower));
Copy link
Collaborator

@softhack007 softhack007 Dec 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 the "solution" basicially disables WiFi.setTxPower(wifi_power_t(txPower)), because trying to set TX power before AP is started will be ignored.

https://github.com/espressif/arduino-esp32/blob/1f038677eb2eaf5e9ca6b6074486803c15468bed/libraries/WiFi/src/WiFiGeneric.cpp#L1407-L1410

I don't think this can be a general solution, because some boards require setting a reduced tx power otherwise wifi will not work.

Its interesting that this solves any problem ... maybe the default TX power is too high.

#endif

if (!apActive) // start captive portal if AP active
{
Expand Down