[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] board hangs using dhcp
From: |
Andrea Visinoni |
Subject: |
[lwip-users] board hangs using dhcp |
Date: |
Thu, 04 Mar 2010 11:12:06 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 |
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] board hangs using dhcp,
Andrea Visinoni <=