Chat freely about anything...

User avatar
By scargill
#932 I have my new ESP8266 board - this one is detailed here...http://zeflo.com/2014/esp8266-weather-display/ and has a CH_PD pin which needs to be tied high - most of the boards say no connection.. I can confirm that the output will not work at all unless that pin is held high.

I can talk to the board - and to see what is going on - I send commands to Serial1 echoing them to Serial (my serial monitor) - both at 115Kbd. As you'll see below... it talks to me on reset - it says ok when it's supposed to - but says OK to any old password for the WIFI and in the end simply won't connect...

See output from serial - first line in each case is from serial monitor, the rest is returned from the board... It doesn't make any difference if I put a REAL access point number in - or as in this case a completely duff one - it STILL says ok, then messes up later on... Thought ? Other than the bin...

ets Jan 8 2013,rst cause:4, boot mode:(3,7)

AT+RST

OK

wdt reset
load 0x40100000, len 24444, room 16
tail 12
chksum 0xe0
ho 0 tail 12 room 4
load 0x3ffe8000, len 3168, room 12
tail 4
chksum 0x93
load 0x3ffe8c60, len 4956, room 4
tail 8
chksum 0xbd
csum 0xbd

ready
Sending AT+CWMODE=1
AT+CWMODE=1

no change
Sending AT+CWMODE?
AT+CWMODE?

+CWMODE:1

OK
Sending AT+CWJAP="bottom","192168ol974"
AT+CWJAP="bottom","192168ol974"


OK
Sending AT+CWJAP?
AT+CWJAP?

+CWJAP:"bottom"

OK
Sending AT+CWLAP ie LIST
AT+CWLAP

Sending AT+CIPMUX=0
AT+CIPMUX=0

busy now ...
Sending AT+CIPSTART="TCP","149.255.58.110",80
AT+CIPSTART="TCP","149.255.58.110",80

busy now ...
Sending GET /time1921681974.php HTTP/1.0
Host: www.scargill.net

GET /time1921681974.php HTTP/1.0

busy now ...
Host: www.scargill.net

busy now ...
User avatar
By Bert
#982 Your device was still working on AT+CWLAP, since it did not produce a reply on that command yet. Any input you send it (including any valid commands) will make it reply 'busy now ...' until it finishes (which may be never, in which case the watchdog may kick in at some point).

Re your specific problem: AT+CWJAP will always return OK (unless you send it syntactically invalid parameters or are in a state where CWJAP would be an illegal command), even if a connection cannot be established. I think connecting is actually done in the background.

By the way, you *must* reset your device after changing AT+CWMODE (which you don't appear to be doing here, but it's a good idea either way). Also, AT+CIPMUX=0 is kind of pointless there, since AT+CIPMUX=0 is the default. You also cannot just send a GET request in that way. You'll need to use AT+CIPSEND for that.
User avatar
By scargill
#1055 Interestingly - after failing to get the IP address, I can get a list of routers... and after requesting the IP address I'm waiting up to 5 seconds - seems long enough. When I get back in front of the kit later this week I'll try a longer delay... do you think I have everything correct BEFORE then?
User avatar
By Bert
#1095 There is no point in using delays (except when they are timeouts triggering a hardware reset (i.e. watchdogs)), since only one command can run at a given time. You'll have to wait for it to return (i.e. reply OK/ERROR/…) instead of just waiting a few seconds. How long it takes depends on all kinds of things, including the negotiation speed of your WiFi router.