DJI dock firmware
ARGUS hosts firmware binaries in S3 and pushes them to paired docks (and
their aircraft) over the DJI Cloud API ota_create service. The pipeline
lives under Admin → DJI management → Firmware.
Who can upload
Firmware upload is admin-only. Operators see the firmware version in the dock tile but cannot initiate an upgrade.
Upload flow
When an admin picks a firmware file in Admin → DJI → Firmware → Upload:
- ARGUS requests a 10-minute presigned S3 PUT URL from the API. The short TTL bounds the window for a credential leak.
- The browser reads the file and computes MD5 client-side (big files stream through the Web Crypto subtle digest — no load into memory).
- The browser uploads directly to S3 via the presigned URL. No bytes round-trip through ARGUS.
- After upload, the API runs an
S3.HeadObjectCommandto confirm the object exists at the expected size. If the HEAD fails, the S3 key is deleted and the upload is rejected. - The API mints a 6-hour presigned GET URL (long enough to cover the
dock’s download + retries) and writes a
dji_firmware/{id}Firestore doc with:- file name, size, SHA, MD5;
- product version + firmware version strings pulled from the filename
(DJI’s convention — e.g.
WM265E_07.01.10.05.zip); - target domain (
aircraft/dock); - uploader uid + timestamp;
- the presigned GET URL (regenerated on re-push if it expires).
Push to device
- In the firmware list, pick the row and click Push to device.
- Confirm the target: dock, aircraft, or both (determined by the firmware filename).
- ARGUS calls
POST /api/dji/docks/{sn}/firmware/upgradewith adevices[]array (one entry each for the dock SN and aircraft SN, withproduct_version+firmware_version). - argus-dji publishes the DJI
ota_createMQTT service with the presignedfile_url,md5, andfile_size. - The dock downloads the binary, verifies MD5, and begins install. When the target is the aircraft, the dock installs to the aircraft on next presence.
Status pipeline
The dji_docks/{sn}.firmwareUpgrade subfield tracks progress; the
firmware tab renders it as a labelled progress bar:
| Status | Meaning |
|---|---|
queued | The push was accepted; the dock hasn’t started yet. |
downloading | Dock is pulling the binary from the presigned URL. Progress percent is byte-level. |
verifying | Dock is verifying MD5 against the manifest. |
installing | Flash write in progress. Do not power-cycle the dock during this phase. |
completed | Install finished. The dock usually reboots at this point. |
failed | See lastError — usually a DJI error code (e.g. 50001 bad MD5). |
Progress updates arrive as DJI ota_progress events on
thing/product/{sn}/events and are mirrored into Firestore by
argus-dji roughly once per second.
Safety gates
ARGUS (and the dock firmware) enforce:
- No upgrade while airborne. If the aircraft is in any in-flight mode
code (
MANUAL_FLIGHT,WAYLINE_FLIGHT,AUTO_RETURNING_HOME, etc.), the push is refused by the bridge before it hits MQTT. Land first. - No upgrade during an active flight task. Dispatched WPML missions are completed or cancelled before an upgrade is accepted.
lastErrorwith DJI code. On failure, the error code is surfaced raw — decoding tables live in DJI’s Cloud-API docs. Common codes:50001(MD5 mismatch),50002(insufficient storage),50005(aircraft missing from dock).
No rollback
There is no rollback. DJI does not expose a downgrade path over Cloud-API OTA. Once a firmware is installed, the only way to go back is a factory-held firmware from DJI support via a physical USB-attached Assistant 2 session. Plan accordingly:
- Test an upgrade on one dock before fleet-wide push.
- Keep a spare dock on the prior firmware as a fallback.
- Do not push during an operational window.
Triggering “check for updates”
The firmware tab also has a Check for updates button that reuses the
same pipeline but with empty product_version / firmware_version
fields. The dock interprets this as a DJI-managed upgrade-check and
pulls whatever it thinks its current recommended version is (bypassing
the ARGUS-uploaded binary). Useful in an emergency when ARGUS hasn’t
yet mirrored a new DJI release.
Related
- Pairing — prerequisite.
- Dock tile — surfaces the current firmware version on the summary row.
- Remote logs — pull diagnostics if an upgrade fails.