<?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>Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61528/connection-to-device-peripheral-after-smartphone-central-erased-its-bonding-data</link><description>Hi, 
 I am currently working on a product based on an nRF52832 (SDK 15.3, S112 6.1). 
 The firmware uses the Nordic UART Service to receive and send data from and to a smartphone. 
 I have added the Peer manager and set all characteristics access in ble_nus_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 May 2020 14:16:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61528/connection-to-device-peripheral-after-smartphone-central-erased-its-bonding-data" /><item><title>RE: Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/thread/252240?ContentTypeID=1</link><pubDate>Thu, 28 May 2020 14:16:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17220f71-36dd-4606-b8ab-3f6225c3310a</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Yes, it will always a trade-off between user-friendliness and security, it will depend on what you are more concerned about. Let me know if you have any more questions.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/thread/251758?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 15:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c53e2bd-bad4-4fcf-a2d4-f0304d646224</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Hi Marjeris,&lt;/p&gt;
&lt;p&gt;I actually managed to get my hands on a Galaxy S9 and I can confirm I do not have any pop-up on this smartphone with my own project. So you are right, it&amp;#39;s probably a specific issue of my smartphone (the pop-up actually changed content since the last time I checked with an OS update of the phone).&lt;/p&gt;
&lt;p&gt;Regarding the security of the repairing I see what you mean. For now, my customer does not want to implement any kind of factory reset on the device. I&amp;#39;ll have to explaing this situation and raise the concern about the repairing. The device&amp;#39;s input capability is also very limited so not sure how we could really handle a request to delete bonding information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/thread/251680?ContentTypeID=1</link><pubDate>Tue, 26 May 2020 10:43:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5beaa8d4-a771-4d3d-8acf-4d497ace6cc4</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Nathan,&lt;/p&gt;
&lt;p&gt;There is one catch with repairing. Repairing is not secure, I have now updated my original post to reflect that.&lt;/p&gt;
&lt;p&gt;If repairing is allowed anyone can just pretend it has the same MAC address and read all the data by bonding again.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s recommended to instead remove the pairing info on both sides. This can also be done &amp;quot;remotely&amp;quot;, like with a &amp;quot;restore factory defaults&amp;quot; setting in your device, or with a button for example...&lt;/p&gt;
&lt;p&gt;So as you see, it would be a trade-off between security and user-friendliness... If you choose to allow repairing anyways, the user data should at least be removed so no one can get access to them. &lt;br /&gt;&lt;br /&gt;Anyways, I just tested a modified version of the glucose example in the SDK, adding the event handling for PM_EVT_CONN_SEC_CONFIG_REQ in the PM handler so I can handle repairing, using my Samsung Galaxy S9 without seeing any pop-up window... so it may be a manufacturer dependent issue...&lt;/p&gt;
&lt;p&gt;To be sure, you can do the same&amp;nbsp; test I did, open the Glucose example from the SDK v16.0.0, add the 3 lines for repairing from the above post inside the pm_evt_handler() and test bonding and repairing with your phone to see if the issue still persists. &lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/thread/250784?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 14:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db07fd85-ac0c-49db-b1d0-6668ef60b6e0</guid><dc:creator>Nathan O.</dc:creator><description>&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;I actually already have this configuration for handling SEC_CONFIG_REQ events.&lt;/p&gt;
&lt;p&gt;Is it an expected behavior that the smartphone shows a popup asking for association request when this happens ?&lt;/p&gt;
&lt;p&gt;On the first bonding procedure, I do not have any popup (Just Works pairing is done). I would like to avoid having this smartphone popup if possible. It is especially an issue as on one of my smartphone, this popup show as &amp;quot;association request with null&amp;quot; but that&amp;#39;s probably a smartphone side issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connection to device (peripheral) after smartphone (central) erased its bonding data.</title><link>https://devzone.nordicsemi.com/thread/250769?ContentTypeID=1</link><pubDate>Tue, 19 May 2020 14:11:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88ee5387-99e6-4c69-bd9a-e37c28f9d69a</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When you erase the bonding information from the smartphone it is also recommended to erase the bonding information on the nRF device too.&lt;/p&gt;
&lt;p&gt;The peer manager which handles pairing&amp;nbsp;requests will for &lt;strong&gt;security reasons*&lt;/strong&gt; reject new pairing requests from an already bonded peer device. It sounds like&amp;nbsp;this may be the problem here.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may add the following event handling to the PM callback if you want to allow repairing:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;      case PM_EVT_CONN_SEC_CONFIG_REQ: 
       {
            pm_conn_sec_config_t config = {.allow_repairing = true};
            pm_conn_sec_config_reply(p_evt-&amp;gt;conn_handle, &amp;amp;config);
       }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The other alternative is to actually delete the bond from the nRF device. For the SDK examples, you can delete all bonds by pressing board button 2 while resetting the device.&lt;br /&gt;&lt;br /&gt;NB:&lt;/p&gt;
&lt;div&gt;* Note that this will enable a potential attacker to update an existing bond. So there is a trade-off between security and user-friendliness.&lt;/div&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>