Bluetooth LE Fundamental, Lesson 3 Exercise 2 question about datalength and MTU settings

Dear Team,

into the Connection parameters chapeter of the Lesson 3 is stated that

The relation between data length and MTU is not one-to-one. On air, the data length can be up to 251 bytes, while the actual payload that you can send is a maximum of 244 bytes. This is because the 251 byte Data PDU payload needs an L2CAP Header of 4 bytes, and an Attribute header of 3 bytes. This leaves you with 251 – 4 – 3 = 244 bytes that you can actually populate with payload data.

but into the Exercise 2 at point 12 is written:

CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_CTLR_DATA_LENGTH_MAX
=251
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_L2CAP_TX_MTU=247

I've a doubt, but the CONFIG_BT_L2CAP_TX_MTU config should be set to 244 or this is set to 247 because the attribute header is not considered by this config?

Thanks and best regards.

F.

Related