From 1314c42ad360b4101a17fd6bfb93d792d856d048 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Wed, 23 Oct 2024 16:44:39 +0100 Subject: [PATCH] Fix RX buffer BLE issue for good --- Bluetooth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bluetooth.h b/Bluetooth.h index 57bae7c..fddaef7 100644 --- a/Bluetooth.h +++ b/Bluetooth.h @@ -29,8 +29,8 @@ #elif MCU_VARIANT == MCU_NRF52 #include #include - #define BLE_MTU 512+3 - BLEUart SerialBT(BLE_MTU); + #define BLE_RX_BUF 6144 + BLEUart SerialBT(BLE_RX_BUF); BLEDis bledis; BLEBas blebas; bool SerialBT_init = false; @@ -437,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(BLE_MTU); + conn->requestMtuExchange(512+3); conn->requestDataLengthUpdate(); }