<?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>Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7160/device-manager-dm_evt_security_setup_complete-error</link><description>I&amp;#39;m using s110 softdevice 6.1 SDK. I do bonding in my application the same way as in the ble_app_hrs example (bond, no_mitm). I have a charactarestic set to SEC_MODE_SET_ENC_NO_MITM. I use writing into this characteristic initially to trigger the bonding</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 May 2015 12:56:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7160/device-manager-dm_evt_security_setup_complete-error" /><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25307?ContentTypeID=1</link><pubDate>Mon, 25 May 2015 12:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f1bccf-3b17-44d0-b08c-c59c82ebe2e1</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Yes, this bug was fixed in SDK 7.1.0. CEAA is an IC revision 2 chip, it is compatible with SoftDevice S110 7.1.0 (and 8.0.0, if you disable CPU and radio concurrency, see its release notes). However, SDK 7.0.1 and later has not been tested on IC revision 2. Please see the &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF51822#Downloads"&gt;nRF51 Series Compatibility Matrix&lt;/a&gt; for more information. &lt;a href="https://devzone.nordicsemi.com/question/35590/can-i-only-use-modules-based-on-revision-3-nrf51822-with-nrf51-dk/"&gt;This&lt;/a&gt; question may also provide some insight.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25306?ContentTypeID=1</link><pubDate>Sun, 24 May 2015 16:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f8311b6-c4ff-4477-8ad2-fbabd947ee8a</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;p&gt;I was trying to implement this, but the 6.1 device manager seems to have a bug&lt;/p&gt;
&lt;p&gt;Lines from 2574 in device_manager_peripherla.c&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                        if (p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.central_kex.irk == 1)
                        {
                                                            m_peer_table[index].irk =
                                p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.central_keys.irk;
                            m_peer_table[index].id_bitmap &amp;amp;= (~IRK_ENTRY);
                        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;replace to this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                        if (p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.central_kex.irk == 1)
                        {
                                                            m_peer_table[device_index].irk =
                                p_ble_evt-&amp;gt;evt.gap_evt.params.auth_status.central_keys.irk;
                            m_peer_table[device_index].id_bitmap &amp;amp;= (~IRK_ENTRY);
                        }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Otherwise I get only valid irk for the first entry in the whitelist, the rest is nilled data.&lt;/p&gt;
&lt;p&gt;Is this fixed in newer sdks? Can we use newer sdk and softdevice with nrf58188_xxAA (CEAA)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25305?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 20:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:522055a1-4c42-427d-93a8-8bcb6bb0f578</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Please see my edited answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25304?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 16:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc8e41b5-c413-44e0-8488-902368374664</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;p&gt;Okay, I must have connected 7 times before that error. I cannot reproduce it before seven consecutive connections from the same device. The 8th pairing causes the error.
So when and how should I delete the rest of paired information. I still didn&amp;#39;t find any way to list the bonded peers and delete the oldest ones.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25303?ContentTypeID=1</link><pubDate>Fri, 22 May 2015 11:15:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18f15093-80d1-43df-920b-9c32bfde7871</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I just tested this now. SoftDevice S110 v7.1.0, SDK6.1.0, iOS 8.3, ble_app_hrs with BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&amp;amp;hrs_init.hrs_hrm_attr_md.cccd_write_perm); With DEVICE_MANAGER_MAX_BONDS 7 I don&amp;#39;t get DM_DEVICE_CONTEXT_FULL, but with DEVICE_MANAGER_MAX_BONDS 1 I get it. Could it be that you have bonded 7 times without deleting the bond information? Please help me reproduce this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25302?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 15:03:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f8f9af3-7897-4567-859e-ea7818a20cc2</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;p&gt;The only theoretical solution that comes in my mind to delete all bond information after the LINK_SECURED event if pairing is in progress. Given it is safe to assume that device manager doesn&amp;#39;t store device information somewhere before this. But this way only one bounded device would be supported and a solution for your 2) problem would be required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25299?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 14:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34c9a476-19f8-4b2f-acd7-ba019aa9f086</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;ll try to reproduce this tomorrow. What iOS version and device are you using? You are using SDK 6.1.0 with SoftDevice S110 v7.1.0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25301?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 14:42:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c35070b-b9b9-4a5a-8cb9-7611060330c0</guid><dc:creator>Michal Zacharias</dc:creator><description>&lt;ol&gt;
&lt;li&gt;MAX_BONDS is set to 7, and only 1 device connected to it. The application functions as activity tracker and delivers notifications to the user. We need bonding because we also use ANCS client. Without bonding ANCS doesn&amp;#39;t work.&lt;/li&gt;
&lt;li&gt;I found no way to get a list of stored bonded centrals with device manager and the documentation to it is rather brief and confusing. Could you point me to an example code, where this is implemented?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device manager DM_EVT_SECURITY_SETUP_COMPLETE error</title><link>https://devzone.nordicsemi.com/thread/25300?ContentTypeID=1</link><pubDate>Thu, 21 May 2015 14:11:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f755da49-d24e-48f5-8ecf-0b114bf36845</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;ol&gt;
&lt;li&gt;I think you will only get DM_DEVICE_CONTEXT_FULL when the device context memory is full. You will receive this error from device_instance_allocate() when the BLE_GAP_EVT_AUTH_STATUS event is handled in dm_ble_evt_handler().&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Have you set DEVICE_MANAGER_MAX_BONDS to 1? You could try to increase it. If you have space in the device context memory I believe the device manager will just look at the iOS device as a new device and create a new bond. Lets say you set it to 8, then you will be able to bond with 8 different devices, or if you delete the bonding information in iOS, have up to 8 bonds with the same device. The device manager allows you to delete bonds, so you could have some kind of mechanism that ensures that there always is device context memory available when a new device tries to bond.&lt;/p&gt;
&lt;p&gt;To detect if a central device has been unbonded you need some way of identifying it. The device address changes, but maybe you can use IRK to achieve it. So what event in the &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/s110/html/a01070.html"&gt;bonding process&lt;/a&gt; will give you the IRK? You will not get the IRK when you get the BLE_GAP_EVT_CONNECTED event(if you don&amp;#39;t use whitelisting), and you will not get it with the BLE_GAP_EVT_SEC_PARAMS_REQUEST or the BLE_GAP_EVT_CONN_SEC_UPDATE events. You will get it with the BLE_GAP_EVT_AUTH_STATUS event.&lt;/p&gt;
&lt;p&gt;To get a list of IRKs of the bonded devices you can use dm_whitelist_create(). So in ble_evt_dispatch() you can look for the BLE_GAP_EVT_AUTH_STATUS event, get the list, run through it, and delete the bonded devices with dm_device_delete_all() if you get a match.&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tested this, it is just an idea. Also, I cannot guarantee that the central device will use the same IRK.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;The devices are still connected, and they are still able to communicate, but you will only be able to access characteristic values and descriptors that doesn&amp;#39;t require encryption, but usually the app doesn&amp;#39;t try to access these. Please see &lt;a href="https://devzone.nordicsemi.com/question/37204/how-to-tell-the-host-to-clear-and-do-all-the-bonding-setup-again/"&gt;this&lt;/a&gt; question for a bit more information.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Edit 22.05.2015 Added a suggestion on how to identify an unbonded central.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>