Udp Transmission - Espressif ESP32 At Instruction Set

Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

!
5. ESP32 is connected to the TCP server as a client:
AT+CIPSTART="TCP","192.168.3.116",8080 // protocol、server IP & port
6. Send data:
AT+CIPSEND=4 // set date, such as 4 bytes
>DGFY // enter the data, no CR
Response:
SEND OK
⚠ Notice:
If the number of bytes sent is bigger than the size defined (n), the response will be busy. After sending the first n number
of bytes, SEND OK will be returned.
7. Receive data:
+IPD,n:xxxxxxxxxx // received n bytes, data=xxxxxxxxxxx

7.2. UDP Transmission

UDP transmission is established via AT+CIPSTART. There is no such distinction between UDP server
and UDP client.
1. Set the Wi-Fi mode:
AT+CWMODE=3 // SoftAP+Station mode
Response:
OK
2. Connect to the router:
AT+CWJAP="SSID","password" // SSID and password of router
Response:
OK
3. Query the device's IP:
AT+CIFSR
Response:
+CIFSR:STAIP,"192.168.101.104" // IP address of ESP32 Station
4. Connect the PC to the same router which ESP32 is connected to. Use a network tool on the PC to
create UDP transmission.
Espressif
36 53
!
/!
7. AT Commands Examples
2017.02

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Table of Contents