mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
bleuart service stay registered first to prevent gatt cache issues on android when already paired
This commit is contained in:
parent
77d737beb9
commit
cfe4b0b9a5
1 changed files with 6 additions and 4 deletions
|
|
@ -177,15 +177,17 @@ void SerialBLEInterface::begin(const char* prefix, char* name, uint32_t pin_code
|
|||
|
||||
Bluefruit.setEventCallback(onBLEEvent);
|
||||
|
||||
bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
|
||||
bleuart.begin();
|
||||
bleuart.setRxCallback(onBleUartRX);
|
||||
|
||||
|
||||
|
||||
// Register DFU on the main BLE stack so paired clients can discover it
|
||||
// without switching the device into a separate OTA-only BLE mode first.
|
||||
bledfu.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
|
||||
bledfu.begin();
|
||||
|
||||
bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
|
||||
bleuart.begin();
|
||||
bleuart.setRxCallback(onBleUartRX);
|
||||
|
||||
Bluefruit.Advertising.addFlags(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE);
|
||||
Bluefruit.Advertising.addTxPower();
|
||||
Bluefruit.Advertising.addService(bleuart);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue