feature/APSTA #8

Merged
pablo2048 merged 2 commits from feature/APSTA into master 2020-08-21 14:05:01 +02:00
Showing only changes of commit 7ea5b222ad - Show all commits

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