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

  • when provision first time the devkey is 9D F7 CC 2D C8 E8 B4 AA 66 C7 DC 41 40 9D AD 4E 00 and p_devkey address is 0x200036E0. After re-provision with same node address the devkey becomes AA 36 22 75 76 7D 55 34 4A 75 33 13 42 A8 1A 8E 00 and p_devkey address is  0x200036E0. how to remove the address from device key list.

  • where should i need to call this dsm_devkey_delete() 

  • When you remove the node (calling config_client_node_reset() ) you can delete the device key in the dsm list on the provisioner by calling dsm_devkey_delete()

  • ok, what you saying is, i have to call sdm_devkey_delete() after config_client_code_reset() in provisioner main.c but the dsm_devkey)delete() contains handle parameter. dsm_clear() will not delete this devkey?

Reply Children
Related