Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can i Rejoin with the previously paired network after power goes off ?

Hi Team, In my project i am using nrf52833 and i have established a network using Open Thread protocol to communicate . I am able to pair my device with the network. One scenario i wanted to implement for my project are described below.

Generally when power goes off device got disconnected from the network. I wanted to rejoin the device with the previously paired thread network when device powered  again. Is there any possibilities to rejoin with the network when power ON with out doing any physical activities with the device. If so, then what are the possible way we can rejoin the device with the network.

Thank you.

Parents
  • Hi,

    The OpenThread stack should store the network dataset in flash during the commissioning procedure. When you power cycle the device, your application should be able to utilize the existing credentials to rejoin the network. See this post for more details.

    You can use the function otDatasetIsCommissioned() to check if the dataset is commissioned, to determine if you should start joiner process or not.

    Best regards,
    Jørgen

  • is dataset stored in flash automatically after successfully got paired?

  • No, you do not need to pair again if you have reset the device and want to rejoin the network. Dataset and keys are stored in flash during commissioning. See Chapter 10.12 (Persistent data) in Thread 1.1.1 specifications for more details.

    In your application, you can call otDatasetIsCommissioned() to see if the dataset is commissioned. If the dataset is not commissioned, you can choose to start the joiner, or call otThreadSetEnabled() to join the network if dataset is commissioned.

  • otDatasetIsCommissioned() this function accept otinstance as a parameter . Very 1st time while i am pairing device one otinstance gets created . I have used this function otDatasetIsCommissioned() with the otinstace and i can see this function returned TRUE that's mean data gets commissioned. now i  do reset my device and i wanted to use those data . How can i faced those data? so that i can use the stored dataset and key for join again.

     

  • Unless you call otInstanceFactoryReset()/otInstanceErasePersistentInfo() after joining, the dataset should be stored in non-volatile memory (flash) and loaded when you call otInstanceInitSingle()/otInstanceInit() after the reset. When you call otThreadSetEnabled() to enable the Thread stack, the previously commissioned dataset should be used to attach to the previously joined network.

  • I can see now my device is getting reconnecting into the network. One issue i am facing now with this implementation. i.e while i am trying to change few parameters of the device, i observed in sniffer that sometimes parameters are getting changed and some times not, getting time out error. what may the cause would you let me know?

  • Please post a new ticket where you describe the issue in detail and include the sniffer logs. Then we will help you resolve it.

Reply Children
Related