Hi,
i have a simple webserver task on my custom board (at91sam7x256) using
freertos and lwip 1.2.0.
Using static ip i have no problems, but using dhcp my board hangs after
the very first send (using socket api or netconn_write...same problem).
The port is open, the connection is accepted, but when i start sending
data to client in several sends, only the first one succeed.
this is my dhcp start code:
IP4_ADDR(&xIpAddr,0,0,0,0);
IP4_ADDR(&xNetMast,0,0,0,0);
IP4_ADDR(&xGateway,0,0,0,0);
netif_add(&EMAC_if,&xIpAddr,&xNetMast,&xGateway, NULL,
ethernetif_init, tcpip_input);
// make it the default interface
netif_set_default(&EMAC_if);
// Avvio DHCP
dhcp_start(&EMAC_if);
// DHCP negotiation
int mscnt = 0;
while (EMAC_if.ip_addr.addr == 0)
{
sys_msleep(DHCP_FINE_TIMER_MSECS);
dhcp_fine_tmr();
mscnt += DHCP_FINE_TIMER_MSECS;
if (mscnt>= DHCP_COARSE_TIMER_SECS * 1000)
{
dhcp_coarse_tmr();
mscnt = 0;
}
}
Any hints?
Best regards
Andrea
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users