From a6331691e855ed5c5de66fcba3ba1133929e45ad Mon Sep 17 00:00:00 2001 From: Piotr Narajowski Date: Wed, 18 Sep 2024 11:21:35 +0200 Subject: [PATCH] nimble/host: Truncate data in ble_eatt_tx Data packets sent over eatt chan weren't correctly truncated. Data packet is now adjusted to peer device's MTU for the channel. Fixes various GATT/SR test cases that verify support for Read Long Characteristic Value Requests, Multiple Read Characteristic Value Requests etc. --- nimble/host/src/ble_eatt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nimble/host/src/ble_eatt.c b/nimble/host/src/ble_eatt.c index c15f545b6..96666c9d0 100644 --- a/nimble/host/src/ble_eatt.c +++ b/nimble/host/src/ble_eatt.c @@ -476,6 +476,8 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct os_mbuf *txom) goto error; } + ble_att_truncate_to_mtu(eatt->chan, txom); + rc = ble_l2cap_send(eatt->chan, txom); if (rc == 0) { goto done;