Hi,
I'm developping an ethernet application with LPC4337. I would like to be able to enable or disable DHCP at run time using CMSIS network library.
There is one function to disable DHCP at run time : dhcp_disable() works fine.
Then I would like to enable it again. There is no function to do that so I tried to re-initialize network: net_initialize()
This works but if I do the same operation 5 times, net_initialize() hangs. I guess it's because network ressources are not released and they are allocated each time I call the function but there is no function to release/uninit. ressources.
Does someone have a solution for my application (I really don t want to reset the system each time I want enable the DHCP)?
Thank you.
Keil have the solution: http://www.keil.com/support/man/docs/rlarm/rlarm_dhcp_disable.htm
Georg
Thank you for your reply.
But I don't use RL-ARM, I am using new CMSIS library (introduced in Keil v5). And I already have a solution for disabling DHCP in run time (simple call to dhcp_disable() function).
But I am not able to enable it more than 5 times. According to CMSIS documentation it seems that it is not possible to do what I want without reseting the system (http://www.keil.com/pack/doc/mw/Network/html/group__net__eth.html#ga5891fe7e80c75a1c36f7bb33d567a228)
I hope this functionality will be added in future library revision.
Problem solved with Keil MDK-ARM Professional Middleware Dual-Stack IPv4/IPv6 Network for ARM Cortex-M.
In addition of adding IPV6 support, It is possible to enable/disable DHCP during run time.