<?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>Disconnect of bonded device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15990/disconnect-of-bonded-device</link><description>Hi! 
 I am having problems with bonding and the UART service. To connect to the peripheral I am using nrfConnect and nrfToolbox (UART) on an iPhone 6. 
 I am trying to setup an encrypted and bonded connection in the ble_app_uart example from SDK 8.0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Jan 2019 09:01:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15990/disconnect-of-bonded-device" /><item><title>RE: Disconnect of bonded device</title><link>https://devzone.nordicsemi.com/thread/168629?ContentTypeID=1</link><pubDate>Wed, 30 Jan 2019 09:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9308e46a-7d9c-499e-bfc0-535886a08232</guid><dc:creator>Matej</dc:creator><description>&lt;p&gt;Hi guys,&lt;/p&gt;
&lt;p&gt;I have the completely same issue, so I&amp;rsquo;m wondering where can I found the debate about this issue? Or how to proceed in case that central have invalid encryption key?&lt;/p&gt;
&lt;p&gt;One approach is of course deleting bonding on smart device&amp;hellip; any other idea?&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: Disconnect of bonded device</title><link>https://devzone.nordicsemi.com/thread/60995?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 12:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09259f59-6e59-42c9-a75f-f9a1957763a8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;@Christopher Could you add a new question and rather add a link to this one? This could get a bit messy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect of bonded device</title><link>https://devzone.nordicsemi.com/thread/60994?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 10:30:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb65021d-f5a7-40de-9ebc-62f175517fc8</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;@petter thanks for your comment&lt;/p&gt;
&lt;p&gt;I am using SDK10 (and SoftDevice 130 version 1 on the nRF51 rev.3 ) with an  unmodifed device manager and I also get the 0x003D (&lt;code&gt;BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE&lt;/code&gt;) disconnection error. I enabled the log of the DM, here is the output (with some other debug logs):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[DM]: Request to allocation connection instance
[DM]:[00]: Connection Instance Allocated.
[DM]:[00]:[Block ID 0x0003F800]:Loading bond information at 20002D70, size 0x0000001C, offset 0x0000001C.
[DM]:[0x00]:[0xFF]: Bond context Event
[DM]: Notifying application of event 0x21
[DM]:[00]:Loading service context at 20002D8C, size 0x00000010, offset 0x00000038.
[DM]:[0x00]:[0xFF]: Service context Event
[DM]:[00]:[Block ID 0x0003F800]: Service context loaded, size 0xFFFFFFFF
���������|�5cDM_EVT_CONNECTION
* Event id 16
&amp;gt; LOCAL - Push new state = 2
[DM]: &amp;gt;&amp;gt; BLE_GAP_EVT_SEC_INFO_REQUEST
����������������* Event id 20
[DM]: Disconnect Reason 0x003D
[DM]: Notifying application of event 0x12
[DM]:[CI 0x00]: Freeing connection instance
[DM]:[00]: Freed connection instance.
[DM]: Initializing Connection Instance 0x00000000.
* Event id 17
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can reproduce this error when connecting the nRF51 peripheral software (which produce this error) with an Android and iOS phone. I use the &amp;quot;Just Works&amp;quot; pairing mechanism. Some characteristics are open, some other are &lt;code&gt;BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is the procedure to reproduce it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clear the list of the paired device in the DM on the nRF side&lt;/li&gt;
&lt;li&gt;Forget/Remove the paired device on the smartphone (iOS, Android)&lt;/li&gt;
&lt;li&gt;Start advertising on the peripheral and connect to it&lt;/li&gt;
&lt;li&gt;Connection is successful. The smartphone is bonded and paired and we can write to protected characteristics&lt;/li&gt;
&lt;li&gt;Disconnect. Make sure the device is disconnected. On Android, sometimes a paired device keep connected.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This was the first use case and it works. Then, this is the procedure to reproduce the &lt;code&gt;0x003D&lt;/code&gt; error:&lt;/p&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Erase bonds on the nRF side. I use &lt;code&gt;dm_device_delete_all&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Start advertising.&lt;/li&gt;
&lt;li&gt;Connect to the peripheral from a smartphone (iOS or Android).&lt;/li&gt;
&lt;li&gt;Crash! Cannot connect (or immediately disconnected). We even do not get the connection event on the smartphone. We get the &lt;code&gt;0x003D&lt;/code&gt;  error code on the nRF side.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The reason why we got this error is because the device is still  known as a paired device on the smartphone but no more on the peripheral. The only way to be able to connect again is to clear the device from the list of known device on the smartphone (step 2).&lt;/p&gt;
&lt;p&gt;In my opinion, this use case should be handle correctly by the device manager. In that error case, we got the connection failure quickly and we cannot send a security request to initiate the bonding request again.&lt;/p&gt;
&lt;p&gt;Are you aware of this use case and bug ? SDK10 is quite old now but could you provide a patch of the device manager ?&lt;/p&gt;
&lt;p&gt;Thank you in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Disconnect of bonded device</title><link>https://devzone.nordicsemi.com/thread/60993?ContentTypeID=1</link><pubDate>Fri, 26 Aug 2016 12:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fdd60f4-f7a9-42ba-b88f-3ac779212076</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;0x003D is BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE (Connection Terminated due to MIC Failure). I think you will get this error when you use incorrect encryption keys when you try encrypt the link with a bonded device. Are you using the unmodifed device manager? Do you experience this if you clear the bond information on both device before you test? Why are you using such an old SDK? I seem to remember some issues with iOS devices on older SDKs, but it should work now. Let me know, and I&amp;#39;ll try to reproduce the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>