- Mon Jun 22, 2015 1:29 pm
#21254
burkmurray wrote:The webserver works as expected, when using IP instead of domain.
You mean using the AP's IP, right? A random IP won't redirect, will it?
Correct .. if I type 192.168.1.1 in the browser, my page display. If I type example.com, the browser sites in wait pattern until is times out.
burkmurray wrote:Yes, my nexus running latest android OS and using latest chrome browser connects to the esp01 as a client just fine.
When it connects, what does your Nexus say is its DNS server? It lists your AP's IP, right? If you have multiple DNS server IPs listed, have you tried clearing them out?
I believe it is, since I added serial.print inside the DNSserver.ccp for debugging purposes. And it printed what it was requesting and returning on each request. But I will double check, you never know, maybe it is using something else on a secondary level ?!?
burkmurray wrote:I've tested your code on IOS 7 & 8 and on OSX and it works for me with both Safari and Chrome. The only change I made was the one I noted above - replacing "example.com" with "*". I'm running an ESP-12 and 1.6.4 IDE with the most recent boards manager release (nothing special).
I am also using latest versions of both IDE and ESP git code and yes I deleted it all, including the hidden stuff in AppData for my user. And since I added serial.print I know it is using the latest, because I get my prints in the serial monitor. That would not happen if it didn't take.
For my demo I am using ESP01, but that shouldn't make a difference.
burkmurray wrote:A couple of things to try (and apologies if these sound simplistic, no offense intended):
Try the new example code. It's a good baseline.
Double-check that you're using the latest libraries, and that you've cleared the old ones out of the path. I've been stung by this a couple of times.
Make sure you have replaced "example.com" with "*" when you start the DNSServer.
Try example.com in your browser, just to check.
Did all the above yesterday, including using the CaptivePortal.ino example...no bueno
And no offense taken, sometimes a second set of eyes on the posted code helps...hence why I posted it in full.
burkmurray wrote:Hope this helps,
Burk
PS - I don't see a way to attach a pic from my desktop, but your menu looks pretty good!
Thanks, it is just a short demo I threw together...I plan to do something much bigger, once I get this stupid captive portal thing to work.
I will try again tonight with my old ipad and see if that works, then I will check the DNS settings of the android to see if that is the issue as you suggested above.
If you have any more ideas or anyone else can give the code a test, it would be appreciated.
Oh, one last thing....are you using the entire library from
https://github.com/esp8266/Arduino/tree ... /librariesor from
https://github.com/knovoselic/Arduino/t ... /librariesCurrently I am using latest of
https://github.com/esp8266/Arduino/tree ... /librarieswith the addition of latest DNSServer from
https://github.com/knovoselic/Arduino/t ... /DNSServer