swaits f867383b12 fix: exclusive serial port lock prevents USB port theft
The mux now acquires an flock-based exclusive lock on the serial port
before opening it. This prevents bridges or other processes from directly
opening the same device while the mux owns it. The lock is held for the
duration of the dongle session and auto-released on disconnect or crash.
2026-04-07 18:04:52 -06:00

DongLoRa Mux (Rust)

USB multiplexer daemon — lets multiple applications share one DongLoRa dongle simultaneously.

Install

cargo install donglora-mux

What It Does

  • Owns the USB serial connection exclusively
  • Exposes a Unix domain socket (and optional TCP) speaking the same COBS-framed protocol
  • RxPacket frames broadcast to all connected clients
  • StartRx/StopRx reference-counted across clients
  • SetConfig locked once set (single client can change freely)
  • Single-instance enforcement via file lock (stale sockets auto-cleaned)
  • Automatic dongle reconnect on hot-plug
  • No panics — enforced by clippy deny lints

Running

donglora-mux                                    # start the mux daemon
donglora-mux --verbose                          # start with verbose logging
donglora-mux --tcp 5741 --port /dev/ttyACM0     # with options

Depends On

S
Description
No description provided
Readme MIT
97 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 98.4%
Just 1.6%