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.

LAUNCHXL-CC2650: Limit bonding to a single device

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650

I am struggling to limit my CC2650 to bond to only a single device. I am using the launchpad simple_peripheral (CC2650lp) example and have tried setting 'GAP_BONDINGS_MAX' to 1 in 'gapbondmgr.h'. I have also tried setting 'GAPBOND_LRU_BOND_REPLACEMENT' to 'false' during the setup of the bond manager.

 However, I am still able to bond two phones to the device. Is there something else that I need to do?

  • After you 'GAP_BONDINGS_MAX' to 1 in 'gapbondmgr.h', do you rebuild and download both stack and application to test it?

  • Yes, did a mass flash erase and then re-built stack and app and loaded onto the target. I am going to see if it's picking up a different file to the one I edited.

  • So, everything looks Ok to me. But it still allows multiple bondings.

  • Hey Liam,

    I followed those steps and was not able to reproduce this with the latest SDK. I am able to connect to a second phone. I attempt to write to characteristic 5, a pairing attempt is made and is successful. Then, when I disconnect with the second phone and attempt to reconnect, I am unable to do so. This looks like the intended behavior to me.

    Which SDK version are you using? What are you seeing?

  • Hi Ammar,

    I am using BLE_SDK 2_02_06_07. I would like to connect and pair the device with a single phone and for it to reject all other pairing requests.

    If I bond with the 1st phone (read Char5), disconnect and then connect with a 2nd phone. The pairing request appears on the 2nd phone and the bond is successful on the second phone (Char5 read successfully). I can then disconnect the 2nd phone and reconnect with the 1st phone, read Char5 is done successfully without a further bonding request.

    Going back go the 2nd phone requires another bond which then allows Char5 to be read..

    So it looks like it is only remembering one bond (the first phone) but it is allowing both phones to bond and access Char5.

  • Hey Liam,

    Thanks for your observations. Have you made any modifications to the default simple_peripheral example?

  • So I have just checked the example files and they are the same as the default install:

    The only file I have edited is:
    "C:\ti\simplelink\ble_sdk_2_02_06_07\src\profiles\roles\gapbondmgr.h" to change the GAP_BONDINGS_MAX to 1.

  • Hey Liam,

    I think the behavior we see here is expected. The key is that the second device is still required to pair before accessing Char5 because the bond is not being stored in NV by the launchpad (which is intended). This means every single time you connect with a second device, it will require a pairing session and bonding will fail. That does not mean that Char5 cannot be accessed... it just means it will have to go through pairing each time it joins.

    The first device should be able to reconnect and access Char5 without requiring a pairing request.