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-CC2640R2: Using connection secure for pairing between LAUNCHXL-CC2640R2

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F

Hello,

I am using your CC2640R2 launchXL board and i am trying to realize a secure connection pairing between device and Samsung S10. All the commands are sent from Btool application. 

The CC2640R2 is flashed with Host example from simplelink_cc2640r2_sdk_4_20_00_04.

Between S10 and CC2640R2 , I realized pairing in Legacy mode (MITM and just works method). 

All commands for configuring the bonding/pairing are done with GapBondMgr_SetParameter().

I will attach an log for my attempt with secure connection pair. I hope you can help me with this problem

[15] : <Tx> - 05:26:29.538
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0400 (1024) (GAPBOND_PAIRING_MODE)
 ParamLength    : 0x01 (1)
 PairingMode    : 0x00 (0) (GAPBOND_PAIRING_MODE_NO_PAIRING)
Dump(Tx):
0000:01 36 FE 04 00 04 01 00                         .6......
--------------------------------------------------------------------
[16] : <Rx> - 05:26:29.593
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------
[17] : <Tx> - 05:26:37.015
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0402 (1026) (GAPBOND_MITM_PROTECTION)
 ParamLength    : 0x01 (1)
 MitmEnable     : 0x00 (0) (False)
Dump(Tx):
0000:01 36 FE 04 02 04 01 00                         .6......
--------------------------------------------------------------------
[18] : <Rx> - 05:26:37.070
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------
[19] : <Tx> - 05:26:45.369
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0403 (1027) (GAPBOND_IO_CAPABILITIES)
 ParamLength    : 0x01 (1)
 BondIOCaps     : 0x03 (3) (GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT)
Dump(Tx):
0000:01 36 FE 04 03 04 01 03                         .6......
--------------------------------------------------------------------
[20] : <Rx> - 05:26:45.415
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------
[21] : <Tx> - 05:26:50.595
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0404 (1028) (GAPBOND_OOB_ENABLED)
 ParamLength    : 0x01 (1)
 OobEnabled     : 0x00 (0) (False)
Dump(Tx):
0000:01 36 FE 04 04 04 01 00                         .6......
--------------------------------------------------------------------
[22] : <Rx> - 05:26:50.643
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------
[23] : <Tx> - 05:26:56.007
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0406 (1030) (GAPBOND_BONDING_ENABLED)
 ParamLength    : 0x01 (1)
 BondingEnabled : 0x00 (0) (False)
Dump(Tx):
0000:01 36 FE 04 06 04 01 00                         .6......
--------------------------------------------------------------------
[24] : <Rx> - 05:26:56.055
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------
[25] : <Tx> - 05:27:07.202
-Type           : 0x01 (Command)
-OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
-Data Length    : 0x04 (4) byte(s)
 ParamID        : 0x0411 (1041) (GAPBOND_SECURE_CONNECTION)
 ParamLength    : 0x01 (1)
 BondSecureCxns : 0x01 (1) (GAPBOND_SECURE_CONNECTION_ALLOW)
Dump(Tx):
0000:01 36 FE 04 11 04 01 01                         .6......
--------------------------------------------------------------------
[26] : <Rx> - 05:27:07.253
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE36 (GAPBondMgr_SetParameter)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 36 FE 00                      ......6..
--------------------------------------------------------------------

55] : <Tx> - 05:30:21.700
-Type           : 0x01 (Command)
-OpCode         : 0xFE62 (GapInit_connect)
-Data Length    : 0x0A (10) byte(s)
 PeerAddrType   : 0x01 (1) (PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID)
 PeerAddr       : 40:8B:FF:48:06:A1
 InitiatingPhy  : 0x01 (1) (
                  INIT_PHY_1M)
 Timeout        : 0x0000 (0)
Dump(Tx):
0000:01 62 FE 0A 01 A1 06 48 FF 8B 40 01 00 00       .b.....H..@...
--------------------------------------------------------------------
[56] : <Rx> - 05:30:21.728
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE62 (GapInit_connect)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 62 FE 00                      ......b..
--------------------------------------------------------------------
[57] : <Rx> - 05:30:21.918
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x14 (20) bytes(s)
 Event          : 0x0605 (1541) (GAP_EstablishLink)
 Status         : 0x00 (0) (SUCCESS)
 DevAddrType    : 0x01 (1) (ADDRTYPE_RANDOM)
 DevAddr        : 40:8B:FF:48:06:A1
 ConnHandle     : 0x0000 (0)
 ConnRole       : 0x08 (8) (
                  Central)
 ConnInterval   : 0x0050 (80)
 ConnLatency    : 0x0000 (0)
 ConnTimeout    : 0x07D0 (2000)
 ClockAccuracy  : 0x00 (0)
Dump(Rx):
0000:04 FF 14 05 06 00 01 A1 06 48 FF 8B 40 00 00 08 .........H..@...
0010:50 00 00 00 D0 07 00                            P......
--------------------------------------------------------------------
[58] : <Tx> - 05:30:21.923
-Type           : 0x01 (Command)
-OpCode         : 0x2022 (HCI_LE_SetDataLength)
-Data Length    : 0x06 (6) byte(s)
 Handle         : 0x0000 (0)
 TxOctets       : 0x00FB (251)
 TxTime         : 0x0848 (2120)
Dump(Tx):
0000:01 22 20 06 00 00 FB 00 48 08                   ." .....H.
--------------------------------------------------------------------
[59] : <Info> - 05:30:22.059
Device Connected
Handle = 0x0000
Addr Type = 0x01 (ADDRTYPE_RANDOM)
BDAddr = 40:8B:FF:48:06:A1
--------------------------------------------------------------------
[60] : <Rx> - 05:30:21.980
-Type           : 0x04 (Event)
-EventCode      : 0x000E (HCI_CommandCompleteEvent)
-Data Length    : 0x06 (6) bytes(s)
 Packets        : 0x01 (1)
 OpCode         : 0x2022 (HCI_LE_SetDataLength)
 Status         : 0x00 (0) (SUCCESS)
 Handle         : 0x0000 (0)
Dump(Rx):
0000:04 0E 06 01 22 20 00 00 00                      ...." ...
--------------------------------------------------------------------
[61] : <Rx> - 05:30:22.406
-Type           : 0x04 (Event)
-EventCode      : 0x003E (HCI_LE_GenericReportEvent)
-Data Length    : 0x0C (12) bytes(s)
 LE Event Code  : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)
 LE Event Code  : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)
 Status         : 0x00 (0) (SUCCESS)
 ConnectionId   : 0x0000 (0)
 Features       : 0x00000000000049FF (18943) (
                  Encryption
                  Connection_Parameters_Request
                  Reject_Extended_Indication
                  Slave_Features_Exchange
                  Ping
                  Data_Packet_Length_Extension
                  Privacy
                  Extended_Scanner_Filter_Policies
                  PHY_2M
                  Coded_PHY
                  Channel_Selection_Algorithm_2)
Dump(Rx):
0000:04 3E 0C 04 00 00 00 FF 49 00 00 00 00 00 00    .>......I......
--------------------------------------------------------------------
[62] : <Tx> - 05:30:27.617
-Type           : 0x09 (ExtCommand)
-OpCode         : 0xFE48 (GAPBondMgr_Pair)
-Data Length    : 0x0200 (512) byte(s)
 ConnHandle     : 0x0000 (0)
Dump(Tx):
0000:09 48 FE 02 00 00 00                            .H.....
--------------------------------------------------------------------
[63] : <Rx> - 05:30:27.658
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
 Status         : 0x00 (0) (SUCCESS)
 OpCode         : 0xFE48 (GAPBondMgr_Pair)
 DataLength     : 0x00 (0)
Dump(Rx):
0000:04 FF 06 7F 06 00 48 FE 00                      ......H..
--------------------------------------------------------------------
[64] : <Rx> - 05:30:30.116
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x6B (107) bytes(s)
 Event          : 0x060A (1546) (GAP_AuthenticationComplete)
 Status         : 0x08 (8) (SMP_PAIRING_FAILED_UNSPECIFIED)
 ConnHandle     : 0x0000 (0)
 AuthState      : 0x08 (8) (
                  Secure_Connections)
 SecInf.Enable  : 0x00 (0)
 SecInf.LTKSize : 0x00 (0)
 SecInf.LTK     : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 SecInf.DIV     : 0x0000 (0)
 SecInf.Rand    : 00:00:00:00:00:00:00:00
 DSInf.Enable   : 0x00 (0) (Disable)
 DSInf.LTKSize  : 0x00 (0)
 DSInf.LTK      : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 DSInf.DIV      : 0x0000 (0)
 DSInf.Rand     : 00:00:00:00:00:00:00:00
 IdInfo.Enable  : 0x00 (0)
 IdInfo.IRK     : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 IdInfo.BD_Addr : 00:00:00:00:00:00
 IdInfo.AddrType: 0x00 (0) (ADDRTYPE_PUBLIC)
 SignInfo.Enable: 0x00 (0) (Disable)
 SignInfo.CSRK  : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 SignCounter    : 0x00000000 (0)
Dump(Rx):
0000:04 FF 6B 0A 06 08 00 00 08 00 00 00 00 00 00 00 ..k.............
0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0020:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0040:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0050:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0060:00 00 00 00 00 00 00 00 00 00 00 00 00 00       ..............
--------------------------------------------------------------------
[65] : <Info> - 05:30:33.414
Device Disconnected
Handle = 0x0000
Addr Type = 0x01 (ADDRTYPE_RANDOM)
BDAddr = 40:8B:FF:48:06:A1
--------------------------------------------------------------------
[66] : <Rx> - 05:30:33.413
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (HCI_LE_ExtEvent)
-Data Length    : 0x06 (6) bytes(s)
 Event          : 0x0606 (1542) (GAP_TerminateLink)
 Status         : 0x00 (0) (SUCCESS)
 ConnHandle     : 0x0000 (0)
 Reason         : 0x13 (19) (PEER_REQUESTED_TERM)
Dump(Rx):
0000:04 FF 06 06 06 00 00 00 13                      .........
--------------------------------------------------------------------

Thank you,

Robert

  • Hi Robert,

    I have assigned an expert to help you with this.

    Best Regards,
    Alec

  • Robert, 

    Please apologize for the delay; I was sidetracked by several issues. 

    I am not entirely sure I understood your setup. You have a Galaxy S10 phone connecting to a peripheral that is configured with Just works and MITM disabled and is sniffing all this with Btool running on your CC2640R2F, is that so?

    Although I don't have a S10, my S9 seems to connect just fine to a peripheral by following the steps in Task 1 of the BLE Security Fundamentals SimpleLInk Academy module:

    https://dev.ti.com/tirex/explore/node?node=AOPOY.GDApakIOYjiwoY6A__pTTHBmu__LATEST 

    Could you check its details and see if the modifications to your project match what is seen there? 

    At last, there is always a level of uncertainty when dealing with cellphones or other pre-built devices - they tend to do whatever they want... :)

    At any rate, please let me know if this helps,

    Rafael

  • Hello Rafael,

    The setup is: CC2640R2 flashed with host test (center) and Samsung S10 (configured as peripheral device). The connection is working fine, but when i try to pair the devices (with GapBondMgr_Pair() command) in secure connection mode, the connection crashes.

    How you can check in log, all data from GAP_AuthenticationComplete response is filled with zeros if I try the secure connection pairing .

    Thank you,

    Robert 

  • Robert,

    Please apologize for the delay; I was sidetracked.

    I suspect this issue is related to the other one I just replied, thus I suspect this is a consequence of what is reported there. 

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/946754 

    Best regards,

    Rafael

  • Hello Rafael,

    I tried secure connection paring but with another controller as central: (flashed with host central) CC26X2R1 LaunchXL. With this one is working and i'm doing the same steps (S10 still as peripheral). For me this issue is closed because I will start using CC26X2R1. 

    Thank you,

    Robert