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: How to config MTU and MPS size?

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

SDK: 7_10_00_35


Lets example that I have two requirements, which is:

1. Config MTU size as 250 bytes

2. Config MPS size as 240 bytes


and I have referred two topics here that mention:

1. MPS = MAXIMUM_PDU_SIZE CCS/CC2652R: How to change MPS (max payload size) in L2CAP Connection Oriented Channels - Bluetooth forum - Bluetooth®︎ - TI E2E support forums

2. MTU = MAXIMUM_PDU_SIZE - 4 CC2652R7: Setting MTU size - Bluetooth forum - Bluetooth®︎ - TI E2E support forums

So, I will have an assume that there is no option to config MPS and MTU separately.

When we config MAXIMUM_PDU_SIZE we will config for both MPS and MTU? And MPS will always greater than MTU in this case?

  • Hi,

    Thank you for reaching out to us. We will look into your questions and get back to you as soon as possible.

    Best Regards,

    Jan

  • Hi,

    First I recommand you to have a look at the User's guide, chapter Genetic attribute Profile (GATT) section Maximum Transmission Unit (MTU), it will provide a lot of information concerning your thread.

    Below is a graphics extracted from the Bluetooth Spec, it should also help.

    The maximum ATT _MTU size is fixed at 255-L2CAP Header size (which is 4 bytes), so you couldn't go up to 251bytes.

    Also, the ATT data are inside the PDU so yes both are linked and you have to set a MPS greater than MTU.

    regards,

  • hi, I have another concern, as TI specification, the ATT_MTU is not MTU.  Only ATT_MTU, when we set ATT_MTU = 65 then in sniffer we can see the MPS = 65.

    So MPS = ATT_ATU and MTU have to config via SW, not Sysconfig, right?

  • I'm not sure to fully understand your point, you set on sysconfig a MPS at 69, I assume that you're seeing on your sniffer is the ATT_MTU (MPS-4=65). ATT_MTU and MTU is basically the same thing.

    To correct my previous answer, it's possible to have an ATT_MTU size greater than the PDU size, but it will not improve the throughput, PDU it's literally the packet over the air, ATT_MTU is all the data you want to transmit. So you can remove the header for the next packet and slightly increase the ATT_MTU size but we do not recommand it.

    regards,

  • Sorry, I capture wrong message. it's show that MPS = 65. not ATT_MTU

  • Hello,

    That's a bit weird, I can't explain that without the full context of the BLE sniffer log. I'm thinking that it could be the MPS for the L2CAP layer. Thus the ATT_MTU size. The MPS L2CAP layer and the MPS of PDU could be different but both name MPS on your sniffer.

    regards,

  • Firstly, Master request ATT_MTU then Slave response ATT_MTU value

    Then L2CAP: master and slave negotiate MTU and MPS value. The minimum value of Master and Slave will be used.

    (65 is ATT_MTU, 512 is config in Application)

    After this time, all length of L2CAP layer is 65 as we config as ATT_MTU.

    So I assume that

    1. MPS = ATT_MTU and config through sysconfig

    2. MTU = config in Application

  • Hello,

    What is the configured MPS in the application? I'm thinking of that the ATT_MTU is divided in several different packets. The PDU size is the packet sent over-the-air, if you set an ATT_MTU larger than the MPS, you'll have more than one packet (PDU one). So here you fixed at 512 the ATT_MTU size but I need to know the configured MPS size to confirm my thoughts.

    regards,

  • currently I only config ATT_MTU = 65 in systemconfig and L2CAP buffer in Application = 512

    MPS also define as maximum PDU payload size, and we can see in previous picture that PDU payload size is 65 also. 

  • My apologies for the misunderstanding,

     You were right, MPS is the size for the L2CAP layer and I was confused with the PDU size itself.

    So, if we take a step back at your first question, it's possible to configure a larger MTU size than the MPS one (the Bluetooth spec allows it) but we do not support it, cause the throughput and the memory gains are to little.

    Hope I didn't confuse you too much and I apologies once again,

    Regards,

  • Don't worry about it. I'm also confuse it for the time and have to analyze many sites understand it.