I have these ESP32S3 boards and use the WifiClient.Write method to send the FrameBuffer of a captured Image to a Server endpoint via HTTP-Post.

Everything works well except the Wifi performance of the ESPs is really really bad.

(I use modified Arduino IDE examples as the base)

Sending 40Kb Jpg takes between 500ms to 15 seconds to send. These are only the timings for sending the FrameBuffer.

Anyone a link/tip to a good working example in preferably Arduino IDE?

#askfedi #esp32s3 #esp32

@themipper write() sends one byte at a time. Use print, printf or a stream to send blocks of data (somewhere around the MTU is best). Or, you can use the libraries (HTTPClient) that already have this optimized, instead of making your own wheel.

@algaeman I will look into the HttpClient.

But the WifiClient.write method already takes a buffer. I tested it with different chunk sizes but that made no difference.

Didn't make my own wheel took this from some of the examples in the Arduino IDE.

@algaeman rewritten it to use the HTTPClient. Looks a bit cleaner but the results are the same.

Sending takes between 500ms and 15 seconds. Same room as the wifi ap and stationary on a good powersupply.

Have been searching for the last 2-3 hours. Seems to be a known problem with no real solution.

Next step try to get ESP-IDF installed and try from there.

@themipper Set your debugging to verbose (with timestamps if using arduinoIDE) and see if you can't sort out what code is taking so long. If it is the actual socket send, then the esp is limited by the network.