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);
}
Is it possible to run this aplication on a 512kB memory? Am I missing something?
Thanks.