Repository navigation
Conversation
When the bootloader version starts with "gdfu-", reply with the GDFU beacon target_id and reset into the bootloader after 2 s instead of starting the BLE DFU service, which a GDFU image does not provide.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update repeaters from the bottom of the hill
nRF52: reboot straight into the GDFU bootloader on
start otaThe best repeaters sit on rooftops, towers and hilltops. Those are also the hardest nodes to maintain. BLE DFU only reaches a few metres, so every firmware release means another trip, a ladder, a weatherproof enclosure to open, or a key to someone else's roof. In practice many remote repeaters stay on old firmware because nobody wants to make that trip.
GDFU (GFSK Device Firmware Update) moves the update onto a sub-GHz radio link. Your phone talks Bluetooth to a small proxy next to you, and the proxy sends the firmware to the repeater over GFSK. With line of sight and suitable antennas, you can update a hilltop repeater from the car park or the valley below it. The repeater never comes down. In real-world tests with this bootloader, updates have worked at distances of more than 1 km.
A few things make it suitable for repeaters specifically:
More information.
How it fits together
The proxy and the repeater have to use the same radio profile (433.175 MHz or 864.1 MHz, GFSK 80 kbps).
What this PR changes
One change in
NRF52Board::startOTAUpdate(). If the bootloader version string starts withgdfu-,start otadoes this:OK: 0x<target_id>. The ID is the low 32 bits of the BLE MAC (NRF_FICR->DEVICEADDR[0]), the same value the GDFU bootloader puts in its beacon, so you can match this node to a target in the app.enterOTADfu()on a 2 s software timer, so the reply still goes out over the mesh before the reset.With any other bootloader the function behaves exactly as it does today.
Why it is needed
A GDFU bootloader image ships a single OTA transport. With GFSK enabled, BLE OTA is not built in. Today
start otabrings up the Bluefruit DFU service and waits for a BLE client, which can't work with this bootloader. Nothing on the GFSK side ever hears about it. The only way to reach the GDFU bootloader would be a double-tap of reset or a USB connection, which defeats the point of updating a node you can't touch.The bootloader already reports its version through
getBootloaderVersion(), so the firmware can detect GDFU at runtime. Board variants and existing installs need no build flag or configuration change.