Open EastEriq opened 3 years ago
Ideas:
look at:
/dev/serial/by-id/
single empty file, e.g usb-FTDI_FT232R_USB_UART_A1085VJH-if00-port0
udevadm info --query all --name /dev/ttyUSB0 --attribute-walk
https://unix.stackexchange.com/questions/81754/how-to-match-a-ttyusbx-device-to-a-usb-serial-device
look at /sys/bus/usb-serial/devices/
which contains links to the physical device, e.g. ttyUSB0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/ttyUSB0
Tackling it with https://github.com/EastEriq/LAST_USBserial
Shit, and the answer is: "usb-Celestron_Celestron_Focuser_MF_v1-if00". No serial number or the like. (~Enrico on LAST-PC)
self-note: find a way to store in the class also some sort of unique identifier, in case more than one focuser are connected to the same computer. Notably via USB, the numbering of the serial port is dynamic and arbitrary. In that case identifying the serial # oft the FTDI chip may help.
If the focuser was connected to a true serial port, numbering would be fixed. If it was connected with a serial cable, but via an USB-232(TTL) dongle, ditto as above.