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.

"Just Works" bonding configuration

Other Parts Discussed in Thread: CC2541

Hello,

I can't figure out the right way to implement "just works" bonding with the CC2541 keyfob and an iPhone.

From the simpleBLEPeripheral app I only made the following changes:

// Setup the GAP Bond Manager
{
uint32 passkey = 0; // passkey "000000"
uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8 mitm = FALSE;
uint8 ioCap = GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
uint8 bonding = TRUE;
GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
}

And one of the read characteristic value is setup with GATT_PERMIT_AUTHEN_READ:

// Characteristic Value 2
{ 
{ ATT_BT_UUID_SIZE, simpleProfilechar2UUID },
GATT_PERMIT_READ | GATT_PERMIT_AUTHEN_READ, 
0, 
&simpleProfileChar2 
},

With this configuration the pairing prompt pops up when trying to read char2 with every new connection, obviously I'd like the bonding to be persistent so user only has to press Pair at the first connection and all subsequent connections are encrypted.

I must be missing something, thanks for your guidance.
Olivier

  • Hi Olivier,

    Your issue may be related to the iOS device using a new Private Resolvable Address (PRA) on subsequent re-connections. Thus, your peripheral treats each new connections (with a different PRA) as a new device. Refer to this thread: e2e.ti.com/.../1428335 for tips on how to resolve a PRA once the connection is established.

    Best wishes