lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problems getting a basic example running


From: Martin Velek
Subject: Re: [lwip-users] Problems getting a basic example running
Date: Tue, 28 Aug 2012 09:04:12 +0200

Hello,

this is not the correct way. You should not call lwip_init by
yourselves when NO_SYS = 0. You have to call tcpip_init() which will
call lwip_init(). To setup interface you should call netifapi_netif_*
functions.
Check this site http://lwip.wikia.com/wiki/Initialization_using_tcpip.c

Martin


On Tue, Aug 28, 2012 at 12:14 AM, Fre Net <address@hidden> wrote:
> I'm using lwip_init() to initialize LWIP. Is this not the correct way to do
> this? Here's the code from the start of my program to where the error
> occurs:
>
> int sockfd;
> struct sockaddr_in their_addr; // connector's address information
> struct hostent *he;
> int numbytes;
> int broadcast = 1;
> lwip_init();
>
> if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
>  perror("socket?");
>  exit(1);
> }
>
>
> Thanks,
> Fred
>
> On Fri, Aug 24, 2012 at 11:34 AM, Kieran Mansley <address@hidden> wrote:
>>
>>
>> On 22 Aug 2012, at 02:18, Fre Net wrote:
>>
>> > I've got some more info in the hopes that this will help...
>> >
>> > I've debugged a bit more and found that from within tcpip_apimsg():
>> >
>> > sys_mbox_valid(&mbox) is failing causing a return of ERR_VAL.
>> >
>> > This in turn causes netconn_new_with_proto_and_callback() to return
>> > NULL. I am not sure why it is failing. 
>> > netconn_new_with_proto_and_callback()
>> > is not failing at the asserts after the tcpip_apimsg() call.
>> >
>>
>> That suggests that it hasn't been initialised.  How are you initialising
>> lwIP in your project?
>>
>> Kieran
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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