-->
Page 1 of 4

Captive portal issues

PostPosted: Thu Aug 06, 2015 9:54 am
by bjpirt
Hi Sprite_tm and others,
I've been using libesphttpd to good effect and had configured the captive portal which had been working really well until I realised how iOS devices behave. The problem I'm having is that the iPhone thinks that because it can't actually connect to the internet then it should disconnect from the AP (which is just plain annoying).

My suspicion is that they're just not going to play nicely, in which case I'd like to keep the DNS server functionality but only have it respond successfully to one address so that users don't need to type in IP addresses. I've been trying this by making it return an NXDOMAIN error for anything other than my domain but the iOS device still won't join the network.

Has anyone else made the captive portal work on iOS devices?

I'm going to keep trying to make it work, but any pointers or advice would be appreciated.
Cheers,
Ben

Re: Captive portal issues

PostPosted: Mon Aug 10, 2015 5:53 pm
by Sprite_tm
Hmm. From what I heard, iPhone handles captive portals by opening the webpage in a small window, not by ignoring them completely. Unfortunately, I have about zero iPhones to test it with here; when I tested the captive portal functionality, however, everything seemed to function OK.

Can you tell me which iPhone and iOS you're having trouble with?

Re: Captive portal issues

PostPosted: Mon Aug 10, 2015 8:08 pm
by burkmurray
You might find something useful in this thread: http://www.esp8266.com/viewtopic.php?f=32&t=3618 or this Github thread: https://github.com/esp8266/Arduino/pull/396.

”With IOS, "Success" is the key to success: to determine whether it's connected to the internet, Apple's CNA issues a GET to one of a pool of sites (e.g., http://www.apple.com - there are nine or ten sites in the pool) and looks for success.html to be returned. But all it cares about is finding the string "success" in the response. So changing the title in responseHTML to "Success" defeats the CNA:

<!DOCTYPE html><html><head><title>Success</title></head><body>"

This is for the Arduino ESP, but may help you find a solution in your environment.

Re: Captive portal issues

PostPosted: Tue Aug 18, 2015 5:35 am
by jesica1
Users are not redirected to the CP page when attempting to reach an HTTPS/SSL site, but are redirected when attempting an HTTP site, and device is also slowing down. What's wrong with it.. :(