Subscription preference

Notification emails are sent to your Samsung account email address.

* Email :



BLE 4.3 Connection Failures

Forums View
Started by Newbie dhe**** , 320 Seed Dec 05, 2013 23:22 Replies : 1 View : 19593 Likes : 0
Device Information
Device: Samsung Galaxy S4
Model: GT-I9500
Android Version: 4.3
Build Number: JSS15J.I9500XXUEMJ8
SELinux Status:  Enforcing SEPF_GT-I9500_4.3_0011

I am seeing occasional connect failures to devices and the errors appear to occur deep in Android code, in BluetoothGatt.  The code I've written was implemented using Google's official API documentation as a guide.  I can use the same code to stably connect to devices when using a Nexus 4, Nexus 7, and the Nexus 5.  However, the Samsung implementation appears buggy to say the least.

The problem occurs immediately upon my call of device.connectGatt with autoConnect=false.

Here is a snippet of my logcat:

This problem occurs 100% of the time if I force close the app after connecting and completely disconnect & closing (via close()) the active BluetoothGatt instance.  Other times, it starts to happen after numerous connects and disconnects, or if I do a scan and then immediately cancel the scan and attempt to connect to a device that was discovered via the scan.

Is there something I may be doing wrong that would cause the client registration to fail (search the logcat above for 'Failed to register callback')

Any help would be greatly appreciated :)


BLE , 4.3 , BluetoothGatt

Post Reply
Board View
Newbie dhe**** , 320 Seed Jan 09, 2014 22:24 Post #1 0
I figured this issue out, by the way.

Apparently ,the Samsung implementation has a bug in it - you can only issue connectGatt() calls on the UI thread.  Once I did this, everything worked.  On Nexus devices (4, 5, 7), connectGatt() works no matter what thread I make the invocation from.

I posted a more in depth answer on Stackoverflow, where a user was having the exact same problem I was seeing.

Post Reply