Bluetooth Mesh Provisioner Reset

Hello,

I am using Bluetooth mesh for a project. I have a central device acting as a provisioner, and node devices that get provisioned as normal through this device.

I am trying to setup a button to perform a factory reset on the provisioner. The issue I get is that after performing a factory reset, the next newly provisioned node has issues communicating IF IT USES THE SAME NODE ADDRESS THAT WAS USED PREVIOUSLY. For example, If I had a node on address 2, do a factory reset, then the new address 2 node will not work. Something is being retained and I'm not sure what. 

Here is how I'm doing the "Factory Reset" 

    /* Clear the Configuration Databasefor provisioner */
    bt_mesh_cdb_clear();

    /* Reset the mesh node state */
    bt_mesh_reset();

    k_msleep(4000);

    sys_reboot(SYS_REBOOT_COLD);


I have also tried wiping the Settings but that doesn't seem to be fixing it either. 

Parents
  • On provisioner, you must not reuse a unicast address while another device still has valid credentials for it. It looks like there are clearly many things persistently stored, best is make sure to delete the subtree and CDB and recreate the cdb before provisioning again. 

    bt_mesh_cdb_clear();
    
    settings_delete("bt/mesh");
    bt_mesh_settings_store_pending(); /* force immediate write if enabled */
    k_msleep(3000); 
    
    sys_reboot(SYS_REBOOT_COLD);
    

Reply
  • On provisioner, you must not reuse a unicast address while another device still has valid credentials for it. It looks like there are clearly many things persistently stored, best is make sure to delete the subtree and CDB and recreate the cdb before provisioning again. 

    bt_mesh_cdb_clear();
    
    settings_delete("bt/mesh");
    bt_mesh_settings_store_pending(); /* force immediate write if enabled */
    k_msleep(3000); 
    
    sys_reboot(SYS_REBOOT_COLD);
    

Children
Related