-->
Page 1 of 1

Stored AT+CWJAP value causes AT+CWLAP to hang?

PostPosted: Tue Nov 18, 2014 8:02 pm
by follower
Hi,

I encountered some strange behaviour with the ESP8266 which I think I've finally narrowed down to a bad interaction between CWJAP and CWLAP commands.

While it's entirely out of spec I managed to successfully connect to a ESP8266 module via an Arduino Uno R3 module without using level conversion or a 3.3V supply other than the one provided on the Arduino. I was also able to connect to a WiFi network (an AP running on an Android mobile phone) with the module and set up a server.

However, the next time when I went to use the module (in a different physical location and coincidentally using a new breakout board I designed) while the serial commands would get responses the CWLAP command would hang with no response. Even when I switched to using a more powerful 3.3V power supply the device would still hang.

I then discovered that if I skipped trying to list available APs and just connected to the phone AP directly the connection would work--which suggested there was nothing wrong with the module itself. *Then* I discovered that once I was connected to the AP the CWLAP command would list the other APs quite happily. I also discovered that the details supplied to CWJAP persist across power-off which I hadn't realised.

Finally, I tried to run the CWLAP command while the AP existed but the module wasn't connected to it and the command ran happily.

So, in short, if the network identified by the stored CWJAP command doesn't exist it seems that the CWLAP command will hang.

The workaround seems to be to run the command AT+CWJAP="","" before the AT+CWLAP command to ensure no network is stored.

This was with firmware version: 00160901

The issue seems to be a bug--perhaps it's been fixed in later revisions? I'd not seen this behaviour described elsewhere but it might explain some of the unusual behaviour some people have observed.

I did occasionally encounter an ERROR response rather than a hang and it seemed that the device needed to be reset/powered off.

Hope this information is helpful to someone else. :)

Re: Stored AT+CWJAP value causes AT+CWLAP to hang?

PostPosted: Wed Nov 19, 2014 4:02 am
by zioax
Try to update to the last firmware. You should solve the problem.