<?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>pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54893/pm_peer_data_bonding_load-not-finding-the-data-error-code-5</link><description>We have a device (in central mode) initiating a secure connection to a peripheral (slave) via the usage of `pm_conn_secure(conn_handle, false)`. This results in a `PM_EVT_CONN_SEC_SUCCEEDED` event being generated by the peer manager. 
 
 Checking the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Dec 2019 14:58:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54893/pm_peer_data_bonding_load-not-finding-the-data-error-code-5" /><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/223108?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 14:58:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10bf7ade-92f7-4b67-ba71-5216c16af284</guid><dc:creator>Alex Crombie</dc:creator><description>&lt;p&gt;That is very helpful, thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/223106?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 14:54:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f32e4b7-4e2c-497f-ad29-241098196feb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;From the code, it does get generated from that. (it&amp;#39;s generated on&amp;nbsp;FDS_EVT_WRITE,&amp;nbsp;FDS_EVT_UPDATE,&amp;nbsp;FDS_EVT_DEL_RECORD success events)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/223096?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 14:35:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fc4a514-d7bc-4a1c-8eb9-c253e972d784</guid><dc:creator>Alex Crombie</dc:creator><description>&lt;p&gt;Does the&amp;nbsp;&lt;span&gt;PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event get generated on the `pm_peer_new()` and `pm_peer_data_bonding_store()` calls?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/223093?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2019 14:26:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d706b5ed-2602-49f0-b604-0345f8a3f19e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Thanks for the update. The way the fds works is that fds has a queue and data_stored=1 in&amp;nbsp;&lt;span&gt;PM_EVT_CONN_SEC_SUCCEEDED only tell the the flash store command is queued, not executed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you try catching&amp;nbsp;&lt;/span&gt;PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event and read the bond information at that event instead ? I think it&amp;#39;s the proper way of doing it. The event is valid for both updating peer data, and storing on the first time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/222664?ContentTypeID=1</link><pubDate>Thu, 28 Nov 2019 17:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5519d008-f7d0-424b-8163-a8bc78e2543d</guid><dc:creator>Alex Crombie</dc:creator><description>&lt;p&gt;I have tested adding a delay before retrieving the bonding information and this does indeed eventually result in the bonding information being present.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As per my previous comment is there a fix in a subsequent SDK/SoftDevice?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a reason the bonding information cannot be returned sooner?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/222446?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 17:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08f86df9-00b6-465a-a43e-e6d41fe619c0</guid><dc:creator>Alex Crombie</dc:creator><description>&lt;p&gt;As mentioned in the issue, the peer_id has the value 0 which is not the invalid peer_id value.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why would the bonding information be available on the disconnect event, but not before?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I will try the delay and reading after disconnect, but our application really needs this to work at the point of the connection being secured.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a fix for this in later SDKs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: pm_peer_data_bonding_load not finding the data (error code 5)</title><link>https://devzone.nordicsemi.com/thread/222439?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2019 16:47:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3f067c-c481-423b-a2ae-24c8d5a409f7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alex,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you received&amp;nbsp;PM_EVT_CONN_SEC_SUCCEEDED event, what the peer_id was ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why you receive NOT_FOUND return, but could you try to do a read after some delay ? There could be a chance that the flash store command is not executed by the softdevice (even though data_stored = 1). You can try doing the bond read after the DISCONNECTED event, it should return the correct bond information.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>