Doubt information between udevadm and lsusb commands

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Doubt information between udevadm and lsusb commands

Postby pixidu » 2019-10-10 16:00

Hi all!

I'm looking for why the command "udevadm info /dev/video0" is showing different information of "lsusb" command. Both commands have the same VENDOR_ID (04ca:7070), but the ID_VENDOR from udevadm is showing "8SSC20F27068L1GZ9430E11" that is different from lsusb that it's showing "Lite-on Technology Corp.". Is it a bug of udevadm command? I need know this because my application is using the library (libudev) to show information about this device.

Information about system are below:
Code: Select all
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
10.1
****************************************************
UDEVADM VERSION
241


Commands that I did It's showing below:
Code: Select all
$ls /dev/video*
/dev/video0
/dev/video1
*************
$lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 06cb:00bd Synaptics, Inc.
Bus 001 Device 005: ID 04ca:7070 Lite-On Technology Corp.
Bus 001 Device 004: ID 04f3:289b Elan Microelectronics Corp.
Bus 001 Device 003: ID 0951:1665 Kingston Technology Digital DataTraveler SE9 64GB
Bus 001 Device 008: ID 0951:1643 Kingston Technology DataTraveler G3
Bus 001 Device 007: ID 8087:0026 Intel Corp.
Bus 001 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
******************************************************************************************************************************************
$udevadm info /dev/video0

P: /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/video4linux/video0
N: video0
L: 0
S: v4l/by-path/pci-0000:00:14.0-usb-0:8:1.0-video-index0
S: v4l/by-id/usb-8SSC20F27068L1GZ9430E11_Integrated_Camera-video-index0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/video4linux/video0
E: DEVNAME=/dev/video0
E: MAJOR=81
E: MINOR=0
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=10501404
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=Integrated Camera: Integrated C
E: ID_V4L_CAPABILITIES=:capture:
E: ID_VENDOR=8SSC20F27068L1GZ9430E11
E: ID_VENDOR_ENC=8SSC20F27068L1GZ9430E11
E: ID_VENDOR_ID=04ca
E: ID_MODEL=Integrated_Camera
E: ID_MODEL_ENC=Integrated\x20Camera
E: ID_MODEL_ID=7070
E: ID_REVISION=0023
E: ID_SERIAL=8SSC20F27068L1GZ9430E11_Integrated_Camera
E: ID_TYPE=video
E: ID_BUS=usb
E: ID_USB_INTERFACES=:0e0100:0e0200:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uvcvideo
E: ID_PATH=pci-0000:00:14.0-usb-0:8:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_8_1_0
E: ID_FOR_SEAT=video4linux-pci-0000_00_14_0-usb-0_8_1_0
E: DEVLINKS=/dev/v4l/by-path/pci-0000:00:14.0-usb-0:8:1.0-video-index0 /dev/v4l/by-id/usb-8SSC20F27068L1GZ9430E11_Integrated_Camera-video-index0
E: TAGS=:seat:uaccess:
************************************************************************************************************************************************
$udevadm info /dev/video1

P: /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/video4linux/video1
N: video1
L: 0
S: v4l/by-id/usb-8SSC20F27068L1GZ9430E11_Integrated_Camera-video-index1
S: v4l/by-path/pci-0000:00:14.0-usb-0:8:1.0-video-index1
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0/video4linux/video1
E: DEVNAME=/dev/video1
E: MAJOR=81
E: MINOR=1
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=10501237
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=Integrated Camera: Integrated C
E: ID_V4L_CAPABILITIES=:capture:
E: ID_VENDOR=8SSC20F27068L1GZ9430E11
E: ID_VENDOR_ENC=8SSC20F27068L1GZ9430E11
E: ID_VENDOR_ID=04ca
E: ID_MODEL=Integrated_Camera
E: ID_MODEL_ENC=Integrated\x20Camera
E: ID_MODEL_ID=7070
E: ID_REVISION=0023
E: ID_SERIAL=8SSC20F27068L1GZ9430E11_Integrated_Camera
E: ID_TYPE=video
E: ID_BUS=usb
E: ID_USB_INTERFACES=:0e0100:0e0200:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uvcvideo
E: ID_PATH=pci-0000:00:14.0-usb-0:8:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_8_1_0
E: ID_FOR_SEAT=video4linux-pci-0000_00_14_0-usb-0_8_1_0
E: DEVLINKS=/dev/v4l/by-id/usb-8SSC20F27068L1GZ9430E11_Integrated_Camera-video-index1 /dev/v4l/by-path/pci-0000:00:14.0-usb-0:8:1.0-video-index1
E: TAGS=:uaccess:seat:


Thanks for any help.
Last edited by pixidu on 2019-10-11 12:09, edited 2 times in total.
pixidu
 
Posts: 4
Joined: 2019-10-10 14:41

Re: Wrongs information between udevadm and lsusb commands

Postby L_V » 2019-10-10 17:34

Nothing wrong for video0 key values, or I miss something

lsusb: Bus 001 Device 005: ID 04ca:7070 Lite-On Technology Corp.

udbadm: DEVNAME=/dev/video0 / ID_VENDOR_ID=04ca / ID_MODEL_ID=7070

+
Code: Select all
apt-cache policy udev | grep Inst
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Wrongs information between udevadm and lsusb commands

Postby p.H » 2019-10-11 07:10

What makes you think that these strings should match ?
AFAIK, the strings displayed by lsusb come from the local USB ID database, and I suspect that the strings displayed by udevadm come from the device itself.
Did you check with lsusb -v ?
p.H
 
Posts: 1151
Joined: 2017-09-17 07:12

Re: Wrongs information between udevadm and lsusb commands

Postby pixidu » 2019-10-11 12:05

Hi all!

L_V, I have made this and the information from the command apt-cache is showing below:
Code: Select all
  Installed: 241-7~deb10u1


p.H, I had thought about these strings should math because I was looking only for the simple information of "lsusb" command. When I used the command that you said, I understood what It was going on. Some output information from command "lsusb -v" is being showed below:
Code: Select all
Bus 001 Device 006: ID 04ca:7070 Lite-On Technology Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x04ca Lite-On Technology Corp.
  idProduct          0x7070
  bcdDevice            0.23
  iManufacturer           1 8SSC20F27068L1GZ9430E11
  iProduct                2 Integrated Camera
  iSerial                 0
  bNumConfigurations      1


Some doubt that I have It are:

[*] Why others integrated camera was showing the name of company in attribute ID_VENDOR and only in this specific camera is being showed stranger string "8SSC20F27068L1GZ9430E11"?[/*]
[*] Which attribute from libudev can I use since the command "udevadm info -a /dev/video0" does not show any attributes with the company name information "Lite-on Technology Corp."? The output from this command is being showed below:[/*]

Code: Select all
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-8/1-8:1.0/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{index}=="0"
    ATTR{dev_debug}=="0"
    ATTR{name}=="Integrated Camera: Integrated C"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0':
    KERNELS=="1-8:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="uvcvideo"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{iad_bFunctionSubClass}=="03"
    ATTRS{iad_bFunctionClass}=="0e"
    ATTRS{authorized}=="1"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceSubClass}=="01"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{iad_bFunctionProtocol}=="00"
    ATTRS{iad_bInterfaceCount}=="02"
    ATTRS{bInterfaceClass}=="0e"
    ATTRS{iad_bFirstInterface}=="00"
    ATTRS{interface}=="Integrated Camera"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-8':
    KERNELS=="1-8"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{ltm_capable}=="no"
    ATTRS{product}=="Integrated Camera"
    ATTRS{rx_lanes}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{speed}=="480"
    ATTRS{idProduct}=="7070"
    ATTRS{idVendor}=="04ca"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{tx_lanes}=="1"
    ATTRS{bNumInterfaces}==" 2"
    ATTRS{version}==" 2.01"
    ATTRS{manufacturer}=="8SSC20F27068L1GZ9430E11"
    ATTRS{bDeviceSubClass}=="02"
    ATTRS{bMaxPower}=="500mA"
    ATTRS{bmAttributes}=="80"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{busnum}=="1"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{configuration}==""
    ATTRS{bNumConfigurations}=="1"
    ATTRS{maxchild}=="0"
    ATTRS{removable}=="fixed"
    ATTRS{urbnum}=="66"
    ATTRS{quirks}=="0x0"
    ATTRS{bcdDevice}=="0023"
    ATTRS{devnum}=="6"
    ATTRS{devpath}=="8"
    ATTRS{bDeviceClass}=="ef"
    ATTRS{authorized}=="1"

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

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

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

*************************************************************************************************************


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-8/1-8:1.0/video4linux/video1':
    KERNEL=="video1"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{name}=="Integrated Camera: Integrated C"
    ATTR{index}=="1"
    ATTR{dev_debug}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.0':
    KERNELS=="1-8:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="uvcvideo"
    ATTRS{iad_bFunctionClass}=="0e"
    ATTRS{bInterfaceClass}=="0e"
    ATTRS{supports_autosuspend}=="1"
    ATTRS{iad_bInterfaceCount}=="02"
    ATTRS{iad_bFirstInterface}=="00"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{iad_bFunctionProtocol}=="00"
    ATTRS{iad_bFunctionSubClass}=="03"
    ATTRS{interface}=="Integrated Camera"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bNumEndpoints}=="01"
    ATTRS{authorized}=="1"
    ATTRS{bInterfaceProtocol}=="00"
    ATTRS{bInterfaceSubClass}=="01"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-8':
    KERNELS=="1-8"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{manufacturer}=="8SSC20F27068L1GZ9430E11"
    ATTRS{configuration}==""
    ATTRS{bDeviceSubClass}=="02"
    ATTRS{urbnum}=="66"
    ATTRS{devpath}=="8"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{maxchild}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{speed}=="480"
    ATTRS{idProduct}=="7070"
    ATTRS{devnum}=="6"
    ATTRS{tx_lanes}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{bcdDevice}=="0023"
    ATTRS{product}=="Integrated Camera"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bNumInterfaces}==" 2"
    ATTRS{idVendor}=="04ca"
    ATTRS{bMaxPower}=="500mA"
    ATTRS{removable}=="fixed"
    ATTRS{rx_lanes}=="1"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{quirks}=="0x0"
    ATTRS{bmAttributes}=="80"
    ATTRS{version}==" 2.01"
    ATTRS{authorized}=="1"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bDeviceClass}=="ef"
    ATTRS{busnum}=="1"

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

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

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



Thanks for help!
Best Regards.
pixidu
 
Posts: 4
Joined: 2019-10-10 14:41

Re: Doubt information between udevadm and lsusb commands

Postby p.H » 2019-10-11 20:20

pixidu wrote:Why others integrated camera was showing the name of company in attribute ID_VENDOR and only in this specific camera is being showed stranger string

Only the manufacturer can answer this question.

pixidu wrote:Which attribute from libudev can I use since the command "udevadm info -a /dev/video0" does not show any attributes with the company name information "Lite-on Technology Corp."?

Use for what ? If you want to match the vendor, you can use the numeric Vendor ID 04ca.
p.H
 
Posts: 1151
Joined: 2017-09-17 07:12

Re: Doubt information between udevadm and lsusb commands

Postby pixidu » 2019-10-14 10:33

p.H wrote:Only the manufacturer can answer this question.


You're correct! I understand this with the command "lsusb -v" that the both commands were showing the same manufacturer information.

p.H wrote:Use for what ? If you want to match the vendor, you can use the numeric Vendor ID 04ca.


It's just to show for user. I had concluded that If I want to show more information from manufacturer I need to do a database with some information of Vendor ID or just show "unknown manufacturer".

Thank you very much!
Last edited by pixidu on 2019-10-20 15:26, edited 1 time in total.
pixidu
 
Posts: 4
Joined: 2019-10-10 14:41

Re: Doubt information between udevadm and lsusb commands

Postby p.H » 2019-10-20 08:30

pixidu wrote: the command "lsbd -v"

Do you mean "lsusb -v" ?

pixidu wrote:I had concluded that If I want to show more information from manufacturer I need to do a database with some information of Vendor ID

There is already a USB vendor/product ID database (actually plain text file/usr/share/misc/usb.ids) installed, updated and used by usbutils (lsusb). Also, udev has a USB database (/lib/udev/hwdb.d/20-usb-vendor-model.hwdb).
p.H
 
Posts: 1151
Joined: 2017-09-17 07:12

Re: Doubt information between udevadm and lsusb commands

Postby pixidu » 2019-10-20 15:33

p.H wrote:Do you mean "lsusb -v" ?

Yes! I had a confusion.

p.H wrote:There is already a USB vendor/product ID database (actually plain text file/usr/share/misc/usb.ids) installed, updated and used by usbutils (lsusb). Also, udev has a USB database (/lib/udev/hwdb.d/20-usb-vendor-model.hwdb).

Thanks p.H! I'll check this.

Best Regards.
pixidu
 
Posts: 4
Joined: 2019-10-10 14:41


Return to Hardware

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable