[En-Nut-Discussion] Ping pail every 10 minutes
Ilan Gabay - Orpak
ilan_g at orpak.com
Wed Jul 11 11:14:31 CEST 2007
Hi,
I'm using Nut/OS ver 4.2.1 with ETERNUT2 (LAN9111)
I have a simple application which has no threads and just init the
ethernet device and the tcp/ip
And then endless loop with NutSleep() in it
I'm pinging the board every 1 second and I get exactly every 10 minute
one ping fail.
I made this test after our real application report this same error every
10 minute a lost of TCP message
Pls help!
Thanks
Code sample:
// set up the eth0 device
if (NutRegisterDevice(&DEV_ETHER, 0, 0) != 0)
{
fprintf(g_fpDebug, "NutRegisterDevice() failed on
ethernet device\n");
return -1 ;
}
ip = inet_addr(DFLT_IP) ;
mask = inet_addr(DFLT_MASK) ;
gate_way = inet_addr(DFLT_GATE_WAY) ;
NutNetIfConfig2("eth0", g_Config->ether.mac, ip, mask, gate_way)
;
// main loop
do
{
// ??? blink_user_led(1, 1, 50, 0) ;
NutSleep(10) ;
} while (1) ;
More information about the En-Nut-Discussion
mailing list