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.

CC2642R-Q1: GAPBOND_PAIRING_STATE_BOND_SAVED does not succeed

Part Number: CC2642R-Q1

Hello

We are implementing OOB pairing using CC2642 and SIMPLE LINK-CC13X2-26X2-SDK_5.20.00.52.
On Peripheral, I confirmed that GAPBOND_PAIRING_STATE_COMPLETE was notified with 0x00 (SUCCESS). After that, we confirmed that GAPBOND_PAIRING_STATE_BOND_SAVED was notified with 0x04.
In the API reference, there is no mention of state for GAPBOND_PAIRING_STATE_BOND_SAVED, can you tell me the condition under which 0x04 is notified as state?

  • Hey Yoshiaki,

    When bonding is enabled, the gapbondmgr will notify the application of this event (if a pairStateCB has been registered for) after pairing is complete and when the bond has successfully been stored in NV. This update comes from the stack upon successful bonding.

    If you'd like, I'd encourage you to search through gapbondmgr.c (located in /source/ti/ble5stack/host/gapbondmgr.c), where you will find the code associated with the behavior I describe above at lines 1406+ shown below:

          // Call app state callback
          if ( pGapBondCB && pGapBondCB->pairStateCB )
          {
            // Report to app
            pGapBondCB->pairStateCB( pPkt->connectionHandle,
                                     GAPBOND_PAIRING_STATE_COMPLETE,
                                     pPkt->hdr.status );
    
            if((pPkt->hdr.status == SUCCESS) &&
               (pPkt->authState & SM_AUTH_STATE_BONDING))
    
            {
              // Report to app
              pGapBondCB->pairStateCB( pPkt->connectionHandle,
                                       GAPBOND_PAIRING_STATE_BOND_SAVED,
                                       saveStatus );
            }
          }

    I hope this helps answer your question. Feel free to follow up with more questions.