写入特征时,我有时会得到 connectionStatus=8
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
我不知道根本原因,可能是我们最终的错误。它只发生在某些 Android 9 设备(例如 Pixel 2)中
问题是,一旦发生这种情况,我将停止接收 onCharacteristicWriteSafe 回调以供将来写入。即使写入成功(我知道感谢内部日志),我也没有收到回调。
关于为什么这可能会在 Android 9 中发生的任何提示?