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.

RTOS/CC2650MODA: problem with connection between cc2650lanchpad(host_test) and cc2650moda(simple_peripheral)

Part Number: CC2650MODA
Other Parts Discussed in Thread: CC2650, BLE-STACK

Tool/software: TI-RTOS

Hi all 

    I would like to implement data length extension in these two project. And I have taken throughput example as my reference. 

But when I connect cc2650 to an ipad , everything is well. It means I am sure it do the mtu_exchange with IPAD , but not do so with

cc2650lanchpad(host_test) .

environment setting is [

compiler version is TI v18.1.4.LTS

code composer version is 8.2 

SDK of ble is ble_sdk_2_02_02_25, 

tirtos_cc13xx_cc26xx_2_21_01_08

When I want to exchangeMTU (GATT_EXCHANGE_MTU)by btool, it would end up MSG_BUFFER_NOT_AVAIL.

If I don't do any operation with btool. it would disconnect 7 seconds later after connection establishing.

It ends up the situation like the following screenshot. 

any idea to figure out what happen?

  • Hi,

    I am assigning an expert to follow-up. Stay tuned

  • Hi,

    to explain the situation more clearly, I attach some code which i try to implement the data length extension base on simple_peripheral .

    These code I add works properly with IPAD BLE scanner

    // this part is in simple_peripheral.c
    
    // in order to understand what I do for data length extension, I remove the original part in simple_peripheral
    static uint8_t SimpleBLEPeripheral_processGATTMsg(gattMsgEvent_t *message) {
        if (message->hdr.status == blePending) {
    
        } else if (message->method == ATT_MTU_UPDATED_EVENT) {
            // MTU size updated
            // this buffer is used to debug
            // when i connect it to my ipad , it do show the value i set
            headstage_debug_buffer[0] = 0x0f;
            headstage_set_debug_information();
            headstage_data_length_extension();
        }
    }
    
    static void headstage_data_length_extension(){
        while(1){
            headstage_debug_buffer[4] ++;
            headstage_set_debug_information();
            while (!Queue_empty(application_message_queue))
            {
              sbpEvt_t *pMsg = (sbpEvt_t *)Util_dequeueMsg(application_message_queue);
              if (pMsg)
              {
                // Process message.
                SimpleBLEPeripheral_processAppMsg(pMsg);
    
                // Free the space from the message.
                ICall_free(pMsg);
              }
            }
            if (EVENT_MASK > 0) {
                headstage_event_handle();
            }
        }
    }
    
    static void SimpleBLEPeripheral_init(void) {
        /*
         * the same as original one , to catch the point more easily, I remove the original part. 
         */
    
        HCI_LE_ReadMaxDataLenCmd();
    
        HCI_LE_WriteSuggestedDefaultDataLenCmd(251 , 2120); // this is used for data length extension
    }
    
    // in simple_peripheral_stack build_config.opt
    
    /* BLE v4.2 Features */
    // I have already uncommented it 
     -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG 
    
    /* 
     * In simple_gatt_profile.h
     * I modify characteristic 4 length for notification with data length extension 
     */
    #define SIMPLEPROFILE_CHAR4_LEN 244
    
    

  • for some experiement with packet sniffer. 

    I don't see any data length extension procedure which is done over air.

    another question about LL_feature_set_meaning , acorrding to official document of bluetooth , page 2653 feature support. 

    It looks like my simple peripheral don't support data length extension. How come?

    condition : cc2650(host_test with btool ) connect to cc2650(simple_peripheral)

    condition 2: IPad (BLE scanner) connect to cc2650(simple_peripheral)

    if the feature set is little endian, we can find that simple peripheral do not support LE Data packet data length extension according to

    specification of bluetooth system, v5.0 page 2653 feature support.

    If i make some mistake about its meaning or I follow the wrong procedure?

    into my application? 

  • Hello User,

    Did you enable data length extension on the Host test project? This is not enabled by default. Review the build_config.opt file in the stack project and uncomment this: 

    /* -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG */

    Also configure MTU/PDU size as described in the Developers Guide:

    5.5.2.1 Configuring for Larger MTU Values 

    5.6.5.1 Enabling the Feature in the BLE-Stack

    5.6.5.2 Enable the Feature at Run Time

    5.6.5.3 Set Packet Length in a Connection

  • HI

         Sorry for reply so late. I do really uncomment  /* -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG */ in config.opt.

    I have tried to use characteristic 4 value to do notification.

    In my knowledge, the characteristic length would control the packet length every time I try to notify.

    If i need to enlarge this value to achieve a larger packet length, or I need to queue to notify like the method in throughput_peripheral do?

  • Hello User,

    You can increase the characteristic attribute size. Or you can allocate space for notifications in your application and send directly (with unvalid handle 0). Please refer to the throughput example:

    https://github.com/ti-simplelink/ble_examples/blob/ble_examples-2.2/docs/throughput_example.md

  • Hi,

        there is some problem with host_test,

    if I uncomment /* -DBLE_V42_FEATURES=EXT_DATA_LEN_CFG */  in host_test_stack config.opt

    from btool, the connection will disconnect right away.

    if i want to send gatt_GATTWriteCharValue , there is an error occur because of msg buffer is not available.