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

Reliably Disabling Mesh Stack Quickly for Low Power

Setup
nRF52840 DK
S140
nRF52 SDK v16.0.0
nRF SDK for Mesh v4.0.0

Goal
I would like to be able to disable the Mesh stack and all radio operations so that my application can enter sleep mode in a few milliseconds

Issues
I have found a number of Nordic blog posts which attempt to address this operation but none of them seem to actually work out of the box.


1) The recommended solution from an expert does not work in my application or the light_switch_server example
https://devzone.nordicsemi.com/f/nordic-q-a/43786/mesh-disable-time-vary/171821#171821

In the above link Andreas recommends this procedure:
i) stop proxy
ii) disable scanner
iii) disable mesh

2) proxy_stop() and scanner_disable() often throw a Mesh Assert

proxy_stop(): 130022>, app_error_weak.c,  108, Mesh assert at 0x0002C494 (:0)
scanner_disable(): 126937>, app_error_weak.c, 108, Mesh assert at 0x0002C494 (:0)

They both cause this failure by calling the function 

timer_sch_abort(...)

This problem with proxy_stop() is listed as the "Solution" to the following blog post

https://devzone.nordicsemi.com/f/nordic-q-a/49046/unprovisioning-a-device-with-power-on-off


How can I prevent these asserts from happening? It is critical to my application to be able to deactivate our mesh network very quickly and reliably, but all methods for doing so appear to take up to 10 seconds if they work. Can we sort out a canonical way to achieve this with the SDK? I am willing help as much as I can to make this happen, but I am not knowledgeable enough about the SDK to do it myself. From the other blog posts I have seen this is a common issue, and may be worth a blog post once sorted out.

Related