AT Command Set
This chapter describes how to use various AT commands.
We strongly recommend reading the following before using commands to learn basic AT command information.
AT Command Types
Generic AT commands fall into four types:
Type |
Command Format |
Description |
|---|---|---|
Test Command |
AT+<command name>=? |
Query internal parameters and value ranges of a set command |
Query Command |
AT+<command name>? |
Return current parameter values |
Set Command |
AT+<command name>=<…> |
Set user-defined parameter values and execute the command |
Execute Command |
AT+<command name> |
Execute a command without user-defined parameters |
Not every AT command supports all four types above.
Command parameters currently support string and integer types only.
Parameters inside angle brackets < > cannot be omitted.
Parameters inside square brackets [ ] are optional; defaults apply when omitted. For example, when running AT+WJAP with certain parameters omitted:
AT+WJAP="ssid","password" AT+WJAP="ssid","password","11:22:33:44:55:66"
When omitted parameters are followed by parameters that must be specified, use
,as a placeholder separator, for example:AT+CWJAP="ssid","password",,1
Use double quotes for string parameters, for example:
AT+CWSAP="ESP756290","21030826",1,4
Special characters must be escaped, such as
,,",\, etc.\\: Escape backslash.\,: Escape comma; commas used to separate parameters do not need escaping.\": Escape double quote; double quotes enclosing string parameters do not need escaping.\<any>: Escape the<any>character; use<any>alone without a backslash.
Only special characters within AT commands need escaping; other contexts do not. For example, when the AT port prints
>waiting for input data, that data does not need escaping.AT+WJAP="comma\,backslash\\ssid","1234567890" AT+MQTTPUB=0,"topic","\"{\"sensor\":012}\"",1,0
The default baud rate for AT commands is 115200.
Each AT command must not exceed 256 bytes in length.
The maximum receive buffer size per AT command packet is 1024 bytes.
AT commands end with a newline (CR-LF), so the serial tool should be set to “Newline mode”.
See Response Error Codes for AT command error code definitions.