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?