[lwip-users] tcpip_init(...) behavior when no Ethernet cable connected

2010-06-21 Thread Dany Thiffeault
Hi, I'm using Atmel (AVR32) suggestion on how to configure the lwip stack. Here is a code sample: [thread] ... sys_sem_t sem; sem = sys_sem_new(0); // Initialize the lwIP stack. tcpip_init(TcpIpInitDone, &sem); // Block until the lwIP stack is initialized. sys_sem_wait(sem); ... // Callback

[lwip-users] Possible bug in lwip_ioctl

2010-06-21 Thread Yoav Nissim
Hello All, We believe there might be a problem when calling lwip_ioctl on a UDP socket. AFAIK, when calling ioctl() with FIONREAD, we should receive the size of the next unread datagram; instead lwip_ioctl() seems to returns the total size of pending datagrams. Although we use lwip 1.3.0, we b

Re: [lwip-users] tcpip_init(...) behavior when no Ethernet cableconnected

2010-06-21 Thread Martin Persich
Hi, this is Atmel's bug, by my mind. The problem is in function "low_level_init()", module "ethernetif.c". This function waiting for ethernet driver initializing in part: - while( xMACBInit(&AVR32_MACB) == FALSE ) { __asm__ __volatile__ ( "nop" ); } - I made many changes

[lwip-users] multithreaded app ...

2010-06-21 Thread Teratux
I'm having trouble setting up a two threaded application that reads and writes from an ethernet port. Is there any problem with setting up something like this?? Is lwip prepared to share resources like the netconn* struct and is it able to read and write at the same time ( ideally ) ?? My ap

Re: [lwip-users] multithreaded app ...

2010-06-21 Thread goldsi...@gmx.de
Teratux wrote: I'm having trouble setting up a two threaded application that reads and writes from an ethernet port. Is there any problem with setting up something like this?? Is lwip prepared to share resources like the netconn* struct and is it able to read and write at the same time ( ideally

Re: [lwip-users] multithreaded app ...

2010-06-21 Thread Teratux
Umm, and what about using mutexes to protect de netconn resource ?? I tried it but haven't been able to determine if it's the cause of my breaks ... On 06/21/10 16:54, goldsi...@gmx.de wrote: Teratux wrote: I'm having trouble setting up a two threaded application that reads and writes from an

Re: [lwip-users] Possible bug in lwip_ioctl

2010-06-21 Thread goldsi...@gmx.de
Yoav Nissim wrote: Hello All, We believe there might be a problem when calling lwip_ioctl on a UDP socket. AFAIK, when calling ioctl() with FIONREAD, we should receive the size of the next unread datagram; The problem here is that FIONREAD does not appear to be standardized. We are trying to

Re: [lwip-users] tcpip_init(...) behavior when no Ethernet cableconnected

2010-06-21 Thread goldsi...@gmx.de
Martin Persich wrote: Hi, this is Atmel's bug, by my mind. I would think so, too, as the rest of the initialization code looks fine. Simon ___ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] multithreaded app ...

2010-06-21 Thread Teratux
Ok, thanks for you quick reply ... You've saved me quite some time of trial and error ... On 06/21/10 16:54, goldsi...@gmx.de wrote: Teratux wrote: I'm having trouble setting up a two threaded application that reads and writes from an ethernet port. Is there any problem with setting up someth

Re: [lwip-users] multithreaded app ...

2010-06-21 Thread goldsi...@gmx.de
Teratux wrote: Umm, and what about using mutexes to protect de netconn resource ?? I tried it but haven't been able to determine if it's the cause of my breaks ... That should work as long as you make sure that you acquire the mutex before *every* usage of the netconn. BTW: either your clo

Re: [lwip-users] tcpip_init(...) behavior when no Ethernet cableconnected

2010-06-21 Thread Dany Thiffeault
Thanks a lot! Indeed Martin, I would be interested to have a look at your modified code. That would be greatly appreciated! Dany On Mon, Jun 21, 2010 at 1:07 PM, goldsi...@gmx.de wrote: > Martin Persich wrote: > > Hi, > this is Atmel's bug, by my mind. > > I would think so, too, as the rest o