This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

UDP Issues with SH-4 custom platform.


  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
driver.


  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.

Client:
http://pastecode.net/?action=viewpost&tag=1864

Server:
http://pastecode.net/?action=viewpost&tag=1865

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

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. 
http://tv.yahoo.com/collections/222

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]