(add) Re: [En-Nut-Discussion] NutUdpSendTo doesn't return
Ulrich Hertlein
ulrich.hertlein at artcom.de
Fri Sep 9 12:39:58 CEST 2005
One thing I just noticed:
- when I call the NetUdpSendTo function from the main thread (the one
that's running the TCP server) it works
- when I call it from the other thread it hangs
Do I have to take some precaution about thread safety with networking?
Cheers,
/Ulrich
Ulrich Hertlein wrote:
> (I only started with the Ethernut board this month so please forgive any
> stupid questions/assumptions on my part.)
>
> A program I'm working on is driving me nuts (so to speak):
> - a list of hosts with IP and MAC addresses is stored in EEPROM and read
> once upon startup
> - the main thread waits for and processes TCP connections on port 23
> - a second thread checks port D (pins 6 & 7)
> - either sends Wake-On-LAN packets to the hosts
> - or it sends a UDP 'halt' command to the hosts (where another prog.
> listens and initiates a shutdown)
>
> Wake-On-LAN (via NutEtherOutput) works find but NutUdpSendTo never
> returns. Some debugging puts() hint at an ARP cache problem...
> If I uncomment the NutUdpSendTo the program works nicely.
>
> Has anyone experienced something similar?
> Thanks in advance,
> /Ulrich
--
Ulrich Hertlein | Software Development
ART+COM AG
Kleiststr. 23-26 | 10787 Berlin | Germany
phone: +49.30.21001-433
fax: +49.30.21001-555
http://www.artcom.de
More information about the En-Nut-Discussion
mailing list