-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support stable serial device IDs on linux and maybe netbsd? #12
Comments
Hey! It could be nice indeed. The only thing I'm considering is how to structure the API. Should the current API simply be adjusted to add stable devices? Or should it be a separate new API? Should that one also include devices that don't have a stable device path? And I think that directory is populated by udev. What about systems that don't have that directory? Should we fall back to non-stable device paths? |
For USB serial ports it is also possible to get stable names on macOS. A former colleague wrote this code in a script:
I don't have a modern mac so I can't really help with that though. Anyway, I would go for a new API for this, returning a With the first being a normal "/dev/ttyACMx"/"COM0"/"/dev/ttyusb.123" etc and the second being the device name when available or None. On my machine I have:
I would expect something like EDIT: Or maybe without the "usb-" prefix. It would be really nice if the device names could be the same on multiple platforms. I've got a program (otii-measurement) that talks to a Otii Arc energy analyzer. Currently I've got its usual linux device name ( |
I like the idea of providing a path and additional information separately. Maybe we should immediately use a |
Many linux distros support /dev/serial/by-id which is stable on device plug/unplug. It would be nice to support this as well when enumerating devices.
The text was updated successfully, but these errors were encountered: