MQX 4.1.1 RTCS ipcfg_bind_staticip sometimes returning IPCFG_ERROR_BIND

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MQX 4.1.1 RTCS ipcfg_bind_staticip sometimes returning IPCFG_ERROR_BIND

跳至解决方案
1,235 次查看
thiagow
Contributor III

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?

标签 (1)
1 解答
978 次查看
soledad
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
979 次查看
soledad
NXP Employee
NXP Employee

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!
-----------------------------------------------------------------------------------------------------------------------

978 次查看
thiagow
Contributor III

Thanks,

I will test your suggestion and I'll post the results soon.

Best Regards.

0 项奖励
回复