Search code examples
androidbluetoothbluetooth-lowenergyatmelgatt

Is Bonding required for BLE <-> Android, iOS device communication?


We have a BLE device and android/ios app for communication with the device.

The requirement is to have an android/ios app connect to the device without any pairing request. No security is required on the device.

Hereafter a few questions around this:

  • Q1. Is it possible at all to have an android/ios app connect to a BLE device without a pairing request?
  • Q2. Does the bonding required for the BLE communication?
  • Q3. What is the downside of having the device with no bonding? Is it going to drop the connection while the app is running?
  • Q4. Who is the initiator or pairing dialog, the app, or the device?
  • Q5. When having the device with Just Works security protocol, with no bonding and no MITM protection, should we see a pairing dialog?

Solution

  • Based on what we got working and based on the answers to this question.

    • A1: Yes, it's possible if no MITM is set and the Security scheme is set to Just Works, which means no security at all.
    • A2: Bonding is not required for BLE communication. If the BLE device can't store the Bond information, it may lead to some issues as we got in our case. If the BLE device is able to store and use Bond information then it's recommended to Bond.
    • A3: The Connection will not be closed. The only downside we got is that now it takes a little more time to reconnect.
    • A4: The app is initiating the connection, but the dialog is shown only if the BLE device requests some type of security, it can be MITM, encryption, pin. Short answer, the pairing dialog can be avoided by changing the settings on the BLE device.
    • A5: When having the device with Just Works security protocol, with no bonding and no MITM protection the pairing dialog should not be presented. We got no pairing dialog experience on both iOS and Android.