f867383b12eba74be420539329107fed9047b1f8
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.
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
donglora-client— protocol types, COBS framing, device discovery
Languages
Rust
98.4%
Just
1.6%