diff --git a/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino b/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino index 717d3c39c6b..9221af1eaa2 100644 --- a/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino +++ b/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino @@ -2,7 +2,7 @@ #include const byte DNS_PORT = 53; -IPAddress apIP(192, 168, 1, 1); +IPAddress apIP(8,8,4,4); // The default android DNS DNSServer dnsServer; WiFiServer server(80); @@ -12,11 +12,9 @@ String responseHTML = "" "be redirected here.

"; void setup() { - WiFi.disconnect(); //added to start with the wifi off, avoid crashing - WiFi.mode(WIFI_OFF); //added to start with the wifi off, avoid crashing WiFi.mode(WIFI_AP); + WiFi.softAP("ESP32-DNSServer"); WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); - WiFi.softAP("DNSServer CaptivePortal example"); // if DNSServer is started with "*" for domain name, it will reply with // provided IP to all DNS request