This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Description
Since I started digging in issues are pouring out :)
So sometimes softAP fires up with custom IP subnet settings other times with default 192.168.4.1.
in void ESP_WiFiManager::setupConfigPortal() function:
if (_ap_static_ip)
{
LOGWARN(F("Custom AP IP/GW/Subnet"));
LOGWARN2(_ap_static_ip, _ap_static_gw, _ap_static_sn);
WiFi.softAPConfig(_ap_static_ip, _ap_static_gw, _ap_static_sn);
}
delay(500); // Without delay I've seen the IP address blank
LOGWARN1(F("AP IP address ="), WiFi.softAPIP());
and log print:
[WM] Custom AP IP/GW/Subnet
[WM] 192.168.10.1 192.168.10.1 255.255.255.0
[WM] AP IP address = 192.168.4.1
[WM] HTTP server started
so you can see i set them up correctly :) but not used ....... i was digging around a bit and got this "crude" solution:
espressif/arduino-esp32#985
so either:
WiFi.softAP(...);
wait for SYSTEM_EVENT_AP_START
WiFi.softAPConfig(...)
or:
WiFi.softAP(...);
delay(100);
WiFi.softAPConfig(...)
For now i went for the second "crude" bypass :) It works but i guess i will delay more because when i shut down debugging, print statement wont delay even more :)