<?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 do bonding and unbonding in zephyr using nrf  52832 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61723/how-to-do-bonding-and-unbonding-in-zephyr-using-nrf-52832-dk</link><description>Hello, 
 I need to bond a device with its bd_addr using AT_command and unbond device using another AT_command. I am having only DK of nrf52832. So I am trying to bond 2 devices, DK as central and mobile as peripheral using nrf_connects advertise. But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Jun 2020 06:24:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61723/how-to-do-bonding-and-unbonding-in-zephyr-using-nrf-52832-dk" /><item><title>RE: How to do bonding and unbonding in zephyr using nrf  52832 DK</title><link>https://devzone.nordicsemi.com/thread/255134?ContentTypeID=1</link><pubDate>Tue, 16 Jun 2020 06:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9a1b07b-8b26-4a05-9451-5dfc5f55135b</guid><dc:creator>Snehal</dc:creator><description>&lt;p&gt;Thank you Einar for your response. Will you please elaborate about bt_foreach_bond API, any example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to do bonding and unbonding in zephyr using nrf  52832 DK</title><link>https://devzone.nordicsemi.com/thread/251478?ContentTypeID=1</link><pubDate>Mon, 25 May 2020 12:24:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a35e4270-ef7f-4343-990c-674f8d409388</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]&amp;nbsp;I need to bond a device with its bd_addr using AT_command and unbond device using another AT_command. I am having only DK of nrf52832. So I am trying to bond 2 devices, DK as central and mobile as peripheral using nrf_connects advertise. But every time mobile is generating new random address.[/quote]
&lt;p&gt;You need to&amp;nbsp;bond in order to obtain the IRK and resolve the address as it changes.&lt;/p&gt;
[quote user=""]How to start bonding procedure in zephyr?[/quote]
&lt;p&gt;Normally the central initiates bonding, but the peripheral can request it. In any case, you do it using &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__conn_ga18ecebf9c85a719996c1b47f39c14106.html#ga18ecebf9c85a719996c1b47f39c14106"&gt;bt_conn_security()&lt;/a&gt;.&lt;/p&gt;
[quote user=""]how to count number of bonded devices and their bd_address in zephyr?[/quote]
&lt;p&gt;There is no API function that will give you the count, but you can count the bonds yourself using &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__gap_ga4a1593690cf2c833848078f37a631c3b.html#ga4a1593690cf2c833848078f37a631c3b"&gt;bt_foreach_bond()&lt;/a&gt;. In most cases you should leave this up to the central, though. And&amp;nbsp;&lt;/p&gt;
[quote user=""]how to unbond device using bd_address in zephyr?[/quote]
&lt;p&gt;You can do that with &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__gap_ga94e92c889ea10de0ae582440d3fbb730.html"&gt;bt_unpair()&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>