[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Problem: new socket (lwip 1.3 + freeRTOS 5.3)
From: |
acemax |
Subject: |
Re: [lwip-users] Problem: new socket (lwip 1.3 + freeRTOS 5.3) |
Date: |
Fri, 29 Jan 2010 06:34:01 -0800 (PST) |
It works when I use the netconn API:
struct netconn *conn;
char msg[]="testing" ;
struct netbuf *buf;
char * data;
conn = netconn_new( NETCONN_UDP );
netconn_bind(conn, IP_ADDR_ANY, 1234 );
netconn_connect(conn, IP_ADDR_BROADCAST, 1235 );
for( ;; )
{
buf = netbuf_new();
data =netbuf_alloc(buf, sizeof(msg));
memcpy (data, msg, sizeof (msg));
netconn_send(conn, buf);
netbuf_delete(buf);
vTaskDelay( 200 );
}
I wanted to use the BSD Socket API. Portability reason. But....
Kieran Mansley wrote:
>
> On Wed, 2010-01-27 at 03:47 -0800, acemax wrote:
>> [Avatar]
>> 2010-01-26 21:07:59 UTC
>> Hello,
>>
>> I'm trying to implement the code below, but it stops in the line sock =
>> socket(AF_INET, SOCK_DGRAM, 0);
>>
>> the message is "sys_arch_timeouts: ptask != NULL"
>
> I would guess you haven't properly initialised lwIP.
>
>> bind(sock, (struct sockaddr *)&sLocalAddr, sizeof(sLocalAddr));
>>
>> lwip_close(sock);
>
> That looks wrong too.
>
> Kieran
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
--
View this message in context:
http://old.nabble.com/Problem%3A-new-socket-%28lwip-1.3-%2B-freeRTOS-5.3%29-tp27335636p27372802.html
Sent from the lwip-users mailing list archive at Nabble.com.