Esp32 As A Tcp Server In Multiple Connections - Espressif ESP32 At Instruction Set

Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

!

7.4. ESP32 as a TCP Server in Multiple Connections

When ESP32 works as a TCP server, multiple connections should be enabled; that is to say, there
should be more than one client connecting to ESP32.
Below is an example showing how a TCP server is established when ESP32 works in the SoftAP
mode. If ESP32 works as a Station, set up a server in the same way after connecting ESP32 to the
router.
1. Set the Wi-Fi mode:
AT+CWMODE=3 // SoftAP+Station mode
Response:
OK
2. Enable multiple connections:
AT+CIPMUX=1
Response:
OK
3. Set up a TCP server:
AT+CIPSERVER=1 // default port = 333
Response:
OK
4. Connect the PC to the ESP32 SoftAP:
5. Connect the device to the PC, with the PC working as a TCP client:
Espressif
!
45 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