Merge pull request #2323 from txkbaldlaw/updated-companion-dfu-from-mt

Add support for Companion BLE OTA updates on nRF devices
This commit is contained in:
Liam Cottle 2026-04-18 12:17:16 +12:00 committed by GitHub
commit 77d737beb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 5 deletions

View file

@ -177,6 +177,11 @@ void SerialBLEInterface::begin(const char* prefix, char* name, uint32_t pin_code
Bluefruit.setEventCallback(onBLEEvent);
// 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);

View file

@ -8,6 +8,7 @@
#endif
class SerialBLEInterface : public BaseSerialInterface {
BLEDfu bledfu;
BLEUart bleuart;
bool _isEnabled;
bool _isDeviceConnected;