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

Parents
  • Hi Ram, 

    Depending on the firmware you're running on the nodes it may not have been designed to put the nodes back into "provisioning mode" after a reset in the app. The easiest way to get the nodes back this state would simply be to re-upload the firmware to the nodes.

    The alternative would be to rewrite the firmware code to enable a function where the nodes goes back into "provisioning mode" after being reset in the app. 

    Best regards, 

    Robin

  • Hi Robin,

      As mentioned in my previous message in point 3 we are having the supporting firmware to unprovision the node and it is working.

    As mentioned in point 4 the actual problem is sometime the unprovision fails  (say out of 10 tries 2 times fail) after that the node is not visible in either provision or unprovision list.

    Even when we power cycle the module it is not even visible in nRF connect APP. It means the BLE chip is DEAD and no more it is accessible from any BLE APP. 

    Observation:

        During unprovison we have the function call mesh_stack_config_clear() to clear the mesh information, during the execution of this function we observe that the BLE chip is resetting because of which the unprovision might be not happening properly.

    Please let us know how we can handle it.

    Regards,

    Ram

  • Hi Ram,

    ramachandra said:
        During unprovison we have the function call mesh_stack_config_clear() to clear the mesh information, during the execution of this function we observe that the BLE chip is resetting because of which the unprovision might be not happening properly.
    Could you please disable optimization in your project and run some debugging to check where in the mesh_stack_config_clear() the reset occurs?  

    Best regards, 

    Robin

  • Hi,

       The reset during the mesh_stack_config_clear()  execution happened only couple of time, But even without reset the BLE chip is not unprovisioing properly.

    Sometime during unprovisiing the device stops advertising and thereafter only way to get it back is reprogramming the chip.

    Regards,

    Ram

  • Hi Ram, 

    Have you tried running debugging on these to determine where in the mesh_stack_config_clear() occurs? 

    I believe that mesh_stack_config_clear() is called in mesh_stack_init(), if the node fails to apply the configurations. When mesh_stack_config_clear() is called, mesh_stack_init() will return NRF_ERROR_INVALID_DATA. If this return value is passed onto an APP_ERROR_CHECK(return_value) then the device will reset.

     As far as I can tell, mesh_stack_config_clear() itself voids all the return values, so it shouldn't reset during mesh_stack_config_clear().

    I have tried to replicate your problem, and I have not been able to recreate the same error with our mesh light switch example code.  

    Regards, 

    Robin 

  • 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

Reply
  • 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

Children
  • 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. 

  • Hi Hung,

       Thanks for providing the inputs and supporting us.

      As informed i tried to use the function apply_reset(), but this is called from the callback function mesh_event_cb(), how do i trigger this callback function intern which triggers the apply_reset() function.

      Actually in our current code the Mesh reset  is happening randomly ( say out of 10 tries 6 tries it reset the node another 4 it fails). 

    In failure case it is observed that the BLE chip get reset automatically before be execute the reset command( force reset).

    Even we are not able to have the calll stack information in the bedugging mode to find out the reason for failure.

    Currently we are using the proxy Mesh SDK, Please let me know is there any way to identity the version number of Mesh APP because it is old code and i didnt get the Mesh SDK with name proxy Mesh SDK in nordic official release.

     

     

Related