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.

CC2640 bonding and pairing problem with Android 5.0+

Other Parts Discussed in Thread: CC2640

Hi buddy,

One shenzhen wristband customer using CC2640 SDK 2.1.1 to connect with Android 5.0+.

They used bonding and pairing as TimeApps done

// Setup the GAP Bond Manager.
{
uint32_t passkey = DEFAULT_PASSCODE;
uint8_t pairMode = DEFAULT_PAIRING_MODE;//GAPBOND_PAIRING_MODE_INITIATE
uint8_t mitm = DEFAULT_MITM_MODE;
uint8_t ioCap = DEFAULT_IO_CAPABILITIES;
uint8_t bonding = DEFAULT_BONDING_MODE;

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t), &passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
}

But when their device connected to Android 5.0+, smart phone need user to enter password, and we used default 000000, but after we click ok, BLE connection will dropped soon.

I am not sure if the reason is related to PRA show in E2E, but we found a workaround.

Changed DEFAULT_IO_CAPABILITIES into GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT.

So their is no need for password and connection is stable with smartphone without drop disconnection.

Is that make sense?

  • Hello Michael,

    Some early Android 5.0 devices 'struggled' with Pairing. Mostly this seems to be resolved in ASOP based devices running 5.0.2+.
    Some details are omitted from your OP, such as the DEFAULT values. I would suggest IOCap as GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT if you are not using Authenticated Pairing (MITM = FALSE).

    Best wishes