<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>10 second delay after provision when using PB-ADV with PB-GATT enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47280/10-second-delay-after-provision-when-using-pb-adv-with-pb-gatt-enabled</link><description>When using the PB-ADV bearer there is a ~10 second delay after the Link is closed and the mesh stack starts working again. 
 This is related to my previous report https://devzone.nordicsemi.com/f/nordic-q-a/43992/10-second-delay-after-pb-gatt-completed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 May 2019 20:14:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47280/10-second-delay-after-provision-when-using-pb-adv-with-pb-gatt-enabled" /><item><title>RE: 10 second delay after provision when using PB-ADV with PB-GATT enabled</title><link>https://devzone.nordicsemi.com/thread/188919?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 20:14:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2513a5d0-8f6d-4d2f-8dad-28d7a2217371</guid><dc:creator>JonasJ</dc:creator><description>&lt;p&gt;Thanks, that solves the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 second delay after provision when using PB-ADV with PB-GATT enabled</title><link>https://devzone.nordicsemi.com/thread/188887?ContentTypeID=1</link><pubDate>Thu, 23 May 2019 14:58:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:317e4869-bf29-4b1b-86b2-fbacd3d69cb3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi JonasJ,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actually there are 2 places need to be updated for that fix. Could you try the 2nd part (in &lt;span&gt;bearer_handler_timer_irq_handler() )&amp;nbsp;&lt;/span&gt;as mentioned in this comment to see if it&amp;#39;s improved:&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43301/nrf_mesh_disable-function-changed-since-sdk-for-mesh-v3-1-0/180061#180061"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/43301/nrf_mesh_disable-function-changed-since-sdk-for-mesh-v3-1-0/180061#180061&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 second delay after provision when using PB-ADV with PB-GATT enabled</title><link>https://devzone.nordicsemi.com/thread/188035?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 19:00:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9892a27-cec8-43a8-8a18-0f35d8512b89</guid><dc:creator>JonasJ</dc:creator><description>&lt;p&gt;When running with an unmodified (almost, small modifications to the logging, see below) I get the following, notice the time difference between &amp;quot;gatt_database_reset&amp;quot; and &amp;quot;Successfully provisioned&amp;quot;, ~9.5 seconds.&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;t:       9308&amp;gt;, main.c,  218, Initializing and adding models
&amp;lt;t:       9312&amp;gt;, main.c,  113, App OnOff Model Handle: 2
&amp;lt;t:      14223&amp;gt;, prov_bearer_adv.c,  400, PB-ADV: context at 0x20003044 added to bearer
&amp;lt;t:      14236&amp;gt;, mesh_app_utils.c,   65, Device UUID (raw): 38E1F5E6712B054DAC7F4505C7950884
&amp;lt;t:      14241&amp;gt;, mesh_app_utils.c,   70, Device UUID : E6F5E138-2B71-4D05-AC7F-4505C7950884
&amp;lt;t:   15896418&amp;gt;, prov_bearer_adv.c,  849, PB-ADV: Link opened.
&amp;lt;t:   15898833&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu1]
&amp;lt;t:   15905560&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu3]
&amp;lt;t:   15912202&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu5]
&amp;lt;t:   15914259&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu6]
&amp;lt;t:   15917568&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu8]
&amp;lt;t:   15918520&amp;gt;, mesh_provisionee.c,  176, gatt_database_reset
&amp;lt;t:   15918524&amp;gt;, prov_bearer_adv.c,  904, PB-ADV: Link closed.
&amp;lt;t:   15932489&amp;gt;, net_beacon.c,  265, BEACON TX CC:D8:7F:3
&amp;lt;t:   16229606&amp;gt;, mesh_provisionee.c,   94, mesh_evt_handler
&amp;lt;t:   16229613&amp;gt;, mesh_provisionee.c,  158, sd_state_evt_handler DISABLED
&amp;lt;t:   16229622&amp;gt;, mesh_provisionee.c,  113, sd_state_evt_handler ENABLED
&amp;lt;t:   16230166&amp;gt;, main.c,  198, Successfully provisioned
&amp;lt;t:   16230173&amp;gt;, main.c,  209, Node Address: 0x0013 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The SDK For Mesh 3.1.0 is running with the following patch&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/examples/common/src/mesh_provisionee.c b/examples/common/src/mesh_provisionee.c
index abffcfa..6f3be59 100644
--- a/examples/common/src/mesh_provisionee.c
+++ b/examples/common/src/mesh_provisionee.c
@@ -91,6 +91,8 @@ static void mesh_evt_handler(const nrf_mesh_evt_t * p_evt)
 {
     if (p_evt-&amp;gt;type == NRF_MESH_EVT_DISABLED &amp;amp;&amp;amp; m_doing_gatt_reset)
     {
+        __LOG(LOG_SRC_APP, LOG_LEVEL_DBG1, &amp;quot;%s\n&amp;quot;, __func__);
+
         APP_ERROR_CHECK(nrf_sdh_disable_request());
         nrf_mesh_evt_handler_remove(&amp;amp;m_mesh_evt_handler);
     }
@@ -108,6 +110,8 @@ static void sd_state_evt_handler(nrf_sdh_state_evt_t state, void * p_context)
     {
         case NRF_SDH_EVT_STATE_ENABLED:
         {
+            __LOG(LOG_SRC_APP, LOG_LEVEL_DBG1, &amp;quot;%s ENABLED\n&amp;quot;, __func__);
+
             uint32_t ram_start = 0;
             /* Set the default configuration (as defined through sdk_config.h). */
             uint32_t err_code = nrf_sdh_ble_default_cfg_set(MESH_SOFTDEVICE_CONN_CFG_TAG, &amp;amp;ram_start);
@@ -151,6 +155,7 @@ static void sd_state_evt_handler(nrf_sdh_state_evt_t state, void * p_context)
         }
         case NRF_SDH_EVT_STATE_DISABLED:
         {
+            __LOG(LOG_SRC_APP, LOG_LEVEL_DBG1, &amp;quot;%s DISABLED\n&amp;quot;, __func__);
             uint32_t err_code = nrf_sdh_enable_request();
             APP_ERROR_CHECK(err_code);
             break;
@@ -168,6 +173,7 @@ NRF_SDH_STATE_OBSERVER(m_sdh_req_obs, MESH_PROVISIONEE_SDH_STATE_PRIORITY) =
 
 static void gatt_database_reset(void)
 {
+    __LOG(LOG_SRC_APP, LOG_LEVEL_DBG1, &amp;quot;%s\n&amp;quot;, __func__);
     m_doing_gatt_reset = true;
     nrf_mesh_evt_handler_add(&amp;amp;m_mesh_evt_handler);
 
diff --git a/examples/light_switch/server/src/main.c b/examples/light_switch/server/src/main.c
index 5ccdf76..c854378 100644
--- a/examples/light_switch/server/src/main.c
+++ b/examples/light_switch/server/src/main.c
@@ -234,7 +234,7 @@ static void mesh_init(void)
 
 static void initialize(void)
 {
-    __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_BEARER, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT);
+    __LOG_INIT(0xFFFFFFFF, LOG_LEVEL_DBG3, LOG_CALLBACK_DEFAULT);
     __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- BLE Mesh Light Switch Server Demo -----\n&amp;quot;);
 
     ERROR_CHECK(app_timer_init());
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Applying the disable()/enable() workaround the log looks like this. This gives a delay of less than 2 ms.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;t:          0&amp;gt;, main.c,  238, ----- BLE Mesh Light Switch Server Demo -----
&amp;lt;t:       9324&amp;gt;, main.c,  218, Initializing and adding models
&amp;lt;t:       9328&amp;gt;, main.c,  113, App OnOff Model Handle: 2
&amp;lt;t:      14260&amp;gt;, prov_bearer_adv.c,  400, PB-ADV: context at 0x20003044 added to bearer
&amp;lt;t:      14273&amp;gt;, mesh_app_utils.c,   65, Device UUID (raw): 38E1F5E6712B054DAC7F4505C7950884
&amp;lt;t:      14277&amp;gt;, mesh_app_utils.c,   70, Device UUID : E6F5E138-2B71-4D05-AC7F-4505C7950884
&amp;lt;t:     518091&amp;gt;, prov_bearer_adv.c,  849, PB-ADV: Link opened.
&amp;lt;t:     520526&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu1]
&amp;lt;t:     526390&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu3]
&amp;lt;t:     532890&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu5]
&amp;lt;t:     535182&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu6]
&amp;lt;t:     538219&amp;gt;, prov_bearer_adv.c,  798, Received ACK for [ppdu8]
&amp;lt;t:     538977&amp;gt;, mesh_provisionee.c,  176, gatt_database_reset
&amp;lt;t:     538984&amp;gt;, prov_bearer_adv.c,  904, PB-ADV: Link closed.
&amp;lt;t:     538988&amp;gt;, mesh_provisionee.c,   94, mesh_evt_handler
&amp;lt;t:     538994&amp;gt;, mesh_provisionee.c,  158, sd_state_evt_handler DISABLED
&amp;lt;t:     539003&amp;gt;, mesh_provisionee.c,  113, sd_state_evt_handler ENABLED
&amp;lt;t:     539554&amp;gt;, main.c,  198, Successfully provisioned
&amp;lt;t:     539560&amp;gt;, main.c,  209, Node Address: 0x0016 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 second delay after provision when using PB-ADV with PB-GATT enabled</title><link>https://devzone.nordicsemi.com/thread/187933?ContentTypeID=1</link><pubDate>Mon, 20 May 2019 13:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4562974f-0d6c-4874-876c-8e041fb8f034</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Doing the initial workaround with scanner_disable()/scanner_enable() in nrf_mesh_disable()/nrf_mesh_enable() does actually improve the situation.[/quote]
&lt;p&gt;How much does it improve? Does this delay also occur when you use an unmodified example from the SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>