<?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>Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9801/android-app-gatt-conn-timeout</link><description>Hi, 
 I am using nRF51422 with SDK 9.0 and SoftDevice130 with nus service. I have a custom android app running on BLE uart service. Data communication and connection handling is proper with the app.
When I switch off the nRf51422 peripheral device,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Jun 2016 08:32:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9801/android-app-gatt-conn-timeout" /><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36338?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2016 08:32:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd16eb0c-1d13-42e4-a98d-9d46183ab792</guid><dc:creator>Akshat</dc:creator><description>&lt;p&gt;Hello Lisa,&lt;/p&gt;
&lt;p&gt;The delay you have mentioned is also there in the Nordic&amp;#39;s Master Control panel app.
I can suggest you to read the rssi of connected device at a particular interval, by this you can get some idea of the device connection state. But I don&amp;#39;t know this thing works for u or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36339?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2016 07:02:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6656e02f-e782-4217-8762-fdab2417ece8</guid><dc:creator>lisa</dc:creator><description>&lt;p&gt;Thanks for your replay Akshat. My customized app is an android app. I set the nRF51822_xxAA device connection supervisory timeout to 3s. When I manually disconnect the power of the device, it takes about 8s for the app to identify the unavailability of the device side. Below is the android log info:&lt;/p&gt;
&lt;p&gt;06-21 23:55:09.890 29331-29343/com.madsglobal.android.smarthw I/ShsService: updateAinPinStatus&lt;/p&gt;
&lt;p&gt;06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw D/BluetoothGatt: onNotify() - Device=F2:6C:48:43:B8:4B UUID=48530002-5a4e-6c61-626f-6c475344414d&lt;/p&gt;
&lt;p&gt;06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw I/ShsService: MSB: 1, LSB: 113&lt;/p&gt;
&lt;p&gt;06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw I/ShsService: updateAinPinStatus&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.030 29331-29343/com.madsglobal.android.smarthw D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=F2:6C:48:43:B8:4B&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.040 29331-29343/com.madsglobal.android.smarthw I/ShsService: Disconnected from GATT server&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.040 29331-29686/com.madsglobal.android.smarthw I/ShsService: Exit SHS&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.040 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: refresh() - device: F2:6C:48:43:B8:4B&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.050 29331-29686/com.madsglobal.android.smarthw I/ShsService: Refreshing result: true&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw I/ShsService: Cleaning up...&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: close()&lt;/p&gt;
&lt;p&gt;06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: unregisterApp() - mClientIf=5&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36336?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2016 06:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acb67937-7190-4cde-9fa5-00cc6a99833e</guid><dc:creator>Akshat</dc:creator><description>&lt;p&gt;Hello Lisa,&lt;/p&gt;
&lt;p&gt;That disconnection event is because of Connection supervisory timeout defined on the peripheral side. After a defined interval there is packet transition between the peripheral and central. If you lower the timeout and any of the packet is lost, then may be you lost the connectivity. But sure u can lower the timeout.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36337?ContentTypeID=1</link><pubDate>Wed, 22 Jun 2016 05:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83b8c1e0-8f5f-4605-9c0b-7a3c9a2e6dc0</guid><dc:creator>lisa</dc:creator><description>&lt;p&gt;Any update for this question? I met the same problem as you now. If I manually turn off the power of device, the app side can only identify the disconnection event only when (0x08) GATT CONN TIMEOUT event occur. But it needs quite a long time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36342?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2015 08:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fae975c-777f-4d6e-9aa2-63fa6686791c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;If the peripheral doesn&amp;#39;t answer in x number of connection events the connection supervision timeout is hit and it is unavailable. The central can&amp;#39;t know if this is because the peripheral is turned off, if it has moved out of range, or if for some other reason the radio signals aren&amp;#39;t getting through. To the central these scenarioes would look exactly the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36341?ContentTypeID=1</link><pubDate>Fri, 23 Oct 2015 16:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e760f73-76e3-4d20-b573-5c74e1fcefc2</guid><dc:creator>Akshat</dc:creator><description>&lt;p&gt;Hi Petter,&lt;/p&gt;
&lt;p&gt;Thanks for your response.
Yes, I am getting this because of the connection timeout.
But I just want to know, is there any way to find the unavailability of the peripheral device, if it is suddenly powered off.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Android app GATT CONN TIMEOUT</title><link>https://devzone.nordicsemi.com/thread/36340?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2015 14:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02f8b75c-c02b-490d-bda1-92f2fbfc5bad</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m guessing you get this event because of the connection supervision timeout. It defines defines the maximum time between two received packets before the connection is considered lost. You should be able to lower this, but you don&amp;#39;t want to lower it too much, because you don&amp;#39;t want the connection to be considered lost because you lost a packet or two.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if it is a solution for you, but you can also do a proper disconnect from the peripheral, by calling sd_ble_gap_disconnect().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>