[ECOS] UDP Issues with SH-4 custom platform.

Jason Thomas thedracle@yahoo.com
Thu Jun 21 15:18:00 GMT 2007

  I am currently trying to implement a simple UDP
client/server on a custom SH-4 target, using the
FreeBSD TCP/IP stack. I've managed to get TCP/IP
working to some extent, and have tested several
functions through it. UDP however, seems to behaving
somewhat strangely. The symptom at the moment is, I
have a server blocking on recvfrom, with a socket that
will accept a connection from any client on port 1602.
I then have a client system, also eCos, which creates
a UDP socket, referring to the host system, and sends
a request for data. The host then responds with a
packet containing data, or the first three bytes as -1
to denote data isn't currently available.

  The first packet negotiation goes as expected, ARP
packets are sent, the host sends a response packet.
The second send/recv, however, seems to be drawing the
same packet over and over again. The send routine
doesn't call the 'send' function in my device driver,
and the recv function seems to pull the same exact
packet at the first sent packet from the ethernet
stack. I've made certain that there doesn't seem to be
any interaction by the TCP/IP stack with my ethernet

  To test that my socket logic is okay, I created an
example application that mimics the exact functions I
use in my eCos application, with the exception that
the server IP is hard coded.



   Everything goes flawlessly--- with the printed
array numbers incrementing every packet request (This
would normally be filled with ADC data from my

Perhaps there are some optimizations issues? Perhaps
some flags that need to be set? Any help would be
greatly appreciated!

-Jason Thomas.

Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list