Skip to content

Commit

Permalink
Update ESPAsyncWiFiManager.cpp
Browse files Browse the repository at this point in the history
Added changes from tzapu/WiFiManager#296
  • Loading branch information
gjt211 authored Dec 14, 2018
1 parent 8801a76 commit 01166de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ESPAsyncWiFiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ void AsyncWiFiManager::safeLoop(){

boolean AsyncWiFiManager::startConfigPortal(char const *apName, char const *apPassword) {
//setup AP
WiFi.mode(WIFI_AP_STA);
DEBUG_WM("SET AP STA");
WiFi.mode(WIFI_AP);
DEBUG_WM("SET AP");

_apName = apName;
_apPassword = apPassword;
Expand Down Expand Up @@ -466,6 +466,9 @@ boolean AsyncWiFiManager::startConfigPortal(char const *apName, char const *apP
connect = false;
delay(2000);
DEBUG_WM(F("Connecting to new AP"));

WiFi.mode(WIFI_STA);
DEBUG_WM("SET STA");

// using user-provided _ssid, _pass in place of system-stored ssid and pass
if (connectWifi(_ssid, _pass) != WL_CONNECTED) {
Expand Down

0 comments on commit 01166de

Please sign in to comment.