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.

CC2340R5: Missing data during transfer.

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi all,

I have a project modify from data_stream example, and used simplelink_lowpower_f3_sdk_8_10_01_02.

I have another device write data to BLE uart, then ble send over data to simplelink connect. I add flow control in this project, and confirmed it works.

Now I got a problem, I send 10 times data without delay, each time send 100 bytes, simplelink connect sometimes receive less than 80% data.

I haven't got any process during read code. Is there any way to make transfer data reliable?

Thank you!

  • Hello Xuefeng,

    Thanks for reaching out.

    May I ask what do you mean by "without delay", what is your connection interval?

    Regarding the write request of 100 bytes, you may want to take a look at this function (instead of the normal Gatt_write): GATT_WriteLongCharDesc(), which is used when the Characteristic Value is longer than can be sent in a single Write Request Attribute Protocol message and therefore it segments it.

    In addition, you can take a look at the UART over BLE example from our Github repository (however it has not been migrated to 8.10 yet): https://github.com/TexasInstruments/ble_examples/tree/simplelink_low_power_f3_sdk-7.20/examples/rtos/LP_EM_CC2340R5/ble5stack/data_stream_UART_over_BL. This section of the user guide can help you with the migration (link) efforts if needed.

    BR,

    David.

  • Hi David,

    I have tested with the Uart over BLE sample, it have same error when baudrate over 115200, but we need the 921600 baudrate.

    Here's a result pictures, I fill the array with 90 ascII from 0x21 to 0x7A

    Please help how to fix this without delay.

  • Hello Xuefeng,

    Are you using the GATT_WriteLongCharDesc() function instead of the normal Gatt_write function? Apologies if my previous message was misleading, the UART over BLE example from our Github repository does not implement this functionality however is sets up the project for transmitting serial data over BLE.

    BR,

    David.

  • Hi David,

    I am not clear about how to instead normal Gatt_write with GATT_WriteLongCharDesc().

    And I think use which write function should be auto select by SDK.

  • Hello Xuefeng,

    Could we please try the following:

    • Increase the PDU size using SysConfig to the max 255.                                                                                            
    • I may be worth checking with a Bluetooth sniffer if the tx payload is actually around 255 to discard an issue on the central device (phone).
    • I would like us to confirm what length we are allocating for each notification. Have the function where we call GATT_Notification() will be helpful as well. You should be able to see how much is being allocated by looking at noti.len = allocLen; (this will most likely be inside the data_stream_server.c)

    If you are using the phone as the central/client device then this should work fine. The GATT_WriteLongCharDesc() makes sense when transmitting long data from the central to the peripheral (phone as central/client should be able to take care of it), apologies for the misunderstanding here.

    BR,

    David.