ESP-AT User Guide Choose target... Choose version... Get Started AT Binary Lists AT Command Set AT Command Examples ESP-AT Versions Compile and Develop Customized AT for 3rd-Patry Open Cloud Platforms FAQ Index of Abbreviations Disclaimer About ESP-AT User Guide ESP-AT User Guide Edit on GitHub ESP-AT User Guide [中文] This is the documentation for ESP-AT Development Framework. ESP-AT project was started and powered by Espressif Systems as an official project, for the ESP32, ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-C61, and ESP32-S2 Series SoCs provided for Windows, Linux, and macOS. This document describes using ESP-AT with the ESP32-C2 SoC. To switch to a different SoC target, choose target from the dropdown in the upper left. Get Started AT Binary Lists AT Command Set AT Command Examples Compile and Develop Customized AT Commands and Firmware Index Provide feedback about this document Next © Copyright 2016 - 2026, Espressif Systems (Shanghai) Co., Ltd.. Built with Sphinx using a theme based on Read the Docs Sphinx Theme. Download PDF
ESP-AT User Guide Choose target... Choose version... Get Started AT Binary Lists AT Command Set AT Command Examples ESP-AT Versions Compile and Develop How to Compile ESP-AT Project Locally How to Compile ESP-AT Project on the GitHub Webpage How to Set AT Port Pin How to Add User-Defined AT Commands How to Improve ESP-AT Throughput Performance How to Update mfg_nvs Partition How to Update Factory Parameters How to Update PKI Configuration How to Customize Bluetooth® LE Services How to Customize Partitions How to Add Support for a Module How to Implement SPI AT How to Implement OTA Update How to Update IDF ESP-AT Firmware Differences How to Download the Latest Temporary Version of AT Firmware from GitHub at.py tool AT API Reference How to Configure Silence Mode How to Enable More AT Debug Logs AT Wi-Fi Function Debugging AT Network Function Debugging TCP Debugging UDP Debugging SSL Debugging ICMP Debugging lwIP Network Debugging AT BLE Function Debugging AT Interface Function Debugging Debugging Examples Example 1: Debugging the Data Sending and Receiving Process of TCP Connections Example 2: Debugging BLE connection and scanning processes Customized AT for 3rd-Patry Open Cloud Platforms FAQ Index of Abbreviations Disclaimer About ESP-AT User Guide How to Compile and Develop Your Own AT Project How to Enable More AT Debug Logs Edit on GitHub How to Enable More AT Debug Logs [中文] This article mainly introduces how to enable log configuration options. To obtain more log information for debugging ESP-AT functionalities, please refer to the guide to compile the ESP-AT project, and in step three, set the silence mode to No. In step five, based on your actual situation, enable the specific logging configuration options. AT Wi-Fi Function Debugging AT Network Function Debugging AT BLE Function Debugging AT Interface Function Debugging Debugging Examples The final debugging logs will be output from the AT log port. Please refer to the Hardware Connection document to find the TX GPIO pin corresponding to the Output Log and use a serial tool to view the logs on that pin. Note Enabling log configuration options will significantly increase the log output. Therefore, it is recommended to first confirm which module the issue belongs to and then enable the corresponding module’s log configuration. This prevents issues such as being unable to reproduce or encountering new problems like task wdt due to excessive log output. Enabling log configuration options will increase the firmware size. This may lead to compilation failures. To resolve this, you can reduce the firmware size by disabling unused AT functionalities via the configuration menu: python build.py menuconfig > Component config > AT. AT Wi-Fi Function Debugging You can enable the following configurations to turn on logging for Wi-Fi packet statistics: Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Periodically dump Wi-Fi statistics
Component config > AT > Enable ESP-AT Debug > Periodically dump Wi-Fi statistics > The interval of dumping Wi-Fi statistics (ms)
You can enable the following configurations to turn on debugging logs for the Wi-Fi interaction process: Component config > Log > Log Level > Default log verbosity > Debug
Component config > Supplicant > Print debug messages from WPA Supplicant
Note When analyzing logs, you may encounter Wi-Fi reason codes. For the specific meanings, please refer to the Wi-Fi Reason Code. AT Network Function Debugging TCP Debugging UDP Debugging SSL Debugging ICMP Debugging lwIP Network Debugging TCP Debugging To monitor outgoing (TX) and incoming (RX) packets for TCP or TCP-based protocols (such as SSL, HTTP, MQTT, WebSocket, etc.), enable the following configuration. The final logs will print TCP packet information, including IP total length, TCP data length, TCP sequence number, TCP acknowledgment number, TCP source port, destination port, and TCP flags. The TCP flags are cumulative. Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the TCP packet debug messages
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the TCP packet debug messages > Specify the list of TCP port numbers to monitor > 0
UDP Debugging To monitor outgoing (TX) and incoming (RX) packets for UDP or UDP-based protocols (such as DHCP, DNS, SNTP, mDNS, etc.), enable the following configuration. The final logs will print UDP packet information, including IP total length, source port, destination port, and UDP data length. Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the UDP packet debug messages
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the UDP packet debug messages > Specify the list of outgoing UDP (UDP TX) port numbers to monitor
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the UDP packet debug messages > Specify the list of incoming UDP (UDP RX) port numbers to monitor
SSL Debugging You can enable the following configurations to enable debugging logs for SSL functionality: Component config > Log > Log Level > Default log verbosity > Verbose
Component config > mbedTLS > Enable mbedTLS debugging
Component config > mbedTLS > Enable mbedTLS debugging > Set mbedTLS debugging level > Verbose
ICMP Debugging You can enable the following configurations to enable debugging logs for the ICMP functionality (AT+PING): Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug
Component config > AT > Enable ESP-AT Debug > Enable Network Debug > Enable the ICMP packet debug messages
lwIP Network Debugging If the logs output by enabling the above configurations still do not meet your debugging needs, you can enable the required debugging configurations under the path Component config > LWIP > Enable LWIP Debug. AT BLE Function Debugging You can directly view the disconnection reason code on the AT log port to debug the BLE disconnection process. You can enable the following configurations to turn on BLE function debugging logs: Component config > Log > Log Level > Default log verbosity > Debug
Component config > Bluetooth > NimBLE Options > NimBLE Host log verbosity > Debug logs
AT Interface Function Debugging When you want to obtain the data sent from AT to MCU through TX at the AT log port, you can enable the following configurations: Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Logging the data sent from AT to MCU (AT ---> MCU)
Component config > AT > Enable ESP-AT Debug > Logging the data sent from AT to MCU (AT ---> MCU) > The maximum length of the data sent from AT to MCU to be logged > 8192
When you want to obtain the data sent from MCU to AT through RX at the AT log port, you can enable the following configurations: Component config > Log > Log Level > Default log verbosity > Info (or Info and above levels)
Component config > AT > Enable ESP-AT Debug
Component config > AT > Enable ESP-AT Debug > Logging the data received by AT from MCU (AT <---- MCU)
Component config > AT > Enable ESP-AT Debug > Logging the data received by AT from MCU (AT <---- MCU) > The maximum length of the data received by AT from MCU to be logged > 8192
Debugging Examples Example 1: Debugging the Data Sending and Receiving Process of TCP Connections Scene: With a baud rate of 115200 and using full-duplex flow control, the ESP module establishes a TCP connection as a TCP client with the server. It enters transparent transmission mode and sends data to the server. Data Stream As shown by the arrows in the figure: The Data stream sent by ESP-AT is (TX): S1 -> S2 -> S3 -> S4 -> S5 -> S6 -> S7 -> S8 The Data stream received by ESP-AT is (RX): R8 -> R7 -> R6 -> R5 -> R4 -> R3 -> R2 -> R1 To troubleshoot data transmission issues in the AT firmware across various communication layers (UART, AT interface, network, Wi-Fi), follow the structured guidance below and choose the appropriate debugging method: For S1/R1 (UART Communication): Use a logic analyzer to capture the serial data sent from the MCU to the ESP module (TX -> RX lines) to verify UART communication. If any anomalies are detected (typi