Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Join an existing mesh Network with a mesh provisioner (nrf mesh sdk)

Hi,

Is it possible to join an existing mesh network with a provisioner made on Nrf52840 (s140)  ?

I have used the provisioner example to make a provisioner which actually create a new mesh network. But after an "erase all" of the board, the provisioning data are lost and the board can't reconnect to the network because information are lost during the erase (logic).

Is there a way to extract the provisioning data and mesh network data from the board to use them later on an other board ?

My goal is to create a mesh network with a device, then store in a file all the information related to this network to be able later with another board to join this network and add new devices.

I have setup a serial connection to send data through the usb port to my computer so I could retrieve and return the data by this method.

I know that this is possible in the mobile application with the "export network" and "import network" functions but I can't reproduce the functionality with the mesh SDK.

Is this possible? If yes how?
Regards

Used sdk :

- nRF5_SDK_16.0.0_98a08e2

- nrf5_SDK_for_Mesh_v4.2.0_src

Board used :

- nrf52840 evaluation board

- nrf52832 evaluation board

  • Hi,

    No it's not possible to update the new device key as far as I know. Otherwise any node in the network would be capable of modifying other nodes in the network. 


    Regarding what you described about the device works after a while, it could be related to IV index updating. So when your device is out of sync with the network (for example inactive for too long, or newly join the network as you are doing now), the IV index might not be the most updated and it won't be able to communicate. It would then need to wait for Secure Network Beacon to sync the IV index after that it would be able to communicate normally. The Secure Network Beacon is broadcasted periodically by all nodes. 

  • Hi,

    Thanks for all this informations.

    Can I send from the provisioner a mesh command that force a new Secure Network Beacon ?

    If its not possible, can I change the periodic delay of this beacon (for example at the first provisioning) ?

    Regards

  • Hi, 

    Please refer to the mesh spec, look for "Beacon Interval" in 3.9.3.1 . The implementation in our code is in update_beacon_interval(). But modifying this may cause an issue for qualification. 
    I don't think it would take a few minutes to receive a beacon. So it's quite strange that it took 5 minutes in your case. How many nodes in the network when you tested ? Please try with at least 3-4 nodes. 

  • Hi,

    In my tests I have 5 nodes in my network.

    I have also test with one, two and three and got the same issue.

    Also, I have forgot to mention that the nodes took an average of 5 mins before interpreting the model commands (all commands before this average time amount is not executed) but the nodes never execute the commands from the config client model (even after 5mins).

    However I got the health alive beacon as soon as I'm reconnect to the network.

    Edit : I have tried to change the beacon interval from the provisioner but no notable change. Its need to be change from the provisioner or from the node ?

    Regards.

  • Otherwise you said before that its can be a problem with the IV index.

    If I try to export the index and reload it at the start can it solve the issue ? If yes, how can I get this index from code ?

    Regards

Related