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

Extends the MTU size in latest Zephyr

Hello everyone,

I am working on an nRF52-DK and getting familiar with Zephyr. In this process I am currently trying to extend the BLE MTU size beyond the default 23 bytes. However, I can't seem to get it working.

Here is the prj.conf:

# Basic Bluetooth configuration
# Activate the BLE layer, set as peripheral
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_GATT_CLIENT=y

# Set up device name and appearance
CONFIG_BT_DEVICE_NAME="Test"
# Appearance 833
CONFIG_BT_DEVICE_APPEARANCE=833

# Extends the L2CAP MTU
CONFIG_BT_HCI_ACL_FLOW_CONTROL=y
CONFIG_BT_L2CAP_RX_MTU=247
CONFIG_BT_L2CAP_TX_MTU=247

# 
CONFIG_BT_MAX_CONN=2
CONFIG_BT_MAX_PAIRED=1

Now, using BT_SMP extends the MTU to 65. And that works fine. But anything that I put beyond that does not work. Indeed, at first I didn't have BT_L2CAP_RX_MTU set in the file. So I added it to the conf file, like many past topics on the site showed. Plus, I found in zephyr/subsys/bluetooth/host/att_internal.c that the BT_ATT_MTU is defined (MIN(BT_L2CAP_RX_MTU, BT_L2CAP_TX_MTU)).

However, putting CONFIG_BT_L2CAP_RX_MTU with its dependencies gives me this warning message (to an error due to Kconfig warnings of course) when building, even after deleting the build folder:

warning: attempt to assign the value '247' to the undefined symbol BT_L2CAP_RX_MTU

I would be thankful for any help regarding this problem.

Best regards,

Parents Reply Children
No Data
Related