SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By gDFfRc7VvzfYydHP
#221508
Hi,

I have a sparkfun redboard artemis on my USB0. I get the following output on udevadmin:

```
~$ udevadm info -a /dev/ttyUSB0

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:14.0/usb1/1-1/1-1:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""

looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0/ttyUSB0':
KERNELS=="ttyUSB0"
SUBSYSTEMS=="usb-serial"
DRIVERS=="ch341-uart"
ATTRS{port_number}=="0"

looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1/1-1:1.0':
KERNELS=="1-1:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="ch341"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bInterfaceProtocol}=="02"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bInterfaceClass}=="ff"
ATTRS{supports_autosuspend}=="1"
ATTRS{authorized}=="1"
ATTRS{bNumEndpoints}=="03"

looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{speed}=="12"
ATTRS{bmAttributes}=="80"
ATTRS{version}==" 1.10"
ATTRS{bDeviceClass}=="ff"
ATTRS{removable}=="removable"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{rx_lanes}=="1"
ATTRS{ltm_capable}=="no"
ATTRS{product}=="USB Serial"
ATTRS{urbnum}=="15"
ATTRS{idVendor}=="1a86"
ATTRS{quirks}=="0x0"
ATTRS{busnum}=="1"
ATTRS{tx_lanes}=="1"
ATTRS{devpath}=="1"
ATTRS{bcdDevice}=="0264"
ATTRS{idProduct}=="7523"
ATTRS{devnum}=="15"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPower}=="98mA"
ATTRS{maxchild}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{authorized}=="1"

looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{product}=="xHCI Host Controller"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{ltm_capable}=="no"
ATTRS{bConfigurationValue}=="1"
ATTRS{busnum}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{idProduct}=="0002"
ATTRS{rx_lanes}=="1"
ATTRS{bMaxPower}=="0mA"
ATTRS{devpath}=="0"
ATTRS{configuration}==""
ATTRS{serial}=="0000:00:14.0"
ATTRS{bDeviceProtocol}=="01"
ATTRS{tx_lanes}=="1"
ATTRS{removable}=="unknown"
ATTRS{idVendor}=="1d6b"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{interface_authorized_default}=="1"
ATTRS{bDeviceSubClass}=="00"
ATTRS{maxchild}=="12"
ATTRS{authorized}=="1"
ATTRS{version}==" 2.00"
ATTRS{manufacturer}=="Linux 5.4.0-56-generic xhci-hcd"
ATTRS{urbnum}=="600"
ATTRS{bNumInterfaces}==" 1"
ATTRS{devnum}=="1"
ATTRS{quirks}=="0x0"
ATTRS{speed}=="480"
ATTRS{bcdDevice}=="0504"
ATTRS{bDeviceClass}=="09"
ATTRS{bNumConfigurations}=="1"
ATTRS{authorized_default}=="1"

looking at parent device '/devices/pci0000:00/0000:00:14.0':
KERNELS=="0000:00:14.0"
SUBSYSTEMS=="pci"
DRIVERS=="xhci_hcd"
ATTRS{dbc}=="disabled"
ATTRS{enable}=="1"
ATTRS{revision}=="0x30"
ATTRS{ari_enabled}=="0"
ATTRS{driver_override}=="(null)"
ATTRS{numa_node}=="-1"
ATTRS{subsystem_device}=="0x5075"
ATTRS{local_cpulist}=="0-7"
ATTRS{msi_bus}=="1"
ATTRS{class}=="0x0c0330"
ATTRS{vendor}=="0x8086"
ATTRS{consistent_dma_mask_bits}=="64"
ATTRS{dma_mask_bits}=="64"
ATTRS{broken_parity_status}=="0"
ATTRS{d3cold_allowed}=="1"
ATTRS{irq}=="125"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{device}=="0x9ded"
ATTRS{local_cpus}=="ff"

looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
```

I suppose the actual board is the 4th block, is that right?

```
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-1':
KERNELS=="1-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{speed}=="12"
ATTRS{bmAttributes}=="80"
ATTRS{version}==" 1.10"
ATTRS{bDeviceClass}=="ff"
ATTRS{removable}=="removable"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{rx_lanes}=="1"
ATTRS{ltm_capable}=="no"
ATTRS{product}=="USB Serial"
ATTRS{urbnum}=="15"
ATTRS{idVendor}=="1a86"
ATTRS{quirks}=="0x0"
ATTRS{busnum}=="1"
ATTRS{tx_lanes}=="1"
ATTRS{devpath}=="1"
ATTRS{bcdDevice}=="0264"
ATTRS{idProduct}=="7523"
ATTRS{devnum}=="15"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPower}=="98mA"
ATTRS{maxchild}=="0"
ATTRS{bConfigurationValue}=="1"
ATTRS{authorized}=="1"
```

Can you say a bit more about the idVendor / idProduct etc? Are these well the ones that should be used for udev rules?
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum