Repository navigation
fix(4g): make 4G reachable — dongle probe is the gate, re-enable Mini 4 Pro - #40
Merged
Merged
Conversation
…i 4 Pro
The 4G model gate could never pass for ANY aircraft:
- Guard 1 rejected serials < 6 chars, but probeSerial()'s model-code fallback
("WA341") is exactly 5 chars, so it was always rejected as "too short".
- Guard 2 did serial.take(5), but probeSerial() prefers the full 1581...
factory serial, whose first 5 chars ("1581x") are never a model code.
Full serial -> failed Guard 2; short model code -> failed Guard 1. 4G was
unreachable regardless of hardware.
Fix:
- is4gDonglePresent() (/duss/mb/0x205 socket) is now the single authoritative
gate: if the cellular module is attached, proceed.
- Require only a non-empty serial for the payload (drop the bogus length floor).
- Demote the model allowlist to an advisory log note; extract a W[AM]xxx code
from anywhere in the serial (or nothing) instead of assuming take(5).
- Re-add wa140 (Mini 4 Pro): DJI's Cellular Dongle 2 is officially compatible
with Mini 4 Pro (with the 4G mounting kit), Air 3, Air 3S, Matrice 4T/4E, so
the earlier "Mini has no cellular" exclusion was wrong.
- Fix the misleading "only on Mavic 4 Pro / Matrice / Inspire 3" message.
Send-only behavior unchanged (NO_ACK, unverifiable); FCC path untouched.
Needs on-hardware confirmation on a real dongle-equipped aircraft.
This was referenced Aug 9, 2026
Closed
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.
The bug: 4G could never activate on any aircraft
The model gate in
send4gActivationFrames()was self-contradictory:< 6chars. ButprobeSerial()'s model-code fallback returns exactly 5 chars (WA341,WM630,WA140) → always rejected as "too short."serial.take(5). ButprobeSerial()prefers the full1581…factory serial, whose first 5 chars are"1581x"→ never in the allowlist.So a full serial failed Guard 2, and a short model code failed Guard 1. 4G activation was unreachable regardless of hardware — this is why "make 4G work" kept hitting a wall.
Fix
is4gDonglePresent()is now the single authoritative gate. If the/duss/mb/0x205abstract socket is connectable, a cellular module is attached — that's ground truth, unlike a hardcoded model list that can't even be extracted from a1581…serial.W[AM]xxxcode anywhere in the serial (or nothing) — never a hard block.wa140(Mini 4 Pro). DJI's Cellular Dongle 2 is officially compatible with the Mini 4 Pro (with the 4G mounting kit), Air 3, Air 3S, Matrice 4T/4E. The prior "Mini has no cellular" exclusion was factually wrong.Safety
assembleRelease+testDebugUnitTestgreen.This makes 4G reachable; whether the Mini 4 Pro actually activates must be confirmed on a real dongle-equipped aircraft before cutting a release.