My USB device keeps changing its number in its name /dev/ttyUSB?
.
I have seen this and this, and tried to do the same with no luck.
gauthier@sobel:/etc/udev/rules.d $ udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB1)
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/ttyUSB1/tty/ttyUSB1':
KERNEL=="ttyUSB1"
SUBSYSTEM=="tty"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/ttyUSB1':
KERNELS=="ttyUSB1"
SUBSYSTEMS=="usb-serial"
DRIVERS=="ftdi_sio"
ATTRS{port_number}=="0"
ATTRS{latency_timer}=="1"
[...]
Then I created a file /etc/udev/rules.d/50-udev.rules
(it did not exist) and put this inside:
SUBSYSTEM=="usb-serial", KERNEL=="ttyUSB?", SYMLINK+="ttyUSBserial"
But did not get the symlink, even after udevadm trigger
:
gauthier@sobel:/etc/udev/rules.d $ ls /dev|grep USB
ttyUSB1
How can I create a device name that does not change? What am I doing wrong with my rule?