You can chat about native SDK questions and issues here.

User avatar
By jhinkle
#78406 Using RTOS SDK 2.0

Using "Select" for non-blocking socket read with select timeout of 10 sec

I have many wireshark captures that show the problem - I'm trying to figure out root cause.

Downloading a 10 meg file from a web site.

50% of the time all goes well.

The other 50% - (based on my debug printf messages and wireshark) that the LWIP stack has stopped processing received packets.

The ESP goes in and out of "TCP Window FULL" and takes 90 to 200 seconds to process a packet.

I know the stack is not locked because I get select timeouts every 10 secs and when I fail to acquire any data from the stack for 200 seconds I issue a close which properly generates a FIN by the ESP LWIP.

Does anyone have an insight to nature of this behavior?

I would normally attempt to trace the LWIP stack but using the RTOS SDK - I don't believe I can enable the LWIP debug messages.

I'm thinking of moving over to the new IDF - since I can have access to the actual LWIP source and debugging options. Is the IDF option viable at this time for the ESP since I see it's primarily designed for ESP32 development?

All comments welcome.

Thanks.

Joe