espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
706 stars 169 forks source link

esp-hosted/features strange behaviour receiving packets #294

Closed claydonkey closed 11 months ago

claydonkey commented 11 months ago

Hello again

I have had success with Receiving UDP packets from iPerf (UDPServer)with speeds of upto 22Mbps, which is enough for my project. It is also good for TCP but transmission is neither stable nor can it mantain satisfactory bandwidth. It's odd because I would have thought that reception would be more intensive than transmission I have used both USE_DRIVER_LOCK == TRUE/FALSE and implemented my own USE_HAL_DRIVER_LOCK for the stm32. The result is the same so I think the problem is higher level. I have adjusted task prioirites/ task sizes across the board and the problem has not been resolved. At lower bandwidths it is stable for a longer duration and initially for 5 and 10Mbps the host delivers the correct packets but soon after the bandwidth drops to between 50-100Kbps. After some time it seems to transmit at the correct bandwidth only to do as before and the bandwidth drops and is erratic.

A clue maybe that when I don't throttle the bw I get an error before first pack transmission

W tcp client send error, error code: 12, reason: Not enough space

vis:

Screenshot 2023-12-06 170500 Screenshot 2023-12-06 162812

Since I've been frantically bit diddling and I believe the HAL SDIO driver is working as expected, perhaps you could shed some light on the issue.

claydonkey commented 11 months ago

Solved it. I had some bad sdkconfig settings for the slave...

mantriyogesh commented 11 months ago

Consider enabling TCP SACK at host LWIP