11 Replies Latest reply on Aug 20, 2018 7:01 AM by DheerajK_81

    Issue with Android on BLE authenticated pairing with encryption

      I implemented the authentication process on BLE device that will pair with an Android 7.1.1 phone and other BLE-enabled devices (eg. laptop, ipad, etc). Below is the configuration info:

                Security mode/level: Mode 1 authenticated pairing with encryption

                I/O capabilities: Display

                Bonding requirement: Bonding/enabled


      Here's how I handled the pairing process and what events are generated:

           1. send authentication request using API CyBle_GapAuthReq() when the CYBLE_EVT_GAP_DEVICE_CONNECTED is generated, which means that peer device (master) initiated pairing.

           2. display passkey in UART terminal when CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST is received by the stack.

           3. key-in the passkey in the peer device

           4. CYBLE_EVT_GAP_AUTH_COMPLETE is generated indicating authentication is successful

           5.  call API CyBle_StoreBondingData() to prevent going through the pairing process again


      However, when I issue a CyBle_GapDisconnect() on the currently connected device, say the Android phone, to allow other master devices to pair with the BLE, I observed that the BLE is removed from the list of "paired devices" of the phone. This prevents the BLE from reconnecting to the Android phone. However, this issue does not occur with the laptop and ipad that I paired with the BLE.


      Does anyone know why this happens?