mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Fix AP mode soes not start webServer
This commit is contained in:
parent
81b30d8303
commit
05901395d1
@ -345,6 +345,7 @@ bool wifiShowAP(char* ssid, char* pass)
|
|||||||
|
|
||||||
LOG_WARNING(TAG_WIFI, F("Temporary Access Point %s password: %s"), ssid, pass);
|
LOG_WARNING(TAG_WIFI, F("Temporary Access Point %s password: %s"), ssid, pass);
|
||||||
LOG_WARNING(TAG_WIFI, F("AP IP address : %s"), WiFi.softAPIP().toString().c_str());
|
LOG_WARNING(TAG_WIFI, F("AP IP address : %s"), WiFi.softAPIP().toString().c_str());
|
||||||
|
networkStart();
|
||||||
// httpReconnect();}
|
// httpReconnect();}
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
@ -352,14 +353,18 @@ bool wifiShowAP(char* ssid, char* pass)
|
|||||||
|
|
||||||
static void wifiReconnect(void)
|
static void wifiReconnect(void)
|
||||||
{
|
{
|
||||||
WiFi.disconnect(true);
|
|
||||||
#if defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP8266)
|
||||||
|
WiFi.disconnect(true);
|
||||||
|
WiFi.begin(wifiSsid, wifiPassword);
|
||||||
WiFi.hostname(haspDevice.get_hostname());
|
WiFi.hostname(haspDevice.get_hostname());
|
||||||
|
|
||||||
#elif defined(ARDUINO_ARCH_ESP32)
|
#elif defined(ARDUINO_ARCH_ESP32)
|
||||||
|
// https://github.com/espressif/arduino-esp32/issues/3438#issuecomment-721428310
|
||||||
|
WiFi.disconnect(true);
|
||||||
|
WiFi.begin(wifiSsid, wifiPassword);
|
||||||
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
|
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
|
||||||
WiFi.setHostname(haspDevice.get_hostname());
|
WiFi.setHostname(haspDevice.get_hostname());
|
||||||
#endif
|
#endif
|
||||||
WiFi.begin(wifiSsid, wifiPassword);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ============ Setup, Loop, Start, Stop =================================================== */
|
/* ============ Setup, Loop, Start, Stop =================================================== */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user