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

After Unpromising (Reset Node) the node is not able to discover for further provisioning.

Hi,

   We are using nRF52840 chipset with SDK 15.0.0  with Mesh implemetation. 

1. We are provisioning the mesh node using the nRF mesh APP.

2. Then we are resetting the node using same nRF mesh APP.

3. Sometimes above works and we are able to scan/see the node in unprovision list  of mesh APP. 

4. But sometime when we reset (unprovision) the node it is not coming back in unprovision list neither we are able to scan/see  it anymore.which is almost dead state for us because we are no longer able to see and connect it.

This has become show stopper for us because even after power cycle we are not able to discover it. 

Waiting for your immediate resolution and support.

Regards,

Ram

  • HI Robin,

      Thanks for the early Reply.

       We have developed the function call to unprovision the node as per our requirement . Please find the snippet of the code for unprovisioning the node which we are using. 

    We are having the mobile app which send the command to the BLE to execute the function  void UnprovisonMeshNode( void ) which intern calls the function mesh_stack_config_clear() to unprrovision it. 

    Please let us know if we need to add any other function before or after calling the function mesh_stack_config_clear()  so that the error doesn't occur and reset the card. 

    Regards,

    Ram

  • Hi Robin,

       Additional to the above information please find the snippet where the BLE chip get reset when we try to close the app in which the provisioning is done.

    Regards,

    Ram

  • Hi Ram,  

    Please see how our mesh example programs handles unprovisioning of nodes by calling the mesh_stack_config_clear() function below.

    static void node_reset(void)
    {
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- Node reset  -----\n");
        hal_led_blink_ms(LEDS_MASK, LED_BLINK_INTERVAL_MS, LED_BLINK_CNT_RESET);
        /* This function may return if there are ongoing flash operations. */
        mesh_stack_device_reset();
    }
    

    You are free to copy this or use it as an inspiration for your own projects. 

    Best regards, 

    Robin

  • Hi Robin,

       As specified i  tried to use the function node_reset() to unprovison the device from the mesh network, But looks like the device is not getting unprovisioned from the network, In nrf Mesh APP it is showing in the provisioned list.

    Function Call:

    node_reset()

    Regards,

    Ram

      

  • Hi Ram, 

    I'm handling the case from Robin.

    I suspect that you have reset the chip before you finished erasing the flash. Time to erase one page can take up to 89.7ms. 

    Using a delay after calling mesh_stack_config_clear() may not be the best option. 

    If you have a look at the apply_reset() function inside config_server.c you can find that we need to check for flash_manager_is_stable() before we forward the event to the application for a reset. And there we also check for flash stable before we trigger the reset. 

    I'm not sure why you need to write your own UnprovisionMeshNode() function. Why wouldn't you use our already made function to handle node reset handle_node_reset() when receive CONFIG_OPCODE_NODE_RESET ?

    Which Mesh SDK are you using ? Have you tried to use our example for example lightswitch server and trigger a node reset from the app ? Which issue do you have when doing that ? 
    Please also try to test on fresh (and newer if possible) SDK just to make sure there wasn't any modification that can cause an issue. 

Related