From adf2b14a6a1493b324d8e176a1519af76bd7e5fb Mon Sep 17 00:00:00 2001 From: nouser2013 <6624032+nouser2013@users.noreply.github.com> Date: Mon, 8 Jul 2019 16:12:28 +0200 Subject: [PATCH] Add support for newer mobile OS changes. (#5529) * 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. * 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. --- libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino | 2 +- .../examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); 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);