This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy Sound Service | SDK13+ | MAX_MTU_SIZE

Hello guys!

I'm trying to port the TSS service to one of my projects. This project is based on SDK13.1 while the Thingy is on SDK12.1

I have a lot of problems with a max MTU size. Somehow Thingy uses for a sound transfer a MTU of 276.

I tryed to use the same MTU size in a SDK13, but I'm blocked with

STATIC_ASSERT(NRF_BLE_GATT_MAX_MTU_SIZE <= 251);
STATIC_ASSERT(NRF_BLE_GATT_MAX_MTU_SIZE + LL_HEADER_LEN <= 255);

in nrf_ble_gatt.c.

Can anyone help me?

Parents
  • Hi,

    Seems like this is not a bug in the Thingy SDK after all. The SoftDevice actually support ATT MTU size up-to 512 bytes, but the on-air data packet length is 251 bytes. If the ATT packet cannot fit in a single on-air packet, it will be split up into multiple on-air packets. The current SDK version have therefore chosen to set a ATT MTU limit at 251 as well. This will avoid fragmentation of the ATT packet into several on-air data packets, and therefore often increase the data throughput. Note that the SDK will open up for longer ATT MTU sizes in the future.

Reply
  • Hi,

    Seems like this is not a bug in the Thingy SDK after all. The SoftDevice actually support ATT MTU size up-to 512 bytes, but the on-air data packet length is 251 bytes. If the ATT packet cannot fit in a single on-air packet, it will be split up into multiple on-air packets. The current SDK version have therefore chosen to set a ATT MTU limit at 251 as well. This will avoid fragmentation of the ATT packet into several on-air data packets, and therefore often increase the data throughput. Note that the SDK will open up for longer ATT MTU sizes in the future.

Children
Related