AT Command Set¶
Here is a list of AT commands. Some of them can only work on the ESP32 series, so they are marked as [ESP32 Only] at the beginning; those without any mark can work on all ESP series, including ESP32, ESP8266, ESP32-S2, and ESP32-C3.
- Basic AT Commands
- Wi-Fi AT Commands
- TCP-IP AT Commands
- [ESP32 Only] Bluetooth® Low Energy AT Commands
- [ESP32 Only] Bluetooth® AT Commands
- MQTT AT Commands
- HTTP AT Commands
- [ESP32 Only] Ethernet AT Commands
- [ESP8266 Only] Signaling Test AT Commands
- Web server AT Commands
- [ESP32 & ESP32S2 & ESP32-C3] Driver AT Commands
- AT Command Set Comparison
It is strongly recommended to read the following sections for some common information on AT commands before you dive into the details of each command.
Generic AT command has four types:
Query the Set Commands’ internal parameters and their range of values.
Return the current value of parameters.
Set the value of user-defined parameters in commands, and run these commands.
Run commands with no user-defined parameters.
Not all AT commands support all of the four types mentioned above.
Currently, only strings and integer numbers are supported as input parameters in AT commands.
Angle brackets < > designate parameters that can not be omitted.
Square brackets [ ] designate optional parameters that can be omitted. The default value of the parameter will be used instead when you omit it. Below are examples of entering the command AT+CWJAP with some parameters omitted.
If the parameter you want to omit is followed by a parameter(s), you must give a
,to indicate it.
String values need to be included in double quotation marks.
Escape character syntax is needed if a string contains special characters, such as
\\: escape the backslash itself
\,: escape comma which is not used to separate each parameter
\": escape double quotation mark which is not used to mark string input
<any>character means that drop backslash symbol and only use
Escape is needed in AT commands only, not elsewhere. For example, when AT command port prints
>and wait for your input, the input does not need to be escaped.
The default baud rate of AT command is 115200.
The length of each AT command should be no more than 256 bytes.
AT commands end with a new-line (CR-LF), so the serial tool should be set to “New Line Mode”.
Definitions of AT command error codes are provided in AT API Reference:
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:
Saving of configuration settings by several other commands can be switched on or off with AT+SYSSTORE command, which is mentioned in the Note section of these commands.
There are two types of ESP-AT messages returned from the ESP-AT command port:
ESP-AT Response Messages (passive)
Each ESP-AT command input returns response messages to tell the sender the result of the ESP-AT command.
AT Response Messages
AT command process done and return OK
AT command error or error occurred during the execution
Response to the sender that describes AT command process results in details
ESP-AT Message Reports (active)
ESP-AT will report important state changes or messages in the system.
ESP-AT Message Report
The ESP-AT firmware is ready
Busy processing. The system is in process of handling the previous command, thus CANNOT accept the new input
Error code for different commands
Will force to restart!!!
Module restart right now
Smart get wifi info
Smartconfig has got the SSID and PASSWORD information
smartconfig connected wifi
Smartconfig done. ESP-AT has connected to the Wi-Fi
Wi-Fi station interface has connected to an AP
WIFI GOT IP
Wi-Fi station interface has got the IPv4 address
WIFI GOT IPv6 LL
Wi-Fi station interface has got the IPv6 LinkLocal address
WIFI GOT IPv6 GL
Wi-Fi station interface has got the IPv6 Global address
Wi-Fi station interface has disconnected from an AP
Ethernet interface has connected
Ethernet interface has got the IPv4 address
Ethernet interface has disconnected
A network connection of which ID is
<conn_id>is established (ID=0 by default)
A network connection of which ID is
<conn_id>ends (ID=0 by default)
Detailed connection information of TCP/UDP/SSL
A station has connected to the Wi-Fi softAP interface of ESP-AT
The Wi-Fi softAP interface of ESP-AT distributes an IP address to the station
A station disconnected from the Wi-Fi softAP interface of ESP-AT
ESP-AT is waiting for more data to be received
ESP-AT has already received
<xxx>bytes from the ESP-AT command port
ESP-AT received the data from the network
Cancel to send in Wi-Fi normal sending mode
Has reached the maximum connection counts for server
ESP-AT quits from the Wi-Fi Passthrough Mode
NO CERT FOUND
No valid device certificate found in custom partition
NO PRVT_KEY FOUND
No valid private key found in custom partition
NO CA FOUND
No valid CA certificate found in custom partition
MQTT connected to the broker
MQTT disconnected from the broker
MQTT received the data from the broker
MQTT failed to publish data
MQTT publish data done
A Bluetooth LE connection established
A Bluetooth LE connection ends
A read operation from Bluetooth LE connection
A write operation from Bluetooth LE connection
A notification from Bluetooth LE connection
An indication from Bluetooth LE connection
Bluetooth LE SMP key
Received encryption request which index is <conn_index>
Bluetooth LE SMP pairing completed