Can't unbind ip address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't unbind ip address

1,378 Views
jesperevertsson
Contributor IV

Hi, we are trying to implement a feature in our product that makes it so that if a DHCP server is unavailable we want to periodically poll the DHCP server for eternity until we obtain an answer (untill then we use our fallback address). The problem is that when we find the DHCP-server we want to unbind our old ip address before we start using our new. We have tried using ipcfg_unbind(BSP_DEFAULT_ENET_DEVICE), but we still end up with having 2 ip addresses. Our fallback address + the one we got from the DHCP server. We also tried calling ipcfg_release_device(BSP_DEFAULT_ENET_DEVICE) and then calling ipcfg_init_device(), but that does the exact same thing. From what I can read in the documentation both these functions should remove the existing ip address, but it's not working for us.

Labels (1)
0 Kudos
2 Replies

386 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Jesper,

Last MQX version is MQX4.2 with MQX4.2.0.1 patch. What version are you using?

Please refer to next thread Change IP address at runtime

Maybe you need to restart TCP/IP task as some resources are not resetting properly.

Regards,

Carlos

----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

386 Views
jesperevertsson
Contributor IV

We tried restarting the TCP/IP task, but that didn't work either. We ended up solving it by just restarting the entire application if we found a DHCP address after running on our fallback