I've a application that has a web interface to configure the network paramters. When I change the IPv4 number to use a static address, sometimes when I call ipcfg_bind_staticip() function passing BSP_DEFAULT_ENET_DEVICE and the number 167772616 ( for setting the 10.0.1.200 ip number) I receive IPCFG_ERROR_BIND instead the expect success message that is IPCFG_ERROR_OK and the IP number is not set. Strange is that if I try to run the same function again I receive IPCFG_ERROR_OK. The other strange behavior is that this problem occours about in 30 % of the times.
Did anybody realized this?
Solved! Go to Solution.
Hello thiagow,
Please try unbinding first address by ipcfg_unbind() function and after that bind new ip address by ipcfg_bind_staticip() function.
If you need more than one IP address for your interface, please use functions RTCS_if_bind() instead of ipcfg_bind.
I hope it helps.
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello thiagow,
Please try unbinding first address by ipcfg_unbind() function and after that bind new ip address by ipcfg_bind_staticip() function.
If you need more than one IP address for your interface, please use functions RTCS_if_bind() instead of ipcfg_bind.
I hope it helps.
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks,
I will test your suggestion and I'll post the results soon.
Best Regards.