4

I have an Android app that uses the BLE API to connect to a BLE device. If I connect to the device and then turn off the power of the device after a few seconds I get this line in the logcat:

11-15 12:33:07.977 27829-27847/com.mycompany.platform.hellodev D/BluetoothGatt: onClientConnectionState() - status=8 clientIf=6 device=55:1C:6C:86:8A:F8

which then invokes our BluetoothGattCallback callback onConnectionStateChange with status=8 and newStatus=0

I can't find any public documentation that says what status=8 means.

Is it right to assume that if newStatus=0 is passed it means the BLE device has disconnected?

Tao
  • 13,457
  • 7
  • 65
  • 76
Ido Ran
  • 10,584
  • 17
  • 80
  • 143

1 Answers1

8

I can't find any public documentation that says what status=8 means.

It means that you lost the connection link(LINK_LOSS) due to no response from remote device or Timeout happened.

Is it right to assume that if newStatus=0 is passed it means the BLE device has disconnected?

Yes if newStatus is 0, means CONNECTION state is idle, and device is now disconnected.

AAnkit
  • 27,299
  • 12
  • 60
  • 71