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: HOST TEST for CC2650

Part Number: CC2650

Hi,

I am testing Dual mode (Central, Peripheral) using the HOST test program.

My device <-HCI->CC2650(Host test) <->central device(android phone()

<->Peripheral device

 

Using the btool PC Application, the Central command of the host test is well controlled.

However, the Peripheral command in the host test is not well controlled.
An error occurs when the ADDservice command is executed.

Please use the HCI command to explain the ADD service and Advertising sequence.

 

thanks,

SC Lee.

 

 

 

  • Hi SC Lee,

    Could you please describe in more detail the error and what goes wrong?

  • Check out this:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/p/206434/732081#732081

    But call GAP_DeviceInit with GAP_PROFILE_CENTRAL | GAP_PROFILE_PERIPHERAL. 

    These are already called in HostTestApp_init and therefore you do not need to call it:

    // Add our services to GATT Server
    VOID GGS_AddService( GATT_ALL_SERVICES );
    VOID GATTServApp_AddService( GATT_ALL_SERVICES );

  • In the Host test PC program, we proceeded as follows.

    Step 1: Changed to Central and Peripaher mode with GAP_DeviceInit command.

    Step 2:If GATT_AddService command is used, Failure is returned.

    Are there any commands that need to be added before running the GATT_AddService command?

    thanks,

    SC Lee.

     

  • Hello SC Lee,

    Then you need to un-comment DGATT_DB_OFF_CHIP in build_config.opt found under the TOOLS folder in the host_test_stack project. DO a full rebuild after that:

    /* GATT Database being off chip */
    -DGATT_DB_OFF_CHIP

    Please note that it might be difficult to manage the complete GATT database from BTool. We have no guide for this. Another options is to implement the required service implementation in the host_test application itself.

  • I solved the above issue.

    However, there are additional questions.

    1)How can I compile HOST Test program for CC2650MODA?

    2) Due to SweynTooth Vulnerabilty issue, I would like to update the BLE stack to the latest.

    After downloading the BLE Stack, where should I fix it?

    thanks,

    SC Lee.

  • I have additional questions.

    1)Set it to peripheral mode in the Btool program, When you connect with android phone, you cannot connect.

    a) GAP_DeviceInit : PeripheralProfileRole- Enable, centralProfileRole - Enable

    b) GATT_AddService : numAttrs - 4

    c) GATT_AddAttribute : uuid - 03:29 permissions :3 

    d) GATT_AddAttribute : uuid - 01:aa permissions :3 

    e) GATT_AddAttribute : uuid - 01:29 permissions :3 

    f) ATT_FindInfoReq

    g) GAP_UpdateAdversiongData: ADVERTISEMENT,_DATA, 02:01:26

    h) GAP_UpdateAdversiongData: SCAN_RSP_DATA, 13:09:43:44:45:20:20:20:20:20:20:20:20:20:20:20:20:20:20:20:05:12:06:00:80:00:02:0A:00

    I set it as above.

    When connecting from an Android phone, the service cannot be read and the connection is not established.

    Btool program log.

     [1] : <Info> - 03:15:39.507
    Device Connected
    Handle = 0x0000
    Addr Type = 0x01 (Static)
    BDAddr = 48:56:89:89:CC:F6
    --------------------------------------------------------------------
    [2] : <Rx> - 03:15:39.485
    -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) (Random)
     DevAddr        : 48:56:89:89:CC:F6
     ConnHandle     : 0x0000 (0)
     ConnRole       : 0x04 (4) (Peripheral)
     ConnInterval   : 0x0027 (39)
     ConnLatency    : 0x0000 (0)
     ConnTimeout    : 0x01F4 (500)
     ClockAccuracy  : 0x01 (1)
    Dump(Rx):
    0000:04 FF 14 05 06 00 01 F6 CC 89 89 56 48 00 00 04 ...........VH...
    0010:27 00 00 00 F4 01 01                            '......
    --------------------------------------------------------------------
    [3] : <Error> - 03:15:39.726
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [4] : <Warning> - 03:15:39.729
    The Last 10 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [5] : <Rx> - 03:15:39.724
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0D (13) bytes(s)
     Event          : 0x0612 (1554) (Unknown Op Code)
     Status         : 0x00 (0) (Success)
     Raw            : 00 00 00 06 00 06 00 00 00 F4 01
    Dump(Rx):
    0000:04 FF 0D 12 06 00 00 00 06 00 06 00 00 00 F4 01 ................
    --------------------------------------------------------------------
    [6] : <Rx> - 03:15:39.801
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x0C (12) bytes(s)
     Event          : 0x0510 (1296) (ATT_ReadByGrpTypeReq)
     Status         : 0x00 (0) (Success)
     ConnHandle     : 0x0000 (0)
     PduLen         : 0x06 (6)
     StartHandle    : 0x0001 (1)
     EndHandle      : 0xFFFF (65535)
     GroupType      : 00:28
    Dump(Rx):
    0000:04 FF 0C 10 05 00 00 00 06 01 00 FF FF 00 28    ..............(
    --------------------------------------------------------------------
    [7] : <Error> - 03:15:44.704
    Could Not Convert Some Of The Data In The Following Message
    (A Specific Message Handler Is Needed To Process The Data)
    --------------------------------------------------------------------
    [8] : <Warning> - 03:15:44.707
    The Last 5 Bytes In The Following Message Were Not Decoded
    (Message Has More Than The Expected Number Of Data Bytes)
    --------------------------------------------------------------------
    [9] : <Rx> - 03:15:44.702
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x08 (8) bytes(s)
     Event          : 0x057E (1406) (Unknown Op Code)
     Status         : 0x00 (0) (Success)
     Raw            : 00 00 00 02 10 10
    Dump(Rx):
    0000:04 FF 08 7E 05 00 00 00 02 10 10                ...~.......
    --------------------------------------------------------------------
    [10] : <Info> - 03:15:54.749
    Device Disconnected
    Handle = 0x0000
    Addr Type = 0x01 (Static)
    BDAddr = 48:56:89:89:CC:F6
    --------------------------------------------------------------------
    [11] : <Rx> - 03:15:54.748
    -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)
    Dump(Rx):
    0000:04 FF 06 06 06 00 00 00 13                      .........
    --------------------------------------------------------------------

     

    2) How to set Value, Value Description and Properties?

    I am setting it like an image.

    In case of SNP protocol, it can be set to 9.5.2 SNP Add Characteristic Value Declaration (0x82).and 9.5.3 SNP Add Characteristic Descriptor Declaration (0x83)

    Which command should be used in HCI protocol?

     thanks,

    SC Lee.

     

     

     

  • Hello SC Lee,

    We don not have guide for how to setup and manage the GATT server from BTool. When database is off chip your application processor (BTool emulates) would have to process all incoming ATT requests.

    A simpler approach is to add the desired profile/service into the HostTest application and compile it in the actual firmware. Then all the GATT/ATT requests could also be handled by the HostTest application on the CC2650.

  • 1) What is the cause of Question 1 connection not working?

    2) I want to manage GATT Server using commands.

       Is the HCI command(TI BLE Vendor Specific HCI Reference Guide Version 2.2.1) not supported? Is Btool not supported?

       If it is not supported by Host Test (HCI Command) program, is there any other program that can be controlled by command?

     I have to use Center mode  and Peripheral mode at the same time.

    thanks,

    SC Lee.

       

  • And which of LPRF_BLE_NPGATT   or SimpleBLEPeripheral_SerialInterface should be referenced?
    thanks,
    SC Lee.
  • I tested it with reference to the LPRF_BLE_NPGATT documentation.

    I think you can send ATT_ReadByGrpTypeRsp in response to ATT_ReadByGrpTypeReq received from Central, and additionally send a response to the next command in this way.

    Is this correct? I couldn't confirm the timeout with BTool.

    and, What documents can check the values ​​entered in ATT_ReadByGrpTypeRsp and ATT_ReadByTypeRsp?

    thanks,
    SC Lee.
  • Hello SC Lee,

    You can reference the TI BLE Vendor Specific HCI Reference Guide:

    C:\ti\simplelink\ble_sdk_2_02_04_06\docs\TI_BLE_Vendor_Specific_HCI_Guide.pdf

    I am not sure if there are limitations in BTool.

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

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