blue-falcon icon indicating copy to clipboard operation
blue-falcon copied to clipboard

BluetoothGatt: android.os.DeadObjectException

Open PeterKucera opened this issue 4 years ago • 0 comments

Expected For creating a connection, I am using method connect() with autoConnect flag set to true. This is setup once and it is expected that after setting up this "autoConnect", there is no other action required and Android OS BLE stack will notify the app, once remote device becomes available, and this call will never time out.

Actual Sometimes, I can reproduce following behavior: App is capable of connecting to device, but when app attempts to write bytes, it results in following exception: "BluetoothGatt: android.os.DeadObjectException"

To Reproduce Steps to reproduce the behavior:

  1. call connect method with autoConnect flag set to true
  2. Wait a few hours
  3. After reconnection, writing to device will always result in "BluetoothGatt: android.os.DeadObjectException"

Note: Even restarting the BT module will not solve the issue. What will solve the issue is reinitialising BlueFalcon library.

Smartphone (please complete the following information):

  • Device: [Samsung Galaxy A5]
  • OS: [Android 7]
  • BlueFalcon version: [0.7.2]

PeterKucera avatar Oct 05 '20 08:10 PeterKucera