lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] broadcast-recv-broadcast sequence fails


From: newbie
Subject: [lwip-users] broadcast-recv-broadcast sequence fails
Date: Sun, 15 Oct 2017 09:13:47 -0700 (MST)

hello, 
I ama using lwip-1.4.1 ontop of freertos, 
using a simple udp connection, I am not able to achieve the sequence
boadcast_receive_broadcast.
The first two instrunctions succeedes, however, the third, returns always
ERR_VAL (-6).
The code is nearly:

/* setup , DHCP enabled */
 conn = netconn_new(NETCONN_UDP);
 l_eConnErr |= netconn_bind (conn,  IP_ADDR_ANY, hostPort);
 l_eConnErr |= netconn_connect(conn, iIP_ADDR_ANY, remotePort);
  netbuf = netbuf_new();
  netconn_set_recvtimeout(conn, 1);

/* exchange data */
l_eConnErr = netconn_sendto(conn, netbuf, IP_ADDR_BROADCAST, remotePort);  
// returns ERR_OK
l_eConnErr = netconn_recv(l_psConn, &l_psIONetBuf);                             
        
// returns ERR_TIMEOUT, correct in my case
l_eConnErr = netconn_sendto(conn, netbuf, IP_ADDR_BROADCAST, remotePort);  
// returns ERR_VAL






--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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