ESP8266 AT Commands Set

This tutorial provides AT commands based on ESP8266_NONOS_SDK and explain how to use them. AT command set is divided into: Basic AT commands, Wi-Fi AT commands, and TCP/IP AT commands.

ESP8266 is a powerful controller with 4Mbytes of Flash and 84Kbytes of RAM. Then why you should use it as just Serial to WiFi module. I recommend use ESP with direct flashing i.e. without using AT commands.

You can Download Complete AT command set for ESP8266 NodeMCU here.

AT Commands Firmware

AT commands will not work if ESP8266 not flashed with AT Firmware.

Downloading AT Firmware into the Flash. Please refer to ESP8266_NONOS_SDK/bin/at/readme.txt for instructions on how to download AT firmware into flash. Please use Espressif’s official Flash Download Tools to download the firmware. Make sure you select the corresponding flash size.
Espressif’s official Flash Download Tools: Espressif Download Tool

Basic AT commands of NodeMCU ESP8266

Commands Description
AT Tests AT startup.
AT+RST Restarts the module.
AT+GMR Checks version information.
AT+GSLP Enters Deep-sleep mode.
ATE Configures echoing of AT commands.
AT+RESTORE Restores the factory default settings of the module.
AT+UART UART configuration. [deprecated]
AT+UART_CUR The current UART configuration.
AT+UART_DEF The default UART configuration, saved in flash.
AT+SLEEP Configures the sleep modes.
AT+WAKEUPGPIO Configures a GPIO to wake ESP8266 up from Light-sleep mode.
AT+RFPOWER Sets the maximum value of the RF TX Power.
AT+RFVDD Sets the RF TX Power according to VDD33.
AT+RFAUTOTRACE Sets RF frequency offset trace.
AT+SYSRAM Checks the available RAM size.
AT+SYSADC Checks the ADC value.
AT+SYSIOSETCFG Sets configuration of IO pins.
AT+SYSIOGETCFG Gets configuration of IO pins.
AT+SYSGPIODIR Configures the direction of GPIO.
AT+SYSGPIOWRITE Configures the GPIO output level
AT+SYSGPIOREAD Checks the GPIO input level.

Wi-Fi AT commands of ESP8266

Commands Description
AT+CWMODE Sets the Wi-Fi mode (Station/AP/Station+AP). [@deprecated]
AT+CWMODE_CUR Sets the Wi-Fi mode (Station/AP/Station+AP); configuration not saved in the flash.
AT+CWMODE_DEF Sets the default Wi-Fi mode (Station/AP/Station+AP); configuration saved in the flash.
AT+CWJAP Connect to an AP. [@deprecated]
AT+CWJAP_CUR Connects to an AP; configuration not saved in the flash.
AT+CWJAP_DEF Connects to an AP; configuration saved in the flash.
AT+CWLAPOPT Sets the configuration of command AT+CWLAP.
AT+CWLAP Lists available APs.
AT+CWQAP Disconnects from an AP.
AT+CWSAP Sets the configuration of the ESP8266 SoftAP. [@deprecated]
AT+CWSAP_CUR Sets the current configuration of the ESP8266 SoftAP; configuration not saved in the flash.
AT+CWSAP_DEF Sets the configuration of the ESP8266 SoftAP; configuration saved in the flash.
AT+CWLIF Gets the Station IP to which the ESP8266 SoftAP is connected.
AT+CWDHCP Enables/Disables DHCP. [@deprecated]
AT+CWDHCP_CUR Enables/Disables DHCP; configuration not saved in the flash.
AT+CWDHCP_DEF Enable/Disable DHCP; configuration saved in the flash.
AT+CWDHCPS_CUR Sets the IP range of the DHCP server; configuration not saved in the flash.
AT+CWDHCPS_DEF Sets the IP range of the DHCP server; configuration saved in the flash.
AT+CWAUTOCONN Connects to an AP automatically on power-up.
AT+CIPSTAMAC Sets the MAC address of the ESP8266 Station. [@deprecated]
AT+CIPSTAMAC_CUR Sets the MAC address of the ESP8266 Station; configuration not saved in the flash.
AT+CIPSTAMAC_DEF Sets the MAC address of ESP8266 station; configuration saved in the flash.
AT+CIPAPMAC Sets the MAC address of the ESP8266 SoftAP. [@deprecated]
AT+CIPAPMAC_CUR Sets the MAC address of the ESP8266 SoftAP; configuration not saved in the flash.
AT+CIPAPMAC_DEF Sets the MAC address of the ESP8266 SoftAP; configuration saved in the flash.
AT+CIPSTA Sets the IP address of the ESP8266 Station. [@deprecated]
AT+CIPSTA_CUR Sets the IP address of the ESP8266 Station; configuration not saved in the flash.
AT+CIPSTA_DEF Sets the IP address of the ESP8266 Station; configuration saved in the flash.
AT+CIPAP Sets the IP address of ESP8266 SoftAP. [@deprecated]
AT+CIPAP_CUR Sets the IP address of ESP8266 SoftAP; configuration not saved in the flash.
AT+CIPAP_DEF Sets the IP address of ESP8266 SoftAP; configuration saved in the flash.
AT+CWSTARTSMART Starts SmartConfig.
AT+CWSTOPSMART Stops SmartConfig.
AT+CWSTARTDISCOVER Enables the mode that ESP8266 can be found by WeChat.
AT+CWSTOPDISCOVER Disables the mode that ESP8266 can be found by WeChat.
AT+WPS Sets the WPS function.
AT+MDNS Sets the MDNS function.
AT+CWHOSTNAME Sets the host name of the ESP8266 Station.

TCP/IP AT commands for ESP8266

Command Description
AT+CIPSTATUS Gets the connection status
AT+CIPDOMAIN DNS function
AT+CIPSTART Establishes TCP connection, UDP transmission or SSL connection
AT+CIPSSLSIZE Sets the size of SSL buffer
AT+CIPSEND Sends data
AT+CIPSENDEX Sends data when length of data is <length>, or when \0 appears in the data
AT+CIPSENDBUF Writes data into TCP-send-buffer
AT+CIPBUFRESET Resets the segment ID count
AT+CIPBUFSTATUS Checks the status of TCP-send-buffer
AT+CIPCHECKSEQ Checks if a specific segment is sent or not
AT+CIPCLOSE Closes TCP/UDP/SSL connection
AT+CIFSR Gets the local IP address
AT+CIPMUX Configures the multiple connections mode
AT+CIPSERVER Deletes/Creates a TCP server
AT+CIPMODE Configures the transmission mode
AT+SAVETRANSLINK Saves the transparent transmission link in the flash
AT+CIPSTO Sets timeout when ESP8266 runs as TCP server
AT+PING Ping packets
AT+CIUPDATE Upgrades the software through network
AT+CIPDINFO Shows remote IP and remote port with +IPD
AT+CIPSNTPCFG Configures the time domain and SNTP server.
AT+CIPSNTPTIME Queries the SNTP time.
AT+CIPDNS_CUR Sets user-defined DNS servers; configuration not saved in the flash
AT+CIPDNS_DEF Sets user-defined DNS servers; configuration saved in the flash

Direct flashing/programming of ESP is recommended to get maximum benefits of powerful low cose WiFi Module. It uses same Arduino IDE and its C commands.

Leave a Reply