Search code examples
androidbluetooth-lowenergyreconnect

Android Bluetooth low energy: What's the correct way to reconnect for an already paired/bonded device


I have an android phone, and I would like to connect to an ble device. I already have the device paired/bonded ( I can see it from my bluetooth setting list). My question is: can I re-connect to the ble device without recreating a bond.

My issue is even though I have the device already paired, I still need to perform service discovery, write notification and write descriptor to get the callback/notification from my target device, but while doing so it appears a new bond is also created, which means I am not using the old bond(for encryption), and I see that because I have listener showing BOND_BONDING and BOND_BONDED. Can I use the existing bond for communication instead of creating a new one?


Solution

  • It turned out it was the target device that I was trying to connect removed the bond, not the android bluetooth sdk's issue. Sorry guys.