Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By burkmurray
#21177
The AP starts. The webserver responds, when accessed directly via IP....but nothing happens when entering any domain. Just does not respond with latest android chrome browser.

I'm connecting to the ESP8266 with an iPad via the AP - is that what you're doing?

Are you typing a domain name or an IP address into your browser?

When you say that it doesn't respond, what DOES it do?

This may be an IOS vs Android thing, but I'm trying to make sure we're actually trying the same thing.
User avatar
By SwiCago
#21211
burkmurray wrote:
The AP starts. The webserver responds, when accessed directly via IP....but nothing happens when entering any domain. Just does not respond with latest android chrome browser.

I'm connecting to the ESP8266 with an iPad via the AP - is that what you're doing?

Are you typing a domain name or an IP address into your browser?

When you say that it doesn't respond, what DOES it do?

This may be an IOS vs Android thing, but I'm trying to make sure we're actually trying the same thing.


Yes, my nexus running latest android OS and using latest chrome browser connects to the esp01 as a client just fine.
The webserver works as expected, when using IP instead of domain. The DNS responds to requests(I added serial.print to DNserver.CCP), but it seems my nexus doesn't understand the response. It just sits there acting like it is trying to load and eventually fails. I have an old iPad, I'll try that tonight to see if it is an iOS and Android thing....maybe someone else has time to give Android a try?
User avatar
By burkmurray
#21235
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?

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'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).

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.
Hope this helps,

Burk

PS - I don't see a way to attach a pic from my desktop, but your menu looks pretty good!
User avatar
By SwiCago
#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 ... /libraries
or from
https://github.com/knovoselic/Arduino/t ... /libraries

Currently I am using latest of
https://github.com/esp8266/Arduino/tree ... /libraries
with the addition of latest DNSServer from
https://github.com/knovoselic/Arduino/t ... /DNSServer