MQX 4.1.1 RTCS ipcfg_bind_staticip sometimes returning IPCFG_ERROR_BIND

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

MQX 4.1.1 RTCS ipcfg_bind_staticip sometimes returning IPCFG_ERROR_BIND

Jump to solution
604 Views
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?

Labels (1)
1 Solution
347 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
348 Views
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!
-----------------------------------------------------------------------------------------------------------------------

347 Views
thiagow
Contributor III

Thanks,

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

Best Regards.

0 Kudos