[En-Nut-Discussion] Network Link state on at91_emac and others

Harald Kipp harald.kipp at egnite.de
Tue Sep 16 09:36:19 CEST 2008


Thiago A. Corrêa wrote:

> Consider that on a connection, the PC sends data soon after the cable
> is disconnected on the nut box. The PC will eventually timeout and
> drop the connection, and when the cable is reinserted to the nut box,
> it will not see any of the transmission attempts form the PC and might
> be stuck in the NutTcpReceive beliving the connection is still open.
> In this state the PC box can't even reestablish the connection if the
> nut application isn't threaded in a maner similar to the HTTP example.
> If done multiple times, the socket descriptors will also run out even
> on the HTTP example and we will end up with an unresponsive nut box
> until NutTcpReceive times out, if it has any timeout.

Thiago,

Consider the PC crashing or a broken cable behind the switch/HUB the 
Ethernut is connected to. The application will be trapped in 
NutTcpReceive too, but is unable to detect the broken link. What I 
wanted to say is, that an application generally has to deal with 
becoming trapped in the TCP receive routine. Broken link detection will 
help in one special situation only, but will not solve this problem in 
general.


> Does Nut threads die gracefully now days? Having one for
> initialization might be a problem if that's not the case.

Luckily they do.

Harald




More information about the En-Nut-Discussion mailing list