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,

    Thanks for all.

    I want to check if its really  a IV Index issue, for that I want to debug it on the both side (provisioner and node) and see what's append.

    Can you say to me how can debug the IV Index (which variable I need to log) ?

    Regards

  • Hi Neicureuil, 

    The current IV Index is stored in m_net_state.iv_index in net_state.c .  If the device is provisioned the IV index is restored when the mesh config is loaded from flash (mesh_config_load). When net_state_enable() (restored_result_apply()) is called the IV index from flash will be applied to  m_net_state.iv_index. 

    The Secure Network Beacon is handled in net_beacon_packet_in inside beacon_packet_in() inside net_beacon.c . You can turn on logging at LOG_LEVEL_DBG1 level for LOG_SRC_NETWORK to get the info about the process on the log. 

    The actual update of the IV index is handled in incoming_data_received() in net_state.c .

    Note that if the difference between the current IV index in the node and the actual IV index in the network is above NETWORK_IV_RECOVERY_LIMIT (42) the node would need to be re-provisioned. 

  • Hi,

    I have realized some test :
    - I have set the NETWORK_IV_RECOVERY_LIMIT to 1000000000 to test if its an Iv Index issue but nothing change. On the network reload (from serial like the beginning) I got node alive event (from the node health model) but I need to wait between 5 minutes and infinity for the nodes to start receiving messages from the On/Off and config models of the provisioner.

    In the end does this look like an IV index problem or not ?

    Because if it is an index problem, the provisioner should not receive the alive events from the health model of the nodes.
    Unless the health model does not depend on the IV index?

    Regards

  • Hi,

    I have made a mistake.

    When I change the NETWORK_IV_RECOVERY_LIMIT, I only change it on the provisioner side.

    When I also change it in the node side, it seems to be faster (1 or 2 seconds).

    But why when the IV index is bad the health model messages are received both side ? Is the health model depends of the iv index or not ?

    EDIT :

    After a second test with more than one device (because the first test use only one node), its doesn't work. The node takes an average of 5 minutes to be sync (like before).

    Fake Hope ......

    EDIT 2 :

    Is the IV index the same for all the nodes in the network or each node as Its own IV index ?

    Regards

  • Hi,

    I don't think the Health Model Message is any different from other model. So it's pretty strange that you can receive the health model message but not the others. 

    I would suggest to test changing the IV Index of a single normal node, and observe how long it would take for the note to get updated to the current IV Index. 

Related