Skip to content

feat(firmware): link OTAFIX bootloader from slow-DFU success screen#5917

Merged
jamesarich merged 1 commit into
mainfrom
claude/distracted-wu-eaf1e9
Jun 23, 2026
Merged

feat(firmware): link OTAFIX bootloader from slow-DFU success screen#5917
jamesarich merged 1 commit into
mainfrom
claude/distracted-wu-eaf1e9

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Why

#5915 detects a low-speed (MTU-capped) nRF52 BLE DFU transfer — a stock Adafruit bootloader negotiates only ATT MTU 23, capping Legacy DFU at 20-byte packets (~3.7 KB/s; a ~785 KB image takes ~3.5 min). It shows an in-upload hint naming the OTAFIX bootloader, which grants a high MTU (244-byte packets, ~10× faster). But that hint had no link, so users had no actionable path to the fix.

A link can't live on the upload screen: opening a browser backgrounds the app mid-DFU, which can drop the BLE link and brick a half-written image (the screen runs KeepScreenOn and traps back-nav for exactly this reason), and you can't flash a new bootloader mid-transfer anyway. So the actionable "Learn more" link lives on the Success screen — shown only when the just-finished transfer was low-speed, once it's safe to leave the app and the user has just felt the slowness.

Changes

🌟 The firmware-update Success screen now offers a one-time OTAFIX upgrade tip with a "Learn more" link, but only after a slow (MTU-capped) DFU transfer.

🛠️ FirmwareUpdateState.Success now carries a wasLowSpeedTransfer flag, set from transport.isLowSpeedTransfer in SecureDfuHandler and threaded through verifyUpdateResult. The tip follows the actual negotiated MTU rather than a static per-device guess (a board already running OTAFIX isn't slow), so no new device flag was added. Reuses the existing firmware_update_slow_bootloader_hint and learn_more strings — no new string resources.

The link points at the OTAFIX README because meshtastic.org's nRF52 docs don't yet document OTAFIX or the bootloader-dependent transfer speed (a docs PR upstream would let this point at meshtastic.org later).

Testing Performed

  • ./gradlew spotlessCheck detekt assembleDebug test allTests — all pass.
  • Updated the 3 firmware tests that construct FirmwareUpdateState.Success for the new data-class constructor; existing post-success state-transition assertions still pass.
  • The new tip is a single if (wasLowSpeedTransfer) branch in SuccessState (not separately screenshot-tested). Not yet verified on real OTAFIX 2.1 hardware — only a stock-bootloader RAK4631 was available; confirming the high-MTU path engages on an OTAFIX unit remains a follow-up.

Builds on #5915, which detects a low-speed (MTU-capped) nRF52 BLE DFU
transfer and shows an in-upload hint naming the OTAFIX bootloader. That
hint had no link, leaving users no actionable path to the ~10x speedup.

A link can't go on the upload screen: opening a browser backgrounds the
app mid-DFU, which can drop the BLE link and brick a half-written image
(the screen keeps itself on and traps back-nav for exactly this reason),
and you can't flash a new bootloader mid-transfer anyway. So the
actionable "Learn more" link lives on the Success screen, shown only
when the just-finished transfer was low-speed.

FirmwareUpdateState.Success now carries a wasLowSpeedTransfer flag, set
from transport.isLowSpeedTransfer and threaded through verifyUpdateResult,
so the tip follows the actual negotiated MTU rather than a static
per-device guess (a board already running OTAFIX isn't slow). Reuses the
existing slow-bootloader-hint and learn_more strings; no new flag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Jun 23, 2026
@jamesarich jamesarich enabled auto-merge June 23, 2026 18:32
@jamesarich jamesarich added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 60b7908 Jun 23, 2026
22 checks passed
@jamesarich jamesarich deleted the claude/distracted-wu-eaf1e9 branch June 23, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant