UDEV Rule to Create Links to USB Serial Converters

I have a few /dev/ttyUSB* and a few of those come from my Huawei modem, soem others are the USB-serial converters i work with. Since I do not always have everything connected the numbers change. Here is a UDEV rule to create symlinks for the USB-serial converters, PL2303 in this case:

ACTION=="add", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", KERNEL=="ttyUSB*", SYMLINK+="usbser%n"

Just create a file /etc/udev/rules.d/99-USB-serial.rules containing above line, then disconnect and reconnect the USB-serial converters. The result are the following links:

lrwxrwxrwx 1 root root 7 Aug 13 08:24 /dev/usbser0 -> ttyUSB0
lrwxrwxrwx 1 root root 7 Aug 13 08:24 /dev/usbser2 -> ttyUSB2

More information can be found here and here.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>