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.

CC2640R2F: How to increase the payload of trasmitted data in 4x4 Project Zero Based BLE

Part Number: CC2640R2F

Hello, 

I am trying to send some data from my custom 4x4 CC2640R2F board and am currently able to Advertise, establish connection and send a few bytes of data using multiple characteristics in my service,, ie payloads of various lengths.

I was using BLEScanner to view the transmitted packets, and have now shifted to nRF Connect app.

However, I have 3 questions:

1 - In Bluetooth Low Energy Software Developer's Guide in Section 5.5.2.1 Configuring for Larger MTU Values "the stack can be configured to support a MAX_PDU_SIZE up to 255 bytes"  (The maximum ATT_MTU size is always 4 bytes less than the value of the MAX_PDU_SIZE, so 251) . So am I wrong in understanding that in blestack (bluetooth 4) I can transmit up to 251 packets of 1B in each transmission? 

2 - I have 4 separate Service Characteristics for which I am using 4 different lengths of transmission buffers. I am seeing a mismatch in the number of data bytes I am transmitting vs the number of bytes updating when the data is updated in the apps 9both BLEScanner and nRF Connect)

Note: Size of 1st characteristic data length is 128B and 2nd characteristic length is 64 B

  1.  In the image below, I have flashed the custom board and just enabled Notification, and Read

These are exactly 128 and 64 B in the 1st and 2nd characteristics.

         2. Now I started sending data from my sensors on board and the following change happens:

As you can see I am able to see only 20 B of data while in the continuous Rx mode

3. After I Disconnect and Reconnect with the custom board on the nRF app itself, I am able to see all 128 and 64 B again from the previous connection as seen below:

So my 2nd question is that am I just not able to see all 128 and 64B in the nRF app or is the data really not being transmitted/received.

3 - Also, in case I want to increase the payload to 240B, is it possible? If yes, what modifications need to be done?

Please let me know if any other information is required, thanks!

Regards,

Ritoo

  • Hi Ritoo, 

    Thanks for reaching out! Could you share what version of the SDK you have installed and which project you are currently working off of?

    Best regards,

    Luke

  • Sure,

    The SDK I am currently using is "simplelink_cc2640r2_sdk_5_30_00_03".

    regards,

    Ritoo

  • Hi Ritoo,

    I suspect you are running to memory issues. I suggest to not enable notification. Just read the value. Enabling notification adds to memory consumption.

    Also, if reading 128 bytes works but not 128 bytes plus another 64 bytes, then you are encounter memory issues.

    If you want to send 128 + 64 bytes, what you can do is send the data in fragments. Meaning send 128 bytes. After that send another 128 bytes. You can also send 4 x 64 bytes. But, you need to send example the 64 bytes in a format with a header and footer. After receiving all the data at smart phone side you need to decode it.

    -kel