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

How to re-provision a node to same address with nRF52840 DK board in mesh

i'm using nRF mesh sdk v2.1.1 with 2 boards and 1 provisioner board. I have un-provisioned 1 board with the help of config_client_node_reset().  I want to know the procedure to re-provision the unprovisioned node with same address.Please give me solution.

Parents
  • Hi, 

    Mesh spec has no guide regarding this. By the spec, the address of a newly provisioned node should be the increment of the last provisioned node. 

    But it should be possible to provision with the previous address. You need to modify the provisioner code to store the database and when you re-provision the unprovisioned node you use the same address. 

  • <t: 461821>, provisioner_helper.c, 287, Scanning For Unprovisioned Devices
    <t: 461857>, main.c, 118, Flash write complete
    <t: 532066>, main.c, 702, Button 4 pressed
    <t: 532068>, main.c, 716, ----- Node reset -----
    <t: 532078>, main.c, 721, ----- Press reset button or power cycle the device -----
    <t: 532081>, main.c, 728, Setup start after reset
    <t: 532083>, main.c, 731, Waiting for node to be provisioned ...
    <t: 532086>, provisioner_helper.c, 287, Scanning For Unprovisioned Devices
    <t: 534849>, main.c, 146, Flash remove complete
    <t: 535156>, main.c, 460, Config client event
    <t: 613530>, provisioner_helper.c, 144, UUID seen: 0059000000000000975B2B98BE9A8FF2
    <t: 613533>, provisioner_helper.c, 95, UUID filter matched
    <t: 614293>, provisioner_helper.c, 264, Provisioning link established
    <t: 693378>, provisioner_helper.c, 259, Static authentication data provided
    <t: 704892>, provisioner_helper.c, 192, Provisioning completed received
    <t: 704895>, provisioner_helper.c, 197, Adding device address, and device keys
    <t: 704898>, provisioner_helper.c, 200, Address: 0x0100
    <t: 704900>, provisioner_helper.c, 203, devkey_handle:0
    <t: 627593>, app_error_weak.c, 103, Mesh error 15 at 0x00027FF1

    (Error in line:\provisioner\src\provisioner_helper.c:203)

    It seems device key handle gets 0 if i reset the node and re-provision it.How to solve this problem

  • This is something out of spec so you will be on your own if you want to do this. We unfortunately don't have the resource to provide you the detailed instruction on how to do it. You would need to look into the provisioner code and find where we assign the address of the new node. Look for next_device_address in the provisioner example. 

    I'm not sure your logging is about, why you have Flash remove complete  ? 

    What you need to test first is to remove a node and add the node back as a new node with incremental address. After you can do that, you can start to modify to add the new node with the original address. 

  • i have added the code which was in check_network_state function for provisioned_device =0, after reset a node by pressing button 4 from main.c. If i do like this i got error for devkey_handle.can you just help me to solve this devkey_handle issue?

  • I'm not sure I understand what you are doing. Are you saying you resetting the provisioner node ? Why would you reset the provisioner node ? 

    My understanding is that you want to reset the provisionee node, a normal node in the network. To reset a normal node (reset means remove/unprovision it from the network) you call config_client_node_reset() inside the config client. 

    This (command with CONFIG_OPCODE_NODE_RESET opcode) will be handled by the config server on the node to be reset. 

    Please describe what exactly your code doing. 

  • i'm resetting provisionee node (unprovision from network) by calling config_client_node_reset().I have successfully unprovisioned the node, I facing the issue, when i start provision to same address it provision to (address: 0x0100) same address but devkey_handle becomes 0 instead of 2.Can you please clarify why the devkey_handle becomes 0 when i re-provision the node with same address.  

    Please describe what exactly your code doing. 

    I'm simply reset a node using config_client_node_reset() from provisioner and trying to re-provision it to same address.

Reply
  • i'm resetting provisionee node (unprovision from network) by calling config_client_node_reset().I have successfully unprovisioned the node, I facing the issue, when i start provision to same address it provision to (address: 0x0100) same address but devkey_handle becomes 0 instead of 2.Can you please clarify why the devkey_handle becomes 0 when i re-provision the node with same address.  

    Please describe what exactly your code doing. 

    I'm simply reset a node using config_client_node_reset() from provisioner and trying to re-provision it to same address.

Children
Related