AnsweredAssumed Answered

check real time ip conflict

Question asked by vines on Feb 25, 2014
Latest reply on Mar 18, 2014 by Garabo

Hi all,

 

My project involves manually setting the IP for the device. Lets say I have 2 devices with identical IP. When I power up both system, I should be able to see that one can bind with the static IP and the other should throw an error. However on my module below, it is not. Is there any setting I need to do to perform these?

 

error = RTCS_create();

if ((ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, enet_address)) != IPCFG_OK) //my enet_address is unique in every device

     errorNet();

if ((ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE, &ipDataGlobal)) != IPCFG_OK)// i set 2 devices with same IP

     errorNet();

 

Isn't it the bind static IP function should throw an error? Correct me if I am wrong, when I power up both devices, there will be a race condition and whichever comes first binds the IP. Is it a correct assumption?

FYI

I am debugging and it is not going into errorNet function.

 

Thanks.

Outcomes