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.

IP Tunelling with CC2540?

Hi

The BLE spec contains the IP tunelling possibility (device requests one IP from host and uses the host for tunel his data to the given IP). A nice feature for data logging what could be usefull for my needs. 

Is this implemented in the TI stack and libraries, if it does where because I could not find it?

If it is not it is planned to be? Or it's a feature what TI will not support with this chip?

regards,

B.

  • There is a section describing HCI command/response type tunneling in HCI vender specific commands, but this may not be what you are looking for.  Can you point me the 4.0 spec section you are looking at, and I'll check into it.  Most data will usually be handled via GATT server, client.

    TI BLE HCI Vendor Specific HCI Guide 

    9.3 Request and Response Tunneling

    -Greg

  • This is what I was looking for but I had problem understanding how the bonding is made between a attr server (ble slave) and a web aplication via the attr client (ble host).

    I understand that the web application talks with the attribute client (ble host) via HCI commands in both direction. This is similar what BTool does.

    In the same time a web application does not have a way to know about the attribute server device before he is advertising himself. Does this advertisement will be done using a special UUID which will indicate a need for a gateway? (and maybe some special data in this advertisement with IP or other connection information). And after connection is done everything can go via HCI commands? 

    -Barni

  • Hi

    Did you figure out how to pair two device using btool HCI commands..

  • Two devices via BLE is easy to pair - BTool makes that in a few clicks and also displays the HCI commands so it's easy to understand.

    Using network tunneling is another question - it's not even defined well in the Bluetooth Core Spec (only blabla, nothing concrete) so I think nobody have done it yet unless it's vendor specific ...

    B.

  • Are u reffering to GAP bond command in BTool?Ive not gone through the GAPBONDMANAGER C file as yet but if you have implemented it already id like to ask you if you pair two devices do they connect to each other automatically when in close proximity with each other?

    Thanks

  • Ive tried the following commands in BTool but I get disconnected or unknown opcode  after my last command.How do i check if pairing is succesfull.Here are the following steps i followed

    step 1 : Connect to the peripheral device

    step 2 : Send authentication request

    step 3 : Then from the response  I copy LTK ,DIV ,Rand,Authenticated:Yes into the bond command.Im not sure which one you have to use so ive tried secinf and devsecinf info

     

     SecInf.LTKSize : 0x10

     SecInf.LTK : A9:98:71:BE:68:64:5D:2D:C2:F9:7F:50:68:62:8D:ED

     SecInf.DIV : 0xFBA5

     SecInf.Rand : 50:C1:42:FF:77:B0:78:A4

     DevSecInf.Enable : 0x01

     DevSecInf.LTKSize : 0x10

     DevSecInf.LTK : 7D:9A:4A:1B:15:2E:AE:61:DB:43:84:14:76:D2:A8:50

     DevSecInf.DIV : 0x306E

     DevSecInf.Rand : 26:EB:48:07:F5:57:A0:95

     

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     

     

    [51] : <Tx> - 12:43:02.015

    -Type : 0x01 (Command)

    -Opcode : 0xFE0B (GAP_Authenticate)

    -Data Length : 0x1D byte(s)

     ConnHandle : 0x0000

     sec.IOCaps : 0x03 (NoInputNoOutput)

     sec.OOBAvail : 0x00 (False)

     sec.OOB : 4D 9F 88 5A 6E 03 12 FE 00 00 00 00 00 00 00 00 

     sec.authReq : 0x01

     sec.maxKeySize : 0x10 (16)

     sec.keyDist : 0x3F

     pair.Enable : 0x00 (Disable)

     pair.IOCaps : 0x03 (NoInputNoOutput)

     pair.OOBFlag : 0x00 (Disable)

     pair.authReq : 0x01

     pair.maxKeySize: 0x10 (16)

     pair.keyDist : 0x3F

    Dump(Tx):

    01 0B FE 1D 00 00 03 00 4D 9F 88 5A 6E 03 12 FE 

    00 00 00 00 00 00 00 00 01 10 3F 00 03 00 01 10 

    3F 

     

     

     

     

    [52] : <Rx> - 12:43:02.125

    -Type : 0x04 (Event)

    -EventCode : 0xFF (HCI_LE_ExtEvent)

    -Data Length : 0x06 bytes(s)

     Event : 0x067F (GAP_HCI_ExtentionCommandStatus)

     Status : 0x00 (Success)

     OpCode : 0xFE0B (GAP_Authenticate)

     DataLength : 0x00

    Dump(Rx):

    04 FF 06 7F 06 00 0B FE 00 


    -----------------------------------------------------------------------------------------------

    [53] : <Rx> - 12:43:04.390

    -Type : 0x04 (Event)

    -EventCode : 0xFF (HCI_LE_ExtEvent)

    -Data Length : 0x6A bytes(s)

     Event : 0x060A (GAP_AuthenticationComplete)

     Status : 0x00 (Success)

     ConnHandle : 0x0000

     AuthState : 0x01

     SecInf.Enable : 0x01

     SecInf.LTKSize : 0x10

     SecInf.LTK : A9:98:71:BE:68:64:5D:2D:C2:F9:7F:50:68:62:8D:ED

     SecInf.DIV : 0xFBA5

     SecInf.Rand : 50:C1:42:FF:77:B0:78:A4

     DevSecInf.Enable : 0x01

     DevSecInf.LTKSize : 0x10

     DevSecInf.LTK : 7D:9A:4A:1B:15:2E:AE:61:DB:43:84:14:76:D2:A8:50

     DevSecInf.DIV : 0x306E

     DevSecInf.Rand : 26:EB:48:07:F5:57:A0:95

     IdentityInfo.Enable : 0x01

     IndetityInfo.IRK : EB:E2:34:F6:D0:AF:33:84:24:FB:14:A1:16:D2:41:CD

     IndentityInfo.BD_ADDR : 1F:FF:FF:FF:FF:FF

     SigningInfo.Enable : 0x01

     SigningInfo.CSRK : 9B:42:0A:E4:DB:7D:09:D1:AF:94:0D:C0:10:51:21:E3

     SignCounter : 0xFFFFFFFF

    Dump(Rx):

    04 FF 6A 0A 06 00 00 00 01 01 10 A9 98 71 BE 68 

    64 5D 2D C2 F9 7F 50 68 62 8D ED A5 FB 50 C1 42 

    FF 77 B0 78 A4 01 10 7D 9A 4A 1B 15 2E AE 61 DB 

    43 84 14 76 D2 A8 50 6E 30 26 EB 48 07 F5 57 A0 

    95 01 EB E2 34 F6 D0 AF 33 84 24 FB 14 A1 16 D2 

    41 CD FF FF FF FF FF 1F 01 9B 42 0A E4 DB 7D 09 

    D1 AF 94 0D C0 10 51 21 E3 FF FF FF FF 

     

     

    56] : <Tx> - 12:43:49.406

    -Type : 0x01 (Command)

    -Opcode : 0xFE0F (GAP_Bond)

    -Data Length : 0x1E byte(s)

     ConnHandle : 0x0000

     Authenticated : 0x01 (Yes)

     Long Term Key : 7D 9A 4A 1B 15 2E AE 61 DB 43 84 14 76 D2 A8 50 

     DIV : 0x306E

     Rand : 26 EB 48 07 F5 57 A0 95 

     LTKSize : 0x10 (16)

    Dump(Tx):

    01 0F FE 1E 00 00 01 7D 9A 4A 1B 15 2E AE 61 DB 

    43 84 14 76 D2 A8 50 6E 30 26 EB 48 07 F5 57 A0 

    95 10 

     

    -----------------------------------------------------------------------------------------------

    [57] : <Rx> - 12:43:49.515

    -Type : 0x04 (Event)

    -EventCode : 0xFF (HCI_LE_ExtEvent)

    -Data Length : 0x06 bytes(s)

     Event : 0x067F (GAP_HCI_ExtentionCommandStatus)

     Status : 0x00 (Success)

     OpCode : 0xFE0F (GAP_Bond)

     DataLength : 0x00

    Dump(Rx):

    04 FF 06 7F 06 00 0F FE 00 


    -----------------------------------------------------------------------------------------------

    [58] : <Rx> - 12:43:50.500

    -Type : 0x04 (Event)

    -EventCode : 0xFF (HCI_LE_ExtEvent)

    -Data Length : 0x05 bytes(s)

     Event : 0x060E (Unknown Op Code)

     Status : 0x00 (Success)

     Raw : 00 00 00 

    Dump(Rx):

    04 FF 05 0E 06 00 00 00 


    -----------------------------------------------------------------------------------------------

     

     

  • I haven't tried gap_bond yet - I will have to try it together with the security settings a bit later - hope it's not a bug in the TI libraries ...

  •  

    Bluetooth 4.0 page 1963