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: how to use data length extension in host test with btool

Part Number: CC2650
Other Parts Discussed in Thread: CC2640

Dear all : 

there is a question bothering me . I've tried the procedure from http://www.ti.com/lit/ug/swru393e/swru393e.pdf

--------------------------------------------------------------------
[109] : <Tx> - 03:40:42.808
-Type : 0x01 (Command)
-OpCode : 0xFC21 (HCIExt_SetMaxDataLength)
-Data Length : 0x08 (8) byte(s)
TxOctets : 0x0000 (0)
TxTime : 0x0000 (0)
RxOctets : 0x0000 (0)
RxTime : 0x0000 (0)
Dump(Tx):
0000:01 21 FC 08 00 00 00 00 00 00 00 00 .!..........
--------------------------------------------------------------------
[110] : <Rx> - 03:40:42.848
-Type : 0x04 (Event)
-EventCode : 0x000E (HCI_CommandCompleteEvent)
-Data Length : 0x04 (4) bytes(s)
Packets : 0x01 (1)
OpCode : 0xFC21 (HCIExt_SetMaxDataLength)
Status : 0x01 (1) (Unknown HCI Command)
Dump(Rx):
0000:04 0E 04 01 21 FC 01 ....!..
--------------------------------------------------------------------

Should I use the simple central to try this feature ?

or need anything change?

  • Hi,

    What's the SDK version you are using?
    Can you elaborate what you did to see this issue?
  • Hi,

    sorry for lack of detailed description.

    I use the "ble_sdk_2_02_02_25" for my development. I believe I can enable data length extension
    by removing command ,"-DBLE_V42_FEATURES=EXT_DATA_LEN_CFG" ,in the build_config.opt.
    I've tried to modified this in Simple_peripheral_ cc2650em_stack. I used IPad to test this feature, and it worked properly.

    When I tried to use host test with btool , it showed that HCIExt_SetMaxDataLength is unknown HCI command.
    I'm curious whether i need to do some modification of host_test.c .

    besides , if i do the MTU_Exchange , it don't really transmit 251bytes in a single transfer event
    but spliting 251bytes into a combination of 27bytes.

  • I guess you meant uncommenting -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG instead of removing command, right?
    The parameters you want to change is normally set exclusively by the Controller to the maximum data length and duration allowed by this device. You don't need to change it especially when you are trying to 0.
    Also please be aware that this command can't be issued during a connection.

    Can you try to run the following command?
    LE Set Data Length Command (HCI_LE_SetDataLenCmd())
  • hi,

    i do really uncomment -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG.

    do you mean this command , HCIExt_SetMaxDataLength? Because i can only find this command in the btool command list.

    and the result is as the picture below.

    when i reference C:\ti\simplelink\ble_sdk_2_02_02_25\docs\SWRU393_CC2640_BLE_Software_Developer's_Guide 

    it recommend me to transmit HCI_LE_SetDataLengthCmd() during a connection , and i do add this code in simple_peripheral.c.

    SimpleBLEPeripheral_processStateChangeEvt(){
    
    ......
    
    case GAPROLE_CONNECTED:
    
    ......
    
    uint16_t cxnHandle;
    uint16_t pdu_size = 251;
    uint16_t tx_time = 2120;
    GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
    HCI_LE_ReadRemoteUsedFeaturesCmd(cxnHandle);
    
    if(SUCCESS == HCI_LE_SetDataLenCmd(cxnHandle, pdu_size, tx_time))
    PIN_setOutputValue(LED,Board_DK_LED3,0);
    
    ......
    
    }

    and i can also find this LED is set to 0 which means HCI_LE_SetDataLenCmd() result is SUCCESS.

    but i don't know why i can't work , any idea ?

  • besides , when i uncomment   -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG of host_test.stack ,

    the compile result will be error.

    y sdk :ble_sdk_2_02_02_25

    my xdctool :3.32.0.06 core

    my compiler : TI v18.1.4LTS

    thanks for help

  • You need to use correct compiler version which is listed in the SDK release note.

    I have no problem building the host test when I uncomment -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG.

  • Hi!
    I will try to figure it out.