CC2640R2F: Set MAX_PDU_SIZE 255 but Payload not 251

Part Number: CC2640R2F

Tool/software:

Hi,

Why I set MAX_PDU_SIZE = 255 I sent packet data 251 bytes, but payload remain 248 and spilt packet not 251 bytes in 1 time

and I try set MAX_PDU_SIZE = 251 I sent packet data 251 bytes, but payload remain 244 and spilt packet not 247 bytes in 1 time

From ATT_MTU=MAX_PDU_SIZE-L2CAP_HDR_SIZE or ATT_MTU(251) = MAX_PDU_SIZE(255) - L2CAP_HDR_SIZE(4) Follow figure below

I found note follow figure below I see about (ATT_MTU-3) bytes results. I don't know if this is related to the problems we're facing right now.

I use CCS version 10.1.1.00004 

software project Simple serial socket Server

Copyright (c) 2020, Texas Instruments Incorporated

SDK: 5.30.1.11

Thank,

Vasu Khwanyuen

  • Hello Vasu,

    As per the Bluetooth specs and our API guide (here):

    "The Read Response only contains a Characteristic Value that is less than or equal to (ATT_MTU - 1) octets in length. If the Characteristic Value is greater than (ATT_MTU - 1) octets in length, the Read Long Characteristic Value procedure may be used if the rest of the Characteristic Value is required."

    So, when you set MAX_PDU_SIZE = 255, your ATT_MTU = 251. Therefore, the maximum size of the packet itself that is transmitted can be 251, however the maximum size of the value you are trying to send is limited to (ATT_MTU - 1), or 250 bytes in this case. If you try to send data equal to or larger than ATT_MTU, you will get split packets as you are seeing now.

    Thanks,

    Eshaan

  • Hi,

    Since I haven't heard anything back, I will assume issue has been resolved and close the ticket. Thanks!

    Eshaan