TCP socket communication between (RPi Pico+ESP-01S) and ESP32 via WiFi



TCP socket communication between (RPi Pico+ESP-01S) and ESP32 via WiFi

TCP socket communication between (RPi Pico+ESP-01S) and ESP32 via WiFi

– ESP32 MicroPython setup as WiFi Access Point, run a socket server on port 9999, wait connection from client, receive data, convert to upper case and echo back.
– Raspberry Pi Pico+ESP-01S join the ESP32 WiFi network, connect to 192.168.4.1 (the default IP of ESP32 SoftAP), port 9999, send data and wait response.
example code: https://helloraspberrypi.blogspot.com/2021/02/tcp-socket-communication-between-rpi.html

In my practice, a Raspberry Pi 4B is used as development host for both ESP32 and Pico using MicroPython. Firstly, in Thonny, save server code (upyESP32_AP_EchoSvr_20210224a.py) on ESP32, name main.py. Switch Thonny interpreter for Pico and port. Then open Putty as serial terminal connect to ESP32 as REPL to monitor the output from ESP32. Finally, run the client code (mpyPico_ESP-01S_TCPclient_20210224a.py) in Thonny. .

Comments are closed.