не использовать hid драйвер для usb устройства
Добрый день.
Есть usb устройство, которое определяется как hid клавиатура. через
echo 2-2.2:1.0 > /sys/bus/usb/drivers/usbhid/unbind
А надо бы навсегда) При этом систем много, желательно минимальным вмешательством.
Может как-то через правило udev?
udevadm info -a
looking at device '/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0/0003:E851:2100.0005':
KERNEL=="0003:E851:2100.0005"
SUBSYSTEM=="hid"
DRIVER=="hid-generic"
ATTR{country}=="00"
looking at parent device '/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0':
KERNELS=="2-2.2:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usbhid"
ATTRS{authorized}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceClass}=="03"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bNumEndpoints}=="01"
ATTRS{interface}=="HID Interface"
ATTRS{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2':
KERNELS=="2-2.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}=="64"
ATTRS{bMaxPower}=="500mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0233"
ATTRS{bmAttributes}=="80"
ATTRS{busnum}=="2"
ATTRS{configuration}==""
ATTRS{devnum}=="8"
ATTRS{devpath}=="2.2"
ATTRS{idProduct}=="2100"
ATTRS{idVendor}=="e851"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Manufacturer"
ATTRS{maxchild}=="0"
ATTRS{product}=="Barcode Reader"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{speed}=="12"
ATTRS{urbnum}=="16"
ATTRS{version}==" 1.10"
... далее хаб
udevadm info -a
looking at device '/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2/2-2.2:1.0':
KERNEL=="2-2.2:1.0"
SUBSYSTEM=="usb"
DRIVER==""
ATTR{authorized}=="1"
ATTR{bAlternateSetting}==" 0"
ATTR{bInterfaceClass}=="03"
ATTR{bInterfaceNumber}=="00"
ATTR{bInterfaceProtocol}=="01"
ATTR{bInterfaceSubClass}=="01"
ATTR{bNumEndpoints}=="01"
ATTR{interface}=="HID Interface"
ATTR{supports_autosuspend}=="1"
looking at parent device '/devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.2':
KERNELS=="2-2.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}=="64"
ATTRS{bMaxPower}=="500mA"
ATTRS{bNumConfigurations}=="1"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bcdDevice}=="0233"
ATTRS{bmAttributes}=="80"
ATTRS{busnum}=="2"
ATTRS{configuration}==""
ATTRS{devnum}=="8"
ATTRS{devpath}=="2.2"
ATTRS{idProduct}=="2100"
ATTRS{idVendor}=="e851"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Manufacturer"
ATTRS{maxchild}=="0"
ATTRS{product}=="Barcode Reader"
ATTRS{quirks}=="0x0"
ATTRS{removable}=="unknown"
ATTRS{speed}=="12"
ATTRS{urbnum}=="16"
ATTRS{version}==" 1.10"