lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP 1.3.x and tcp socket disconnects in the ESTABLISH


From: yueyue papa
Subject: Re: [lwip-users] lwIP 1.3.x and tcp socket disconnects in the ESTABLISHED state
Date: Fri, 23 Jan 2009 22:52:36 +0800

i think i meet the similar problem you meet.
 
I do not make deep debug as you did. (Due to project time.)
 
I make such change:
in tcp.h
#define TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */
#define TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */
==>
#define TCP_FIN_WAIT_TIMEOUT 10000 /* milliseconds */
#define TCP_SYN_RCVD_TIMEOUT 10000 /* milliseconds */
the problem becomes better.
 
In fact I donot know the deep reason. I guest such change make quick resent, and some other problems are avoid. I also hope to get the answer too.
 
I test the problem only happened in the GPRS environement, the same code in the modem channel is working very stable.
On Fri, Jan 23, 2009 at 10:39 PM, Dustin Stahlback <address@hidden> wrote:
Gentleman,

I have the following setup:

lwIP 1.3.0.x (latest CVS), freeRTOS 5.0.0, AT91SAM7X256

I use the PPP driver to interface to analog and wireless modems.


I am looking for some advice an trying to track down an issue while
recieving data from a TCP socket using the netconn api.


I have a specific file (random data padded with 230K+ bytes of 0xFF).
Sometimes, this file transfer causes the TCP socket to close and send
the FIN packet even though the file has not finished being received.
The state the TCP socket is in is ESTABLISHED when the socket closes,
whereas on a proper functioning file transfer, the socket closes in the
state CLOSE_WAIT.  This was determined from the tcp_debug_print_state()
mechanism.  The stats_display() indicates that I have allocated enough
resources for this specific task so I believe I have a decent lwipopts.h
setup.  I can decrease the failure rate by enabling a debug statement
(2ms to printout) in the function tcp_process() under the ESTABLISHED
case.  I cannot turn on all TCP debug as this will cause the stack not
to work at all.

If you have any ideas I would appreciate them.

Thanks,

Dustin


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

[Prev in Thread] Current Thread [Next in Thread]