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

Scanner is disabled after provision completes with PB-GATT enabled with 10 second delay workaround

A device that is provisioned with PB-GATT enabled stops receiving mesh packets after the provision is complete.

When the provisioning process is complete nrf_mesh_disable() is called. Later when the SD has been restarted nrf_mesh_enable() is called.

nrf_mesh_disable() will call scanner_disable() but nrf_mesh_enable() never calls scanner_enable().

This patch solves the problem.

diff --git a/mesh/core/src/nrf_mesh.c b/mesh/core/src/nrf_mesh.c
index 311225f..0c409cb 100644
--- a/mesh/core/src/nrf_mesh.c
+++ b/mesh/core/src/nrf_mesh.c
@@ -409,9 +409,13 @@ uint32_t nrf_mesh_enable(void)
             }
 #endif
             bearer_event_start();
-            /* fallthrough */
+            status = bearer_handler_start();
+            break;
         case MESH_STATE_DISABLED:
         case MESH_STATE_DISABLING:
+#if !MESH_FEATURE_LPN_ENABLED
+            scanner_enable();
+#endif
             status = bearer_handler_start();
             break;
         default:

This is a bug was introduced with the previous workaround for the 10 second delay during provision. https://devzone.nordicsemi.com/f/nordic-q-a/43992/10-second-delay-after-pb-gatt-completed-until-first-mesh-proxy-service-advertisement

Related