Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDHCP timed out, going back to default IP address(es)
I am using simple socket server. After I run the program, there is a long wait and then "DHCP timed out, going back to default IP address(es)" comes. I wanted to know how to decrease this timeout val...
Altera_Forum
Honored Contributor
16 years agoIf you want to disable DHCP you have two options:
1 - Open the BSP editor for your project and disable the DHCP client for the InterNiche Stack. 2 - Edit the function "get_ip_addr" in the file "network_utilities.c" for the simple socket server example so that it doesn't set the variable "*use_dhcp" to 1 before returning. If you want to reduce the DHCP timeout, there is a function called "dhc_set_timeout" which you can call before initializing the InterNiche stack. What you would do is put the declaration:extern void dhc_set_timeout(int timeout_sec); at the top of your file. Then you simply call dhc_set_timeout with the timeout value in seconds before the call to "iniche_initialize". Jake