Hi there,
This is actually a question re. the Android BLE library (https://github.com/NordicSemiconductor/Android-BLE-Library), so please re-direct me if necessary.
My question is in relation to bonding. I use the BLE library to connect to another Android device with the peripheral role. The GATT service on the peripheral has a characteristic requiring encryption. Therefore, when I use the BLE library to read the peripheral's characteristics, a pairing UI sequence ensues. However... the peripheral first displays a pairing dialog without the central device displaying one. If I then accept the peripheral's pairing request dialog then both the peripheral and the central (BLE library) devices display a dialog.
I experienced this behaviour prior to using the BLE library, when I used the Android APIs directly on the central device, so I don't think this is an issue with the BLE library per se.
I'm left wondering how others go about the process of bonding though. I've been working on getting bonding to work nicely on Android for a couple of weeks now, and Android is winning. Do people rely on users using the Android pairing UI of settings, or are they successful in using the BLE library to bond from the central device?
Thanks for any guidance.
Cheers,
-C