Eu tenho um kernel Linux personalizado e um driver de modo de usuário para detectar o scanner de código de barras USB. O driver está obtendo as informações do dispositivo (PID, VID, Número de série, etc.) usando o udev, mas nesse ambiente o driver não está conseguindo obter os atributos relevantes do udev. Eu iniciei o daemon do udevd. Isso é um problema com a falta de componentes no kernel personalizado?
neste caso o dmesg está dando a saída abaixo quando desconectar e conectar ao sistema, o que é um pouco diferente com uma distribuição Ubuntu 14.04 LTS.
usb 4-1: new full-speed USB device number 2 using ohci-pci
hid-generic 0003:05E0:1900.0001: hiddev0: USB HID v1.10 Device [Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner] on usb-0000:00:13.0-1/input0
EXT2-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 944K (ffffffff81d18000 - ffffffff81e04000)
usb 3-1: new full-speed USB device number 2 using ohci-pci
cdc_acm 3-1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 3-1:1.0: ttyACM0: USB ACM device
eth0: 0xffffc90000030000, 00:8c:fa:d0:37:a4, IRQ 32
usb 3-4: new low-speed USB device number 3 using ohci-pci
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
input: HP USB Keyboard as /devices/pci0000:00/0000:00:12.0/usb3/3-4/3-4:1.0/0003:03F0:0D4A.0002/input/input11
hid-generic 0003:03F0:0D4A.0002: input: USB HID v1.10 Keyboard [HP USB Keyboard] on usb-0000:00:12.0-4/input0
input: HP USB Keyboard as /devices/pci0000:00/0000:00:12.0/usb3/3-4/3-4:1.1/0003:03F0:0D4A.0003/input/input12
hid-generic 0003:03F0:0D4A.0003: input: USB HID v1.10 Device [HP USB Keyboard] on usb-0000:00:12.0-4/input1
r8168: eth0: link up
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
EXT2-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
usb 4-1: USB disconnect, device number 2
usb 4-1: new full-speed USB device number 3 using ohci-pci
hid-generic 0003:05E0:1900.0004: hiddev0: USB HID v1.10 Device [Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner] on usb-0000:00:13.0-1/input0
EXT2-fs (ram2): warning: mounting unchecked fs, running e2fsck is recommended
EXT2-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
random: nonblocking pool is initialized
systemd-udevd[1214]: starting version 204
usb 4-1: USB disconnect, device number 3
usb 4-1: new full-speed USB device number 4 using ohci-pci
hid-generic 0003:05E0:1900.0005: hiddev0: USB HID v1.10 Device [Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner] on usb-0000:00:13.0-1/input0
em um sistema Ubuntu 14.04 LTS, fiquei abaixo pelo dmesg.
[452821.991512] usb 1-1.5.1: new full-speed USB device number 29 using ehci-pci
[452822.102238] usb 1-1.5.1: New USB device found, idVendor=05e0, idProduct=1200
[452822.102252] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[452822.102255] usb 1-1.5.1: Product: Symbol Bar Code Scanner
[452822.102257] usb 1-1.5.1: Manufacturer: Symbol Technologies, Inc, 2008
[452822.102260] usb 1-1.5.1: SerialNumber: S/N:D1464B8C235E9048A89170C641982831 Rev:PAAASS00-007-R00-3
[452822.103795] input: Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:05E0:1200.0017/input/input14
[452822.160028] hid-generic 0003:05E0:1200.0017: input,hidraw0: USB HID v1.10 Keyboard [Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner] on usb-0000:00:1a.0-1.5.1/input0
[494622.996400] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.001114] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.005829] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.010549] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.015262] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.019972] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.024679] [drm:intel_dp_link_training_clock_recovery [i915]] *ERROR* too many voltage retries, give up
[494623.024875] [drm:intel_dp_link_training_channel_equalization [i915]] *ERROR* failed to train DP, aborting
[495874.843869] Chrome_~dThread[23473]: segfault at 0 ip 00007f844b8d079f sp 00007f84499b8b00 error 6 in libxul.so[7f844aa82000+598f000]
[495874.890734] Chrome_~dThread[23410]: segfault at 0 ip 00007ff432dd079f sp 00007ff430eb8b00 error 6 in libxul.so[7ff431f82000+598f000]
[495944.953671] usb 1-1.5.1: USB disconnect, device number 29
[495949.282807] usb 1-1.5.1: new full-speed USB device number 30 using ehci-pci
[495949.393655] usb 1-1.5.1: New USB device found, idVendor=05e0, idProduct=1200
[495949.393668] usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[495949.393671] usb 1-1.5.1: Product: Symbol Bar Code Scanner
[495949.393673] usb 1-1.5.1: Manufacturer: Symbol Technologies, Inc, 2008
[495949.393676] usb 1-1.5.1: SerialNumber: S/N:D1464B8C235E9048A89170C641982831 Rev:PAAASS00-007-R00-3
[495949.395227] input: Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:05E0:1200.0018/input/input15
[495949.451857] hid-generic 0003:05E0:1200.0018: input,hidraw0: USB HID v1.10 Keyboard [Symbol Technologies, Inc, 2008 Symbol Bar Code Scanner] on usb-0000:00:1a.0-1.5.1/input0
[496635.470075] systemd-udevd[1059]: starting version 204
[497583.349462] audit: type=1400 audit(1528856143.415:45): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=1484 comm="apparmor_parser"
[497583.349473] audit: type=1400 audit(1528856143.415:46): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=1484 comm="apparmor_parser"
[505675.003576] systemd-hostnamed[2444]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
dwft78@dwft78-HP-Compaq-Pro-6300-SFF:~/projects/CoreScanner/zebra-corescanner-sdk-lotomatica/Native/CsDependencies$
com o sistema padrão do Ubuntu, eu posso ver os atributos udev Product, Manufacturer e SerialNumber listados corretamente, mas não no kernel personalizado. também no sistema baseado no kernel do Ubuntu customizado eu não consigo obter todos os valores esperados de atributos / udev para o comando " udev info /dev/hidraw0
". mostra apenas alguns atributos.
P: /devices/pci0000:00/0000:00:13.0/usb4/4-1/4-1:1.0/usbmisc/hiddev0
N: usb/hiddev0
E: DEVNAME=/dev/usb/hiddev0
E: DEVPATH=/devices/pci0000:00/0000:00:13.0/usb4/4-1/4-1:1.0/usbmisc/hiddev0
E: MAJOR=180
E: MINOR=96
E: SUBSYSTEM=usbmisc
mas no Ubuntu 14.04, eu posso ver a lista completa como abaixo.
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:05E0:1200.0018/hidraw/hidraw0
N: hidraw0
E: DEVNAME=/dev/hidraw0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.5/1-1.5.1/1-1.5.1:1.0/0003:05E0:1200.0018/hidraw/hidraw0
E: ID_BUS=usb
E: ID_MODEL=Symbol_Bar_Code_Scanner
E: ID_MODEL_ENC=Symbol\x20Bar\x20Code\x20Scanner
E: ID_MODEL_ID=1200
E: ID_REVISION=0100
E: ID_SERIAL=Symbol_Technologies__Inc__2008_Symbol_Bar_Code_Scanner_S_N:D1464B8C235E9048A89170C641982831_Rev:PAAASS00-007-R00-3
E: ID_SERIAL_SHORT=S_N:D1464B8C235E9048A89170C641982831_Rev:PAAASS00-007-R00-3
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030101:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Symbol_Technologies__Inc__2008
E: ID_VENDOR_ENC=Symbol\x20Technologies\x2c\x20Inc\x2c\x202008
E: ID_VENDOR_ID=05e0
E: MAJOR=246
E: MINOR=0
E: SUBSYSTEM=hidraw
E: USEC_INITIALIZED=452808648423
Este é um problema com o udev ou com o problema USB-Hidraw neste sistema Ubuntu customizado?
Tags kernel usb udev kernel-modules ubuntu