Cekani na start AP pro ESP32

This commit is contained in:
Pavel Brychta 2020-08-21 14:03:36 +02:00
parent f42c8a1bf3
commit 7ea5b222ad

View File

@ -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))));
}