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.

[2650] Overlapped Processing to achieve Higher Data Throughput with Single BLE Connection

Other Parts Discussed in Thread: CC2541, CC2640, CC2650

Hi All,

We are trying to achieve a Data Throughput rate of 125 Samples Per Second (SPS) on SmartRF06 Evaluation Board having CC2650EM Module.

We are initializing a Clock Instance:

Util_constructClock( &clockEvtTest, Sample_clockHandler, 8, 0, false, EVT_TEST);

So the '8' above is for 8ms.

When we create a connection i.e. on GAPROLE_CONNECTED callback, we are using:

Util_startClock(&clockEvtTest);

to start this EVT_TEST to start pumping the data.

We are sending the data on 2 characteristics on every EVT_TEST. Each data packet is having 20 bytes of data (maximum allowed by the Application). So we are sending total of 40 bytes (20 bytes on each characteristics).

We have kept the Connection Interval of 20ms (We already tried to check the Data throughput by changing Connection Interval to 10ms, 80ms, 100ms - but the results were even worst with Packet Loss).

But when we connect with the BLE Device Monitor, we are seeing a Sample Rate of ~85.

We have used CC2541 and we were able to achieve a Sample Rate of ~120 to ~123 by enabling the OVERLAPPED_PROCESSING by using the below functions:

LL_EXT_OverlappedProcessing(LL_EXT_ENABLE_OVERLAPPED_PROCESSING);
HCI_EXT_OverlappedProcessingCmd(HCI_EXT_ENABLE_OVERLAPPED_PROCESSING);

But these functions are not available for CC26xx as mentioned in the SimpleLink™ Bluetooth® low energy CC2640 wireless MCU manual. We were expecting better results on this CC2650 platform since it has RTOS.

So can you please let us know a way to tweak and/or configure anything to achieve a Sample Rate of 125 or more or is it not possible to do so for this kind of higher throughput.

Thanks,
Sunny

  • Hello Sunny,

    Have you reviewed the CC2640 High Throughput example on the BLE Wiki? The tips in this example should help your application achieve higher throughput. Also, taking a corresponding air sniffer trace is advisable.

    Note that Overlapped Processing is enabled by default in the CC2640 BLE Controller, so the legacy API is not implemented.

    Best wishes
  • Dear JXS,

    Thank you for the reply.

    I ported the Patch code to my custom project but I got compilation errors.

    So I ported the Patch code to SimpleBLEPeripheral and got the same compilation errors as I got in my custom project.

    Below are the errors:

    Description Resource Path Location Type

    #137 union "<unnamed>" has no field "flowCtrlEvt" simpleBLEPeripheral.c /SimpleBLEPeripheral/Application line 732 C/C++ Problem --> pMsg->msg.flowCtrlEvt.opcode

    #141 too many arguments in function call simpleBLEPeripheral.c /SimpleBLEPeripheral/Application line 713 C/C++ Problem --> HCI_EXT_ConnEventNoticeCmd(pMsg->connHandle, selfEntity, SBP_CONN_EVT_END_EVT)

    #141 too many arguments in function call simpleBLEPeripheral.c /SimpleBLEPeripheral/Application line 776 C/C++ Problem --> HCI_EXT_ConnEventNoticeCmd(pMsg->connHandle, selfEntity, SBP_CONN_EVT_END_EVT)

    #20 identifier "appEvtHdr_t" is undefined simpleBLEPeripheral.c /SimpleBLEPeripheral/Application line 144 C/C++ Problem

    #20 identifier "ATT_FLOW_CTRL_VIOLATED_EVENT" is undefined simpleBLEPeripheral.c /SimpleBLEPeripheral/Application line 725 C/C++ Problem

    #20 identifier "pfnBMAlloc_t" is undefined bleUserConfig.h /SimpleBLEPeripheral/ICallBLE line 343 C/C++ Problem

    #20 identifier "pfnBMAlloc_t" is undefined bleUserConfig.h /SimpleBLEPeripheral/ICallBLE line 359 C/C++ Problem

    #20 identifier "pfnBMFree_t" is undefined bleUserConfig.h /SimpleBLEPeripheral/ICallBLE line 344 C/C++ Problem

    #20 identifier "pfnBMFree_t" is undefined bleUserConfig.h /SimpleBLEPeripheral/ICallBLE line 360 C/C++ Problem

    Can you please let us know where to find the definition of the structure / functions.

    I checked the TI_BLE_Vendor_Specific_HCI_Guide.pdf and found that HCI_EXT_ConnEventNoticeCmd only takes 2 arguments, but the Patch code provided at the link gives 3 arguments. We changed the number of arguments to two as per the Guide and that error is now resolved.

    But the question is whether that is correct or the Patch code is correct ?

    OBSERVATION:
    As per the TI BLE Wiki for Higher Througput, it is mentioned that we can increase the MAX_PDU_SIZE upto 255.

    But if I update the macro to 162 or 255, I am getting "Characteristics description discovery timeout" with BLE Device Monitor.
    For this I have kept the HEAPMGR_SIZE=6000 (as mentioned in the TI Wiki) and HEAPMGR_SIZE=2672 (default for SimpleBLEPeripheral).

    The Connection Interval that we are using is 20ms.
    I also checked by changing the Connection Interval to 200ms, but the same issue is observed - "Characteristics description discovery timeout" with BLE Device Monitor.

    Awaiting your reply.

    Thanks,
    Sunny

  • Hello Sunny,

    It appears you are referencing an older version of the TI_BLE_Vendor_Specific_HCI_Guide.pdf from BLE 2.0. The Throughput patch is for BLE 2.1; this probably explains your build errors as well. Also, BLE 2.0 had an erratum related to using a larger MTU size, hence the guidance it to update your system to BLE 2.1 (released e/o July 2015).

    Finally, I don't see that BLE Device Monitor does a MTU Exchange (the tool doesn't really need larger MTU sizes for what it is designed for), so I'm not sure this tool would be the best option for your throughput setup. You can use BTool or do a custom implementation using HCITester with custom HCI scripts.

    Best wishes
  • Hi JXS,

    Thanks for your reply and sorry for reverting back late.

    I have downloaded the new stack and am currently porting my changes here.

    If any issues regarding the Overlapped Processing then I will re-open this thread.

    Thanks,
    Sunny