esp8266/AT Commands.md at master · abkonsta/esp8266

ATCheck modulebaseAT-If the module is successfully started, then say “OK”

AT + RSTRestart modulebaseAR + RST-After a successful restart returns “OK”

AT + GMRDisplay firmware versionbaseAT + GMR-Version is displayed as eight digits. The first group of 4 digits – version of the AT (eg, 0022), a second group of 4 – version of the SDK (for example, 0100)

AT + GSLPTransition to low power modebaseAT + GSLP = <time in ms>Example: AT + GSLP = 5000 (5s)
To the module came from sleep mode, you need to connect terminals and XPD_DCDC EXT_RSTB

ATEEnable / disable echobaseATE0
ATE1Note: ATE 0 or 1 without an error.

AT + RESTOREReset to factory settingsbaseAT + RESTORENote: After resetting the unit will restart

AT + UART_CUR
Set the serial interface for the current session without storing in the flash memory
base
AT+UART_CUR=115200,8,1,0,3

speed 4400-4608000
data bits (5,6,7,8)
stop bits
1: 1 stop bit
2: 1.5 stop bit
3: 2 stop bits
parity
0: No
1: Odd
2: Even
flow control
0: disabled
1: RTS enabled
2: CTS enabled
3: Both

AT + UART_DEFSame as AT + UART_CURbaseCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWMODE_CURSwitching the wifi for the current session (current, ie without storing in the flash memory)wifiAT + CWMODE_CUR = <mode>CWMODE_CUR + AT?
AT + = CWMODE_CUR?1 = Station (WiFi client) 2 = SoftAP (AP) 3 = Both modes (Station + SoftAP)
For example, AT + CWMODE_CUR = 1

AT + CWMODE_DEFThe team is completely analogous to AT + CWMODE_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWJAP_CURConnecting to the AP, the AP (current, ie without storing in the flash memory)wifiAT + CWJAP_CUR = <network ID> <password>AT + CWJAP_CUR?
Returns the name of the network to which you are connectedReturns OK or ERROR.
SSID WiFi network and the password are specified in double quotes, the password up to 64 characters ASCII. The command is not available in SoftAP (access point).
The data is NOT stored in flash memory. In the case of SSID or password to special characters (”, ” ‘and’ \ ‘) they should escape backslash. For example,
if the SSID “ab \, c”
and the password “0123456789” \ “then the team will take the form
AT + CWJAP_CUR =” ab \\\, c “,” 0123456789 \ “\\”

AT + CWJAP_DEFThe team is completely analogous to AT + CWJAP_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWLAPDisplay a list of available access pointswifiAT + CWLAP shows all available access pointsAT + CWLAP = ssid, mac, ch
shows the access point, only the relevant set parametersDisplays the SSID, encryption method, signal strength, MAC address, channel number. The types of encryption: 0: Open, 1: WEP, 2: WPA_PSK, 3: WPA2_PSK, 4: WPA_WPA2_PSK
Examples: AT + CWLAP = “wifi”, “ca: d7: 19: d8: a6: 44”, 6
or search for WiFi network with the name “home”
AT + CWLAP = “home”, “”

AT + CWQAPDisconnect from access pointwifiAT + CWQAPAT + CWQAP =? test team-

AT + CWSAP_CURCreate SoftAP (access point) for the current sessionwifiAT + CWSAP_CUR = <network ID> <password>, <channel>, <Encryption Type>AT + CWSAP_CUR? returns the current access point settingsThe command is only available when the module is in SoftAP (access point). Requires RST + AT.
SSID and password are specified in double quotes. Password up to 64 characters. The types of encryption: 0: Open, 2: WPA_PSK, 3: WPA2_PSK, 4: WPA_WPA2_PSK (WEP encryption is not available in this version)
Example: AT + CWSAP_CUR = “ESP8266”, “1234567890”, 5.3

AT + CWSAP_DEFThe team is completely analogous to AT + CWSAP_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWLIFDisplay the IP address of stations connected to the access point ESP8266 SoftAPwifiAT + CWLIF-(for modes 2 and 3-SoftAP-Station + SoftAP)

AT + CWDHCP_CUREnable or disable DHCP server for the current session
wifiAT + CWDHCP_CUR = <mode>, <ON><mode>
0: ESP8266 SoftAP
1: ESP8266 station
2: SoftAP and station
<ON>
0: Disable DHCP
1: Enable DHCP
Example: AT + CWDHCP_CUR = 0,1

AT + CWDHCP_DEFThe team is completely analogous to AT + CWDHCP_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWAUTOCONNAutomatic connection to an access point (saved in flash memory)wifiAT + CWAUTOCONN = <ON><ON>
0: do not automatically connect to the access point after the start of the module
1: automatically connect to the access point after the start of the module
Default ESP8266 station is automatically connected to the access point

AT + CIPSTAMAC_CURView / set MAC address of the station mode for the current sessionwifiAT + CIPSTAMAC =AT + CIPSTAMAC_CUR?
Displays the current MAC address of StationExample: AT + CIPSTAMAC_CUR = “18: fe: 35: 98: d3: 7b”

AT + CIPSTAMAC_DEFThe team is completely analogous to AT + CIPSTAMAC_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CIPAPMAC_CURView / set MAC Address mode SoftAP (access point) for the current sessionwifiAT + CIPAPMAC_CUR =AT + CIPAPMAC_CUR? Displays the current MAC address of the access point SoftSPExample: AT + CIPAPMAC_CUR = “1a: fe: 36: 97: d5: 7b”

AT + CIPAPMAC_DEFThe team is completely analogous to AT + CIPAPMAC_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CIPSTA_CURView / set the IP address of the station mode for the current sessionwifiAT + CIPSTA_CUR =[<Gateway>, <mask>]AT + CIPSTA_CUR? Displays the current IP address of the stationip – ip address as a string, <gateway> – default gateway <mask> – subnet mask. Example: AT + CIPSTA_CUR = “192.168.6.100”, “192.168.6.1”, “255.255.255.0”

AT + CIPSTA_DEFThe team is completely analogous to AT + CIPSTA_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CIPAP_CURView / set the IP address in the mode SoftAP (access point) for the current sessionwifiAT + CIPAP_CUR =AT + CIPAP_CUR? Displays the current IP address SoftAP (AP)Example: AT + CIPAP_CUR = “192.168.5.1”

AT + CIPAP_DEFThe team is completely analogous to AT + CIPAP_CURwifiCommand parameters are stored in flash memory and are loaded when you start the unit.

AT + CWSTARTSMARTThe team starts the process SmartConfigwifiAT + CWSTARTSMART = <protocol type><protocol type> – 1: ESP_TOUCH
2: AirKiss
1. Read additional information about SmartConfig from Espressif.
2. For ESP8266 mode must be activated Station
3. After receiving the message “Smart get wifi info” SmartConfig successfully completed, you can use the command “AT + CIFSR” to check the ip address, obtained from the router
4. ESP8266 not respond to commands during SmartConfig, use the command “AT
+ CWSTOPSMART” to stop the process.
Example: AT + CWMODE = 3
AT + CWSTARTSMART = 1

AT + CWSTOPSMARTThe command stops the SmartConfigwifiAT + CWSTOPSMARTRegardless of the results of the command AT + CWSTARTSMART always use after completion of the command AT + CWSTOPSMART to free up resources

AT + CIPSTATUSDisplay connection statustcp/ipAT + CIPSTATUS-Returns = ID compounds 0-4,
<type> = connection type (2 – have IP, 3 – connected, 4 – off)
“TCP” or “UDP”,
= remote IP address,
= remote port,= communication type: 0: connected client, 1: server

AT + CIPSTARTInstall a TCP or UDP, or to get information about the current connectiontcp/ip1. A single connection (+ CIPMUX = 0)
AT + CIPSTART =
<type>, <address> <port>
[(<local port>) (<mode>)]
2. Multiple connections:
(+ CIPMUX = 1)
AT + CIPSTART =
<type>
[(<local port>) ()]AT + CIPSTART =?ID
Connection 0-4,
<type> = TCP or UDP, <address> = IP address of the remote host, <port> = the remote host port.
[<Local port>] only for UDP
[<mode>] only for UDP
Returns ” OK “,” ERROR “or” ALREADY CONNECT
“0: destination peer entity of UDP will not change.
1: destination peer entity of UDP can change once.
2: destination peer entity of UDP is allowed to change.
It is used only in conjunction
Example: AT + CIPSTART = “TCP”, “192.168.101.110”, 1000
Additional information in the document “Espressif AT Command Examples”

AT + CIPSENDSend datatcp/ip1. A single connection (+ CIPMUX = 0)
AT + CIPSEND = <length>
2. Multiple connections:
(+ CIPMUX = 1) AT + CIPSEND = <ID>, <length>
3. For the “unvarnished
transmission mode” AT + CIPSENDAT + CIPSEND =?
Only for testThe length of the data in the packet to 2048 bytes. After receiving this command module prompts “>”, and proceeds to receive data via UART, after receiving the data length needed transmits them to the radio channel. If successful transmission returns “SEND OK”.
In the failure “ERROR”.
In the “unvarnished
transmission mode”
interrupt to receive data and go into command mode can be “+++” sequence in a separate package. 20ms interval between packets. Examples can be found in the document “Espressif AT Command Examples”

AT + CIPCLOSEClose connection TCP or UDPtcp/ip1. multiple connections:
(+ CIPMUX = 1) AT + CIPCLOSE =
2. A single connection (+ CIPMUX = 0) AT + CIPCLOSEAT + CIPCLOSE =?
Returns OKReturns “LINK IS NOT” or “UNLINK” if the connection ID is already broken, ERROR if there is no connection. If the client mode= 5, then close all connections

AT + CIFSRDisplay local IP addresses, the address that is received from the access point to which are connected and the IP address of ESP8266 SoftAP (local access point)tcp/ipAT + CIFSRAT + CIFSR =?
Only testReturns the IP address of the ESP8266 SoftAP and
IP address ESP8266 Station

AT + CIPMUXSelect single or multiple connectionstcp/ipAT + CIPMUX = <mode>AT + CIPMUX?
Returns the current mode 1 or 00 = single connection, 1 = connect multiple.
Edit mode is possible only after closing all connections. If the server is running, you need to restart the module.
“AT + CIPMUX = 1” command is available only if “AT + CIPMODE = 0”

AT + CIPSERVERStart (restart) TCP servertcp/ipAT + CIPSERVER = <mode> [<port>]-0 = server is disabled, 1 = server is running. Port is optional, default: 333. To run the server module must be in the mode of multiple connections AT + CIPMUX = 1. Examples: AT + CIPMUX = 1
AT + CIPSERVER = 1,1001

AT + CIPSTOSet / view server timeouttcp/ipAT + CIPSTO = <timeout>AT + CIPSTO?
Returns specified timeoutTimeout in seconds from 0 to 7200. Example: AT + CIPMUX = 1
AT + CIPSERVER = 1,1001
AT + CIPSTO = 10

AT + CIPMODESet-through mode “unvarnished transmission mode”tcp/ipAT + CIPMODE = <mode>AT + CIPMODE?0 = normal,
1 unvarnished transmission mode =
(Mode 1 is available only when AT + CIPMUX = 0).
Example: AT + CIPMODE = 1

AT + SAVETRANSLINKSave transparent transmission link to FlashSAVETRANSLINK + AT
= <mode>, <port><mode> 0-normal mode
1-transparent transmission mode
remote ip address
<port> remote port.
Example: AT + SAVETRANSLINK = 1, “192.168.6.110”, 1002

AT + CIUPDATEFirmware Update via the cloud. The module must be in mode 1 or 3 and be connected to the access point with Internet access.tcp/ipAT + CIUPDATE1 found server
2 connect server
3 got edition
4 start update

AT + PINGPing the host name or IP addresstcp/ipAT + PING = ipExamples:
AT + PING = “192.168.1.1”
AT + PING = “esp8266.ru”

+ IPDGet the datatcp/ip(+ CIPMUX = 0)
+ IPD,:
(+ CIPMUX = 1)
+ IPD,.:-1. Single connection
(+ CIPMUX = 1)
+ IPD, <length>: <data>
2. Multiple connections
(+ CIPMUX = 1)
+ IPD,<length>, <data>
When the module receives the data over the network, it sends them to the UART command + IPD