feature/APSTA #8
@ -720,6 +720,7 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb)
|
|||||||
ssid.replace(F("?"), String(lmac));
|
ssid.replace(F("?"), String(lmac));
|
||||||
}
|
}
|
||||||
WiFi.softAP(ssid.c_str(), NULL, SETUP_CHANNEL);
|
WiFi.softAP(ssid.c_str(), NULL, SETUP_CHANNEL);
|
||||||
|
delay(100); // kvuli ESP32 - cekame na start AP
|
||||||
WiFi.softAPConfig(apIP, apIP, netMsk);
|
WiFi.softAPConfig(apIP, apIP, netMsk);
|
||||||
#endif
|
#endif
|
||||||
dnsServer->setErrorReplyCode(DNSReplyCode::NoError);
|
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)));
|
WiFi.softAP(s.c_str(), NULL, EEPROM.read(configBase + offsetof(wificonfigarea_t, apchannel)));
|
||||||
}
|
}
|
||||||
if (IPCONFIG_STATIC == EEPROM.read(configBase + offsetof(wificonfigarea_t, ip))) {
|
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))),
|
WiFi.softAPConfig(IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, ipaddr))), IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, gateway))),
|
||||||
IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, netmask))));
|
IPAddress(getEEPROMuint32(configBase + offsetof(wificonfigarea_t, netmask))));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user