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.

BLE CC2540 enable/disable pair and bond process - erase bond table

Other Parts Discussed in Thread: CC2540, BLE-STACK

Hi Everyone,

I am implementing an application using the Keyfob demo project as a base. I am looking for a solution with the following features:

1) The application only allow the connection /pairing from new devices(smartphone for example) when a certain Pin of the CC2540 microcontroller is turned High (pressing a button for example)

2) The application allows the connection /bonding of devices that were previously paired.

For this reason I have some questions regarding the BLE stack:

1) Can I perform the 1) Feature using as default the GAPBOND_PAIRING_MODE equal to GAPBOND_PAIRING_MODE_NO_PAIRING and after, when the button is pressed I put the GAPBOND_PAIRING_MODE equal to GAPBOND_PAIRING_MODE_WAIT_FOR_REQ?

2) In this situation (GAPBOND_PAIRING_MODE equal to GAPBOND_PAIRING_MODE_NO_PAIRING) the bonding will still work in the same way and accept previously paired devices?

3) What is the difference between the GAPBOND_IO_CAP_DISPLAY_ONLY and GAPBOND_IO_CAP_KEYBOARD_DISPLAY? In both the situations it is necessary to perform the pairing with pass code for a connection with a new device, right?

4) How can I erase all the devices from my bond table?

Many thanks in advance,

Miguel

  • Hi,

    Please can anyone give me some help?

    Thanks in Advance,

    Miguel

  • Hello Miguel,

    Yes, your application can control the state of pairing by changing the GAPBOND_PAIRING_MODE. This param only affects new pairing, and does not affect previously paired (bonded) devices. See the section "Using the Bond Manager" in the SW Dev Guide from the BLE-Stack v1.4.2 SDK.

    Regarding the IO capabilities, please refer to the BT4.0 core specification, Vol 3, Part H (Security Manager). The IO Capabilities section will describe this in more detail.

    See GAPBOND_ERASE_ALLBONDS in gapbondmgr.h.

    Best wishes