A Linux-first desktop controller for DJI wireless microphones (DJI Mic Mini, DJI Mic Mini 2 transmitters, and DJI Mic Series Mobile Receiver on v1 and v2 firmware), built on core Flutter and Dart libraries with zero third-party native Flutter plugins.
Repository: chriscz/dji-mic-control
This port was developed so we can move to a single, unified language and UI framework (Dart and Flutter) for building cross-platform desktop apps while depending on very little in the way of external libraries: zero third-party pub.dev runtime packages and zero hard-linked OS-specific native plugins.
This project is a ground-up Flutter/Dart port of ShadowBitBasher/DJI-Mic-Control (v1.1.0, commit 9ba7688), originally written in Rust + Svelte + Tauri and dedicated to the public domain under The Unlicense.
It also incorporates protocol, UI, and localization work from two upstream pull requests authored by VaderCheng:
- PR #4 (VaderCheng): DJI Mic Series Mobile Receiver identification,
Receiver Gain(-12/-6/0/6/12dB) andMonitoring Gain(-12..+12dB) sliders with confirmation wait,mobile-rxpictogram,Power: USBreadout, read-only O/L/H switch noise cancellation status, and unsupported-command guards. - PR #3 (VaderCheng): Optional Simplified Chinese (
zh-CN) UI localization with English fallback.
All protocol reverse-engineering, DUML framing, UI layout concepts, and original device PNG artwork originate from ShadowBitBasher, and the Mobile Receiver / gain control / Chinese translation additions originate from VaderCheng.
- Human and upstream credit: Original authors and contributors are credited explicitly in
README.md,LICENSE,CHANGELOG.md, and relevant source file headers. - Git commit attribution: AI tools are used under human direction to assist with development, not as authors or co-authors. Git authorship and
Co-Authored-Bytrailers are reserved for humans, and AI tooling is transparently disclosed viaAssisted-by-AI-modelandAssisted-by-AI-harnesscommit trailers (enforced locally bylefthookviascripts/check_commit_message.rb). See AGENTS.md for details.
- Core Flutter and Dart standard library only: Zero third-party pub.dev runtime dependencies and zero hard-linked OS plugin libraries (
libappindicator,libnotify,libusb,webkit2gtk). - Dual USB transport behind one seam (
UsbTransport):- Default on Linux: pure-Dart
sysfs+usbfsioctl transport (lib/transport/linux_usbfs_transport.dart) usingdart:ffiagainstlibc. - Optional cross-platform backend: thin Rust
nusbcdylib(native/dji_mic_usb/+lib/transport/nusb_ffi_transport.dart) linking only glibc on Linux, IOKit on macOS, and WinUSB on Windows.
- Default on Linux: pure-Dart
- Runtime OS capability probing with in-app setup hints: Automatically probes USB permissions (udev/Zadig), notifications (
notify-send/ session D-Bus), system tray (org.kde.StatusNotifierWatcher), and autostart, gracefully degrading when optional OS tools are absent and offering one-click Linux udev rule installation (pkexec) plus copyable commands inside System & Capabilities. - On-screen Diagnostics and Pending Operations: Collapsible bottom Diagnostics fold (expanded by default) showing live
TX,TX OK,TX FAIL, andConfirmedlogs, paired with a hideable Pending Operations strip. - English and Simplified Chinese UI: Switch between
Englishand简体中文in System & Capabilities > Preferences. - Byte-level simulator and demo mode: Run with
--dart-define=DEMO=trueor--demoto exercise real DUML v1/v2 packets without physical hardware.
flutter analyze
flutter test # unit, protocol, platform, and headless E2E tests
flutter run -d linux --dart-define=DEMO=true # launch UI with simulated v1 + v2 microphones
flutter run -d linux # launch with real USB hardwareHeadless flutter test works immediately with no extra system packages. Building a Linux binary (flutter build linux) requires:
sudo apt install clang cmake ninja-build libgtk-3-dev xvfbThen build and package Linux x64 artifacts (pure-Dart usbfs default):
bash tool/package_linux.sh --formats tar,deb,rpm,appimage --out-dir distReleases run entirely inside GitHub Actions (.github/workflows/release.yml) with zero third-party release actions:
- One-click from GitHub UI: Open Actions -> release -> Run workflow, enter a version (for example
0.1.0), and keep draft checked to review before publishing. The workflow runsscripts/prepare_release.rbto updatepubspec.yamland roll## [Unreleased]inCHANGELOG.md, tagsv0.1.0, runs all tests, builds.tar.gz,.deb,.rpm,.AppImage, andSHA256SUMS.txt(pure-Dartusbfs), and creates the GitHub Release with notes extracted fromCHANGELOG.md. - Tag push: Pushing a
vX.Y.Ztag (or creating a tag in GitHub Releases) triggers the same verification, packaging, and upload pipeline.
You can install the udev rule directly inside the app via the Install udev rule button (pkexec), or manually copy packaging/60-dji-mic.rules so non-root desktop sessions can open vendor Interface 6 while leaving USB Audio interfaces untouched:
sudo cp packaging/60-dji-mic.rules /etc/udev/rules.d/60-dji-mic.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --action=add --subsystem-match=usb --attr-match=idVendor=2ca3This repository (chriscz/dji-mic-control) is licensed under the MIT License. See LICENSE and CHANGELOG.md for upstream origin and attribution details.