Como obter meu dispositivo reconhecido como um dispositivo HID?

1

Estou tentando fazer com que um dispositivo USB HID funcione no Ubuntu, mas parece que ele não funciona. É um dispositivo USB HID e aparece como tal no dmesg:

[ 2236.277518] usb 1-1: new full-speed USB device number 17 using xhci_hcd
[ 2236.429224] usb 1-1: New USB device found, idVendor=0b6a, idProduct=5346
[ 2236.429230] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2236.429234] usb 1-1: Product: Rejoyce 
[ 2236.429237] usb 1-1: Manufacturer: REHABTRONICS
[ 2236.429240] usb 1-1: SerialNumber: 0000
[ 2758.828284] usb 1-1: USB disconnect, device number 17
[ 2760.813658] usb 1-1: new full-speed USB device number 18 using xhci_hcd
[ 2760.966827] usb 1-1: New USB device found, idVendor=0b6a, idProduct=5346
[ 2760.966829] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2760.966830] usb 1-1: Product: Rejoyce 
[ 2760.966832] usb 1-1: Manufacturer: REHABTRONICS
[ 2760.966832] usb 1-1: SerialNumber: 0000

mas o driver genérico-oculto não está carregado e nada de novo aparece em /dev/hidraw*

A execução de lsusb no dispositivo (que é exibido em /dev/bus/usb/001/ ) fornece:

Bus 001 Device 018: ID 0b6a:5346 Maxim Integrated Products 
Device Descriptor:
bLength                18
bDescriptorType         1
bcdUSB               2.00
bDeviceClass          255 Vendor Specific Class
bDeviceSubClass       255 Vendor Specific Subclass
bDeviceProtocol       255 Vendor Specific Protocol
bMaxPacketSize0        64
idVendor           0x0b6a Maxim Integrated Products
idProduct          0x5346 
bcdDevice            0.01
iManufacturer           1 REHABTRONICS
iProduct                2 Rejoyce 
iSerial                 3 0000
bNumConfigurations      1
Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
    (Bus Powered)
    MaxPower              450mA
    Interface Descriptor:
    bLength                 9
    bDescriptorType         4
    bInterfaceNumber        0
    bAlternateSetting       0
    bNumEndpoints           2
    bInterfaceClass         3 Human Interface Device
    bInterfaceSubClass      0 No Subclass
    bInterfaceProtocol      0 None
    iInterface              0 
        HID Device Descriptor:
        bLength                 9
        bDescriptorType        33
        bcdHID               1.10
        bCountryCode            0 Not supported
        bNumDescriptors         1
        bDescriptorType        34 Report
        wDescriptorLength      34
        Report Descriptor: (length is 34)
            Item(Global): Usage Page, data= [ 0xa0 0xff ] 65440
                            (null)
            Item(Local ): Usage, data= [ 0x01 ] 1
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Local ): Usage, data= [ 0x02 ] 2
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x20 ] 32
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Local ): Usage, data= [ 0x03 ] 3
                            (null)
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x08 ] 8
            Item(Main  ): Output, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
    Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
        Transfer Type            Interrupt
        Synch Type               None
        Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              16
    Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
        Transfer Type            Interrupt
        Synch Type               None
        Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              16
Device Status:     0x0000
(Bus Powered)

Que mais uma vez implica um dispositivo USB HID.

udevadm info /dev/bus/usb/001/018 dá:

P: /devices/pci0000:00/0000:00:14.0/usb1/1-1
N: bus/usb/001/018
E: BUSNUM=001
E: DEVNAME=/dev/bus/usb/001/018
E: DEVNUM=018
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-1
E: DEVTYPE=usb_device
E: DRIVER=usb
E: ID_BUS=usb
E: ID_MODEL=Rejoyce
E: ID_MODEL_ENC=Rejoyce\x20
E: ID_MODEL_ID=5346
E: ID_REVISION=0001
E: ID_SERIAL=REHABTRONICS_Rejoyce_0000
E: ID_SERIAL_SHORT=0000
E: ID_USB_INTERFACES=:030000:
E: ID_VENDOR=REHABTRONICS
E: ID_VENDOR_ENC=REHABTRONICS
E: ID_VENDOR_FROM_DATABASE=Maxim Integrated Products
E: ID_VENDOR_ID=0b6a
E: MAJOR=189
E: MINOR=17
E: PRODUCT=b6a/5346/1
E: SUBSYSTEM=usb
E: TYPE=255/255/255
E: USEC_INITIALIZED=2760968874

Eu criei uma regra do udev em /etc/udev/rules.d/99-hid.rules com o conteúdo (e variações sobre isso):

SUBSYSTEM=="usb", ATTRS{idVendor}=="0b6a", MODE="0666"
KERNEL=="hidraw*", ATTRS{busnum}=="001", ATTRS{idVendor}=="0b6a", MODE="0666"

Mas isso não parece ter feito nada (mesmo depois de recarregar com udevadm control --reload-rules e reinicialização).

Eu estou em uma perda completa sobre o que fazer aqui, outros dispositivos HID funcionam muito bem (por exemplo, desconectando e conectando meu teclado dá o seguinte no dmesg:)

[ 3329.994265] usb 1-2: USB disconnect, device number 11
[ 3332.283514] usb 1-2: new full-speed USB device number 19 using xhci_hcd
[ 3332.432917] usb 1-2: New USB device found, idVendor=2516, idProduct=0047
[ 3332.432923] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3332.432927] usb 1-2: Product: MasterKeys Pro L White
[ 3332.432931] usb 1-2: Manufacturer: Cooler Master Technology Inc.
[ 3332.434839] input: Cooler Master Technology Inc. MasterKeys Pro L White as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:2516:0047.0011/input/input30
[ 3332.491698] hid-generic 0003:2516:0047.0011: input,hidraw3: USB HID v1.11 Keyboard [Cooler Master Technology Inc. MasterKeys Pro L White] on usb-0000:00:14.0-2/input0
[ 3332.492863] hid-generic 0003:2516:0047.0012: hiddev1,hidraw4: USB HID v1.11 Device [Cooler Master Technology Inc. MasterKeys Pro L White] on usb-0000:00:14.0-2/input1
[ 3332.494695] input: Cooler Master Technology Inc. MasterKeys Pro L White as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:2516:0047.0013/input/input31
[ 3332.555443] hid-generic 0003:2516:0047.0013: input,hidraw5: USB HID v1.11 Keyboard [Cooler Master Technology Inc. MasterKeys Pro L White] on usb-0000:00:14.0-2/input2

Algum conselho sobre como reconhecer este dispositivo como um dispositivo HID?

Obrigado!

    
por FuzzyWuzzie 05.11.2018 / 18:06

0 respostas