<?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>Loss of bonding key</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49589/loss-of-bonding-key</link><description>I am working on a BLE peripheral (nRF52840 &amp;amp; SDK 15.3), which uses the Peer Manager to handle encryption and bonding to an iOS central device. 
 Requirements call for the device to advertise its presence every 180 seconds such that the central device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jul 2019 10:59:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49589/loss-of-bonding-key" /><item><title>RE: Loss of bonding key</title><link>https://devzone.nordicsemi.com/thread/198122?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 10:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:780f48bd-0175-4159-bd11-fce526d7280e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I see your point, this shouldn&amp;#39;t occur no. There should at least be some check that if it&amp;#39;s only one bond (e.g. call pm_peer_count()), then the&amp;nbsp;pm_peer_delete() is not executed. Considering you only have one bond you may just set flash_write_after_gc to true always. You are free to change this as you see fit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An alternative may be that you on each disconnection call&amp;nbsp;fds_stat(), and then run&amp;nbsp;fds_gc() before&amp;nbsp;&lt;span&gt;PM_EVT_STORAGE_FULL may occur.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Loss of bonding key</title><link>https://devzone.nordicsemi.com/thread/197942?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 18:31:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcca7161-a08e-4a1a-904f-149294898bc3</guid><dc:creator>jhewitt</dc:creator><description>&lt;p&gt;You say in your response that there is no automatic deletion of the peer based on it&amp;#39;s rank.&amp;nbsp; When this event occurs it is because peer_manager_handler.c line 350 is executed in the function pm_handler_flash_clean()&amp;nbsp;with state PM_EVT_STORAGE_FULL.&amp;nbsp; How do I configure the app to allow this state to occur without the call to pm_peer_delete() on line 350?&amp;nbsp; This line deletes the lowest ranked peer even when it is the only peer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Loss of bonding key</title><link>https://devzone.nordicsemi.com/thread/197934?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 17:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55d7a7bc-bfb2-4910-b517-77ae4542afd1</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You may disable the rank system, especially if you only have 1 bond at any time. The intention of the rank system is for the application to be able to have some kind of knowledge of which peer have been used last or least. The rank will be updated each time you connect to a peer, and that is really it. There is no automatic deletion of the peer based on it&amp;#39;s rank, this must be handled by the application in some way based on application criteria (e.g. need to delete a bond to make room for a new). I am not sure what a good idea it is to frequently update CCCD&amp;#39;s, since they will trigger flash write (and possible erase) operation frequently. A better idea would be to simply have CCCD&amp;#39;s enabled all the time, but instead the peer can write a command on demand that the application will use to decide if it should send notifications or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Loss of bonding key</title><link>https://devzone.nordicsemi.com/thread/197777?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 10:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89281e77-6570-45c2-acf7-b576888927c3</guid><dc:creator>jhewitt</dc:creator><description>&lt;p&gt;Nordic engineer to be assigned ... applying both of the above changes did correct the encryption failure issue that was being created.&amp;nbsp; The change to allow re-pairing is a security risk and therefore not considered an acceptable solution.&amp;nbsp; Is this condition being created because of the &lt;span&gt;PM_PEER_RANKS_ENABLED&amp;nbsp;&lt;/span&gt;option and, where is there documentation that describes the behavior of this option?&amp;nbsp; I would expect this option to delete the lowest ranked peer only when the number of bonded peers approaches the value assigned to&amp;nbsp;PM_RA_PROTECTION_TRACKED_PEERS_NUM which is eight in my case.&amp;nbsp; Does this option also delete the only peer that is bonded when peer manager executes garbage collection anyway?&lt;/p&gt;
&lt;p&gt;While awaiting my answers I will back out the change to allow re-pairing and see if the condition returns after another 18 hour test.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>