[libhid-discuss] Opening Microchip Mouse In a Circle Demo in ubuntu

Kim Chuan Lim lim.kim.chuan at gmail.com
Thu Aug 7 08:37:43 UTC 2008


sorry for cross posting..

Hi ya,

I'm using kubuntu with linux kernel version 2.6.24-19.

I'm not sure what is the correct way of reading and writing from the
device. The following is some output from test_libhid.c

device identification of HIDInterface 004/006[0]:
 dev_handle:    0x0804b350
 device:        0x08057258
 location:      004/006
 manufacturer:  Microchip Technology Inc.
 product:       Mouse In a Circle Demo
dump tree....
 TRACE: hid_reset_parser(): resetting the HID parser for USB device
004/006[0]...
 TRACE: hid_dump_tree(): iterating the parse tree for USB device 004/006[0]...
parse tree of HIDInterface 004/006[0]:
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x80
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 path: 0xffff0001.0x00000000; type: 0x90
 TRACE: hid_reset_parser(): resetting the HID parser for USB device
004/006[0]...
 TRACE: hid_get_input_report(): looking up report ID...
 TRACE: hid_prepare_parse_path(): preparing search path of depth 2
for parse tree of USB device 004/006[0]...
 TRACE: hid_prepare_parse_path(): search path prepared for parse tree
of USB device 004/006[0].
 NOTICE: hid_find_object(): found requested item.
 TRACE: hid_get_input_report(): retrieving report ID 0x00 (length:
64) from USB device 004/006[0]...
WARNING: hid_get_input_report(): failed to retrieve report from USB
device 004/006[0]:error sending control message: Broken pipe.
hid_get_input_report failed with return code 20

Can someone tell me what is the correct information to retrieve report?

The following is some system information.
dmesg
[102780.879169] usb 4-1: new full speed USB device using uhci_hcd and address 6
[102780.892127] usb 4-1: configuration #1 chosen from 1 choice
[102780.906887] hiddev96hidraw1: USB HID v1.11 Device [Microchip
Technology Inc. Mouse In a Circle Demo] on usb-0000:00:1d.1-1

sudo lsusb -d 04d8:003f -vvv

Bus 004 Device 006: ID 04d8:003f Microchip Technology, Inc.
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               1.10
 bDeviceClass            0 (Defined at Interface level)
 bDeviceSubClass         0
 bDeviceProtocol         0
 bMaxPacketSize0         8
 idVendor           0x04d8 Microchip Technology, Inc.
 idProduct          0x003f
 bcdDevice            0.02
 iManufacturer           1 Microchip Technology Inc.
 iProduct                2 Mouse In a Circle Demo
 iSerial                 0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength           41
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xc0
     Self Powered
   MaxPower              100mA
   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.11
         bCountryCode            0 Not supported
         bNumDescriptors         1
         bDescriptorType        34 Report
         wDescriptorLength      28
         Report Descriptor: (length is 28)
           Item(Global): Usage Page, data= [ 0xff 0xff ] 65535
                           (null)
           Item(Local ): Usage, data= [ 0x01 ] 1
                           (null)
           Item(Main  ): Collection, data= [ 0x01 ] 1
                           Application
           Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                           (null)
           Item(Local ): Usage Maximum, data= [ 0x40 ] 64
                           (null)
           Item(Global): Logical Minimum, data= [ 0x00 ] 0
           Item(Global): Logical Maximum, data= [ 0xff ] 255
           Item(Global): Report Size, data= [ 0x08 ] 8
           Item(Global): Report Count, data= [ 0x40 ] 64
           Item(Main  ): Input, data= [ 0x02 ] 2
                           Data Variable Absolute No_Wrap Linear
                           Preferred_State No_Null_Position
Non_Volatile Bitfield
           Item(Local ): Usage Minimum, data= [ 0x01 ] 1
                           (null)
           Item(Local ): Usage Maximum, data= [ 0x40 ] 64
                           (null)
           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     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0040  1x 64 bytes
       bInterval              10
     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              10
Device Status:     0x0001
 Self Powered

Hope you guys can help me.

Regards,
Kim Chuan.



More information about the libhid-discuss mailing list