I am working on nRF52-DK using the light client example under Mesh 2.1.1
I am trying to start and stop the listening for provisioning packets as the idea is to switch to provisioner role and then switch back to provisionee role.
The code is by default setup that it starts sending out unprovisioned beacons and this works nicely. After 10s I execute a call for nrf_mesh_disable() followed by nrf_mesh_prov_listen_stop(&m_prov_ctx);
No matter what I try after that doesn't start the sending unprovisioned beacons again.
First I tried calling the start function from the example that starts the mesh and initializes the listener, but that didn't go through as the p_bearer was already set, so the ASSERT got triggered
the list_compare_add was failing as there was a p_bearer left after executing nrf_mesh_prov_listen_stop. Mesh error number returend was 95.
Then I tried calling nrf_mesh_enable() followed by nrf_mesh_prov_listen(&m_prov_ctx, m_params.p_device_uri, 0, PROV_BEARERS) that should start the listening
This would return with NRF_SUCCESS and the software would continue running until it was time to dispatch the advertisement packet about 2s later. At this stage it would break with the following call stack with error number 95. Which I haven't figured out yet where to find the meaning
There seems to be something wrong with the advertisement packet struct and it fails when trying to free a packet.
Am I missing some function calls that should be done before or after calling the start and stop functions for listening?
Any help would be appreciated
As I am still new to development on nrf52 the assert message was indicating the place of the print statement not the error number. Duh
Attached is the screen shot of the code that rises the assert when processing the packet before it is sent
Thanks, look like a buffer issue, we will try to reproduce and report to R&D.