I sometimes get connectionStatus=8 when writing to a characteristic
Writing characteristic 03... (WRITE COMMAND)
gatt.writeCharacteristic(03...)
//6 seconds gap
BluetoothGatt: onClientConnectionState() - status=8 clientIf=7 device=C0:4B:3C:5D:93:49
[Callback] Connection state changed with status: 8 and new state: 0 (DISCONNECTED)
Error: (0x8): GATT CONN TIMEOUT
Connection lost
onDeviceDisconnected()
fail for command 0x39 with status 8 //WriteRequest callback
I don't know the root cause, might be a bug in our end. It's only happening in some Android 9 devices (Pixel 2, for example)
The thing is, once this happens, I stop receiving onCharacteristicWriteSafe callback for future writes. Even when the write succeeds (I know thanks to internal logs), I don't get the callback.
Any hint as to why this might be happening in Android 9?