ESP8266 WiFi Module offers complete networking solutions to our DIY (Do-it-yourself) and IoT (Internet of Things) projects. It provides WiFi connectivity to any microcontroller through its full TCP/IP Stack. The ESP8266 WiFi module and the microcontroller can be interface through UART and with the help of a wide range of AT Commands, the Microcontroller can control the ESP Module. The AT Commands of the ESP8266 WiFi Module are responsible for controlling all the operations of the module like restart, connect to WiFi, change mode of operation and so forth. So, it is important to understand the ESP8266 AT Commands, at least a few important ones if not all.

Types of ESP8266 AT Commands

Before going into the details of the AT Command Set and how the AT Commands are divided, you need to understand about the different types AT Commands. Basically, the ESP8266 AT Commands can be classified into four types:

Test Query Set Execute

The following table gives you a clear idea about these different types of AT Commands. Here, I’ll use a sample command as “TEST” to demonstrate the differences.    Test Commands: The Test AT Commands of ESP8266 WiFi Module are used to get the parameters of a command and their range. Query Commands: The Query Commands returns the present value of the parameters of a command. Set Commands: The Set Commands are used set the values of the parameters in the commands and also runs the commands. Execute Commands: The Execute Commands will run the commands without parameters.   NOTE: Not all the ESP8266 AT Commands support all the four command types. Now that we have seen the different types of ESP8266 AT Commands, let us proceed with the actual AT Commands list.

ESP8266 AT Commands Set

The ESP8266 AT Commands Set is divided into three categories. They are:

Basic AT Commands  WiFi AT Commands  TCP/IP AT Commands 

There are a total of 88 AT Commands for ESP8266 WiFi Module. I will not talk about all the 88 AT Commands but just a few important ones. If you want to know the details of all the ESP8266 AT Commands, then I suggest you to visit the official documentation page provided by Espressif Systems (the manufacturer of ESP8266EX SoC). You can view the official ESP8266 AT Commands Documentation from here.    Let us see about different ESP8266 AT Commands in each category along with their format (syntax) and responses. NOTE: The Parameters mentioned in [] are optional.

Basic ESP8266 AT Commands

As per the official documentation from Espressif Systems, there are a total of 23 Basic AT Commands. AT This is the basic command that tests the AT start up i.e. if the AT System is working correctly or not. If the AT start up is successful, then the response is OK.   AT+RST This command can be used to restart (reset) the ESP8266 WiFi Module.       AT+GMR This command is used to check the version information of the firmware and SDK. The response consists of three things: the AT Firmware version, the SDK version and the compilation time of the BIN file.   OK Other important Basic AT Commands: AT+GSLP, ATE and AT+UART.

WiFi AT Commands

The WiFi AT Commands are useful in controlling the WiFi features of the ESP8266 Module like setting up the WiFi Mode of operation, get the list of WiFi Networks, connect to a WiFi Network, setup the Access Point (AP), control DHCP, WPS, MAC Address, IP Address etc. As per the official documentation, there are 40 WiFi AT Commands for ESP8266 Module. Let me introduce a few important AT Commands.   AT+CWMODE This command is used to set the WiFi Mode of operation as either Station mode, Soft Access Point (AP) or a combination of Station and AP. The CWMODE command supports Test, Query and Set type commands. The syntax, response and parameters (in Set command) of this command are given in the following table.   OK OK 1: Station 2: Soft Access Point (AP) 3: Station+SoftAP AT+CWLAP This command lists out all the available WiFi Networks in the reach of ESP8266. It has both Set and Execute Command types.   ,<scan_time_min>,<scan_time_max>] freq      offset>,<freq   cali>,<pairwise_cipher>, <group_cipher>,, OK NOTE: For more information on Parameters, please refer to the original documentation. AT+CWJAP This command is to connect to an Access Point (like a router).     OK +CWJAP: FAIL : Password. []: MAC Address of AP (used when multiple APs have the same SSID.) 1: Connection timeout. 2: Wrong password. 3: Cannot find the target AP. 4: Connection failed. AT+CWQAP This command is used to disconnect the ESP8266 from an Access Point.   AT+CIPSTA This command is used to set a static IP Address to the ESP8266 WiFi Module in Station Mode. This command has both Query and Set type commands.   +CIPSTA: +CIPSTA:   OK : Netmask AT+CWSAP This command is used to configure the ESP8266 WiFi Module in Soft Access Point (AP) Mode. Both Query and Set types are available for this command.   conn>][,<ssid  hidden>] ERROR : Password. : Channel ID. : Encryption method. 0: OPEN 2: WPA_PSK 3: WPA2_PSK 4: WPA_WPA2_PSK : Max # of Stations

TCP/IP AT Commands

The TCP/IP AT Commands are responsible for communication over the internet. There are a total of 25 TCP/IP AT Commands for ESP8266 WiFi Module. Some of the important ones are mentioned here.   AT+CIPSTATUS This TCP/IP AT Command of the ESP8266 WiFi Module get the information or status of the connection. Only the Execute type command is available.   +CIPSTATUS:,,,,, 2: Connected to an AP and its IP is obtained. 3: Created a TCP or UDP transmission. 4: Disconnected. 5: Does NOT connect. : ID of the connection. : “TCP” or “UDP”. : Remote IP address. : Remote port number. : Local port number. : 0: Client. 1: Server. AT+CIPSTART This AT Command is used to establish one of the three connections: TCP, UDP or SSL. Depending on the type of TCP Connection (single or multiple), the format of the Set command will vary.   , [,] , [,] or ERROR (Response when TCP connection is already established: ALREADY CONNECTED) : “TCP”, “UDP” or “SSL”. : Remote IP address. : Remote port number. []: detection time interval NOTE: The above table shows command for only establishing the TCP Connection. For establishing UDP and SSL Connections, please refer to the official documentation. AT+CIFSR This AT Command is used to obtain the IP Address of the ESP8266 WiFi Module.   +CIFSR:APMAC, +CIFSR:STAIP, +CIFSR:STAMAC, OK : MAC address of the ESP8266 SoftAP : IP address of the ESP8266 Station. : MAC address of the ESP8266 Station AT+CIPMUX This AT Command is used to enable or disable multiple TCP Connections.   OK 0: Single connection 1: Multiple connections AT+CIPSERVER This AT Command is used to create or delete a TCP Server.   0: Delete Server. 1: Create Server. NOTE: A TCP Server can be created only when AT+CIPMUX=1 i.e. multiple connections are enabled. AT+CIUPDATE This AT Command is used update the software through WiFi Connection i.e. for over the air (OTA) updates.   OK 1: Find the Server 2: Connect to the Server 3: Get the Software Version 4: Start Update RELATED POSTS: GETTING STARTED WITH ESP8266 AND ARDUINO  HOW TO FLASH FIRMWARE IN ESP8266?  DIY BREAKOUT BOARD FOR ESP8266 PCB one more time, very thanks for your post. Comment * Name * Email * Website

Δ

ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 12ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 55ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 92ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 6ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 77ESP8266 AT Commands  AT Instruction Set    Electronics Hub - 98