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.

CC2640R2F: why does simple_peripheral example need not bonding & pairing?

Part Number: CC2640R2F

Hi,

in the simple_peripheral example, it enables pairing & bonding as following. But why there is no need to do the pairing or bonding when a phone connects in?

uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = TRUE;

Best regards,

Victor Chu

  • Hi Victor,

    This example shows how it could be done. In BLE it is not required to have encryption/pairing on a connection.

    In Simple Peripheral there is a GATT service called SimpleGATTProfile, and only one of the characteristics (number 5) requires authentication (pairing with code) to be used.

    With the setup you describe in your post, a device does not need to pair when connecting, but pairing is supported. If they try to read/write to char5 without being paired they will get an error response, and will then start pairing.

    Best regards,
    Aslak
  • Dear Aslak,
    Why does the example of multi_role need pairing on a connection? Its GATT service almost as same as simple_peripheral.

    Thank you!

    Best regards,

    Victor
  • Hi Victor,

    There is no reason for this except perhaps to show that it's possible to have multiple secure/paired connections.

    Best regards,
    Aslak