Closed hchaudhary1 closed 5 years ago
Hi hchaudhary1, that would not be something you can solve with the code. You would have to add an entry into your DNS server so that mysesp.config gets you back to 192.168.1.1.
You can also buy your own domain and have it send you back to 192.168.1.1.
There is mDNS but it has its own set of limitations.
well, most routers in hotels and coffee shops will automatically force my laptop to open a page with a non-public DNS name. I never need to know the IP of the router...
Here is a Wikipedia article I found. I will research this more. It should be possible. https://en.wikipedia.org/wiki/Captive_portal
ok, I think it would go something like this...
Perhaps I will test this at some point...
I have forked this and added captive portal functionality, but it currently only works on macOS and iOS clients, due to a very hacky DNS implementation that can only parse the very specific DNS request that I sniffed on the network during testing.
There may now be a more generalized DNS server implementation that can parse any DNS query and resolve it to 192.168.1.1.
https://github.com/craftmetrics/esp32-wifi-manager https://github.com/craftmetrics/esp32-dns-server
ESP team may support the captive portal. ref: https://github.com/espressif/esp-idf/issues/2723
The current version now automatically opens a page for you, similarly to a hotel wifi ("captive portal"). Try it out!
Instead of going to http://192.168.1.1, is it possible instead to go to "http://myesp.config". Is that possible?