Skip to content

Commit adf2b14

Browse files
nouser2013d-a-v
authored andcommitted
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 (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. * 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.
1 parent d2a487d commit adf2b14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/DNSServer/examples/CaptivePortal/CaptivePortal.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <ESP8266WebServer.h>
44

55
const byte DNS_PORT = 53;
6-
IPAddress apIP(192, 168, 1, 1);
6+
IPAddress apIP(172, 217, 28, 1);
77
DNSServer dnsServer;
88
ESP8266WebServer webServer(80);
99

libraries/DNSServer/examples/CaptivePortalAdvanced/CaptivePortalAdvanced.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ DNSServer dnsServer;
4141
ESP8266WebServer server(80);
4242

4343
/* Soft AP network parameters */
44-
IPAddress apIP(192, 168, 4, 1);
44+
IPAddress apIP(172, 217, 28, 1);
4545
IPAddress netMsk(255, 255, 255, 0);
4646

4747

0 commit comments

Comments
 (0)