From d5265aa5ac4995b65bce3e29025307cfd7ae0d0f Mon Sep 17 00:00:00 2001 From: nouser2013 <6624032+nouser2013@users.noreply.github.com> Date: Wed, 19 Dec 2018 23:24:27 +0100 Subject: [PATCH 1/2] Add support for newer mobile OS changes. Took me quite a while to figure this out, but according to this issue (https://github.com/espressif/arduino-esp32/issues/1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1). On Android, a notification ("Register with Network") is displayed in top left notification bar. On IOS, the login popup is displayed. --- libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino b/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino index 354116415b..53b159502b 100644 --- a/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino +++ b/libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino @@ -3,7 +3,7 @@ #include const byte DNS_PORT = 53; -IPAddress apIP(192, 168, 1, 1); +IPAddress apIP(172, 217, 28, 1); DNSServer dnsServer; ESP8266WebServer webServer(80); From 42f9eab813dbdf10cac1035ba29903814a9b545f Mon Sep 17 00:00:00 2001 From: nouser2013 <6624032+nouser2013@users.noreply.github.com> Date: Wed, 19 Dec 2018 23:34:38 +0100 Subject: [PATCH 2/2] Add support for newer mobile OS changes. Took me quite a while to figure this out, but according to this issue (espressif/arduino-esp32#1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1). On Android, a notification ("Register with Network") is displayed in top left notification bar. On IOS, the login popup is displayed. --- .../examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino b/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino index 4da1fcc447..0f2553fbc2 100644 --- a/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino +++ b/libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino @@ -41,7 +41,7 @@ DNSServer dnsServer; ESP8266WebServer server(80); /* Soft AP network parameters */ -IPAddress apIP(192, 168, 4, 1); +IPAddress apIP(172, 217, 28, 1); IPAddress netMsk(255, 255, 255, 0);