I'm worried about the difference between Raspberry Pi and PC speed during TCP communication...

Asked 2 years ago, Updated 2 years ago, 50 views

We are communicating TCP using Raspberry Pi (client) and PC (server).

The current data is sent by changing the photo file taken with the camera to byte, and the server changes it to buffed image and displays it on the screen.

However, if you open the server on your PC (laptop) and run client code on your PC (laptop), there is no problem with speed. => Approximately 15 frames per second.

However, if you open a server on your PC (laptop) and run the client on the Raspberry Pi (external device), the speed difference is too big. => 1.5 to 2 frames per second.

How do I solve this?

< Conditions of the current program>

If it's a simple performance difference without a solution, it can't be helped

Mentors, masters, please give us your opinions~~!

java raspberry-pi

2022-09-22 20:34

1 Answers

First, check how your WiFi connection is (IEEE 802.11a, b, g, n) to see what the appropriate theoretical speed is. Verify that the WiFi module on the Raspberry Pi is set to achieve the maximum speed supported.

Measure the actual communication speed and see how much it is with the theoretical speed above.

Do you compress real data? It is estimated that you use OpenCV, but if you do not, you need to compress and maximize transmission efficiency.

You need to review the code on the socket communication side. Socket options such as TCP_NODELAY


2022-09-22 20:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.