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

Mesh: How to properly Stop and Restart Provision Beaconing

I have tried nrf_mesh_disable(); but it does not turn off the Provision Beaconing.

mesh_provisionee_prov_listen_stop(); does the trick, however I am struggling with re-enabling the beaconing. mesh_provisionee_prov_start(&prov_start_params) throws an error "Mesh assert at 0x00032FB0 (:0)".

Screenshot of call stack attached bellow:

  • Hi,

    Instead of calling mesh_provisionee_prov_start() could you try to define a function like this inside mesh_provisionee.c (and declare it in mesh_provisionee.h):

    uint32_t my_provisionee_start(void)
    {
    return provisionee_start();
    }

    You then can call my_provisionee_start() to start sending beacon again. 
    Don't forget about the interrupt context that you can call this function. If you declare mesh with NRF_MESH_IRQ_PRIORITY_LOWEST then you need to call the function in an interrupt handler (button press for example)

Related