From cd9b60495d47c14bc6c49e5b7958c661fae82260 Mon Sep 17 00:00:00 2001 From: Scott Powell Date: Thu, 13 Feb 2025 20:22:56 +1100 Subject: [PATCH] * nrf52 BLE, increased MTU to 250 --- src/helpers/nrf52/SerialBLEInterface.cpp | 5 ++--- src/helpers/nrf52/SerialBLEInterface.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/helpers/nrf52/SerialBLEInterface.cpp b/src/helpers/nrf52/SerialBLEInterface.cpp index c6ca2f81..fc7d1302 100644 --- a/src/helpers/nrf52/SerialBLEInterface.cpp +++ b/src/helpers/nrf52/SerialBLEInterface.cpp @@ -1,12 +1,11 @@ #include "SerialBLEInterface.h" void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) { - _pin_code = pin_code; char charpin[20]; - sprintf(charpin, "%d", _pin_code); + sprintf(charpin, "%d", pin_code); Bluefruit.configPrphBandwidth(BANDWIDTH_MAX); - + Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU Bluefruit.begin(); Bluefruit.setTxPower(4); // Check bluefruit.h for supported values Bluefruit.setName(device_name); diff --git a/src/helpers/nrf52/SerialBLEInterface.h b/src/helpers/nrf52/SerialBLEInterface.h index 9824a9bd..d5555f56 100644 --- a/src/helpers/nrf52/SerialBLEInterface.h +++ b/src/helpers/nrf52/SerialBLEInterface.h @@ -9,7 +9,6 @@ class SerialBLEInterface : public BaseSerialInterface { bool oldDeviceConnected; bool checkAdvRestart; bool _isEnabled; - uint32_t _pin_code; unsigned long _last_write; struct Frame {