Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: How to know when BLE link is encrypted?

$
0
0

Hi Richard,

As you mentioned that you are registering your Bond Manager callbacks with GAPBondMgr_Register(). I think using pairStateCB callback you can track the pairing status for the central device.

I think this will be helpful to you :

static void CentralPairStateCB( uint16 connHandle, uint8 state, uint8 status )
{
  if ( state == GAPBOND_PAIRING_STATE_STARTED )
  {
    // Pairing started
  }
  else if ( state == GAPBOND_PAIRING_STATE_COMPLETE )
  {
    if ( status == SUCCESS )
    {
      // Pairing success
    }
    else
    {
      // Pairing fail
    }
  }
  else if ( state == GAPBOND_PAIRING_STATE_BONDED )
  {
    if ( status == SUCCESS )
    {
      // Bonding success
    }
  }
}


Viewing all articles
Browse latest Browse all 116964

Trending Articles