Skip to content

Incorrect bond state of already bonded BluetoothDevice #495

@david-gettins

Description

@david-gettins

I would like to be able to press a button in an app and bond with a BLE device. Next time I open the app and reconect the BLE device I would like to see if it is already bonded and hide the button. Unfortuntely the ObservableBleManager bondingState is incorrectly reported as NOT_BONDED when it actually is bonded. android.bluetooth.BluetoothDevice shows it as being bonded.

To Reproduce

  1. Connect to a BLE device
  2. Call ensureBond().enqueue()
  3. Disconnect BLE device
  4. Close and re-open app
  5. Connect BLE device
  6. BondState is NOT_BONDED but bluetoothDevice.bondState == BluetoothDevice.BOND_BONDED the Android OS reports it as bonded also.

Notes

After bonding for the first time, BondState is correct. BondState is also correct if I remove bond and ensure bond again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions