close-circle
Close

More AT Command Information Found

A project log for ESP8266 WiFi Module Library

A project researching the capabilities and use of the newly available ESP8266 low-cost WiFi module.

bafeigum 08/29/2014 at 02:280 Comments

So looking around on this German forum post about the ESP8266

http://www.mikrocontroller.net/topic/342240#new

I saw that somebody translated the Chinese AT command pdf (into German which google than translated into English for me). The translation this person posted had much more information about the chip than I had seen before! I had assumed that the Nurdspace page everybody is probably already very familiar with

https://nurdspace.nl/ESP8266#Translated_datasheet

was translated from the same document and was all the information we had so I didn't bother taking a look at the actual document in Chinese. It seemed like it would be just BARELY enough to get a good library going, however a lot of information was missing like possible return values and the returned data format. It wouldn't have been impossible to figure this stuff out after getting the chip, but it would have taken longer just poking around.

Read on to see the translated document and what to expect from the List Access Points Command.

So I took a look at the Chinese document and after seeing actual return values for the AT commands, I knew there would be something worth looking further into. Instead of posting the Chinese->German->English translation, I threw this document

https://dl.dropboxusercontent.com/u/307560/ESP8266%20WIFIATCOMMANDS.pdf

into Google translate and got some great stuff! 

https://dl.dropboxusercontent.com/u/307560/ESP8266%20WIFIATCOMMANDS_English.pdf

(Edit: Removed .txt translation and replaced with .pdf which provides much easier to read formatting than the .txt file did)

For example, check out the Nurdspace page for the AT command AT+CWLAP which should return a list of the access points that the ESP8266 can see. The page doesn't say anything about what will be returned. How will the data be formatted? WHAT data will even be sent?

From the translated page, we get this information about AT+CWLAP

AT + CWLAP: lists currently available AP

Instruction:

AT + CWLAP

Response

Successful return AP list

+ CWLAP: <ecn>, <ssid>, <rssi> [, <mode>]

OK Or Fails, the return ERROR

Description

Response parameters:

<Ecn> 0 OPEN

1 WEP

2 WPA_PSK

3 WPA2_PSK

4 WPA_WPA2_PSK

<Ssid> string parameter, the access point name

<Rssi> signal strength

<Mode> 0 manually connect

An automatic connection

And now we can compare this with the page from the Chinese manual to see how it should be formatted.

You can see that the "An automatic connection" phrase at the end of the translated section should have a "1" in front of it.

So, what should happen if you request a list of the access points? Lets assume there is an open access point at a coffee shop called attwifi with an RSSI of 80. 

Starting from the top, you should send 

AT+CWLAB

to the ESP8266. The ESP8266 will then send either OK or ERROR. It should then send 

+ CWLAB: 0,attwifi,80

The <mode> at the end is in brackets which means that is might not show up every time the chip sends this information. If <mode> is 0, it means "manual connection" and if <mode> is 1, it means "automatic connection". I believe that this will indicate if you manually connected to the access point or if it automatically joined the access point. If it doesn't set anything for <mode>, you aren't connected to the access point. This might point to an ability to set the ESP8266 to automatically join an access point if it sees it, however I could be wrong about this. I don't see anything in the "Join Access Point" AT command that indicates that you can register an access point as an automatic connection, but maybe the EPS8266 does this automatically whenever you join an access point. 

I will be working on formatting this document and pouring over it for more hints about  the functionality. Take a look and let me know what you find!

Discussions