Detecting usb serial device on linux?
⚓ Rust 📅 2025-10-20 👤 surdeus 👁️ 2I'm working on a driver for a device called the Tourbox, for Linux specifically. I have a working version, which uses udev rules to start the driver process whenever it detects the device connects.
The issue with this approach is udev only detects the device when it's plugged in. If it's already connected at boot, nothing happens. Ideally, too, I'd rather have the driver process run constantly in the background to make configuration and error reporting more consistent.
The Tourbox exposes itself as a serial port over USB. I can identify the device with its vendor/product ID, but I've been struggling to find a way to go from that to identifying the specific serial device to target within Rust. My initial thought was the udev crate, given it could monitor for devices being added, but I couldn't find a way to go from USB device to a serial port (and, even if I could, the example given for monitoring is way above my current knowledge).
I'm sure this is a problem other people have run into, wanted to see if anyone knew the best direction to approach this from.
1 post - 1 participant
🏷️ Rust_feed