<?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>Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22483/why-the-device-will-connect-again-when-we-diconnect-from-device</link><description>I modified the nordic uart apk from this website 
 github.com/.../Android-nRF-UART 
 and I do some revising below 
 MainActivity.java:
if (action.equals(WearableService.ACTION_GATT_DISCONNECTED)) {
 runOnUiThread(new Runnable() {
 public void run</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Jun 2017 13:16:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22483/why-the-device-will-connect-again-when-we-diconnect-from-device" /><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88439?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 13:16:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91659802-9de7-431a-bb81-6dc8b95c8a2e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I tested on an S8 running Android 7.0
If I force closed Spotify or uninstall it , the re-connection stopped.&lt;/p&gt;
&lt;p&gt;I tried with notification running with 100Hz but saw no difference.&lt;/p&gt;
&lt;p&gt;Could you send us your test firmware ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88440?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2017 10:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29e1c96b-d03d-4456-8403-852b37227698</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;hi Hung Bui
I still have the reconnecting problem if I don&amp;#39;t implement this workaround. And I also test pixel phone with custom image from AOSP(NMF26O), this image has minimum app installed, still have reconnecting issue. What the environments you test? Did you use Nordic Uart APK ?
&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-UART"&gt;github.com/.../Android-nRF-UART&lt;/a&gt;
Did you test your device with notify characteristic to inform the phone 100 times per second?
Thanks your reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88438?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2017 07:30:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a31c59ec-4c56-4798-8817-307a6fb112fa</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi berniechen ,&lt;/p&gt;
&lt;p&gt;Thanks for sharing your workaround with us. It&amp;#39;s still strange that you need to disable notification before you disconnect.&lt;/p&gt;
&lt;p&gt;May I ask do you still have the reconnecting problem if you don&amp;#39;t implement the workaround. In our test here our devices didn&amp;#39;t have problem after we remove Spotify app.&lt;/p&gt;
&lt;p&gt;Have you tried to test on a fresh phone with minimum app installed ? We are suspecting there could be an app that detect if there is notification receives from a device and then the device get disconnected it will try to re-connect again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88437?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2017 03:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:179a9243-16e4-4d32-8700-45e5a356192c</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;There is my solution at nRF UART APK.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (mBluetoothAdapter == null || mBluetoothGatt == null) {
        Log.w(TAG, &amp;quot;BluetoothAdapter not initialized&amp;quot;);
        return;
    }
    BluetoothGattService RxService = mBluetoothGatt.getService(RX_SERVICE_UUID);
    if(RxService != null) {
        BluetoothGattCharacteristic TxChar = RxService.getCharacteristic(TX_CHAR_UUID);
        BluetoothGattDescriptor descriptor = TxChar.getDescriptor(CCCD);
        descriptor.setValue(BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);

        mBluetoothGatt.writeDescriptor(descriptor);
    }
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {
        @Override
        public void run() {
            mBluetoothGatt.disconnect();
        }
    }, 1000);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;at the function of disconnect(), We need disable descriptor first, and post delay 1 sec to disconnect() then close the gatt.&lt;/p&gt;
&lt;p&gt;But I hope the bluetooth expert director me why the device will reconnect again when we turn on notify characteristic???   Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88436?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2017 11:00:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d743fe4-cb39-4bef-ac6c-cba66a171b18</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;Hi, I  force close Spotify on my Xeperia XC, and using nRF Connect to scanning device and connect to it, then I disconnect from device. It will not reconnect again. If I connect it and open CCCD enable, then the characteristic send me some values 100 times per sec, it will reconnect again after I disconnecting from device. If I disable the CCCD, then pressing the disconnect, it will not reconnect again. why..?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88435?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2017 09:21:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:045586a5-dbee-43f2-90b8-3e80515ad36e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;What happens if you uninstall your app, connect to your device with nRF Connect, and disconnect again? Do you still experience that the phone keeps reconnecting by itself?&lt;/p&gt;
&lt;p&gt;If it is something similar to the Spotify issue it shouldn&amp;#39;t matter what app you use to connect. You just need to connect and disconnect once, with e.g. nRF Connect, and then Spotify (or maybe a different app) will continue the cycle in the background.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88434?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2017 08:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6cee3caa-4844-47ea-9b29-b9ba597c5094</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;I test the google pixel with custom system image with no Spotify app, but it still has the same problem....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88433?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 17:31:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7851bc7b-b51e-44a6-8ade-10950b74d05e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;We seem to have slightly different symptoms, but the solution presented here seems to work for me: &lt;a href="https://stackoverflow.com/questions/43160195/android-ble-unexpectedly-and-repeatedly-reconnects-to-peripheral"&gt;Android BLE unexpectedly and repeatedly reconnects to peripheral&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Can you try to &amp;quot;Force Close&amp;quot; Spotify if you have it installed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88414?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 02:17:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adefe7c5-27f8-4155-b7ef-e8ac9edd703c</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;@Martin Børs-Lind&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I haven&amp;#39;t figured out the problem yet. And I think the one of solution is firmware. Device side can
translate status to normal mode(don&amp;#39;t try reconnect again) after received the signal of disconnect.&lt;/li&gt;
&lt;li&gt;Indeed, mService.close() can&amp;#39;t be comment.  because I have two product. one of frequent of notify characteristic too fast, it will reconnect immediately after I disconnect and result in null object operation. so we need comment mService.close(). Another product still have reconnect issue, but the notify frequency is less than another product. I need un-comment mService.close() to release resource to let case of reconnection not occur.&lt;/li&gt;
&lt;li&gt;Xperoa compact and Google Pixel&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88423?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2017 12:07:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c522e216-38f8-4026-9af5-1f116cc7aba4</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi @berniechen. Have you made any progress on this? I have some similar issues, but haven&amp;#39;t figured out the problem yet.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it so that after you have connected to your device once with your own app your phone keeps reconnecting by itself?&lt;/li&gt;
&lt;li&gt;You have a workaround which is to remove mService.close() from your code?&lt;/li&gt;
&lt;li&gt;What happens if you uninstall your app, connect to your device with nRF Connect, and disconnect again? Do you still experience that the phone keeps reconnecting by itself?&lt;/li&gt;
&lt;li&gt;Have you tried this on more than one phone?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88432?ContentTypeID=1</link><pubDate>Tue, 06 Jun 2017 11:14:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bf002b4-9b3b-409a-8a6d-055515e32cec</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Berniechen: I can&amp;#39;t read what you paste, please put them in a text file and edit the question and put the file there. Don&amp;#39;t you see that it&amp;#39;s unreadable what you paste above.&lt;/p&gt;
&lt;p&gt;Why would the phone reconnect ? In our code I don&amp;#39;t think we have any reconnect. I don&amp;#39;t think simply change the UUID cause the problem. Please try again with the stock example, then modify UUID and test.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88431?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 06:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f59b319-1e5e-4fea-8bd8-e7ab00a5cd82</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
W ActivityManager:   Force finishing activity com.nordicsemi.nrfUARTv2/.MainActivity
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88430?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 06:10:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:938849c6-0a97-4701-a4f0-2f0c7aee34ba</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;E AndroidRuntime:        at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
E AndroidRuntime:        at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
E AndroidRuntime:        at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6119)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88429?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 06:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6573ef12-19f3-476f-9136-f4b5e753f40a</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;E BtGatt.ContextMap: Context not found for ID 6
D nRFUART : UART_CONNECT_MSG
D AndroidRuntime: Shutting down VM
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.nordicsemi.nrfUARTv2, PID: 8257
E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method &amp;#39;android.bluetooth.BluetoothGattService android.bluetooth.BluetoothGatt.getService(java.util.UUID)&amp;#39; on a null object reference
E AndroidRuntime:        at com.nordicsemi.nrfUARTv2.UartService.enableTXNotification(UartService.java:311)
E AndroidRuntime:        at com.nordicsemi.nrfUARTv2.MainActivity$5.onReceive(MainActivity.java:237)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We can find that  message of UART_CONNECT_MSG which is shown  it reconnects again when I disconnect from device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88428?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 06:00:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cd16a22-0738-4eda-83d3-214c93587dfc</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: got characteristic with UUID=457871e8-d516-4ca1-9116-57d0b17b9cb2
D BtGatt.GattService: got characteristic with UUID=5f78df94-798c-46f5-990a-b3eb6a065c88
D BtGatt.GattService: got descriptor with UUID=00002902-0000-1000-8000-00805f9b34fb
D nRFUART : UART_DISCONNECT_MSG
D BluetoothGatt: onSearchComplete() = Device=E9:6A:37:30:9D:D9 Status=0
W UartService: mBluetoothGatt = android.bluetooth.BluetoothGatt@19a31dc
W UartService: mBluetoothGatt closed
D BluetoothGatt: close()
D BluetoothGatt: unregisterApp() - mClientIf=6
D BtGatt.GattService: unregisterClient() - clientIf=6
D BtGatt.GattService: onDisconnected() - clientIf=6, connId=6, address=E9:6A:37:30:9D:D9
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88427?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 05:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89ca2195-8d9f-4fea-9004-d0104d57318c</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: got descriptor with UUID=00002902-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00000002-1000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00000003-1000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=0000fef5-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=8082caa8-41a6-4021-91c6-56f9b954cc34
D BtGatt.GattService: got characteristic with UUID=724249f0-5ec3-4b5f-8804-42345af08651
D BtGatt.GattService: got characteristic with UUID=6c53db25-47a1-45fe-a022-7c92fb334fd4
D BtGatt.GattService: got characteristic with UUID=9d84b9a3-000c-49d8-9183-855b673fda31
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88426?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 05:53:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e27a182-b6d2-4fd6-9ca7-9ec5187d64d1</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: got characteristic with UUID=00002a29-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a26-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a50-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=0000180f-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a19-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got descriptor with UUID=00002902-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=0000fe55-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00000001-1000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00000001-1000-1000-8000-00805f9b34fb
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88425?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 05:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7a33863-6f01-4d90-90d9-292725e358de</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;-----------------continue listen message of logcat---------------------&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: onSearchCompleted() - connId=6, status=0
I UartService: Attempting to start service discovery:true
D bt_bta_gattc: bta_gattc_get_gatt_db
D BtGatt.GattService: onGetGattDb() - address=E9:6A:37:30:9D:D9
D BtGatt.GattService: got service with UUID=00001800-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a00-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a01-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a04-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=00001801-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=0000180a-0000-1000-8000-00805f9b34fb
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88424?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2017 05:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a36e615-ce65-4afa-9d5a-123506819236</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;@Hung Bui: Hi, Sorry, I still do some revises about UUID. We are using google pixel phone( native android 7.1.1) instead of Xperia x compact. And I only revise the code below
//public static final UUID RX_SERVICE_UUID = UUID.fromString(&amp;quot;6e400001-b5a3-f393-e0a9-e50e24dcca9e&amp;quot;);
public static final UUID RX_SERVICE_UUID = UUID.fromString(&amp;quot;0000fe55-0000-1000-8000-00805f9b34fb&amp;quot;);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//public static final UUID TX_CHAR_UUID = UUID.fromString(&amp;quot;6e400003-b5a3-f393-e0a9-e50e24dcca9e&amp;quot;);
public static final UUID TX_CHAR_UUID = UUID.fromString(&amp;quot;00000001-1000-1000-8000-00805f9b34fb&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;referenced from &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-UART"&gt;github.com/.../Android-nRF-UART&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, I got the error message of application forced closed when I press the Disconnect button and result like picture third above. The result of I am listening logcat shows the root cause is the phone will reconnect from callback but we have executed mService.close() to release resource before.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;I UartService: Connected to GATT server.
D BluetoothGatt: discoverServices() - device: E9:6A:37:30:9D:D9
D BtGatt.GattService: discoverServices() - address=E9:6A:37:30:9D:D9, connId=6
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88422?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 10:34:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64f51a5d-92a4-4e51-b334-81eddbcc01d1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@berniechen: Please try to reproduce the  &amp;quot;null point operation&amp;quot; issue with the nordic stock app with no modification. We need to fix that, instead of comment out  mService.close();&lt;/p&gt;
&lt;p&gt;You may also want to test on other Android phone.&lt;/p&gt;
&lt;p&gt;The nRFUART app is pretty old, you should try to use nRFToolbox as reference app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88421?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 07:09:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:226f345c-b863-41ba-805e-0a0def37bf2d</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;enter code here&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;W bt_btif : notification already registered
D BtGatt.GattService: onRegisterForNotifications() - address=null, status=0, registered=1, handle=11
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88420?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 07:05:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6244faaa-1cf6-418e-a7bc-c0ac68eb3a71</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;enter code here&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: got service with UUID=00001800-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a00-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a01-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=00002a04-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=00001801-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got service with UUID=6e400001-b5a3-f393-e0a9-e50e24dcca9e
D BtGatt.GattService: got characteristic with UUID=6e400003-b5a3-f393-e0a9-e50e24dcca9e
D BtGatt.GattService: got descriptor with UUID=00002902-0000-1000-8000-00805f9b34fb
D BtGatt.GattService: got characteristic with UUID=6e400002-b5a3-f393-e0a9-e50e24dcca9e
D BluetoothGatt: onSearchComplete() = Device=F1:C1:E2:24:ED:57 Status=0
W UartService: mBluetoothGatt = android.bluetooth.BluetoothGatt@7cfef34
D BluetoothGatt: setCharacteristicNotification() - uuid: 6e400003-b5a3-f393-e0a9-e50e24dcca9e enable: true
D BtGatt.GattService: registerForNotification() - address=F1:C1:E2:24:ED:57 enable: true
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88419?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 07:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06a4a873-9bb1-4584-b015-7a2af61b3a65</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;enter code here&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BtGatt.GattService: discoverServices() - address=F1:C1:E2:24:ED:57, connId=6
I UartService: Attempting to start service discovery:true
D nRFUART : UART_CONNECT_MSG
W Atfwd_Sendcmd: AtCmdFwd service not published, waiting... retryCnt : 5
W bt_bta_gattc: bta_gattc_explore_srvc no more services found
I bt_bta_dm: bta_dm_gatt_disc_result service_id_uuid_len=2
I bt_bta_dm: bta_dm_gatt_disc_result service_id_uuid_len=2
I bt_bta_dm: bta_dm_gatt_disc_result service_id_uuid_len=16
E bt_btif_gattc: btif_gattc_upstreams_evt: Unhandled event (7)!
E bt_btif_gattc: btif_gattc_upstreams_evt: Unhandled event (7)!
E bt_btif_gattc: btif_gattc_upstreams_evt: Unhandled event (7)!
D BtGatt.GattService: onSearchCompleted() - connId=6, status=0
D bt_bta_gattc: bta_gattc_get_gatt_db
D BtGatt.GattService: onGetGattDb() - address=F1:C1:E2:24:ED:57
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88418?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 06:53:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7562a0c6-03a7-468c-8a53-f306db939c4f</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;enter code here&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;I BroadcastQueue: am_broadcast_finished: [background,1,Intent 
  act=android.bluetooth.adapter.action.DISCOVERY_STARTED flg=0x10 }]
I BroadcastQueue: am_broadcast_finished: [background,1,Intent { act=null.CONNECTION_ALARMflg=0x14 (has extras) }]
E bt_btif : bta_gattc_cache_load: can&amp;#39;t open GATT cache file 
/data/misc/bluetooth/gatt_cache_f1c1e224ed57 for reading, error: No such file or directory
W SearchService: Abort, client detached.
I ServiceManager: Waiting for service AtCmdFwd...
E bt_btif : bta_gattc_process_indicate, ignore HID ind/notificiation
D BtGatt.GattService: onConnected() - clientIf=6, connId=6, address=F1:C1:E2:24:ED:57
D BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=F1:C1:E2:24:ED:57
I UartService: Connected to GATT server.
D BluetoothGatt: discoverServices() - device: F1:C1:E2:24:ED:57
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Why the device will  connect again when we diconnect from device?</title><link>https://devzone.nordicsemi.com/thread/88417?ContentTypeID=1</link><pubDate>Fri, 02 Jun 2017 05:48:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d58d38b-999d-4ba1-b8f0-f64bfdf28ec2</guid><dc:creator>berniechen</dc:creator><description>&lt;p&gt;Blow is I type logcat, and I comment the line mService.close()&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;D BluetoothAdapter: stopLeScan()
D BluetoothAdapter: scan not started yet
D BluetoothGatt: cancelOpen() - device: F1:C1:E2:24:ED:57
D BtGatt.GattService: clientDisconnect() - address=F1:C1:E2:24:ED:57, connId=6
E bt_btif : bta_gattc_mark_bg_conn unable to find the bg connection mask for: f1:c1:e2:24:ed:57
D BtGatt.GattService: onDisconnected() - clientIf=6, connId=6, address=F1:C1:E2:24:ED:57
D BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=F1:C1:E2:24:ED:57
I UartService: Disconnected from GATT server.
D nRFUART : UART_DISCONNECT_MSG
I BroadcastQueue: am_broadcast_enqueue: [background,0,Intent { act=com.sdl.android.newservice 
  flg=0x10 (has extras) },1]
I BroadcastQueue: am_broadcast_finished: [background,0,Intent { act=com.sdl.android.newservice 
   flg=0x10 (has extras) }]
I BroadcastQueue: am_broadcast_finished: [background,1,Intent { 
   act=android.bluetooth.device.action.ACL_CONNECTED flg=0x4000010 (has extras) }]
beacuse limit of characters, so we continue at blow comment.
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>