Osetreni SSID, konciciho znakem ?, aktivace noveho nastaveni (pozor!!! mozna je problem se statickymi ip adresami - proverit...
This commit is contained in:
parent
6f1dd6a7ba
commit
4cdce88ca5
@ -807,6 +807,12 @@ bool WiFiConfig::_testWifi(wificonfig_cb cb)
|
||||
|
||||
case WIFIMODE_AP:
|
||||
DEBUG_MSG("AP mode.\r\n");
|
||||
if (s.endsWith(F("?"))) {
|
||||
char lmac[16];
|
||||
|
||||
sprintf_P(lmac, PSTR("%06X"), ESP_getChipId());
|
||||
s.replace(F("?"), String(lmac));
|
||||
}
|
||||
WiFi.mode(WIFI_AP); // startujeme AP
|
||||
if (pass.length()) {
|
||||
// je zadane heslo do AP
|
||||
@ -948,8 +954,10 @@ void WiFiConfig::initConfig(int configBase, const String& ssid, const String& pa
|
||||
setEEPROMuint32(configBase + offsetof(wificonfigarea_t, dns), (uint32_t) dns);
|
||||
}
|
||||
EEPROM.commit(); // ulozime zmeny v EEPROM
|
||||
_testWifi(nullptr); // nastavime novou WiFi konfiguraci
|
||||
}
|
||||
|
||||
// Zastarale - bude brzy odstraneno!!!
|
||||
void WiFiConfigPrepare(int configBase, String ssid, String pass)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user