From b898e7a04eb43f6ace9b64dc508aa75d12c68246 Mon Sep 17 00:00:00 2001 From: txkbaldlaw Date: Thu, 16 Apr 2026 16:04:30 -0500 Subject: [PATCH 1/3] Add DFU to BLE Stack --- src/helpers/nrf52/SerialBLEInterface.cpp | 5 +++++ src/helpers/nrf52/SerialBLEInterface.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/helpers/nrf52/SerialBLEInterface.cpp b/src/helpers/nrf52/SerialBLEInterface.cpp index 5a3017af45..c7c211a3f7 100644 --- a/src/helpers/nrf52/SerialBLEInterface.cpp +++ b/src/helpers/nrf52/SerialBLEInterface.cpp @@ -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); diff --git a/src/helpers/nrf52/SerialBLEInterface.h b/src/helpers/nrf52/SerialBLEInterface.h index e2fc6cb95f..de1030548f 100644 --- a/src/helpers/nrf52/SerialBLEInterface.h +++ b/src/helpers/nrf52/SerialBLEInterface.h @@ -8,6 +8,7 @@ #endif class SerialBLEInterface : public BaseSerialInterface { + BLEDfu bledfu; BLEUart bleuart; bool _isEnabled; bool _isDeviceConnected; From 4f9764b1b455c4e6c85d0ec5b5c6fdcd9f822917 Mon Sep 17 00:00:00 2001 From: txkbaldlaw Date: Fri, 17 Apr 2026 10:56:51 -0500 Subject: [PATCH 2/3] Update FAQ to include Companion OTA DFU updates --- docs/faq.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index 560e3f629b..3cf93c5683 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -89,7 +89,7 @@ A list of frequently-asked questions and answers for MeshCore - [6.7. Q: My RAK/T1000-E/xiao\_nRF52 device seems to be corrupted, how do I wipe it clean to start fresh?](#67-q-my-rakt1000-exiao_nrf52-device-seems-to-be-corrupted-how-do-i-wipe-it-clean-to-start-fresh) - [6.8. Q: WebFlasher fails on Linux with failed to open](#68-q-webflasher-fails-on-linux-with-failed-to-open) - [7. Other Questions:](#7-other-questions) - - [7.1. Q: How to update nRF (RAK, T114, Seed XIAO) repeater and room server firmware over the air using the new simpler DFU app?](#71-q-how-to-update-nrf-rak-t114-seed-xiao-repeater-and-room-server-firmware-over-the-air-using-the-new-simpler-dfu-app) + - [7.1. Q: How to update nRF (RAK, T114, Seed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app?](#71-q-how-to-update-nrf-rak-t114-seed-xiao-companion-repeater-and-room-server-firmware-over-the-air-using-the-new-simpler-dfu-app) - [7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?](#711-q-can-i-update-seeed-studio-wio-tracker-l1-pro-using-ota) - [7.2. Q: How to update ESP32-based devices over the air?](#72-q-how-to-update-esp32-based-devices-over-the-air) - [7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)?](#73-q-is-there-a-way-to-lower-the-chance-of-a-failed-ota-device-firmware-update-dfu) @@ -783,13 +783,13 @@ Allow the browser user on it: --- ## 7. Other Questions: -### 7.1. Q: How to update nRF (RAK, T114, Seed XIAO) repeater and room server firmware over the air using the new simpler DFU app? +### 7.1. Q: How to update nRF (RAK, T114, Seed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app? **A:** The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms: 1. Download nRF's DFU app from iOS App Store or Android's Play Store, you can find the app by searching for `nrf dfu`, the app's full name is `nRF Device Firmware Update` 2. On flasher.meshcore.co.uk, download the **ZIP** version of the firmware for your nRF device (e.g. RAK or Heltec T114 or Seeed Studio's Xiao) -3. From the MeshCore app, login remotely to the repeater you want to update with admin privilege +3. If updating a companion, skip to step 6 below. If updating a repeater or room server, from the MeshCore app, login remotely to the repeater you want to update with admin privilege 4. Go to the Command Line tab, type `start ota` and hit enter. 5. you should see `OK` to confirm the repeater device is now in OTA mode 6. Run the DFU app,tab `Settings` on the top right corner @@ -798,8 +798,13 @@ Allow the browser user on it: 10. Select the device you want to update. If the device you want to update is not on the list, try enabling`OTA` on the device again 11. If the device is not found, enable `Force Scanning` in the DFU app 12. Tab the `Upload` to begin OTA update -13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. -14. Wait for the update to complete. It can take a few minutes. +13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the "Enabling Bootloader" step, try forgetting the NRF board in your IOS or Andriod device's bluetooth settings and re-pair it through the DFU app. +14. Wait for the update to complete. It can take a few minutes. +15. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX. +16. Please see the Meshcore Blog for additional information on OTA firmware flashing: + - https://blog.meshcore.io/2026/04/06/otafix-bootloader + - https://blog.meshcore.io/2026/04/02/nrf-ota-update + #### 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA? **A:** You can flash this safer bootloader to the Wio Tracker L1 Pro From 96a16c238abb11dbca959be2660af3e4a55bafc9 Mon Sep 17 00:00:00 2001 From: txkbaldlaw Date: Fri, 17 Apr 2026 16:17:12 -0500 Subject: [PATCH 3/3] Additional Update to FAQs regarding Companion OTA --- docs/faq.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index 3cf93c5683..c27561e493 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -801,7 +801,8 @@ Allow the browser user on it: 13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the "Enabling Bootloader" step, try forgetting the NRF board in your IOS or Andriod device's bluetooth settings and re-pair it through the DFU app. 14. Wait for the update to complete. It can take a few minutes. 15. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX. -16. Please see the Meshcore Blog for additional information on OTA firmware flashing: +16. To update a companion node over OTA, it must be running companion firmware v1.15 or greater. +17. Please see the Meshcore Blog for additional information on OTA firmware flashing: - https://blog.meshcore.io/2026/04/06/otafix-bootloader - https://blog.meshcore.io/2026/04/02/nrf-ota-update