AT Command Set¶
Here is a list of AT commands. Some of the AT commands can only work on the ESP32, which is marked as [ESP32 Only]; others can work on both the ESP8266 and ESP32.
Before checking the command set details, please review some common information on command types, configurations that can be saved in the flash, as well as messages returned after entering commands.
AT Command Types¶
Generic AT command has four types:
|Test Command||AT+=?||Queries the Set Commands’ internal parameters and their range of values.|
|Query Command||AT+?||Returns the current value of parameters.|
|Set Command||AT+=<…>||Sets the value of user-defined parameters in commands, and runs these commands.|
|Execute Command||AT+||Runs commands with no user-defined parameters.|
Not all AT commands support all four types mentioned above.
Square brackets [ ] designate parameters that may be omitted; default value of the parameter will be used instead.
Below are examples of entering command AT+CWJAP with some parameters omitted:
If the parameter which is not the last one is omitted, you can give a
,to indicate it.
String values need to be included in double quotation marks, for example:
Escape character syntax is needed if a string contains any special characters, such as
\\: escape backslash itself
\,: escape comma which is used to separate each parameter
\": escape double quotation marks which used to mark string input
<any>character means that drop backslash symbol and only use
The default baud rate of AT command is 115200.
AT commands are ended with a new-line (CR-LF), so the serial tool should be set into “New Line Mode”.
Definitions of AT command error codes are provided in AT API Reference:
AT Commands with Configuration Saved in the Flash¶
Configuration settings entered by the following AT Commands will always be saved in the flash NVS Area, so they can be automatically restored on reset:
- AT+UART_DEF: for example,
- AT+SAVETRANSLINK : for example,
- AT+CWAUTOCONN: for example,
|ready||The AT firmware is ready.|
|ERROR||AT command error, or error occurred during execution.|
|WIFI CONNECTED||ESP station connected to an AP.|
|WIFI GOT IP||ESP station got IP address.|
|WIFI DISCONNECT||ESP station disconnected from an AP.|
|busy p…||Busy processing. The system is in process of handling the previous command, cannot accept the newly input.|
|<conn_id>,CONNECT||A network connection of which ID is <conn_id> is established.|
|<conn_id>,CLOSED||A network connection of which ID is <conn_id> ends.|
|+IPD||Network data received.|
|+STA_CONNECTED: <sta_mac>||A station connects to the ESP softAP.|
|+DIST_STA_IP: <sta_mac>,<sta_ip>||ESP softAP distributes an IP address to the station connected.|
|+STA_DISCONNECTED: <sta_mac>||A station disconnects from the ESP softAP.|
|+BLECONN||A BLE connection established.|
|+BLEDISCONN||A BLE connection ends.|
|+READ||A read operation from BLE connection.|
|+WRITE||A write operation from BLE connection.|
|+NOTIFY||A notification from BLE connection.|
|+INDICATE||An indication from BLE connection.|
|+BLESECNTFYKEY||BLE SMP key|
|+BLEAUTHCMPL||BLE SMP pairing completed.|