Skip to content

Commit 77d737b

Browse files
authored
Merge pull request #2323 from txkbaldlaw/updated-companion-dfu-from-mt
Add support for Companion BLE OTA updates on nRF devices
2 parents d7a3d41 + 96a16c2 commit 77d737b

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

docs/faq.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ A list of frequently-asked questions and answers for MeshCore
8989
- [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)
9090
- [6.8. Q: WebFlasher fails on Linux with failed to open](#68-q-webflasher-fails-on-linux-with-failed-to-open)
9191
- [7. Other Questions:](#7-other-questions)
92-
- [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)
92+
- [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)
9393
- [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)
9494
- [7.2. Q: How to update ESP32-based devices over the air?](#72-q-how-to-update-esp32-based-devices-over-the-air)
9595
- [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:
783783
---
784784
## 7. Other Questions:
785785

786-
### 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?
786+
### 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?
787787

788788
**A:** The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms:
789789

790790
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`
791791
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)
792-
3. From the MeshCore app, login remotely to the repeater you want to update with admin privilege
792+
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
793793
4. Go to the Command Line tab, type `start ota` and hit enter.
794794
5. you should see `OK` to confirm the repeater device is now in OTA mode
795795
6. Run the DFU app,tab `Settings` on the top right corner
@@ -798,8 +798,14 @@ Allow the browser user on it:
798798
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
799799
11. If the device is not found, enable `Force Scanning` in the DFU app
800800
12. Tab the `Upload` to begin OTA update
801-
13. If it fails, try turning off and on Bluetooth on your phone. If that doesn't work, try rebooting your phone.
802-
14. Wait for the update to complete. It can take a few minutes.
801+
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.
802+
14. Wait for the update to complete. It can take a few minutes.
803+
15. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.
804+
16. To update a companion node over OTA, it must be running companion firmware v1.15 or greater.
805+
17. Please see the Meshcore Blog for additional information on OTA firmware flashing:
806+
- https://blog.meshcore.io/2026/04/06/otafix-bootloader
807+
- https://blog.meshcore.io/2026/04/02/nrf-ota-update
808+
803809

804810
#### 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?
805811
**A:** You can flash this safer bootloader to the Wio Tracker L1 Pro

src/helpers/nrf52/SerialBLEInterface.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ void SerialBLEInterface::begin(const char* prefix, char* name, uint32_t pin_code
177177

178178
Bluefruit.setEventCallback(onBLEEvent);
179179

180+
// Register DFU on the main BLE stack so paired clients can discover it
181+
// without switching the device into a separate OTA-only BLE mode first.
182+
bledfu.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
183+
bledfu.begin();
184+
180185
bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM);
181186
bleuart.begin();
182187
bleuart.setRxCallback(onBleUartRX);

src/helpers/nrf52/SerialBLEInterface.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#endif
99

1010
class SerialBLEInterface : public BaseSerialInterface {
11+
BLEDfu bledfu;
1112
BLEUart bleuart;
1213
bool _isEnabled;
1314
bool _isDeviceConnected;

0 commit comments

Comments
 (0)