2

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 ?

1

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"

| improve this answer | |
-1

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

| improve this answer | |
  • This does answer the question. I have now reformulated. – kimusan Sep 25 '18 at 10:06
  • the case is that the SUBSYSTEM="tty" part is not needed. Problem is that OP had the spelling error in the first place – kimusan Sep 25 '18 at 10:13
  • The tty is needed since he communicates to usb via serial. – abu_bua Sep 25 '18 at 10:56
  • that wont be needed until the bind event - the SUBSYSTEM=usb will catch it at the add event. – kimusan Sep 26 '18 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.