2

I am trying to connect to a Bluetooth LE device. Occasionally I observe the folowing behavior:

onClientConnectionState indicates that the connection has been established and I call discoverServices. But onServicesDiscoverd callback is never called and the connection is lost after 30s with status 8 = LINK_LOSS indicating a timeout on the client side. Trying to reconnect will result in the same behavior over and over again.

D/BluetoothAdapter: STATE_ON
D/BluetoothGatt: connect() - device: 5C:31:3E:84:F3:A8, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=f7d6124f-2987-46dc-8c23-9b03397fa010
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=5C:31:3E:84:F3:A8
D/BluetoothGatt: discoverServices() - device: 5C:31:3E:84:F3:A8
... about 30s
D/BluetoothGatt: onClientConnectionState() - status=8 clientIf=5 device=5C:31:3E:84:F3:A8
D/BluetoothGatt: cancelOpen() - device: 5C:31:3E:84:F3:A8
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=5

Unpairing the device and restarting blootooth will restore normal behavior, but thats seems not to be a good solution.

There are simillar threads for lower Android versions, so is this a hardware issue that is unsolveable?

Community
  • 1
  • 1
Myon
  • 937
  • 13
  • 23
  • It's easier to debug if you could attach a HCI snoop log as well, if log cat doesn't tell anything interesting. – Emil Dec 07 '16 at 13:27
  • I have this as well for my BLE device, on Moto G5 for example and on my Nexus 9, all with Android 7.0. It disappeared with an update for my Nexus, but the Moto G5 is still on 7.0 – Rogier Apr 12 '17 at 05:10

0 Answers0