ESP-01/07/12 Series Modules User's Manual V1.4
Copyright © 2017 Shenzhen Ai-Thinker Technology Co., Ltd All Rights Reserved
Page 21 of
23
>
//After the emergence of the symbol serial port to send
Ai-Thinker (without carriage return line)
Recv 10 bytes
//The serial port receives the data
SEND OK
AT+CIPCLOSE
//close the UDP connection
CLOSED
OK
Station Configuration
:
Ai-Thinker Technology Co. Ltd.
ready
AT+CWMODE=2
//configured for station mode
OK
AT+CWSAP_DEF="TCP_Server","12345678",5,4
//Connect to AP
OK
AT+CIFSR
//Query the local IP address
+CIFSR:STAIP,"192.168.4.2"
+CIFSR:STAMAC,"5c:cf:7f:91:8b:3b"
OK
AT+CIPSTART="UDP","192.168.4.1",8001,8002,0
//Open UDP connection
CONNECT
OK
AT+CIPSEND=10
//send 10 bytes of data to the server
OK
>
//After the emergence of the symbol serial port to send
Ai-Thinker (without carriage return line)
Recv 10 bytes
//The serial port receives the data
SEND OK