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

Maximum value for ATT_MTU

Hi

When initialising BLE in the softdevice, the following value is used as part of enable_params:-

 * @brief BLE GATT initialization parameters.
 */
typedef struct
{
  uint16_t  att_mtu;          /**< Maximum size of ATT packet the SoftDevice can send or receive.
                                   If it is 0 then @ref GATT_MTU_SIZE_DEFAULT will be used.
                                   Otherwise @ref GATT_MTU_SIZE_DEFAULT is the minimum value.
                                   @mscs
                                   @mmsc{@ref BLE_GATTC_MTU_EXCHANGE}
                                   @mmsc{@ref BLE_GATTS_MTU_EXCHANGE}
                                   @endmscs
                              */
} ble_gatt_enable_params_t;

I know that the minimum (and default) size for ATT_MTU is 23 bytes as defined in ble_gatt.h:-

/** @brief Default MTU size, in bytes. */
#define GATT_MTU_SIZE_DEFAULT 23

However, there is no specification for the maximum size, so what is the maximum size that can be used?

I am using softdevice s132 v3.0.0 on nRF52.

Parents
  • Hi,

    The maximum should only be limited by the amount of RAM you want to set aside for it. Performance-wise, the throughput gain per byte of RAM starts to fall off when ATT_MTU gets much larger than the ATT overhead of 4 bytes. Many peers will also not be able to utilize enormous payloads, and will limit you to what they can support. There is also a limit on how long a packet can be on the air, so some amount of fragmentation will always happen once you pass that threshold.

    Currently, the full amount of RAM for the ATT_MTU is reserved for every possible link, but this is something that is likely to be changed in future releases.

Reply
  • Hi,

    The maximum should only be limited by the amount of RAM you want to set aside for it. Performance-wise, the throughput gain per byte of RAM starts to fall off when ATT_MTU gets much larger than the ATT overhead of 4 bytes. Many peers will also not be able to utilize enormous payloads, and will limit you to what they can support. There is also a limit on how long a packet can be on the air, so some amount of fragmentation will always happen once you pass that threshold.

    Currently, the full amount of RAM for the ATT_MTU is reserved for every possible link, but this is something that is likely to be changed in future releases.

Children
Related