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.

CC2650: Using pairing mode on CC2650

Part Number: CC2650
Other Parts Discussed in Thread: CC2640,

Hello.

On a new development I would like to set up a pairing system with my device.

1- I do not really understand the difference between pairring and bonding.
2- Can you tell me how to configure the stack so that my first connection is done with a button press then the following connections is automatic.

I started working on simple_peripheral

Thanks for your help

best regards

  • Hi,

    The difference between pairing and bonding can be found in the software developer's guide found in the SDK at the following file path:

    C:\ti\simplelink\ble_sdk_2_02_01_18\docs\SWRU393_CC2640_BLE_Software_Developer's_Guide.pdf

    Specifically, look at section 5.4 GAP Bond Manager and LE Secure Connections. In short, pairing is the process of exchanging keys while bonding is the storing of the keys in nonvolatile memory to use for the next encryption sequence.

    I would highly suggest using this guide to help you develop your application.

    For your second point, you want to press a button and auto-pair with a set list of devices? If so, you'll have to be sure those devices are bonded. Refer to the same section I have noted earlier for more information.

    -Sy Su

  • Thank you for the link.

    That's what I want to do: I have a device (cc2650) and a phone.
    when I want to link them, I press a button on the device which allows me to connect with the phone (with a timeout of XX seconds).
    then for the next connection to this phone I have no need to press the button.
    if I want to change the phone I repress the button.
    in this use case what is the best pairring mode?

    In the case of a key exchange. which generates the key (Device or Central)?

    Thank you

  • Hi,

    If your application doesn't need Man in the Middle (MITM) protection, the simple Just Works Pairing would suffice and be good enough. Refer to section 5.4.4 of the developer's guide, for more details on the different pairing modes.

    Both. As mentioned in Volume 3, Part H, Section 2.3.5.6.1 of the current Bluetooth Specification (v5.0): Pairing is initiated by the initiating device sending its public key to the receiving
    device. The responding device replies with its own public key. After the public keys have been exchanged, the device can then start
    computing the Diffie-Hellman Key. If LE secure connections is not enabled then it will use LE legacy pairing which won't use Elliptic Curve Diffie-Hellman cryptography.

    Key generation in Bluetooth with low energy is performed by the Host on each low energy device independent of any other.  By performing key generation in the Host, the key generation algorithms can be upgraded without the need to change the Controller. Note that key generation in BR/EDR (Bluetooth Classic) is performed in the Controller.

    Further information on this can be found in the previously referenced section of the developer guide or the Bluetooth Specification linked here: https://www.bluetooth.com/specifications/bluetooth-core-specification

    This blog post series provides a good summary too: https://blog.bluetooth.com/bluetooth-pairing-part-2-key-generation-methods https://blog.bluetooth.com/bluetooth-pairing-part-4

    -Sy Su

  • Hello.

    if I understand well in my case. when i press the pairing button i'm in parring mode just work.

    and for the futur connexion I'm in bounding mode ?

    my questions mainly concern the use of the stack. do you have a sample code for this use ?

    what are the functions for this use ?

    Thanks

  • The section for Using GapBondMgr will help you out with this. There are examples included here. Have you read through these sections yet?
    software-dl.ti.com/.../gapbondmngr.html

    The same section can be found in section 5.4.3 and relevant functions are found here in Appendix F: www.ti.com/lit/pdf/swru393