Hello,
For the multi-role example which is available as part of SDK3.0, my customer would only like to enable pairing / bonding in the peripheral role - What is the best way to accomplish this ? Would it suffice to just comment out the section in GAPBondMgr_LinkEst function highlighted below ?
Does anyone have an example for this already ?
Thanks,
Padmaja
bStatus_t GAPBondMgr_LinkEst( uint8 addrType, uint8 *pDevAddr, uint16 connHandle, uint8 role )
{
........................
// Update LRU Bond list
gapBondMgrUpdateLruBondList(idx);
}
#if ( HOST_CONFIG & CENTRAL_CFG )
else if ( role == GAP_PROFILE_CENTRAL &&
gapBond_PairingMode == GAPBOND_PAIRING_MODE_INITIATE )
{
// If Central and initiating and not bonded, then initiate pairing
VOID gapBondMgrAuthenticate( connHandle, addrType, NULL );
// Call app state callback
if ( pGapBondCB && pGapBondCB->pairStateCB )
{
pGapBondCB->pairStateCB( connHandle, GAPBOND_PAIRING_STATE_STARTED, SUCCESS );
}
}
#endif // HOST_CONFIG & CENTRAL_CFG
#if ( HOST_CONFIG & PERIPHERAL_CFG )
// If Peripheral and initiating, send a slave security request to
// initiate either pairing or encryption
if ( role == GAP_PROFILE_PERIPHERAL &&
gapBond_PairingMode == GAPBOND_PAIRING_MODE_INITIATE )
{
gapBondMgrSlaveSecurityReq( connHandle );
}
#endif //HOST_CONFIG & PERIPHERAL_CFG
return ( SUCCESS );
}