3

I have the following udev rule for a USB thermal printer that works with serial through usb:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c8a", ATTRS{idProduct}=="3001", SYMLINK+="ttyS99", MODE="0660", GROUP="lp"

output of ls -la:

lrwxrwxrwx 1 root root 7 ago 21 10:50 /dev/ttyS99 -> ttyACM1

but if I power it off and on again, it symlinks to the wrong device:

output of ls -la after powering off and on again:

lrwxrwxrwx 1 root root 15 ago 22 13:28 /dev/ttyS99 -> bus/usb/001/008

How can I make it always point to ttyACM1 ?

2 Answers2

2

Found the answer: I added SUBSYSTEM=="tty" at the start:

SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c8a", ATTRS{idProduct}=="3001", SYMLINK+="ttyS99", MODE="0660", GROUP="lp"

abu_bua
  • 10,783
-1

Change SUBSYSTEMS to SUBSYSTEM in the usb rule in your initial ruleset and then it will work.

abu_bua
  • 10,783
kimusan
  • 251