rudy is correct.
captive portal is what you are looking for.. (and those links will get you there)
what I did was have several different devices 'connect' and the output the info/request to the serial monitor of the Arduino IDE. (debug = on)
I then made note to use these in specific handlers in my code.. (along with my own custom requests/handlers)
* in my project I served up my own little HTML & in-line CSS to make a gui (interface) to send 'commands' from the connected mobile phone to the ESP/Arduino (which was a pro-micro acting as an HID device (ie: keyboard/mouse) and have it execute those actions on the connected PC.
example:
Code: Select all//main page request (serve up my HTML gui)
my_server.on("/", my_html_page);
//iOS handlers
my_server.on("/hotspot-detect.html", handle_iphone);
my_server.on("/bag", handle_ipad);
//android handlers
my_server.on("/generate_204", my_html_page); //Android captive portal
//custom (app specific) handlers (requests sent from HTML page)
//mouse
my_server.on("/mouse", handle_mouse);
//keyboard
my_server.on("/keyboard", handle_keyboard);
//preset link/action handlers
my_server.on("/preset", handle_preset);
etc..etc
all the:
handle_iphone, handle_ipad, my_html_page...etc.. are all functions that you create to do/handle (whatever you want)
I also recall a 'tip' that the HTML page/code you serve up needs to have 'success' in the title or something for iOS devices.. (been a while since I worked on things though)..
tip 2:
the ip address you assign the ESP8266 module matters when trying to be a captive portal/AP..
I have found that my project would not let iOS devices connect when I use an internal LAN IP such as 192.168.1.x or 192.168.0.x etc..etc
when I used 10.10.0.1 it worked.
tip 3:
I found that even when my phone/ipad would connect to the captive portal/network.. when I opened my browser and requested a web page (a legit one)..
I was expecting it to not matter what url I typed in there.. (as it should only serve up the captive portal page/html)
but if I typed in a site my phone/browser had been to before, it seemed to try and load the page from cache and fail.
if I requested a never before visited page it was fine.. or requesting things like abc123.com..etc worked as well..
good luck.