This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPN won't unprovision

Hello,

I'm trying to get an LPN to unprovision itself based off of an external command.

I tried to base it off of the examples so I simply call: 

(void) proxy_stop();
mesh_stack_config_clear();
dsm_clear();
node_reset();

However after the reset it still immediately pairs back with it's friend and still seems to have retained it's keys.

What am I missing?

Thanks,

Alex

Parents
  • Hi,

    Have you stepped through the code and see if the node is actually reset?

    What SDK version are you using?

  • Hi,

    But have you debugged the code to see if these functions:

    (void) proxy_stop();
    mesh_stack_config_clear();
    dsm_clear();
    node_reset();

    are called?

    It seems like the functions aren't really called at all.

    aross11 said:
    One thing of note is that I do have the bootloader (/Bootloader/nrf52833_secure_bootloader.hex) running on it as well for DFU.

    I don't think this will cause any issue.

  • Sorry for the delay!

    I walked through with a debugger and everything looked right. I added these messages to ensure full execution:

    void mesh_unprovision(void)
    {
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, __RECEIVE__ "1\n");
    (void) proxy_stop();
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, __RECEIVE__ "2\n");
    mesh_stack_config_clear();
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, __RECEIVE__ "3\n");
    dsm_clear();
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, __RECEIVE__ "4\n");
    node_reset();
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, __RECEIVE__ "5\n");
    }


    00> <t:    1233929>, mesh_interface.c,  458, Friend poll procedure complete
    00> <t:    1509965>, mesh_interface.c,  458, Friend poll procedure complete
    00> <t:    1793067>, mesh_interface.c,  327,  RX: Unprovision request
    00> <t:    1793070>, mesh_interface.c,  332,  RX: Executing...
    00> <t:    2350794>, mesh_interface.c,  342,  RX: 1
    00> <t:    2477728>, mesh_interface.c,  344,  RX: 2
    00> <t:    6003326>, mesh_interface.c,  346,  RX: 3
    00> <t:    6129078>, mesh_i<t:      49888>, main.c,  151, ----- Pin init done -----
    00> <t:      49890>, main.c,  154, ----- Timer init done -----
    00> <t:      49893>, uart_interface.c,   73, ----------UART init complete 
    00> <t:      62090>, nrf_sdh_ble.c,  240, RAM starts at 0x20002488<t:      62092>, main.c,  160, ----- NUS init done -----
    00> <t:      62711>, nrf_mesh_dfu.c,  690, ------>nrf_mesh_dfu_init 6
    00> <t:      62718>, mesh_interface.c,  187, Initializing and adding models
    00> <t:      62764>, mesh_interface.c,  224, Initting LPN mode 
    00> <t:      62766>, main.c,  163, ----- Mesh init done -----
    00> <t:      62769>, mesh_interface.c,  509, Mesh Timer init finished 
    00> <t:      63037>, main.c,  179, ----- Initalize done -----
    00> <t:      63040>, mesh_interface.c,  108, Node Address: 0x001B 
    00> <t:      63043>, mesh_app_utils.c,   66, Device UUID (raw): 
    00> <t:      63059>, mesh_interface.c,  256, 

  • Hi,

    I'm not seeing node_reset() being called since 4 isn't being printed. Can you see if this is the case?

  • I think it had to as I have init messages pop up again after it should have been called. 

Reply Children
No Data
Related