<?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>No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18171/no-disconnect-event-after-bond-on-android</link><description>Hello, 
 To reproduce this problem I use these steps: 
 
 Bond to NRF51822 using Android 6.0.1 and latest nRF Connect version; 
 After successful bond, connect to NRF51822; 
 Use &amp;quot;DISCONNECT&amp;quot; button in nRF Connect application; 
 
 After these steps</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Dec 2016 12:23:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18171/no-disconnect-event-after-bond-on-android" /><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70160?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 12:23:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a01d9fd-a2b5-4c66-9a2f-aa6ed46a455a</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Nexus 5x with Android 7.1.1 (issue fixed) and Nexus 6 with Android 7 (issue to fixed).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70152?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 08:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46072749-042b-4f76-b435-3076b7426cc0</guid><dc:creator>Mindaugas</dc:creator><description>&lt;p&gt;Yeah you are right about Disconnect button not calling gatt.close(). But just checked that by closing device tab after bond central does not disconnect from peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70156?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 08:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1006474a-db3b-47dd-8c55-dd19734dfd0a</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;It used to call close(), but since few versions note it doesn&amp;#39;t. It does before calling connect again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70155?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 08:13:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43a19d16-3a3d-4814-aec5-30350dcf69e2</guid><dc:creator>Mindaugas</dc:creator><description>&lt;p&gt;Closing device tab has the same behavior as clicking Disconnect button (does not disconnect from peripheral after bonding). If you see the nRF Connect log, after you click Disconnect button log shows that gatt.close() method was called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70154?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 07:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:408ba14f-db0f-4b50-af16-85b31fc90c52</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;One comment. Does it disconnect when you close the device tab in nRF Connect? Clicking Disconnect button will not call gatt.close() method (to allow clearing device cache when device is disconnected), but closing the tab will.
Aldo, make sure you don&amp;#39;t have any other app that opened the GATT server running in background as it might have connected to your device. Then disconnect button will only disconnect your app, not the physical link. To make sure the device disconnected no matter how many apps are connected (or as a workaround in case of a bug) send a command to it and disconnect from peripheral side as suggested below.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70159?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 07:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d007a6e9-6a03-4820-b4b8-c717de9acea3</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, what phones have you tried it on?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70165?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 07:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1cd27e5-eab9-4f01-8511-caff2d0f0c47</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;I edited my answer. It was a disconnect after first OOB pairing that is not working even on 7.1.1. I also added a link to commits.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70153?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2016 04:00:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26398c6-2c3a-42c7-aadf-9551029a7b98</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;I posted something on this about 9 months ago.  Unfortunately on certain Android phones it can happen under Android 5.x.  One way we get around this is in our Android app we call the peripheral to disconnect, not rely on the Android phone to disconnect.  Works a charm and we are no longer subject to the vagaries of Android OS and/or Android phone manufacturers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70164?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 15:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be0883b-d1c3-4805-ad38-a6ba7c5aad70</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;FYI, the issue seems to be fixed on Android N 7.1.1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70163?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 11:13:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:439b7325-5d0d-4c0b-9422-4a4ed0dcd5b8</guid><dc:creator>Mindaugas</dc:creator><description>&lt;p&gt;Added a suggested workaround to disconnect from the peripheral side after bonding. Now get disconnect events from central and it works fine so far.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70162?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 09:01:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:287fee40-075e-4421-a978-df90ac51d6e3</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;Thanks for your message. Would be interested if you could find that commit. This fix will not be included in N 7.1.1 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70161?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2016 08:31:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99647647-1069-4668-85be-e0e194f87672</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hi, as far as I know the first disconnection after &lt;em&gt;Edit: OOB (Out Of Band)&lt;/em&gt; bonding will not work when Disconnect sent from the Android side. After reconnecting it should work properly every time.&lt;/p&gt;
&lt;p&gt;The fix for that is already on AOSP but will not be included in N release. I&amp;#39;ll try to get a link to a commit.
&lt;em&gt;Edit: found it: &lt;a href="https://android-review.googlesource.com/#/q/topic:bt-oob-nfc-profiles"&gt;android-review.googlesource.com/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Disconnecting after pairing from Settings should work normally, but as you see above some phones may have problems (however, I have never had such issue).&lt;/p&gt;
&lt;p&gt;As a workaround you would have to disconnect from the peripheral side, perhaps just after bonding? After that phone could connect again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70158?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 20:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f4f6aa5-8db6-45ed-a87d-d8eb0323e562</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;I also notice the behavior you described. This is an &amp;quot;issue&amp;quot; on the client (Android phone) and not on the server.&lt;/p&gt;
&lt;p&gt;When a BLE peripheral is bonded to an Android phone (from Android 6 an higher ?), the disconnect request is not sent most of the time. If you are connected, as soon as you &amp;quot;forget&amp;quot; the bonded device, you will receive the disconnect event. If you turn the Bluetooth off on your phone, you will also get the disconnect event after the timeout you defined in the connection parameters.&lt;/p&gt;
&lt;p&gt;The Android API has only one method to disconnect. I used an Ellisys sniffer and no disconnect request are sent at all if the device is paired. You can to the test yourself. You can forget the bonded device using the &amp;quot;bonded&amp;quot; tab in nRF Connect for Android.&lt;/p&gt;
&lt;p&gt;This behavior is also quite annoying for me. It appends on Android Nexus phones running Android 6 and 7. You can use any demo application on the server, you will get the same behavior, unfortunately.&lt;/p&gt;
&lt;p&gt;Turning off the Bluetooth on the phone or removing a paired device is not acceptable. As a workaround, you could send the disconnect request from the server (you could write to a characteristic value to the server or another similar mechanism).&lt;/p&gt;
&lt;p&gt;The disconnection in BLE is always a bit tricky. This behavior on Android is not very clear for me. On iOS, the disconnect request has the same behavior with paired devices or not.&lt;/p&gt;
&lt;p&gt;Any Android developer at Nordic could help us with this issue ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No disconnect event after bond on Android</title><link>https://devzone.nordicsemi.com/thread/70157?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 13:33:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84b56ec8-1650-48f6-88ac-4e1be16a4ce3</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Could you use the sniffer to capture what is being transmitted over the air? And then, specifically check if the disconnect packet from nRF Connect is transmitted? And also check if the slave responds to that packet?&lt;/p&gt;
&lt;p&gt;Do you see this problem if using the &amp;quot;normal&amp;quot; ble_app_hrs in SDK 12.1.0 (without free rtos)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>