NCS v3.1.0 BLE Packets being fragmented to 27 bytes regardless of MTU. Data len update configs crash device on connection.

I am using a custom nRF52832 board with NCS v3.1.0 with the following BT configs:

# Enable Bluetooth
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_SMP=y

# Bluetooth buffer configuration
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_ACL_RX_SIZE=251
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_MAX_CONN=1
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_L2CAP_TX_MTU=247

At connection, the connection callback calls `bt_conn_le_param_update` and mtu is verified with `bt_gatt_exchange_mtu` which returns 247, however, when I monitor this on the bt central device the max tx octets is limited to 27.

I have tried enabling the following configs:

CONFIG_BT_DATA_LEN_UPDATE=y
CONFIG_BT_USER_DATA_LEN_UPDATE=y

And then manually trying to configure the max tx octets len with;

struct bt_conn_le_data_len_param param = {
.tx_max_len = 251,
.tx_max_time = 2120,
};
bt_conn_le_data_len_update(conn, &param);


However with either of the configs enabled, the device crashes when the central attempts connection:

ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:504
Controller unresponsive, command opcode 0x2032 timeout with err -11

Previously with an identical setup (excluding the two additional configs) running on NCS version 2.9.0 we were able to achieve data transfer with 247 byte MTU and no LL fragmentation.

The only difference I have noticed between the two build configurations is that on NCS 3.1.0 we get a deprecation warning for BT_CTLR being enabled, however this seems to be a dependency, and not directly user configured:

warning: Deprecated symbol BT_CTLR is enabled.

This warning is not present for NCS 2.9.0.


Here are some of the btmon logs:

> ACL Data RX: Handle 128 flags 0x02 dlen 7 #647 [hci0] 14.378418
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 247
< HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 #648 [hci0] 14.388969
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
> HCI Event: Command Status (0x0f) plen 4 #649 [hci0] 14.392854
LE Read Remote Used Features (0x08|0x0016) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 11 #650 [hci0] 14.438712
LE Data Length Change (0x07)
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Max TX octets: 27
Max TX time: 2120
Max RX octets: 27
Max RX time: 2120
> HCI Event: LE Meta Event (0x3e) plen 12 #651 [hci0] 14.438723
LE Read Remote Used Features (0x04)
Status: Success (0x00)
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Features: 0x2d 0x41 0x00 0x00 0x00 0x00 0x00 0x00
LE Encryption
Extended Reject Indication
Peripheral-initiated Features Exchange
LE Data Packet Length Extension
LE 2M PHY
Channel Selection Algorithm #2
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #652 [hci0] 14.440328
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 517
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #653 [hci0] 14.440515
ATT: Exchange MTU Request (0x02) len 2
Client RX MTU: 517
> HCI Event: Number of Completed Packets (0x13) plen 5 #654 [hci0] 14.453167
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> HCI Event: Number of Completed Packets (0x13) plen 5 #655 [hci0] 14.468349
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 7 #656 [hci0] 14.483309
ATT: Exchange MTU Response (0x03) len 2
Server RX MTU: 247
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #657 [hci0] 14.483710
ATT: Read Request (0x0a) len 2
Handle: 0x000b Type: Device Name (0x2a00)
> HCI Event: Number of Completed Packets (0x13) plen 5 #658 [hci0] 14.498257
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 18 #659 [hci0] 14.513363
ATT: Read Response (0x0b) len 13
Value: 416d75615f4134383331313931
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #660 [hci0] 14.513929
ATT: Read Request (0x0a) len 2
Handle: 0x000d Type: Appearance (0x2a01)
> HCI Event: Number of Completed Packets (0x13) plen 5 #661 [hci0] 14.528251
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 7 #662 [hci0] 14.543253
ATT: Read Response (0x0b) len 2
Value: 0000
< ACL Data TX: Handle 128 flags 0x00 dlen 11 #663 [hci0] 14.543761
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Server Supported Features (0x2b3a)
> HCI Event: Number of Completed Packets (0x13) plen 5 #664 [hci0] 14.558267
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> ACL Data RX: Handle 128 flags 0x02 dlen 9 #665 [hci0] 14.573279
ATT: Error Response (0x01) len 4
Read By Type Request (0x08)
Handle: 0x0001
Error: Attribute Not Found (0x0a)
< ACL Data TX: Handle 128 flags 0x00 dlen 11 #666 [hci0] 14.573822
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0001-0xffff
Attribute type: Database Hash (0x2b2a)
> HCI Event: Number of Completed Packets (0x13) plen 5 #667 [hci0] 14.588943
Num handles: 1
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Count: 1
> HCI Event: LE Meta Event (0x3e) plen 11 #668 [hci0] 14.588953
LE Data Length Change (0x07)
Handle: 128 Address: C7:06:DE:E6:FE:E3 (Static)
Max TX octets: 27
Max TX time: 2120
Max RX octets: 27
Max RX time: 2120

Parents Reply Children
No Data
Related