This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SIG Mesh LPN automatically re-select FRIEND node.

Hi, everyone

A LPN ( Node-LP ) had selected one of nodes as its friend ( Node-F0 ), if Node-F0 is taken away, will the Node-LP automatically reselect other node as its friend?

Parents
  • Hi Jhc, 

    If the friend node is taken away the friendship will be timed out after a period of time. You will receive NRF_MESH_EVT_FRIENDSHIP_TERMINATED event when that happens. 
    After that you can choose to re-initialize friendship again (with other nodes) by calling mesh_lpn_friend_request(). Please have a look at initiate_friendship() function in our LPN example. 
    Note that you may need to wait for a period of time before you call mesh_lpn_friend_request() after you receive NRF_MESH_EVT_FRIENDSHIP_TERMINATED  event. If you call it in the same event, you may receive NRF_ERROR_INVALID_STATE error. 

Reply
  • Hi Jhc, 

    If the friend node is taken away the friendship will be timed out after a period of time. You will receive NRF_MESH_EVT_FRIENDSHIP_TERMINATED event when that happens. 
    After that you can choose to re-initialize friendship again (with other nodes) by calling mesh_lpn_friend_request(). Please have a look at initiate_friendship() function in our LPN example. 
    Note that you may need to wait for a period of time before you call mesh_lpn_friend_request() after you receive NRF_MESH_EVT_FRIENDSHIP_TERMINATED  event. If you call it in the same event, you may receive NRF_ERROR_INVALID_STATE error. 

Children
Related