|
From: | Chen |
Subject: | [lwip-users] DHCP OK but TCP not? (Chen) |
Date: | Thu, 20 Sep 2012 15:54:18 -0400 |
Message: 2
Date: Tue, 18 Sep 2012 12:54:08 -0400
From: Chen <address@hidden>
To: address@hidden
Subject: [lwip-users] DHCP OK but TCP not?
Message-ID: <address@hidden>
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Hi there,
I have been developing my project using static IP and every works
great, now I wanted to turn on DHCP
Bad news, DHCP got the IP assigned, but I can't connect to it via TCP
anymore (UDP works fine), and the only difference in codes are
if (DHCP){
//This gets the IP, but I can't open via TCP
IP4_ADDR( &xIpAddr,0,0,0,0 );
IP4_ADDR( &xNetMask,255,255,255,0 );
IP4_ADDR( &xGateway,0,0,0,0 );
netif_add( &MACB_if, &xIpAddr, &xNetMask, &xGateway,
NULL, ethernetif_init, tcpip_input );
netif_set_default( &MACB_if );
dhcp_start(&MACB_if);
}
else{
//This works perfectly
IP4_ADDR( &xIpAddr,myIP[0],myIP[1],myIP[2],myIP[3]);
IP4_ADDR( &xNetMask,255,255,255,0 );
IP4_ADDR( &xGateway,0,0,0,0 );
netif_add( &MACB_if, &xIpAddr, &xNetMask, &xGateway,
NULL, ethernetif_init, tcpip_input );
netif_set_default( &MACB_if );
netif_set_up( &MACB_if );
}
......
//If DHCP is used, it will not returned from this call
clientfd = lwip_accept(lSocket, (struct sockaddr*)&client_addr,
(socklen_t)&addrlen);
I am using lwip 1.32 on AVR32. Is there a known bug like this?
Thanks for your time!
[Prev in Thread] | Current Thread | [Next in Thread] |