Wifi to Ethernet TCP performance issue

technomage
Posts: 7
Joined: Fri Dec 03, 2021 12:28 pm

Wifi to Ethernet TCP performance issue

Postby technomage » Mon Dec 04, 2023 10:50 am

Hello,
I have a setup with a custom esp32 board that generates ~270kB/s of data and sends it through tcp socket via wifi to an Olimex ESP32-Gateway rev G. The Olimex forwards this data to a server via TCP socket over Ethernet.

If I only do the part of receiving data (not forwarding to ethernet), it works as expected, being able to receive all data. But when I send the data to ethernet, the system gets stalled after sending some bytes and stops receiving and sending data for a while, then receives and sends some more data and stall for a while again. I think that, for some reason it is not sending the data in the TX buffers.

This is the code in the Olimex that does the forwarding:

Code: Select all

for(;;) {
    uint8_t buf[512];
    int b = recv(wifi_sock, buf, 512, MSG_WAITALL);
    b = send(eth_sock, buf, b, 0);
}
I tried different configurations of wifi RX and TX buffers and the ETH DMA buffer size, but with no result.

Is it possible to run this aplication on a 512kB memory? Am I missing something?

Thanks.

Who is online

Users browsing this forum: Baidu [Spider] and 61 guests