mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* nrf52 BLE, increased MTU to 250
This commit is contained in:
parent
7af8f4dfa3
commit
cd9b60495d
2 changed files with 2 additions and 4 deletions
|
|
@ -1,12 +1,11 @@
|
||||||
#include "SerialBLEInterface.h"
|
#include "SerialBLEInterface.h"
|
||||||
|
|
||||||
void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) {
|
void SerialBLEInterface::begin(const char* device_name, uint32_t pin_code) {
|
||||||
_pin_code = pin_code;
|
|
||||||
char charpin[20];
|
char charpin[20];
|
||||||
sprintf(charpin, "%d", _pin_code);
|
sprintf(charpin, "%d", pin_code);
|
||||||
|
|
||||||
Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);
|
Bluefruit.configPrphBandwidth(BANDWIDTH_MAX);
|
||||||
|
Bluefruit.configPrphConn(250, BLE_GAP_EVENT_LENGTH_MIN, 16, 16); // increase MTU
|
||||||
Bluefruit.begin();
|
Bluefruit.begin();
|
||||||
Bluefruit.setTxPower(4); // Check bluefruit.h for supported values
|
Bluefruit.setTxPower(4); // Check bluefruit.h for supported values
|
||||||
Bluefruit.setName(device_name);
|
Bluefruit.setName(device_name);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ class SerialBLEInterface : public BaseSerialInterface {
|
||||||
bool oldDeviceConnected;
|
bool oldDeviceConnected;
|
||||||
bool checkAdvRestart;
|
bool checkAdvRestart;
|
||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
uint32_t _pin_code;
|
|
||||||
unsigned long _last_write;
|
unsigned long _last_write;
|
||||||
|
|
||||||
struct Frame {
|
struct Frame {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue