From 58fdc627225fb3e8c27f037c04d220c7765585d6 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Wed, 23 Oct 2024 08:35:11 +0100 Subject: [PATCH] Enlarge BLE transmission buffer to support split packets --- Bluetooth.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Bluetooth.h b/Bluetooth.h index 60cf86a..57bae7c 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -29,7 +29,8 @@ #elif MCU_VARIANT == MCU_NRF52 #include #include - BLEUart SerialBT; + #define BLE_MTU 512+3 + BLEUart SerialBT(BLE_MTU); BLEDis bledis; BLEBas blebas; bool SerialBT_init = false; @@ -436,7 +437,7 @@ char bt_devname[11]; cable_state = CABLE_STATE_DISCONNECTED; BLEConnection* conn = Bluefruit.Connection(conn_handle); conn->requestPHY(BLE_GAP_PHY_2MBPS); - conn->requestMtuExchange(512+3); + conn->requestMtuExchange(BLE_MTU); conn->requestDataLengthUpdate(); }