total 0 lrwxrwxrwx 1 root root 13 Jan 1 1970 usb-FTDI_FT232R_USB_UART_A7035K2R-if00-port0 -> ../../ttyUSB0
Make a symlink from this L-O-N-G name to a name of your choosing in a directory of your choosing. In my case, it is a system device and only root controls it so I make a link in /root, like:
In your programs or whatever needs the device name of the serial device, you just use your link, in my case above "/root/easydigi", as the replacement for the "/dev/ttyUSB0".
total 0 lrwxrwxrwx 1 root root 13 Jan 1 1970 usb-FTDI_FT232R_USB_UART_A7035K2R-if00-port0 -> ../../ttyUSB0
Make a symlink from this L-O-N-G name to a name of your choosing in a directory of your choosing. In my case, it is a system device and only root controls it so I make a link in /root, like:
In your programs or whatever needs the device name of the serial device, you just use your link, in my case above "/root/easydigi", as the replacement for the "/dev/ttyUSB0".
How to lock device id's to port addresses?----固定usb串口的串口编号
原文地址::https://superuser.com/questions/536478/how-to-lock-device-ids-to-port-addresses0down voteHere is what I do with USB serial devices:cd /dev/serial/