Increasing MTU ATT to 1020 bytes generates a CMake error

Hi,

Using the central and peripheral uart samples I have found the following CMake error when trying to increase the MTU ATT to 1020 bytes.

The added lines to the prj.conf are:

CONFIG_BT_BUF_ACL_RX_SIZE=1024
CONFIG_BT_BUF_ACL_TX_SIZE=1024
CONFIG_BT_L2CAP_TX_MTU=1020
#CONFIG_BT_CTLR_DATA_LENGTH_MAX=1024

The CMake error as follows:

CMake Error at C:/v1.8.0/v1.8.0/zephyr/cmake/kconfig.cmake:270 (message):
  command failed with return code: 1

Any help?

Thanks

  • Hi Armand

    L2CAP packets are only limited by the 16-bit length field, which means they can be up to 65536 bytes long pr spec. 

    Attributes are limited to 512 bytes pr spec, so when running normal communication through ATT there is little need for an MTU larger than 515 bytes (512 bytes for data and 3 bytes for the attribute header). 

    If you bypass ATT and open an L2CAP Connected Oriented Channel you are not limited to 512 bytes, but the practical implication on data throughput will not be very large since the link layer still needs to fragment the packets into 251 byte payloads over the air. 

    Best regards
    Torbjørn

Related