<?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>Unique Identifier for Bonds in Application Space</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3571/unique-identifier-for-bonds-in-application-space</link><description>Working through a custom security implementation. It is to desirable to know a unique identifier for each bond that has been made with the nrf51822 SD. When the SD enters into an encrypted bond link with an authenticated central I would like to keep track</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Aug 2014 15:09:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3571/unique-identifier-for-bonds-in-application-space" /><item><title>RE: Unique Identifier for Bonds in Application Space</title><link>https://devzone.nordicsemi.com/thread/12953?ContentTypeID=1</link><pubDate>Fri, 22 Aug 2014 15:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:decddadb-d09e-45d0-a188-53c84ac423a8</guid><dc:creator>Lucas</dc:creator><description>&lt;p&gt;Aren&amp;#39;t the number of entries in the white list fairly limited. Something like 2? Could you explain a little more about the use of the white list in general? I&amp;#39;m not sure I am seeing the entire picture yet .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unique Identifier for Bonds in Application Space</title><link>https://devzone.nordicsemi.com/thread/12952?ContentTypeID=1</link><pubDate>Fri, 22 Aug 2014 07:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a1edd57-348d-4a7a-8b8e-4ef1d1f387cb</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;I think you can try to use &lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/6.0.0/s110/html/a00946.html#ga2c2148c29f11f7508ee4550ff3ac3db2"&gt;dm_whitelist_create()&lt;/a&gt; to get addresses/IRKs of all bonded devices and use this as UID.&lt;/p&gt;
&lt;p&gt;The only problem is this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, if this routine is called when a
connection exists with one or more
peer devices, those connected devices
are not added to the whitelist.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;But I checked dm_whitelist_create() code and I don&amp;#39;t see where does it exclude connected devices from the peers table.&lt;/p&gt;
&lt;p&gt;UPD:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aren&amp;#39;t the number of entries in the
white list fairly limited. Something
like 2?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it&amp;#39;s limited, but up to 8:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Maximum amount of addresses in a whitelist. */
#define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8)

/**@brief Maximum amount of IRKs in a whitelist.
 * @note  The number of IRKs is limited to 8, even if the hardware supports more.
 */
#define BLE_GAP_WHITELIST_IRK_MAX_COUNT (8)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Well, you can just forget about this dm_whitelist_create() function and just directly use peers table:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;static peer_id_t&lt;br /&gt;
m_peer_table[DEVICE_MANAGER_MAX_BONDS];               /**&amp;lt; Table maintaining bonded devices&amp;#39;
identification information, an
instance is allocated in the table
when a device is bonded and freed when
bond information is deleted. */&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;UPD:&lt;/p&gt;
&lt;p&gt;Though you can&amp;#39;t get access to the m_peer_table without editing SDK files.&lt;/p&gt;
&lt;p&gt;But still with dm_whitelist_create() function you can get all the peers table info, because in dm_whitelist_create() there is no checks whatever or not requested number of addresses/IRKs is more then BLE_GAP_WHITELIST_ADDR_MAX_COUNT/BLE_GAP_WHITELIST_IRK_MAX_COUNT, if you request from it DEVICE_MANAGER_MAX_BONDS number of addresses/IRKs then it&amp;#39;ll just give you all avaible peers addresses/IRKs.&lt;/p&gt;
&lt;p&gt;Just check dm_whitelist_create() code for yourself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>