AW: [En-Nut-Discussion] send UDP packet will cause Hang
Ernst Stippl
ernst at stippl.org
Sun Dec 18 20:57:06 CET 2005
Hi!
In the UDP protocol, the sender doe snot know if the packet "made it" to the
receiver. So, from this point, a "connection loss" can be
a) a loss of the user protocol which is implemented on top of UDP
b) a loss of the Ethernet carrier wire voltage
You say a ping is still possible, so it can't be b) and if the comms pgm on
the remote side end unexpecteldy, maybe your app within the Ethernut is
still waiting for receiving an UDP package from the comms program - which is
never sees. -> "Freeze" (well not really)
Try to "instrument" you app with some printf's to see exacly what's the
function from which there is no return into your app, maybe that help (you
may need to set timeouts when receiving packets).
regards
Ernst
-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von ivesworking
Gesendet: Sonntag, 18. Dezember 2005 15:51
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] send UDP packet will cause Hang
MY application are using UDP packet as communication, if work flawless.
however on my final debug stage, i found that when the connection of the
other side of the communication loss, the ethernut board will freez.
i know it was possible to ping the destination before sending the packet,
however the connection loss i mention here is the communication program
surdently closed, but the computer still valid to accept ping.
i using 3.4 version of the Nut/OS 200407 Winavr
Wf
_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
More information about the En-Nut-Discussion
mailing list