Skip to content

Repository files navigation

mdrop web

A local-first WebUSB controller for Moondrop USB audio dongles, built with Astro 7 and vanilla TypeScript. It reproduces the controls from mdrop in a browser:

  • hardware volume
  • low/high gain
  • indicator light behavior
  • DAC reconstruction filter

Settings travel directly between the browser and the dongle. There is no backend and no device data is uploaded.

Supported devices

The device chooser accepts hardware using Moondrop's USB vendor ID 2fc6, matching the native mdrop application:

  • Moondrop Dawn Pro
  • Moondrop Dawn 3.5 mm (untested)
  • Moondrop Dawn 4.4 mm (untested)

The Dawn Pro is the reference device for the WebUSB implementation.

Browser requirements

WebUSB currently requires:

  • desktop Chrome, Edge, or another Chromium-based browser
  • an HTTPS deployment, or http://localhost during development
  • explicit permission granted through the browser's device chooser

Firefox and Safari do not currently implement WebUSB. A static production build must therefore be hosted over HTTPS.

Linux permissions

Install the same udev rule required by native mdrop, then reconnect the dongle:

SUBSYSTEM=="usb", ATTRS{idVendor}=="2fc6", MODE="0666"

The rule is typically stored at /etc/udev/rules.d/99-moondrop.rules. Reload rules using the procedure for your Linux distribution.

Development

Node.js 22.12.0 or later and pnpm are required. The included Nix shell provides Node 24 and pnpm.

pnpm install
pnpm dev

Open http://localhost:4321 in a supported browser.

Available checks:

pnpm check
pnpm test
pnpm build
pnpm preview

pnpm build writes a deployable static site to dist/. No server adapter is needed.

Device protocol

The implementation mirrors mdrop's vendor control transfers:

  • vendor ID: 0x2fc6
  • recipient: other
  • write request: 0xa0
  • read request: 0xa1
  • request index: 0x09a0
  • response length: 7 bytes

The app does not claim the dongle's protected USB-audio interfaces. Device commands are serialized so a setter cannot interleave with a command/read pair.

Troubleshooting

  • No device appears: confirm the dongle is connected directly and is using vendor ID 2fc6. On Linux, verify the udev rule.
  • The browser reports access denied: close native USB control tools and other tabs that may have the dongle open, then reconnect it.
  • WebUSB is unavailable: use a desktop Chromium browser and ensure the address is HTTPS or localhost.
  • Settings fail after reconnecting: use Refresh. If the problem continues, disconnect the page, physically reconnect the dongle, and choose it again.

License

MIT. The dongle illustration is adapted from the MIT-licensed native mdrop GUI.

About

Web tool for controlling Moondrop Dawn Pro USB DAC.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages