lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Please Help Stack problem


From: Sergio PérezAlcañiz
Subject: Re: [lwip-users] Please Help Stack problem
Date: Tue, 11 Mar 2003 10:07:57 +0100 (CET)
User-agent: IMP/PHP IMAP webmail program 2.2.3

Mensaje citado por: NGB <address@hidden>:

> Hi 
> 
> I am using the stack with a RTL8019AS chip, the driver was ported from
> another application so I know it works.
> I try to ping the stack and it works but after a few pings it dies.
> Sometimes I can get it to work again but I often have to reset the board
> for it to work.
> I am using V0.6 RC1 of the stack
> 
> This is my init code:
> 
>       sys_init();
>       mem_init();
>       memp_init();
>       pbuf_init(); 
>       netif_init();
> 
>       IP4_ADDR(&gw, 10,10,10,1);
>       IP4_ADDR(&ipaddr, 10,10,10,18);
>       IP4_ADDR(&netmask, 255,255,255,0);
> 
>       netif = netif_add(&ipaddr, &netmask, &gw, rtl8019if_init, ip_input);
> 
>       netif_set_default(netif);
> 
>       tcpip_init(0,0);
> 
> 
> In my loop I call this every 30 ms
> 
>  rtl8019_wait(); // polls NIC for data RX IRQ
>  tcp_tmr();
> 
> 
> Thanks
> 
> Nic
> 
> -------------------------------------------------
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-users
> 
> 



Hi, Nic. Your code seems well, but it's not enough to say "everything" goes
fine. Are you sure the problem is with the stack?? Set all macros to 1 in
src/include/lwip/debug.h in order to see where is the problem. If the stack
crashes always in the same place, there you are, if not ....
You say that the driver is ported from other app, ... Some drivers are written
with the idea that all incoming packets are deserved "almost" inmediatly. If
you're polling the NIC at 30 ms, maybe buffers used in the driver are
overflowed. Try putting some printfs in the driver code (in "send" and
"receive"), maybe the driver cannot be directly ported to lwip. 
Again, 30 ms is too much time. With normal bursts you'll lost packets. Why don't
you try signaling??
Regards.

Sergio.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]