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.

CC2340R5: How can I not bind directly after pairing is completed, but wait for the CC2340 button to be pressed before binding?

Part Number: CC2340R5

Tool/software:

Hi,

How can I not bind directly after pairing is completed, but wait for the CC2340 button to be pressed before binding?

Where is the best place to add a program? Or how to modify the setting method?

When the phone is paired, after pressing the phone twice to pair, it will be executed directly to the final binding completion state, even if I am in void Pairing_pairStateHandler(uint32 event, BLEAppUtil_msgHdr_t *pMsgData)

BLEAPPUTIL_PAIRING_STATE_STARTED: New while(1) loop added and binding cannot be stopped.

The relevant settings are as follows:

Thanks.

  • Hi,

    The GapBondMgr is in charge of kicking off the bonding procedure. To initiate the bond save at a different time, then you will likely need to modify the gapbondmgr.c file. That said, it may be easier to delay pairing until you are ready to save a bond instead of modifying the gapbondmgr.c file.

    Best Regards,

    Jan

  • Hi Jan,

    After modifying the gapbondmgr.c, how to build SDK? Are there relevant documents or manuals available for reference?

    Best Regards,

  • Hi,

    I would recommend not modifying the original copy of that file in the SDK. Instead, keep the SDK copy unmodified and drag & drop the file into your project in CCS. You should get a prompt that asks if you would like to copy or link the file. You should copy it and then you can modify the local copy freely without affected the SDK copy and other projects.

    Best Regards,

    Jan