I am building a captive portal for a university network. It works quite well on all devices I have tested with, but I am having some iPad troubles. Let me explain my steps:
- I go to Settings, WiFi
- Select my test network
- Immediately upon connecting to the WiFi, Safari slides up from the bottom (sans URL box, with "Log In" at top) with my captive portal page.
- I login to my captive portal page
- I am redirected to Apple.com, which loads fine
The iPad is now allowed to use the internet, and all is well. The problem is, the iPad doesn't see it that way.
The "Log In" form of Safari never slides back down out of the way, as I would expect. If I press Home open up Safari, and try to open a page, I am immediately given the error:
Cannot Open Page
Safari cannot open the page because it is not connected to the Internet.
There are no connectivity issues at all, and the iPad indeed can connect to the Internet. It just believes that it can't.
A few things that the problem isn't:
- DHCP/DNS/IP Addressing issues... I assure you it has a valid IP address as assigned from DHCP, and the correct DNS addresses, and gateway.
- WiFi Connectivity... Signal is strong, I am sitting 5 ft. away from the AP, and I can continuously ping the iPad with no packet loss or high latency.
- "Turn it off/on again", or "Forget the network and rejoin it" are not solutions, and do not solve the problem
- A problem with my captive portal... The captive portal itself is fine, and there are no problems with it. Again, the iPad can load apple.com from its own "Login Safari" just fine.
I believe the problem is that Apple has written some code, trying to be "intelligent" that detects when my captive portal page logon is complete, so it can save any form data for posting to the server later for automatic logon.
My question is...
What cue is Apple looking for to know when captive portal logon is complete?
For what its worth, I stumbled across a forum thread discussing the captive portal detection. I'd rather not outright disable it... I just need to find a way to make it work.