<?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>Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76088/remote-provisioning-link-open-timeout-not-triggering</link><description>Hello, I am using SDK 16.0 and mesh SDK 4.2. 
 We successfully implemented remote provisioning capabilities in our devices&amp;#39; firmware. One thing we are noticing though is that the remote provisioner does not timeout after some time if no PDU is received</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Jun 2021 07:54:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76088/remote-provisioning-link-open-timeout-not-triggering" /><item><title>RE: Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/thread/314839?ContentTypeID=1</link><pubDate>Fri, 11 Jun 2021 07:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:877b829f-0003-4938-9fb1-6d0d64c79e2c</guid><dc:creator>rmarques</dc:creator><description>&lt;p&gt;Thank you for the advice Mttrinh, we will do this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/thread/314713?ContentTypeID=1</link><pubDate>Thu, 10 Jun 2021 13:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53d33d6e-729c-4cf1-98d1-36b2bbc6226f</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This seems to be true. I see that PB Remote Client messages are acked after they are forwarded by PB Remote Server to PB-ADV, but the reply on those messages comes independently of the reply on the PB Remote Client message. This looks like an omission from the PB Remote protocol side.&lt;/p&gt;
&lt;p&gt;So, it might actually be a right thing to run timer in &lt;strong&gt;pb_if_link_open_cb&lt;/strong&gt; in &lt;strong&gt;pb_remote_client.c&lt;/strong&gt; setting the timeout to some reasonable time which is 2-3 times bigger than the provisioning link timeout.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/thread/314271?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 16:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffc0a6bc-ccb9-4220-90ec-e591e98809ed</guid><dc:creator>rmarques</dc:creator><description>&lt;p&gt;Thank you for the useful information as always Mttrinh, we will activate those logs and check what may be happening.&lt;/p&gt;
&lt;p&gt;In the meantime, what do you think will happen if the server times out, triggers the link close callback but the reliable message never reaches the remote provisioner client?&lt;/p&gt;
&lt;p&gt;I suspect this might be happening in our case. Will the client be eternally waiting for the server to say something?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/thread/314239?ContentTypeID=1</link><pubDate>Tue, 08 Jun 2021 13:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b0bb82d-2981-4c88-804c-aca79ebaf9f5</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The timeout passed &lt;strong&gt;link_open&lt;/strong&gt; callback is the timeout of the provisioning link, which is the link between the provisioner and an unprovisioned device. In case of PB Remote, this is the link between PB Remote Server and an unprovisioned device. The link between PB Remote Client and PB Remote Server doesn&amp;#39;t use this timeout, but instead relies on the PB Remote protocol. This is because PB Remote Client doesn&amp;#39;t really know when PB Remote Server established the provisioning link and thus can&amp;#39;t manage the timeout correctly. PB Remote Client and Server use reliable messages to exchange the data, so that if the message has not been received by one of the side, it will terminate the remote provisioning process. Since PB-ADV on the PB Remote Server side still uses the timeout, it will call &lt;strong&gt;pb_adv_link_closed_cb&lt;/strong&gt; if link has been timed out (&lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/prov/src/prov_bearer_adv.c#L290"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/mesh/prov/src/prov_bearer_adv.c#L290&lt;/a&gt;). This will go to &lt;strong&gt;pb_remote_server_event_link_closed_cb&lt;/strong&gt; (&lt;a href="https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/models/proprietary/pb_remote/src/pb_remote_server.c#L686)"&gt;https://github.com/NordicSemiconductor/nRF5-SDK-for-Mesh/blob/master/models/proprietary/pb_remote/src/pb_remote_server.c#L686)&lt;/a&gt;, which in turns will send a message to PB Remote Client.&lt;/p&gt;
&lt;p&gt;Can you check that what I described actually happens on your side and what is PB Remote Server and Client states? If you could provide logs with&amp;nbsp;&lt;strong&gt;LOG_SRC_ACCESS | LOG_SRC_BEARER&lt;/strong&gt; and &lt;strong&gt;LOG_LEVEL_DBG3&lt;/strong&gt;, this might also be helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Remote provisioning link open timeout not triggering</title><link>https://devzone.nordicsemi.com/thread/314015?ContentTypeID=1</link><pubDate>Mon, 07 Jun 2021 17:15:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1ea6718-014c-4f45-9079-0d175702f235</guid><dc:creator>rmarques</dc:creator><description>&lt;p&gt;So, this is my idea:&lt;/p&gt;
&lt;p&gt;Inside&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#c2c2c2;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;pb_if_link_open_cb &lt;/span&gt;&lt;/strong&gt;I start a timer&amp;nbsp;that triggers a callback that tries to close the link after&amp;nbsp;&lt;span style="background-color:#c2c2c2;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;NRF_MESH_PROV_LINK_TIMEOUT_MIN_US&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;microseconds. This timer is restarted every time a PDU is processed in&amp;nbsp;&lt;span style="background-color:#c4c4c4;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;pb_remote_client_process&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;and is stopped somewhere when the provisioning is complete, probably in &lt;span style="background-color:#bfbfbf;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;strong&gt;prov_evt_handler&lt;/strong&gt; &lt;/span&gt;in my provisioner_helper.c file, on the&amp;nbsp;&lt;strong&gt;&lt;span style="background-color:#bdbdbd;font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;NRF_MESH_PROV_EVT_LINK_CLOSED &lt;/span&gt;&lt;/strong&gt;case. Am I on the right track?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>