mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-20 18:01:29 +10:00
add connection fixes for esp32 wifi not started yet
This commit is contained in:
@@ -271,6 +271,14 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
DEBUG_WM(F("AutoConnect"));
|
||||
#endif
|
||||
|
||||
#ifdef ESP32
|
||||
if(WiFi.getMode() != WIFI_STA){
|
||||
WiFi.mode(WIFI_STA);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if(getWiFiIsSaved()){
|
||||
_startconn = millis();
|
||||
_begin();
|
||||
@@ -332,6 +340,7 @@ boolean WiFiManager::autoConnect(char const *apName, char const *apPassword) {
|
||||
DEBUG_WM(DEBUG_VERBOSE,F("Connected in"),(String)((millis()-_startconn)) + " ms");
|
||||
DEBUG_WM(F("STA IP Address:"),WiFi.localIP());
|
||||
#endif
|
||||
// Serial.println("Connected in " + (String)((millis()-_startconn)) + " ms");
|
||||
_lastconxresult = WL_CONNECTED;
|
||||
|
||||
if(_hostname != ""){
|
||||
|
||||
Reference in New Issue
Block a user