
ESP-01/07/12 Series Modules User's Manual V1.4
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
Page 19 of
23
OK
AT+CIPSERVER=1
//open the server
OK
0,CONNECT
//There is a client connected to the server
+IPD,0,10:Ai-Thinker
//received 10 data (Ai-Thinker)
AT+CIPSERVER=0
//Close the server
OK
0,CLOSED
//TCP connection is off
TCP Client Configuration
:
Ai-Thinker Technology Co. Ltd.
ready
AT+CWMODE=1
//configured for station mode
OK
AT+CWJAP_DEF="TCP_Server","12345678"
//Connect to AP
WIFI CONNECTED
WIFI GOT IP
OK
AT+CIFSR
//Query the local IP address
+CIFSR:STAIP,"192.168.4.2"
+CIFSR:STAMAC,"5c:cf:7f:91:8b:3b"
OK
AT+CIPMUX=0
//open single link
OK
AT+CIPSTART="TCP","192.168.4.1",333
//Connect to TCP server
CONNECT
OK
AT+CIPSEND=10
//send 10 bytes of data to the server side