User Manual

! ! " !
Espressif Systems
ESP8266
AT Command Examples
Note:
When ESP8266 is working as a TCP server, there exists a timeout mechanism. If the TCP client is
connected to the ESP8266 TCP server, whereas there is no data transmission for a period of time,
then the server will stop the connection with the client. To avoid such problems, please set up a data
transmission circulation every 5 seconds.
Send data:
// ID number of connection is defaulted to be 0.
AT+CIPSEND=0, 4 // send 4 bytes to connection NO.0
>iopd // enter the data, no CR
Response :SEND OK
Note:
If the number of bytes sent is bigger than the size defined (n), will reply busy, and after sending n
number of bytes, reply SEND OK.
Receive data:
+IPD, 0, n: xxxxxxxxxx // received n bytes, data = xxxxxxxxxx
Delete one TCP connection:
AT+CIPCLOSE=0 // Delete NO.0 connection.
Response :0, CLOSED OK
Espressif Systems Confidential / Friday, Oct 23, 201515 16