This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to recover from a failed link?

Other Parts Discussed in Thread: SIMPLICITI

Hello all,

I have a two device peer-to-peer SimpliciTI network and I am trying to work out how to recover from a link failure. 

Case 1: Link between link_to and link_listen devices fails due to distance.  When the two devices are within proper proximity, communication is reestablished. The linkID's are the same so this is expected.

Case2: link_to device loses power and is restarted.  When this happens, the link_to device sends a SMPL_Link command that succeeds even though the link_listen device is not executing a SMPL_LinkListen.  Is that normal?  My understanding the two SMPL link pair should go together.

Case3: link_listen device loses power.  It gets stuck at the SMPL_LinkListen since the link_to device never executes a SMPL_Link command anymore.  What is the best practice to recover in this case? Use SMPL_SendOpt instead?

Any hints or pointers greatly appreciated.

Thank you,

-- Amer

  • Hi Amer,

    Amer Y Abufadel said:

    Case 1: Link between link_to and link_listen devices fails due to distance.  When the two devices are within proper proximity, communication is reestablished. The linkID's are the same so this is expected.

    In this case, as long as both devices do not use e.g. SMPL_Unlink or restart itself, i think it should be no problem. After they can reach other again, they should be able to communicate between each other again.

    Amer Y Abufadel said:

    Case2: link_to device loses power and is restarted.  When this happens, the link_to device sends a SMPL_Link command that succeeds even though the link_listen device is not executing a SMPL_LinkListen.  Is that normal?  My understanding the two SMPL link pair should go together.

    Case3: link_listen device loses power.  It gets stuck at the SMPL_LinkListen since the link_to device never executes a SMPL_Link command anymore.  What is the best practice to recover in this case? Use SMPL_SendOpt instead?

    The best way to do this is storing the network information after the linking succeeds for the first time. To get the network information, you can use SMPL_Ioctl - IOCTL_OBJ_NVOBJ. When the device restarts, it should check in the non volatile memory whether the network information is available which in this case after the device restarts, the information should be available, then they can copy the network information back to the connection handle.

    Unfortunatelly there is currently no example code on doing this, however i would try to make one in the next following days since this issue is kept being asked all the time. I'll let you know if i come up with the example code.

  • Hi Leo,

    Im subscribing to this post because im also very interested in knowing how to get the connection saved to non volatile memory and then reading it again. It would be really helpful to have this information.

    Thanks in advance,

    Mario Medina

  • Hi all,

    i finally made it to create a small example for restoring SimpliciTI network connection after power cycle. I haven't got time to write much explanation about the code, but hopefully the code explains itself.

    I put it on the SimpliciTI FAQ page:

    http://processors.wiki.ti.com/index.php/SimpliciTI_FAQ#Restoring_connection_after_power_cycle

    I hope this helps.

  • Thanks for the code ! this definitely will be from great great help!!!!

    Regards.

    Mario Medina