From 7ea5b222ad3bd6919cda5a1612a2cae088d2d698 Mon Sep 17 00:00:00 2001 From: Pavel Brychta Date: Fri, 21 Aug 2020 14:03:36 +0200 Subject: [PATCH] Cekani na start AP pro ESP32 --- src/WiFiConfig.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/WiFiConfig.cpp b/src/WiFiConfig.cpp index 9ebc78e..3e687b8 100644 --- a/src/WiFiConfig.cpp +++ b/src/WiFiConfig.cpp @@ -720,6 +720,7 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb) ssid.replace(F("?"), String(lmac)); } WiFi.softAP(ssid.c_str(), NULL, SETUP_CHANNEL); + delay(100); // kvuli ESP32 - cekame na start AP WiFi.softAPConfig(apIP, apIP, netMsk); #endif dnsServer->setErrorReplyCode(DNSReplyCode::NoError); @@ -826,6 +827,7 @@ bool WiFiConfig::_testWifi(wificonfig_cb cb) WiFi.softAP(s.c_str(), NULL, EEPROM.read(configBase + offsetof(wificonfigarea_t, apchannel))); } if (IPCONFIG_STATIC == EEPROM.read(configBase + offsetof(wificonfigarea_t, ip))) { + delay(100); // kvuli ESP32 - cekame na start AP WiFi.softAPConfig(IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, ipaddr))), IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, gateway))), IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, netmask)))); }