feature/ipChange #6
@ -1,4 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
|
* V6.3 - 12.8.2019 - IP adresa Captive portalu je zmenena na 172.217.28.1 kvuli funkcnosti na Android zarizenich (viz. zmena zde https://github.com/esp8266/Arduino/blob/master/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino)
|
||||||
|
* ladici vypis pri zachyceni presmerovani v Captive portalu.
|
||||||
|
*
|
||||||
* V6.2 - 12.12.2018- Nastaveni jmena zarizeni nadale NENI soucasti WiFiConfig a je treba ho pridat jako uzivatelsky parametr. Je to proto, protoze
|
* V6.2 - 12.12.2018- Nastaveni jmena zarizeni nadale NENI soucasti WiFiConfig a je treba ho pridat jako uzivatelsky parametr. Je to proto, protoze
|
||||||
* se ukazalo, ze neni dobre z externiho kodu sahat do vnitrni struktury WiFiConfig (napr. pri ukladani noveho jmena).
|
* se ukazalo, ze neni dobre z externiho kodu sahat do vnitrni struktury WiFiConfig (napr. pri ukladani noveho jmena).
|
||||||
*
|
*
|
||||||
@ -313,7 +316,13 @@ void WiFiConfig::_handleNotFound(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
server->sendHeader(F("Location"), String(F("http://")) + server->client().localIP().toString() + String(F("/index.htm")), true);
|
String redirect;
|
||||||
|
redirect.reserve(256);
|
||||||
|
redirect = F("http://");
|
||||||
|
redirect.concat(server->client().localIP().toString());
|
||||||
|
redirect.concat(F("/index.htm"));
|
||||||
|
DEBUG_MSG("Redirection to: %s\r\n", redirect.c_str());
|
||||||
|
server->sendHeader(F("Location"), redirect, true);
|
||||||
server->send_P(302, TEXTPLAIN, PSTR("Redirect"));
|
server->send_P(302, TEXTPLAIN, PSTR("Redirect"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -697,7 +706,7 @@ wificonfigresult_t WiFiConfig::_setupAP(wificonfig_cb cb)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Soft AP network parameters */
|
/* Soft AP network parameters */
|
||||||
IPAddress apIP(192, 168, 4, 1);
|
IPAddress apIP(172, 217, 28, 1);
|
||||||
IPAddress netMsk(255, 255, 255, 0);
|
IPAddress netMsk(255, 255, 255, 0);
|
||||||
|
|
||||||
WiFi.disconnect(); // pro jistotu se odpojime
|
WiFi.disconnect(); // pro jistotu se odpojime
|
||||||
|
Loading…
Reference in New Issue
Block a user