I have an application running on a Blackfin BF537 that uses VDK and LWIP with DHCP enable.
Is there a way to change the DHCP timeout when looking for an IP address during DHCP discovery?
fpataro wrote: I have an application running on a Blackfin BF537 that uses VDK and LWIP with DHCP enable.Is there a way to change the DHCP timeout when looking for an IP address during DHCP discovery?
The DHCP timeout is defined in the LwIP library itself, so changing this does require a rebuild of the LwIP library. Project (.dpj) files for the libraries are provided in "...\Blackfin\lib\src\lwip\contrib\ports\ADSP-Blackfin\proj\lwIPv4lib\".
First, take a look at the "dhcp.h" file, located in "...\Blackfin\lib\src\lwip\src\include\lwip\" where the 'dhcp' struct is defined. You will see it contains: u16_t request_timeout; This value is set in various places in the "dhcp.c" file in "...\Blackfin\lib\src\lwip\src\core". For example, the dhcp_renew() function defines it as follows:
msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS;
We recommend that questions relating generally to the LwIP stack itself - rather than specifically relating to the ADI port of LwIP - are directed to Savannah, who maintain the LwIP stack, as they can offer better support for the underlying operations of the stack. You can find LwIP on the Savannah website via the following address:
Retrieving data ...