Earlier, I had posted about having trouble with creating a Telnet client
using FreeRTOS and lwip.  I was using a button on my development board to
transmit a fixed message to a Hyperterm server, and after a few
transmissions my stack locked up.  It was supposed that my tcpip task was
either blocking or being starved.

 

It turns out that the problem was my client's mishandling of the responses
from Hyperterm.  It seems that Hyperterm responds to each message received
by replying with two packets.  The first packet contains the first byte of
the message it received, and the second packet contains the rest of the
message. I was using the Socket API and was never calling recv(). At each
press of the button, my receive buffer was filling up and eventually maxing
out. 

 

I am curious if my lwip implementation (ethernetif) is handling these
unhandled packets properly by filling up the buffer and locking up, or if it
should be dropping them and continuing.  I had tried to increase all sorts
of buffers in the lwipopts.h but never was able to hit the right one that
handled these incoming packets.

 

What is the correct way to make sure that my stack does not lock up if I am
receiving unexpected data over a connection?  Should I just poll() each time
around the loop?  I cannot just place extra recv()s around the loop or else
my task will block if no data is waiting.

 

Thanks,

 

 

Josh Rothstein

Embedded Systems Engineer

DCX-CHOL Enterprises, Inc.

12831 South Figueroa Street

Los Angeles, CA 90061-1157

310.516.1692x134

 

_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to