Re: multi-port usb-serial hub rules

shawn wilson <[email protected]>
Newsgroups org.kernel.vger.linux-hotplug
Message-ID <CAH_OBieh6uysPBJM3TCqHq2mSFJfj0UCpZpDaQ97GJEOndsbHg@mail.gmail.com>
On Sat, Jul 5, 2014 at 11:31 PM, Greg KH <[email protected]> wrote:
> On Sat, Jul 05, 2014 at 10:18:31PM -0400, shawn wilson wrote:
>> I've got a few usb to 4 serial port hubs. The problem is that
>> sometimes the ttyUSB* devs get resorted. I'm trying to write rules to
>> handle them (and maybe name the devices after the machines they're
>> connected to) however, I'm stuck because they only show up as one usb
>> device (and not another usb hub with a serial device on each port):
>
> What's wrong with the symlinks that show up in /dev/serial/ that should
> be "persistent"?
>

Yes, I think that'll work (though if it's possible, it would be cool
to figure out how to write the udev rule for it).

This is weird too (I think probably a bug?):
# ls /dev/serial/by-path/ -l
total 0
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:3:1.0-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:3:1.0-port1 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:3:1.0-port2 -> ../../ttyUSB2
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:3:1.0-port3 -> ../../ttyUSB3
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:4:1.0-port0 -> ../../ttyUSB4
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:4:1.0-port1 -> ../../ttyUSB5
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:4:1.0-port2 -> ../../ttyUSB6
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:4:1.0-port3 -> ../../ttyUSB7
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:5:1.0-port0 -> ../../ttyUSB8
lrwxrwxrwx 1 root root 13 Jun 19 12:55
pci-0000:00:1d.7-usb-0:5:1.0-port1 -> ../../ttyUSB9
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:5:1.0-port2 -> ../../ttyUSB10
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:5:1.0-port3 -> ../../ttyUSB11
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:6:1.0-port0 -> ../../ttyUSB12
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:6:1.0-port1 -> ../../ttyUSB13
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:6:1.0-port2 -> ../../ttyUSB14
lrwxrwxrwx 1 root root 14 Jun 19 12:55
pci-0000:00:1d.7-usb-0:6:1.0-port3 -> ../../ttyUSB15
# ls /dev/serial/by-id/ -l
total 0
lrwxrwxrwx 1 root root 14 Jun 19 12:55
usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USA-49WG-if00-port0 ->
../../ttyUSB12
lrwxrwxrwx 1 root root 13 Jun 19 12:55
usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USA-49WG-if00-port1 ->
../../ttyUSB9
lrwxrwxrwx 1 root root 14 Jun 19 12:55
usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USA-49WG-if00-port2 ->
../../ttyUSB14
lrwxrwxrwx 1 root root 13 Jun 19 12:55
usb-Keyspan__a_division_of_InnoSys_Inc._Keyspan_USA-49WG-if00-port3 ->
../../ttyUSB7
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.