Detecting serial ports via by-id #456
RussNelson
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I notice that there are a bunch of methods for detecting the serial port. On a system that I used to work on, we had six serial ports connecting devices. We knew what port what device was plugged into. So rather than fiddling around by accessing serial ports one at a time looking for characteristics, we were able to open by path. I notice on my system that it's even easier (at least for the Turing 3.5):
nelson@nelson-Precision-T5600:~/turing-smart-screen-python$ ls -l /dev/serial/by-id/ total 0 lrwxrwxrwx 1 root root 13 Jan 4 17:42 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB1 lrwxrwxrwx 1 root root 13 Jan 19 11:49 usb-Espressif_Systems_Heltec_Wireless_Tracker_4827E2E5B6D4-if00 -> ../../ttyACM2 lrwxrwxrwx 1 root root 13 Jan 19 16:02 usb-Turing_UsbMonitor_USB35INCHIPSV2-if00 -> ../../ttyACM0 nelson@nelson-Precision-T5600:~/turing-smart-screen-python$
I just put the full path to the Turinb_UsbMonitor into my config.yaml:
COM_PORT: "/dev/serial/by-id/usb-Turing_UsbMonitor_USB35INCHIPSV2-if00"
For Linux detection, we could probably do the same thing as long as we know what devices show up as what names.
Beta Was this translation helpful? Give feedback.
All reactions