[mdlug] captive portals with pop-ups

Scott Webster Wood treii28 at gmail.com
Wed Sep 20 14:24:20 EDT 2017


Does anyone know what actually has to occur to cause an Android or Apple 
phone to cause a pop-up to be redirected to a sign-in/landing page when 
connecting to a captive portal hotspot?

I'm trying to create a captive portal on an ESP8266 that will ultimately 
'not' be connected to the internet to use it as a WiFi-based digital 
geocache essentially. But to make it effective, the user should be 
directed to the log-in page automatically.

Examples exist using existing Arduino/ESP8266 libraries that 'try' to do 
this by directing all DNS queries to the access point's IP address then 
assigning handlers to the various device-based 
internet-connectivity-check urls (e.g. /generate_204 on android which 
exists on a handful of google servers, hostname depending on the version 
of android OS)

I think the problem is that the device (phone/tablet) is relying on a 
dns cache and trying to request the url from the google server's (or 
other device's respective host for the url) when the dns reports the 
localnet address. (I can see the requests are being answered by the 
ESP8266 DNS server code, responding with the access point IP address, 
but the HTTP request never appears on the device's web server which 
makes me think it's still being requested of a cached address)

I'm trying to find out if there's existing ways (short of diving deep 
into the source code for esp8266 wifi) to grab anything on port 80 
regardless of the address, but in the meantime, I want to figure out a 
little more about what is actually going on, and/or what actually 
happens on routers/hotspots that successfully achieve this behaviour if 
possible (rather than guessing).

Any help is appreciated.

SW



More information about the mdlug mailing list