I have an USB<-->Serial hub with 4 serial ports. It is always connected to the same USB port and I would like to set a static name for its ports instead of ttyUSB*.
If I run the command dmesg
I see this output:
[ 7631.687299] usb 2-2.2: new full-speed USB device number 18 using uhci_hcd
[ 7631.903348] usb 2-2.2: New USB device found, idVendor=0403, idProduct=6001
[ 7631.903351] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7631.903353] usb 2-2.2: Product: USB <-> Serial
[ 7631.903354] usb 2-2.2: Manufacturer: FTDI
[ 7631.923887] ftdi_sio 2-2.2:1.0: FTDI USB Serial Device converter detected
[ 7631.923907] usb 2-2.2: Detected FT232BM
[ 7631.928137] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 7632.243560] usb 2-2.3: new full-speed USB device number 19 using uhci_hcd
[ 7632.477535] usb 2-2.3: New USB device found, idVendor=0403, idProduct=6001
[ 7632.477538] usb 2-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7632.477539] usb 2-2.3: Product: USB <-> Serial
[ 7632.477540] usb 2-2.3: Manufacturer: FTDI
[ 7632.484472] ftdi_sio 2-2.3:1.0: FTDI USB Serial Device converter detected
[ 7632.484492] usb 2-2.3: Detected FT232BM
[ 7632.488098] usb 2-2.3: FTDI USB Serial Device converter now attached to ttyUSB1
[ 7632.806779] usb 2-2.4: new full-speed USB device number 20 using uhci_hcd
[ 7633.023781] usb 2-2.4: New USB device found, idVendor=0403, idProduct=6001
[ 7633.023784] usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7633.023785] usb 2-2.4: Product: USB <-> Serial
[ 7633.023787] usb 2-2.4: Manufacturer: FTDI
[ 7633.031252] ftdi_sio 2-2.4:1.0: FTDI USB Serial Device converter detected
[ 7633.031290] usb 2-2.4: Detected FT232BM
[ 7633.033538] usb 2-2.4: FTDI USB Serial Device converter now attached to ttyUSB2
[ 7633.351283] usb 2-2.5: new full-speed USB device number 21 using uhci_hcd
[ 7633.570538] usb 2-2.5: New USB device found, idVendor=0403, idProduct=6001
[ 7633.570540] usb 2-2.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 7633.570542] usb 2-2.5: Product: USB <-> Serial
[ 7633.570543] usb 2-2.5: Manufacturer: FTDI
[ 7633.577373] ftdi_sio 2-2.5:1.0: FTDI USB Serial Device converter detected
[ 7633.577394] usb 2-2.5: Detected FT232BM
[ 7633.582237] usb 2-2.5: FTDI USB Serial Device converter now attached to ttyUSB3
I created the file /etc/udev/rules.d/45-serial_hub_map.rules
with this rule:
BUS==usb, ID==2-2.2, NAME=SerialPort0
But the first port is still called ttyUSB0. I imagine that the error is in the rule definition, but I cannot figure where. Thanks for your help, Regards. Massimo
udev
rules. There are plenty of questions about this here, search a bit.