【Feedback】Web Server works in AP Mode but not STA mode, help!

ecgreen
Posts: 1
Joined: Tue Jul 26, 2016 1:57 am

【Feedback】Web Server works in AP Mode but not STA mode, help!

Postby ecgreen » Tue Jul 26, 2016 2:13 am

All,

I'm hoping you can help me figure out why my ESP8266 works correctly as a server in AP mode, but not station mode.

I want to be able to use the default firmware (AT commands) linked with an Arduino to turn on and off Arduino pins. I've seen a lot of examples where this is done. I've got it working when in AP more (i.e. http://192.168.4.1/?pin=13 entered in the browser toggles the Arduino pin 13 led), but I cannot make it work when I'm connected to my router as a Station (AT+CWMODE=1).

Everything is as expected with AT comments. The Station IP address is fixed and is correct (192.168.1.96, subnet 255.255.255.0, gateway 192.168.1.254), and sending AP+CWSTATUS results in 2 or 3 (I can't recall), which means the ESP8266 station is connected to my home network. I then send the following:

AT+CWMODE=1
OK
AT+CWMUX=1
OK
AT+CWSERVER=1,80
OK

According to every tutorial I've read, that should do it. I try to access the ESP8266 through my local network (i.e. http://192.168.1.96/?pin=13 in the browser), but it does not appear a link is ever established. The ESP8266 pings fine, but rather than returning the correct webpage, the browser receives "..." and there's no evidence on my serial connection that the request from the browser ever reached the ESP8266.

This all works just fine in CWMODE=2 and CWMODE=3 (when I'm connected to the AP).

Am I missing something simple? Is there a known bug in the recent firmware? Apparently, I'm not the only one with this issue, but I've not found a solution: http://www.esp8266.com/viewtopic.php?p=12641

Thanks!

ESP_Rubin
Posts: 222
Joined: Wed Jun 29, 2016 11:59 am

Re: Web Server works in AP Mode but not STA mode, help!

Postby ESP_Rubin » Tue Jul 26, 2016 10:18 am

Hi Sir,
which version of SDK and AT you used?
and the best is sharing me the steps for your test, both on AP and STA mode

Who is online

Users browsing this forum: No registered users and 2 guests