Merge pull request #220 from Hieromon/pr/217

Pr/217
enhance/v120
Hieromon Ikasamo 5 years ago committed by GitHub
commit e55a8b64ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/AutoConnect.cpp

@ -83,14 +83,14 @@ bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long
// Captive portal will not be started on connection failure. Enable Station mode
// without disabling any current soft AP.
cs = WiFi.enableSTA(true);
AC_DBG(PSTR("Enable WIFI_STA: %s\n"), cs ? "Ok" : "Failed");
AC_DBG("WiFi mode %d maintained, STA %s\n", WiFi.getMode(), cs ? "enabled" : "unavailable");
}
else {
// Start WiFi connection with station mode.
WiFi.softAPdisconnect(true);
cs = WiFi.mode(WIFI_STA);
if (!WiFi.mode(WIFI_STA))
AC_DBG("Unable start WIFI_STA\n");
delay(100);
AC_DBG(PSTR("Switch to WIFI_STA: %s\n"), cs ? "Ok" : "Failed");
}
// Set host name

Loading…
Cancel
Save