arduinoWebSockets icon indicating copy to clipboard operation
arduinoWebSockets copied to clipboard

Using websocketserver with UNO R4 WIFI

Open srhgrs opened this issue 10 months ago • 2 comments

'm using an Arduino Uno R4 Wi-Fi (ESP32 S3) as a WebSocket server to communicate with a ROS2 client. The client connects successfully but immediately gets disconnected after the connection, even though there is no other client attempting to connect.

The server logs "client 0 connected", but then it logs "client 1 disconnected". Despite the successful connection, no messages are received from the client. I need to precise that my client works with another websockets server, then the issue seems to not be due to the client.

I’ve added debug prints in the webSocketEvent function but am unable to resolve the issue. Any help in understanding why there is another client that is disconnects right after connecting my client and how to ensure the server properly receives messages would be appreciated.

Thanks!

srhgrs avatar Jan 15 '25 09:01 srhgrs

Did you miss the loop()?

https://github.com/Links2004/arduinoWebSockets/blob/master/examples/arduino_renesas/arduino_uno_r4_wifi/arduino_uno_r4_wifi.ino#L108

kakopappa avatar Jan 15 '25 09:01 kakopappa

This is for client 

srhgrs avatar Jan 15 '25 11:01 srhgrs