[libhid-discuss] unable to get input report

stdht.inbox at gmail.com stdht.inbox at gmail.com
Tue Jan 13 08:44:23 UTC 2009


Hello

My device is an usb barcode scanner. It works in 2 modes: simulates
usb keyboard or acts like usb2serial device (general hid). I use it in mode 2 as
general hid device.
I used raw hid under linux and was able to read interrupt reports and
used function ioctl(HIDIOCGUSAGES,...) to retrieve all the array of
usages (about 63 values)...

Now I am using libhid. I receive interrupt reports without problems
but how to get array of usages????

hid_get_input_report with path 0xff03c00, 0xff030d03, 0xff030022
or 0xff03c00, 0xff030d03, 0xff030050 with lengths (1,63,64) fails
with code 20.

My hidtrace and related info:

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        16
  idVendor           0x05e0 Symbol Technologies
  idProduct          0x0600 
  bcdDevice            2.01
  iManufacturer           1 ?Symbol Technologies, Inc, 2002
  iProduct                2 Symbol Bar Code Scanner
  iSerial                 3 S/N:1BBFACCB09D4 Rev:NBRMIAAU5
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Bus Powered
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              400mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Devices
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      40
          Report Descriptor: (length is 40)
            Item(Global): Usage Page, data= [ 0x03 0xff ] 65283
                            (null)
            Item(Local ): Usage, data= [ 0x00 0x0c ] 3072
                            (null)
            Item(Main  ): Collection, data= [ 0x01 ] 1
                            Application
            Item(Local ): Usage, data= [ 0x03 0x0d ] 3331
                            (null)
            Item(Main  ): Collection, data= [ 0x02 ] 2
                            Logical
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x01 ] 1
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0x3f ] 63
            Item(Local ): Usage, data= [ 0x50 ] 80
                            (null)
            Item(Main  ): Input, data= [ 0x02 ] 2
                            Data Variable Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Global): Report Size, data= [ 0x08 ] 8
            Item(Global): Report Count, data= [ 0x3f ] 63
            Item(Global): Logical Minimum, data= [ 0x00 ] 0
            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
            Item(Local ): Usage, data= [ 0x22 ] 34
                            (null)
            Item(Main  ): Input, data= [ 0x00 ] 0
                            Data Array Absolute No_Wrap Linear
                            Preferred_State No_Null_Position Non_Volatile Bitfield
            Item(Main  ): End Collection, data=none
            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              10
Device Status:     0x0000
  (Bus Powered)

TRACE: hid_dump_tree(): iterating the parse tree for USB device 003/030[0]...
parse tree of HIDInterface 003/030[0]:
  path: 0xff030c00.0xff030d03.0xff030050; type: 0x80
  path: 0xff030c00.0xff030d03.0xff030022; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80
  path: 0xff030c00.0xff030d03.0x00000000; type: 0x80




-----------------------------------------------------


Best regards,
Serge.




More information about the libhid-discuss mailing list