[En-Nut-Discussion] Slight problem with UDP

Paolo Simoncelli simonp at email.it
Mon Nov 2 13:34:50 CET 2009



Hello world,

First of all let me make my congratulations to all those who
are supporting the EN/NutOS project ...

Now, ... since i am quite new to ethernut i am just compiling
example applications (UDP and rs232),
ethernut 4.8.5 compiled with WinAVR under Window$ XP and board rev 1.3h

While playing with "icmp-udp.c", after some packet sniffing with
FreeBSD's tcpdump i have noticed that the first packet sent by the
ethernut was regularly lost.

Wince i am absolutely trusting with FreeBSD's TCP/IP ;-)
and ethernut was tied to a network of just 4 machines the
only culprit had to be ethernut :( ...

The issue seem to be somehow ARP related, just adding a slight
( > 300 ms ) delay before start sending UDP packets to the server
seem solve the problem ...


...

     if (NutThreadCreate("RCV", UDPReceiver, (void*)socket, 1024) == 0) {
             puts("Could not start receiver thread\r\n");
             puts("Demo halted...\r\n");
             while (1);
     } else {
         puts("Receiver thread started\r\n");
     }

     puts("Starting echo test (1 packet / second)\r\n");

     ip_udp_echo = inet_addr(UDP_ECHO_IP);
     packet_nr = 0;

->>>    NutSleep(500);

     for(;;) {
         packet_nr ++;

...


Maybe i am wrong and this could be related to some TCP/IP configuration
that i have missed while building NutOS ?

Netwotk(general) -> TCP -> state machine stack
Netwotk(general) -> ARP -> <various options>

...

Any hint welcome

Ciao!
Paolo


 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Prova il servizio di Email Marketing di Email.it, incrementi la visibilita' della tua azienda e trovi nuovi clienti.
* Liste a partire da 10.000 contatti per soli 250 Euro
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8351&d=2-11


More information about the En-Nut-Discussion mailing list