dhylands / serial-monitor

usb-ser-mon implemented in rust
MIT License
54 stars 11 forks source link

Symlinks Unsupported #19

Open fred314159265 opened 1 month ago

fred314159265 commented 1 month ago

Passing a symlink path instead of the actual port return the error: No USB serial ports found.

A common occurrence of this would be using the /dev/serial/by-id or /dev/serial/by-path symlinks to always connect to the same device regardless of how they enumerate.

E.g. /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTAV1YOK-if00-port0 is a symlink pointing to /dev/ttyUSB1.

Invoking serial-monitor with the arguments -b 115200 -p /dev/ttyUSB1 works fine, where as with the arguments -b 115200 -p /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTAV1YOK-if00-port0, the error No USB serial ports found is returned.

fred314159265 commented 1 month ago

I have added some basic support for this functionality here: https://github.com/fred314159265/serial-monitor/tree/symlink_support

You can install it and try it using this command:

cargo install --git https://github.com/fred314159265/serial-monitor.git --branch "symlink_support" --force