[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev rules help with usb>serial adapters +attach



Hello Dave MM0RFN & John AC6SL

Thank you so much for chiming in.

I will admit much of this is beyond my understanding.  However, I'm
going to add the output files from this end.

As you can see, the rule for my Kenwood radio port works perfectly.  Yet
every iteration I've tried for the dual port has failed.

I have difficulty trying to understand this syntax, or really
understanding it.  Bugger.  But I have to be close.  Since I posted my
first message, the new "Bmax Mini PC B3" has arrived!  So I really need
to dial this in so I can port it to the replacement computer.

I had to reboot the computer several times during power outages. So
understand that some commands might look at one port then another port
for same device.  The devices change places each boot.  The glory is at
least my Kenwood now stays working!

I'll need both ports of the dual port USB>serial cable; one for my aprs
Igate, the other for my packet.

If either of you can cobble a rule for this adapter, I'm MORE THAN
WILLING to try it!

Thank you!  73

Jaye ke6sls

On 11/7/24 4:13 PM, Dave Hibberd wrote:
> Hi Jaye,
> 
> On Thursday, 7 November 2024 22:56:52 GMT MJ Inabnit wrote:
>> I am going to retire an old thinkpad with a real serial port.  Found
>> some good how-to about writing a udev rule to id and make new device for
>> usb to serial adapters.  One rule works great for my TS-590sg, but my
>> second adapter (which has two serial ports) rule isn't working.
>>
> 
> We have been doing similar in my online club - sadly it's 2 TNCs with onboard 
> USB/Serial devices not 2 ports on one adaptor. I do have one of those *and* a 
> radio that enumerates as 2 serial ports attached just now, so that'll maybe 
> help to point you in the right direction!
> 
>> Is there anyone here able to assist.  If not, perhaps someone can point
>> out where I might get some assistance?  Googled for weeks and not
>> finding the key to my rule.
> 
> We've been using serial numbers to modify the symlink so the ports have their 
> service name on them, see the first part of the linux notes:
> https://wiki.oarc.uk/packet:ninotnc?s[]=udev#misc_linux_notes
> 
> How is the device enumerating currently - I assume it's connecting and 
> presenting new ports in `/dev` ? 
> 
> What about somewhere like `/dev/serial/by-id`?
> If I look in my raspi's /dev/serial/by-id, I see what is in the attached text 
> file. 
> 
> Reading `udevadm info -a /dev/ttyUSB0` and `udevadm info -a /dev/tty/USB1` has 
> pointed me to ATTRS{bInterfaceNumber}=="00" - I wonder if there is a way to 
> combine that, the serial number of the adaptor ATTRS{serial} to create 
> different devices.
> 
> There was also a hint of this approach here, where the two serial ports showed 
> different serial numbers and that was used to give then pretty names: 
> https://wiki.oarc.uk/persistent_sound_interface?
> s[]=udev#transceiver_device_names 
> 
> Hopefully that's enough of a starter for you to break the deadlock! If not, 
> feel free to reach out again. 
> 
> Cheers,
> --  
>   Hibby <hibby@debian.org>
>   Debian Developer
>   Packet Radioist
>   MM0RFN
> 


-- 

wishing you well
Jaye, ke6sls--via the toshiba w/thunderchicken
SUBSYSTEM=="tty", ATTRS{bInterfaceNumber}=="01", ATTRS{idProduct}=="6010", SYMLINK+="kpc3"

SUBSYSTEM=="tty", ATTRS{product}=="CP2102 USB to UART Bridge Controller", ATTRS{serial}=="05670043DF4A", SYMLINK+="ts590"

jaye@ham:~$ ls -al /dev/ > dev.txt


total 4
drwxr-xr-x  21 root root        4460 Nov 16 18:09 .
drwxr-xr-x  20 root root        4096 Oct 13 13:07 ..
crw-r--r--   1 root root     10, 235 Oct 21 19:39 autofs
drwxr-xr-x   2 root root         300 Nov 16 18:09 block
drwxr-xr-x   2 root root          80 Nov 16 18:09 bsg
crw-rw----   1 root disk     10, 234 Oct 21 19:39 btrfs-control
drwxr-xr-x   3 root root          60 Oct 21 19:38 bus
lrwxrwxrwx   1 root root           3 Oct 21 19:39 cdrom -> sr0
drwxr-xr-x   2 root root        4440 Nov 16 18:09 char
crw--w----   1 root tty       5,   1 Oct 21 19:39 console
lrwxrwxrwx   1 root root          11 Oct 21 19:38 core -> /proc/kcore
drwxr-xr-x   4 root root          80 Oct 21 19:38 cpu
crw-------   1 root root     10, 124 Oct 21 19:39 cpu_dma_latency
crw-------   1 root root     10, 203 Oct 21 19:38 cuse
drwxr-xr-x   6 root root         120 Nov 16 18:09 disk
drwxr-xr-x   2 root root          60 Oct 21 19:38 dma_heap
drwxr-xr-x   3 root root         100 Oct 21 19:39 dri
crw-------   1 root root     10, 126 Oct 21 19:39 ecryptfs
crw-rw----   1 root video    29,   0 Oct 21 19:39 fb0
lrwxrwxrwx   1 root root          13 Oct 21 19:38 fd -> /proc/self/fd
crw-rw-rw-   1 root root      1,   7 Oct 21 19:39 full
crw-rw-rw-   1 root root     10, 229 Oct 21 19:39 fuse
crw-------   1 root root    240,   0 Oct 21 19:39 fw0
lrwxrwxrwx   1 root root           7 Oct 21 19:39 gps2 -> ttyUSB2
crw-------   1 root root    241,   0 Oct 21 19:39 hidraw0
crw-------   1 root root    241,   1 Oct 21 19:39 hidraw1
crw-------   1 root root    241,   3 Oct 21 19:39 hidraw3
crw-------   1 root root     10, 228 Oct 21 19:39 hpet
drwxr-xr-x   2 root root           0 Oct 21 19:38 hugepages
crw-------   1 root root     10, 183 Oct 21 19:39 hwrng
crw-------   1 root root     89,   0 Oct 21 19:39 i2c-0
crw-------   1 root root     89,   1 Oct 21 19:39 i2c-1
crw-------   1 root root     89,   2 Oct 21 19:39 i2c-2
crw-------   1 root root     89,   3 Oct 21 19:39 i2c-3
crw-------   1 root root     89,   4 Oct 21 19:39 i2c-4
crw-------   1 root root     89,   5 Oct 21 19:39 i2c-5
crw-------   1 root root     89,   6 Oct 21 19:39 i2c-6
lrwxrwxrwx   1 root root          12 Oct 21 19:38 initctl -> /run/initctl
drwxr-xr-x   4 root root         380 Nov 13 20:26 input
crw-r--r--   1 root root      1,  11 Oct 21 19:39 kmsg
crw-rw----+  1 root kvm      10, 232 Oct 21 19:39 kvm
lrwxrwxrwx   1 root root          28 Oct 21 19:38 log -> /run/systemd/journal/dev-log
brw-rw----   1 root disk      7,   0 Oct 21 19:39 loop0
brw-rw----   1 root disk      7,   1 Oct 21 19:39 loop1
brw-rw----   1 root disk      7,   2 Oct 21 19:39 loop2
brw-rw----   1 root disk      7,   3 Oct 21 19:39 loop3
brw-rw----   1 root disk      7,   4 Oct 21 19:39 loop4
brw-rw----   1 root disk      7,   5 Oct 21 19:39 loop5
brw-rw----   1 root disk      7,   6 Oct 21 19:39 loop6
brw-rw----   1 root disk      7,   7 Oct 21 19:39 loop7
crw-rw----   1 root disk     10, 237 Oct 21 19:39 loop-control
crw-rw----   1 root lp        6,   0 Oct 21 19:39 lp0
drwxr-xr-x   2 root root          60 Oct 21 19:38 mapper
crw-------   1 root root     10, 227 Oct 21 19:39 mcelog
crw-r-----   1 root kmem      1,   1 Oct 21 19:39 mem
drwxrwxrwt   2 root root          40 Oct 21 19:38 mqueue
drwxr-xr-x   2 root root          60 Oct 21 19:38 net
crw-rw-rw-   1 root root      1,   3 Oct 21 19:39 null
crw-r-----   1 root kmem     10, 144 Oct 21 19:39 nvram
crw-rw-r--   1 root lp       99,   0 Oct 21 19:39 parport0
crw-r-----   1 root kmem      1,   4 Oct 21 19:39 port
crw-------   1 root root    108,   0 Oct 21 19:39 ppp
crw-------   1 root root     10,   1 Oct 21 19:39 psaux
crw-rw-rw-   1 root tty       5,   2 Nov 19 18:17 ptmx
drwxr-xr-x   2 root root           0 Oct 21 19:38 pts
crw-rw-rw-   1 root root      1,   8 Oct 21 19:39 random
crw-rw-r--+  1 root netdev   10, 242 Oct 21 19:39 rfkill
lrwxrwxrwx   1 root root           4 Oct 21 19:39 rtc -> rtc0
crw-------   1 root root    248,   0 Oct 21 19:39 rtc0
brw-rw----   1 root disk      8,   0 Oct 21 19:39 sda
brw-rw----   1 root disk      8,   1 Oct 21 19:39 sda1
brw-rw----   1 root disk      8,   2 Oct 21 19:39 sda2
brw-rw----   1 root disk      8,   5 Oct 21 19:39 sda5
drwxr-xr-x   4 root root          80 Oct 21 19:39 serial
crw-rw----+  1 root cdrom    21,   0 Oct 21 19:39 sg0
crw-rw----   1 root disk     21,   1 Oct 21 19:39 sg1
drwxrwxrwt   3 root root          60 Nov 16 18:08 shm
crw-------   1 root root     10, 231 Oct 21 19:39 snapshot
drwxr-xr-x   4 root root         280 Nov 13 20:26 snd
brw-rw----+  1 root cdrom    11,   0 Oct 21 19:39 sr0
lrwxrwxrwx   1 root root          15 Oct 21 19:38 stderr -> /proc/self/fd/2
lrwxrwxrwx   1 root root          15 Oct 21 19:38 stdin -> /proc/self/fd/0
lrwxrwxrwx   1 root root          15 Oct 21 19:38 stdout -> /proc/self/fd/1
crw-rw----   1 tss  root     10, 224 Oct 21 19:39 tpm0
lrwxrwxrwx   1 root root           7 Oct 21 19:39 ts590 -> ttyUSB2
crw-rw-rw-   1 root tty       5,   0 Nov 15 07:51 tty
crw--w----   1 root tty       4,   0 Oct 21 19:39 tty0
crw--w----   1 root tty       4,   1 Oct 21 19:39 tty1
crw--w----   1 root tty       4,  10 Oct 21 19:39 tty10
crw--w----   1 root tty       4,  11 Oct 21 19:39 tty11
crw--w----   1 root tty       4,  12 Oct 21 19:39 tty12
crw--w----   1 root tty       4,  13 Oct 21 19:39 tty13
crw--w----   1 root tty       4,  14 Oct 21 19:39 tty14
crw--w----   1 root tty       4,  15 Oct 21 19:39 tty15
crw--w----   1 root tty       4,  16 Oct 21 19:39 tty16
crw--w----   1 root tty       4,  17 Oct 21 19:39 tty17
crw--w----   1 root tty       4,  18 Oct 21 19:39 tty18
crw--w----   1 root tty       4,  19 Oct 21 19:39 tty19
crw--w----   1 root tty       4,   2 Oct 21 19:39 tty2
crw--w----   1 root tty       4,  20 Oct 21 19:39 tty20
crw--w----   1 root tty       4,  21 Oct 21 19:39 tty21
crw--w----   1 root tty       4,  22 Oct 21 19:39 tty22
crw--w----   1 root tty       4,  23 Oct 21 19:39 tty23
crw--w----   1 root tty       4,  24 Oct 21 19:39 tty24
crw--w----   1 root tty       4,  25 Oct 21 19:39 tty25
crw--w----   1 root tty       4,  26 Oct 21 19:39 tty26
crw--w----   1 root tty       4,  27 Oct 21 19:39 tty27
crw--w----   1 root tty       4,  28 Oct 21 19:39 tty28
crw--w----   1 root tty       4,  29 Oct 21 19:39 tty29
crw--w----   1 root tty       4,   3 Oct 21 19:39 tty3
crw--w----   1 root tty       4,  30 Oct 21 19:39 tty30
crw--w----   1 root tty       4,  31 Oct 21 19:39 tty31
crw--w----   1 root tty       4,  32 Oct 21 19:39 tty32
crw--w----   1 root tty       4,  33 Oct 21 19:39 tty33
crw--w----   1 root tty       4,  34 Oct 21 19:39 tty34
crw--w----   1 root tty       4,  35 Oct 21 19:39 tty35
crw--w----   1 root tty       4,  36 Oct 21 19:39 tty36
crw--w----   1 root tty       4,  37 Oct 21 19:39 tty37
crw--w----   1 root tty       4,  38 Oct 21 19:39 tty38
crw--w----   1 root tty       4,  39 Oct 21 19:39 tty39
crw--w----   1 root tty       4,   4 Oct 21 19:39 tty4
crw--w----   1 root tty       4,  40 Oct 21 19:39 tty40
crw--w----   1 root tty       4,  41 Oct 21 19:39 tty41
crw--w----   1 root tty       4,  42 Oct 21 19:39 tty42
crw--w----   1 root tty       4,  43 Oct 21 19:39 tty43
crw--w----   1 root tty       4,  44 Oct 21 19:39 tty44
crw--w----   1 root tty       4,  45 Oct 21 19:39 tty45
crw--w----   1 root tty       4,  46 Oct 21 19:39 tty46
crw--w----   1 root tty       4,  47 Oct 21 19:39 tty47
crw--w----   1 root tty       4,  48 Oct 21 19:39 tty48
crw--w----   1 root tty       4,  49 Oct 21 19:39 tty49
crw--w----   1 root tty       4,   5 Oct 21 19:39 tty5
crw--w----   1 root tty       4,  50 Oct 21 19:39 tty50
crw--w----   1 root tty       4,  51 Oct 21 19:39 tty51
crw--w----   1 root tty       4,  52 Oct 21 19:39 tty52
crw--w----   1 root tty       4,  53 Oct 21 19:39 tty53
crw--w----   1 root tty       4,  54 Oct 21 19:39 tty54
crw--w----   1 root tty       4,  55 Oct 21 19:39 tty55
crw--w----   1 root tty       4,  56 Oct 21 19:39 tty56
crw--w----   1 root tty       4,  57 Oct 21 19:39 tty57
crw--w----   1 root tty       4,  58 Oct 21 19:39 tty58
crw--w----   1 root tty       4,  59 Oct 21 19:39 tty59
crw--w----   1 root tty       4,   6 Oct 21 19:39 tty6
crw--w----   1 root tty       4,  60 Oct 21 19:39 tty60
crw--w----   1 root tty       4,  61 Oct 21 19:39 tty61
crw--w----   1 root tty       4,  62 Oct 21 19:39 tty62
crw--w----   1 root tty       4,  63 Oct 21 19:39 tty63
crw--w----   1 root tty       4,   7 Oct 21 19:39 tty7
crw--w----   1 root tty       4,   8 Oct 21 19:39 tty8
crw--w----   1 root tty       4,   9 Oct 21 19:39 tty9
crw-------   1 root root      5,   3 Oct 21 19:39 ttyprintk
crw-rw----   1 root dialout   4,  64 Nov 19 18:15 ttyS0
crw-rw----   1 root dialout   4,  65 Oct 21 19:39 ttyS1
crw-rw----   1 root dialout   4,  74 Oct 21 19:39 ttyS10
crw-rw----   1 root dialout   4,  75 Oct 21 19:39 ttyS11
crw-rw----   1 root dialout   4,  76 Oct 21 19:39 ttyS12
crw-rw----   1 root dialout   4,  77 Oct 21 19:39 ttyS13
crw-rw----   1 root dialout   4,  78 Oct 21 19:39 ttyS14
crw-rw----   1 root dialout   4,  79 Oct 21 19:39 ttyS15
crw-rw----   1 root dialout   4,  80 Oct 21 19:39 ttyS16
crw-rw----   1 root dialout   4,  81 Oct 21 19:39 ttyS17
crw-rw----   1 root dialout   4,  82 Oct 21 19:39 ttyS18
crw-rw----   1 root dialout   4,  83 Oct 21 19:39 ttyS19
crw-rw----   1 root dialout   4,  66 Oct 21 19:39 ttyS2
crw-rw----   1 root dialout   4,  84 Oct 21 19:39 ttyS20
crw-rw----   1 root dialout   4,  85 Oct 21 19:39 ttyS21
crw-rw----   1 root dialout   4,  86 Oct 21 19:39 ttyS22
crw-rw----   1 root dialout   4,  87 Oct 21 19:39 ttyS23
crw-rw----   1 root dialout   4,  88 Oct 21 19:39 ttyS24
crw-rw----   1 root dialout   4,  89 Oct 21 19:39 ttyS25
crw-rw----   1 root dialout   4,  90 Oct 21 19:39 ttyS26
crw-rw----   1 root dialout   4,  91 Oct 21 19:39 ttyS27
crw-rw----   1 root dialout   4,  92 Oct 21 19:39 ttyS28
crw-rw----   1 root dialout   4,  93 Oct 21 19:39 ttyS29
crw-rw----   1 root dialout   4,  67 Oct 21 19:39 ttyS3
crw-rw----   1 root dialout   4,  94 Oct 21 19:39 ttyS30
crw-rw----   1 root dialout   4,  95 Oct 21 19:39 ttyS31
crw-rw----   1 root dialout   4,  68 Oct 21 19:39 ttyS4
crw-rw----   1 root dialout   4,  69 Oct 21 19:39 ttyS5
crw-rw----   1 root dialout   4,  70 Oct 21 19:39 ttyS6
crw-rw----   1 root dialout   4,  71 Oct 21 19:39 ttyS7
crw-rw----   1 root dialout   4,  72 Oct 21 19:39 ttyS8
crw-rw----   1 root dialout   4,  73 Oct 21 19:39 ttyS9
crw-rw----   1 root dialout 188,   0 Oct 21 19:39 ttyUSB0
crw-rw----   1 root dialout 188,   1 Nov 19 07:34 ttyUSB1
crw-rw----   1 root dialout 188,   2 Nov 18 21:41 ttyUSB2
crw-rw----   1 root kvm      10, 125 Oct 21 19:39 udmabuf
crw-------   1 root root     10, 239 Oct 21 19:38 uhid
crw-------   1 root root     10, 223 Oct 21 19:39 uinput
crw-rw-rw-   1 root root      1,   9 Oct 21 19:39 urandom
drwxr-xr-x   2 root root          60 Nov 13 20:26 usb
crw-------   1 root root     10, 240 Oct 21 19:38 userio
crw-rw----   1 root tty       7,   0 Oct 21 19:39 vcs
crw-rw----   1 root tty       7,   1 Oct 21 19:39 vcs1
crw-rw----   1 root tty       7,   2 Oct 21 19:39 vcs2
crw-rw----   1 root tty       7,   3 Oct 21 19:39 vcs3
crw-rw----   1 root tty       7,   4 Oct 21 19:39 vcs4
crw-rw----   1 root tty       7,   5 Oct 21 19:39 vcs5
crw-rw----   1 root tty       7,   6 Oct 21 19:39 vcs6
crw-rw----   1 root tty       7,   7 Oct 21 19:39 vcs7
crw-rw----   1 root tty       7, 128 Oct 21 19:39 vcsa
crw-rw----   1 root tty       7, 129 Oct 21 19:39 vcsa1
crw-rw----   1 root tty       7, 130 Oct 21 19:39 vcsa2
crw-rw----   1 root tty       7, 131 Oct 21 19:39 vcsa3
crw-rw----   1 root tty       7, 132 Oct 21 19:39 vcsa4
crw-rw----   1 root tty       7, 133 Oct 21 19:39 vcsa5
crw-rw----   1 root tty       7, 134 Oct 21 19:39 vcsa6
crw-rw----   1 root tty       7, 135 Oct 21 19:39 vcsa7
crw-rw----   1 root tty       7,  64 Oct 21 19:39 vcsu
crw-rw----   1 root tty       7,  65 Oct 21 19:39 vcsu1
crw-rw----   1 root tty       7,  66 Oct 21 19:39 vcsu2
crw-rw----   1 root tty       7,  67 Oct 21 19:39 vcsu3
crw-rw----   1 root tty       7,  68 Oct 21 19:39 vcsu4
crw-rw----   1 root tty       7,  69 Oct 21 19:39 vcsu5
crw-rw----   1 root tty       7,  70 Oct 21 19:39 vcsu6
crw-rw----   1 root tty       7,  71 Oct 21 19:39 vcsu7
drwxr-xr-x   2 root root          60 Oct 21 19:38 vfio
crw-------   1 root root     10, 127 Oct 21 19:39 vga_arbiter
crw-------   1 root root     10, 137 Oct 21 19:38 vhci
crw-rw----   1 root kvm      10, 238 Oct 21 19:38 vhost-net
crw-rw----   1 root kvm      10, 241 Oct 21 19:38 vhost-vsock
crw-rw-rw-   1 root root      1,   5 Oct 21 19:39 zero
crw-------   1 root root     10, 249 Oct 21 19:38 zfs
udevadm info --name=/dev/ttyUSB1 --attribute-walk


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:1a.7/usb1/1-4/1-4.2/1-4.2:1.0/ttyUSB1/tty/ttyUSB1':
    KERNEL=="ttyUSB1"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{power/async}=="disabled"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_kids}=="0"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_enabled}=="disabled"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2/1-4.2:1.0/ttyUSB1':
    KERNELS=="ttyUSB1"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ftdi_sio"
    ATTRS{latency_timer}=="16"
    ATTRS{port_number}=="0"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2/1-4.2:1.0':
    KERNELS=="1-4.2:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="ftdi_sio"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{interface}=="USB <-> Serial Cable"
    ATTRS{power/async}=="enabled"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="suspended"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2':
    KERNELS=="1-4.2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 2"
    ATTRS{bcdDevice}=="0500"
    ATTRS{bmAttributes}=="80"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="5"
    ATTRS{devpath}=="4.2"
    ATTRS{idProduct}=="6010"
    ATTRS{idVendor}=="0403"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="utek"
    ATTRS{maxchild}=="0"
    ATTRS{power/active_duration}=="168692212"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="2"
    ATTRS{power/autosuspend_delay_ms}=="2000"
    ATTRS{power/connected_duration}=="168692212"
    ATTRS{power/control}=="on"
    ATTRS{power/level}=="on"
    ATTRS{power/persist}=="1"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168692019"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{product}=="USB <-> Serial Cable"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="FTWHB159"
    ATTRS{speed}=="12"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="6675518"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4':
    KERNELS=="1-4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="02"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="2mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0001"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="3"
    ATTRS{devpath}=="4"
    ATTRS{idProduct}=="1000"
    ATTRS{idVendor}=="17ef"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="168692948"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="168692948"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_kids}=="2"
    ATTRS{power/runtime_active_time}=="168692617"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="39"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0515"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 5.15.0-122-generic ehci_hcd"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="168694076"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="168694080"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168694060"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:00:1a.7"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="74"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7':
    KERNELS=="0000:00:1a.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci-pci"
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0320"
    ATTRS{companion}==""
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{device}=="0x283a"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="22"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{local_cpus}=="3"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168695093"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{power/wakeup}=="enabled"
    ATTRS{power/wakeup_abort_count}=="0"
    ATTRS{power/wakeup_active}=="0"
    ATTRS{power/wakeup_active_count}=="0"
    ATTRS{power/wakeup_count}=="0"
    ATTRS{power/wakeup_expire_count}=="0"
    ATTRS{power/wakeup_last_time_ms}=="0"
    ATTRS{power/wakeup_max_time_ms}=="0"
    ATTRS{power/wakeup_total_time_ms}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{reset_method}=="pm"
    ATTRS{revision}=="0x03"
    ATTRS{subsystem_device}=="0x20ab"
    ATTRS{subsystem_vendor}=="0x17aa"
    ATTRS{uframe_periodic_max}=="100"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="17"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{waiting_for_supplier}=="0"

udevadm info --name=/dev/ttyUSB2 --attribute-walk


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:1a.7/usb1/1-4/1-4.2/1-4.2:1.1/ttyUSB2/tty/ttyUSB2':
    KERNEL=="ttyUSB2"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{power/async}=="disabled"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_kids}=="0"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_enabled}=="disabled"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2/1-4.2:1.1/ttyUSB2':
    KERNELS=="ttyUSB2"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ftdi_sio"
    ATTRS{latency_timer}=="16"
    ATTRS{port_number}=="0"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2/1-4.2:1.1':
    KERNELS=="1-4.2:1.1"
    SUBSYSTEMS=="usb"
    DRIVERS=="ftdi_sio"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceNumber}=="01"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{interface}=="USB <-> Serial Cable"
    ATTRS{power/async}=="enabled"
    ATTRS{power/runtime_active_kids}=="0"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.2':
    KERNELS=="1-4.2"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="100mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 2"
    ATTRS{bcdDevice}=="0500"
    ATTRS{bmAttributes}=="80"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="5"
    ATTRS{devpath}=="4.2"
    ATTRS{idProduct}=="6010"
    ATTRS{idVendor}=="0403"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="utek"
    ATTRS{maxchild}=="0"
    ATTRS{power/active_duration}=="168706728"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="2"
    ATTRS{power/autosuspend_delay_ms}=="2000"
    ATTRS{power/connected_duration}=="168706728"
    ATTRS{power/control}=="on"
    ATTRS{power/level}=="on"
    ATTRS{power/persist}=="1"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168706532"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{product}=="USB <-> Serial Cable"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="FTWHB159"
    ATTRS{speed}=="12"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="6676441"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-4':
    KERNELS=="1-4"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="02"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="2mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0001"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="3"
    ATTRS{devpath}=="4"
    ATTRS{idProduct}=="1000"
    ATTRS{idVendor}=="17ef"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="168707464"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="168707460"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_kids}=="2"
    ATTRS{power/runtime_active_time}=="168707131"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="39"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0515"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="1"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0002"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 5.15.0-122-generic ehci_hcd"
    ATTRS{maxchild}=="4"
    ATTRS{power/active_duration}=="168708592"
    ATTRS{power/async}=="enabled"
    ATTRS{power/autosuspend}=="0"
    ATTRS{power/autosuspend_delay_ms}=="0"
    ATTRS{power/connected_duration}=="168708592"
    ATTRS{power/control}=="auto"
    ATTRS{power/level}=="auto"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168708574"
    ATTRS{power/runtime_enabled}=="enabled"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{power/wakeup}=="disabled"
    ATTRS{power/wakeup_abort_count}==""
    ATTRS{power/wakeup_active}==""
    ATTRS{power/wakeup_active_count}==""
    ATTRS{power/wakeup_count}==""
    ATTRS{power/wakeup_expire_count}==""
    ATTRS{power/wakeup_last_time_ms}==""
    ATTRS{power/wakeup_max_time_ms}==""
    ATTRS{power/wakeup_total_time_ms}==""
    ATTRS{product}=="EHCI Host Controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{rx_lanes}=="1"
    ATTRS{serial}=="0000:00:1a.7"
    ATTRS{speed}=="480"
    ATTRS{tx_lanes}=="1"
    ATTRS{urbnum}=="74"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:1a.7':
    KERNELS=="0000:00:1a.7"
    SUBSYSTEMS=="pci"
    DRIVERS=="ehci-pci"
    ATTRS{ari_enabled}=="0"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x0c0320"
    ATTRS{companion}==""
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{device}=="0x283a"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="22"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{local_cpus}=="3"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_kids}=="1"
    ATTRS{power/runtime_active_time}=="168709608"
    ATTRS{power/runtime_enabled}=="forbidden"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="1"
    ATTRS{power/wakeup}=="enabled"
    ATTRS{power/wakeup_abort_count}=="0"
    ATTRS{power/wakeup_active}=="0"
    ATTRS{power/wakeup_active_count}=="0"
    ATTRS{power/wakeup_count}=="0"
    ATTRS{power/wakeup_expire_count}=="0"
    ATTRS{power/wakeup_last_time_ms}=="0"
    ATTRS{power/wakeup_max_time_ms}=="0"
    ATTRS{power/wakeup_total_time_ms}=="0"
    ATTRS{power_state}=="D0"
    ATTRS{reset_method}=="pm"
    ATTRS{revision}=="0x03"
    ATTRS{subsystem_device}=="0x20ab"
    ATTRS{subsystem_vendor}=="0x17aa"
    ATTRS{uframe_periodic_max}=="100"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/async}=="enabled"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_kids}=="17"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_enabled}=="disabled"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{power/runtime_usage}=="0"
    ATTRS{waiting_for_supplier}=="0"

jaye@ham:~$ ls -al /dev/serial/by-id/
total 0
drwxr-xr-x 2 root root 100 Oct 21 19:39 .
drwxr-xr-x 4 root root  80 Oct 21 19:39 ..
lrwxrwxrwx 1 root root  13 Oct 21 19:39 usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_05670043DF4A-if00-port0 -> ../../ttyUSB2
lrwxrwxrwx 1 root root  13 Oct 21 19:39 usb-utek_USB__-__Serial_Cable_FTWHB159-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root  13 Oct 21 19:39 usb-utek_USB__-__Serial_Cable_FTWHB159-if01-port0 -> ../../ttyUSB1


Reply to: