From 505e4e81764d0ae71cbe4fba904f24fee527a6c9 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Wed, 12 Oct 2022 07:55:17 -0500 Subject: [PATCH] Run dfu begin first (#1786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thomas Göttgens --- src/platform/nrf52/NRF52Bluetooth.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index bfa3887ed..0347c2b02 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -244,6 +244,8 @@ void NRF52Bluetooth::setup() Bluefruit.Periph.setConnectCallback(onConnect); Bluefruit.Periph.setDisconnectCallback(onDisconnect); + bledfu.begin(); // Install the DFU helper + // Configure and Start the Device Information Service DEBUG_MSG("Configuring the Device Information Service\n"); bledis.setModel(optstr(HW_VERSION)); @@ -254,7 +256,7 @@ void NRF52Bluetooth::setup() DEBUG_MSG("Configuring the Battery Service\n"); blebas.begin(); blebas.write(0); // Unknown battery level for now - bledfu.begin(); // Install the DFU helper + // Setup the Heart Rate Monitor service using // BLEService and BLECharacteristic classes