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

Relationship between ATT_MTU and Gatt Attribute Max. Length

Hello all

 I've read various other threads concerning this topic, but I still can't wrap my head around it.

 What I think I understand of this topic:

  • ATT_MTU can be anything from 23 bytes and more. However is limited by the available RAM.
  • The ATT_MTU – 3 value defines the maximum data which can be sent via BLE in one application data packet
  • The ATT_MTU is negotiated during the pairing process, the smaller value of both devices is selected

My question now is: What is the GATT Attribute Max. Length for?

Consider the following scenario:

  1. I implement a new service and define a characteristic to use a length of 64 Bytes
  2. I set the ATT_MTU of my device to 128 Bytes (Just some random value greater than 64+3)
  3. I start the application and connect to another device
  4. An ATT_MTU of 23 Bytes is negotiated, because the other device has an ATT_MTU of 23
  • As far as I see it, I can’t use my characteristic with a length of 64 Bytes in this case. Is this correct?
  • If this is the case, why have the option to set a maximum length if it mainly depends on the dynamically set ATT_MTU size?

Related