<?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>Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20648/bonding-issue-in-sdk11-with-ancs</link><description>Hi
I am using SDK11 with S130, NRF51822 that using ANCS and facing bonding problems after reach the max bonds.
Reference to nRF51-ble-peripheral-bond-handling example,
I use the ble_app_ancs_c project example and add app_bond.c and app_bond.h to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Mar 2017 12:04:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20648/bonding-issue-in-sdk11-with-ancs" /><item><title>RE: Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/thread/80515?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 12:04:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b93cd598-c4be-4d17-9afc-9b1be4fad0c4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The tutorial is in the youtube introduction in the page I pointed to.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really get what you meant in your comment. You said
if(((table_index.mr_cnt_val-table_index.lr_cnt_val)== DEVICE_MANAGER_MAX_BONDS-1)
is executed, meaning dm_device_delete(&amp;amp;device);  is called, and it should free up one space in the database, and you should be able to bond with the next device.&lt;/p&gt;
&lt;p&gt;Could you check why it couldn&amp;#39;t ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/thread/80514?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 02:24:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57791f41-8c15-409f-9719-9fb7a9c9fad6</guid><dc:creator>chapman</dc:creator><description>&lt;p&gt;Actually, is is mentioned in &lt;a href="https://github.com/NordicSemiconductor/nRF51-ble-peripheral-bond-handling"&gt;github.com/.../nRF51-ble-peripheral-bond-handling&lt;/a&gt; that &amp;quot;The example always keeps one block free for a new device to be added, so make sure to adjust DEVICE_MANAGER_MAX_BONDS to desired number of bonds + 1.&amp;quot; and //Delete first created bond if bond table is full
if(((table_index.mr_cnt_val-table_index.lr_cnt_val)== DEVICE_MANAGER_MAX_BONDS-1)
However , it is checked in &amp;quot;if (p_evt-&amp;gt;event_id == DM_EVT_DEVICE_CONTEXT_STORED)&amp;quot; and delete first created bond if bond table is full&lt;br /&gt;
if(((table_index.mr_cnt_val-table_index.lr_cnt_val)== DEVICE_MANAGER_MAX_BONDS-1) .....
This code is seen to be executed when it reach  DEVICE_MANAGER_MAX_BONDS-1.&lt;/p&gt;
&lt;p&gt;I have a nrf51 dongle but I don&amp;#39;t know how to use sniffer to check the bonding between my device with iphone. Is there any tutorial about that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/thread/80512?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2017 14:08:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a695453-4f16-4eb6-bc4a-187757928815</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Chapman,&lt;/p&gt;
&lt;p&gt;Sorry I didn&amp;#39;t notice the behavior of the example on github is to erase bond when it reach  DEVICE_MANAGER_MAX_BONDS-1.&lt;/p&gt;
&lt;p&gt;Could you check what happens when you get DM_EVT_DEVICE_CONTEXT_STORED event, and  reach DEVICE_MANAGER_MAX_BONDS-1 of bond (in this case 3) ? Do you see the code execute what it supposed to do of erasing the oldest bond ?&lt;/p&gt;
&lt;p&gt;If you have &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;a sniffer&lt;/a&gt; , you can check if you can bond with the last central (the new phone) and if ANCS is transferred.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/thread/80513?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2017 01:10:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ff24c4e-ab2c-413d-b356-c48b0c5a0da3</guid><dc:creator>chapman</dc:creator><description>&lt;p&gt;There is always ANCS on the first iPhone but no ANCS on another iPhone after reaching maximum bond. The  SDK11&amp;#39;s original ANCS example has the same phenomenon.
If using SDK10&amp;#39;s  ANCS original example, when it reach the maximum 4 bond, it will never receive any ANCS again until erase and flash the program on the chip.
As I add app_bond.c like nRF51-ble-peripheral-bond-handling example, it will never trigger DM_DEVICE_CONTEXT_FULL. Because  the code will delete the last bond  when DEVICE_MANAGER_MAX_BONDS-1 .
It works in SDK10 but fail in SDK11.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bonding issue in SDK11 with ANCS</title><link>https://devzone.nordicsemi.com/thread/80511?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 10:04:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:050550e3-ba8a-4c51-94e9-4ec4fed00157</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you explain this &amp;quot;Then I bond this to another iPhone, There is no ANCS response anymore. &amp;quot; ?&lt;/p&gt;
&lt;p&gt;There is no ANCS on the another iPhone or no ANCS on the first iPhone ?&lt;/p&gt;
&lt;p&gt;If you reach the maximum 4 bond, and you bond with another phone, the program will trigger DM_DEVICE_CONTEXT_FULL event and erase all bond. This explain why you can&amp;#39;t connect to the first iPhone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>