This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3551E: NimBLE passkey pairing issue with iOS and Android

Part Number: CC3551E

Hi Team,

I am working with NimBLE host on CC3551E and trying to implement BLE pairing with a Random/default passkey for both iOS and Android devices.

My goal is:

* BLE Secure Connections enabled

* MITM protection enabled

* Fixed passkey pairing (example: `123456`)

* ANCS support for iOS

Security Configuration

ble_hs_cfg.sm_io_cap         = BLE_HS_IO_DISPLAY_ONLY;

ble_hs_cfg.sm_bonding        = 1;

ble_hs_cfg.sm_mitm           = 1; ble_hs_cfg.sm_sc             = 1;
Issue 

*connection occurs but encryption/pairing does not complete

* ANCS discovery cannot proceed because pairing is incomplete Additional Information

* Old bonds were deleted on both device and phone

* Phone device entry was forgotten before retesting

* Advertising and connection work correctly  

Questions

1. Is the above configuration correct for fixed/default passkey pairing with iOS and Android?

2. Is `BLE_HS_IO_DISPLAY_ONLY` the correct IO capability for this use case?

3. Are additional SMP callbacks or configuration changes required? 

Thanks,

Vignesh.

  • Hi Vignesh. I'll look into your issue more once I am back from business travel. Thanks for your patience.

  • Hi Bliu,

    Any Updates.

    Thanks.

  • Hi Vignesh,

    I have returned from travel. Have you tried using BLE in our network terminal? You just need to run the following on the device:

    wlan_start

    ble_start

    ble_adv_cfg

    ble_adv_enable

    Now you can view the device's advertisement on a BLE scanner (or the new Simplelink app for this) and connect to the device and pair it after entering a passcode, which succeeds. You can verify this but adding this check in the code to ensure that the connection is secure (after pairing): 

    if (ble_gap_conn_find(conn_handle, &desc) != 0 || !desc.sec_state.encrypted) {
    return BLE_ATT_ERR_INSUFFICIENT_AUTHEN;
    }

    Are you able to get this working?