|
From: | Noam Weissman |
Subject: | [lwip-users] DHCP fails ? |
Date: | Tue, 9 May 2017 15:15:48 +0000 |
Hi, I am testing LwIP 2.02 on STM32F769 evaluation board. My simple code with LwIP 1.41 link task and DHCP tasks work fine. I have a simple link task that checks the PHY for link, reads it. If link is up it starts the DHCP task and wait for address. If link is down the DHCP task is put into an idle state and waits for link to come back… I ported the LwIP code to 2.02 and I have problems getting IP with DHCP? When board is reset, link is established and at the DHCP task this code returns with NULL ? dhcp = (struct dhcp *)netif_get_client_data(pDHCP_TaskParams->netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); After device is running, if ETH cable is disconnected and reconnected I get IP address without problems. After checking/debugging I found that if I add a call to function netif_set_link_down(netif); just before I check for link and
netif_set_link_up(netif); … DHCP task will work fine Just to point out that this setup works for several years on several devices and never had any problems Am I missing something ?? Thanks and BR, Noam.
|
[Prev in Thread] | Current Thread | [Next in Thread] |