<?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>How to delete host bonds while keeping peripheral bonds</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44263/how-to-delete-host-bonds-while-keeping-peripheral-bonds</link><description>Hi, 
 I&amp;#39;m using nrf52832 as host and peripheral concurrently, with soft device s132. I know that peer manager can handle both host and peripheral. 
 I now have a need to remove the bonds of host, at the same time I want to keep the bond data of peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 03 Mar 2019 21:23:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44263/how-to-delete-host-bonds-while-keeping-peripheral-bonds" /><item><title>RE: How to delete host bonds while keeping peripheral bonds</title><link>https://devzone.nordicsemi.com/thread/173848?ContentTypeID=1</link><pubDate>Sun, 03 Mar 2019 21:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6770c4c-be74-4269-8873-b0fdcb21415e</guid><dc:creator>AlbertBao</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for the quick reply, I&amp;#39;ll try to see if it works.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to delete host bonds while keeping peripheral bonds</title><link>https://devzone.nordicsemi.com/thread/173632?ContentTypeID=1</link><pubDate>Fri, 01 Mar 2019 08:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b048854d-b9fc-40d9-a971-acbb195133fa</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The GAP role is included as a part of the bonding information.&amp;nbsp;It should be possible to use the pm_peer_count() and&amp;nbsp;pm_peer_data_load() API exposed in peer_manager.h to first find the number of bonds, then retrieve&amp;nbsp;the bonding information to find the GAP role of a particular bond.&lt;/p&gt;
&lt;p&gt;You can probably do something like this to run through the list of bonds (I have not tested it):&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t               err_code;
uint32_t               bond_cnt;
pm_peer_data_bonding_t bonding_info;

bond_cnt = pm_peer_count();

for (pm_peer_id_t id=0; id &amp;lt; bond_cnt; id++)
{
    err_code = pm_peer_data_bonding_load(id, &amp;amp;bonding_info)
    APP_ERROR_CHECK(err_code);
    
    if (bonding_info.own_role == BLE_GAP_ROLE_PERIPH)
    {
        //TODO: Bond belongs to GAP peripheral role
    }
    else if (bonding_info.own_role == BLE_GAP_ROLE_CENTRAL)
    {
        //
    }  

}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>