Selected work
Desktop Tool · SystemsNode.js · PowerShell · Active

DJI Mic Watcher

Windows USB device watcher identifying DJI Mic Mini TX units by firmware-baked recording prefix, with fallback to volume GUID hints.

A real-time Windows USB device watcher that identifies DJI Mic Mini TX units by their firmware-baked recording filename prefix, with fallback to volume GUID hints for uninitialized devices.

Role — Solo developer
  • Node.js (ES modules, >=20)
  • PowerShell (Win32 CIM queries)
  • Windows USB device enumeration
  • fs/promises (async file I/O)
  • child_process spawning
  • JSON state persistence

DJI Mic Mini TX units enumerate as generic USB mass storage devices on Windows, defeating VID/PID identification. This watcher polls for removable drives and applies a two-stage matcher: first checks disk model/PNP device ID against regex patterns to flag potential DJI mics; then fingerprints the device by scanning for TX##_ filename prefixes in recordings, which are firmware-baked and invariant across machines, ports, and reformats.

The project emerged from a hard constraint: identical DJI Mic Mini units share the same USB serial, volume serial, and disk size, so Windows MountManager binds the Volume GUID to the *drive letter* rather than the physical device. Live testing revealed that swapping which mic goes into which USB port would flip the GUID binding—making Volume GUID unusable as a primary identifier. The solution: privilege the filename prefix (the only firmware-bound signal) and use GUID hints only as a fallback for brand-new uninitialized mics.

The tool runs as a Node.js daemon with zero runtime dependencies, shelling out to PowerShell for drive enumeration (avoiding native module build chains). It tracks state.json to detect and log recording additions/removals each time a mic is attached, paired with human-readable owner labels (Myles, Kaitlyn/Guest) for each TX unit.

What's notable
  • Firmware-baked TX## filename prefix as primary identifier — reliable across USB ports and device reformats
  • Two-stage matching: disk model regex patterns + recursive filename scan with depth limit (avoids System Volume Information / hidden folders)
  • Windows Volume GUID fallback documented as unreliable per empirical testing (2026-05-21) — honest trade-off decision baked into config
  • Zero npm dependencies — pure Node.js fs/promises + PowerShell spawning; no native modules or build-chain friction
  • Real-time polling with state persistence: tracks per-device recording inventory and logs additions/removals on each attach