[libhid-discuss] Trouble with IOCTL_USB_REAPURB

Storm Scratcher stormscratcher at gmail.com
Tue Jan 2 11:55:32 CET 2007


Hi and happy new year,

I tested with different version of libusb 1.0.8->1.0.12
This worked for me : libusb 0.1.12 + libhid from svn
But to work, i'm need to tune timeout parameter of function
hid_interrupt_read to 0
It doesn't work with a timeout > 0

I just asked you a problem about closing hid connection : with timeout=0
(hid_interrupt_read), how closing hid connection ?
I tried to close hid connection during hid_interrupt_read wait
and after restarting program written in C, it's not possible to receive data
from barcode scanner.

Debug trace with libusb 0.1.12 + libhid from svn :

usb_set_debug: Setting debugging level to 9 (on)
 NOTICE: hid_init(): libhid 0.2.14.0.0 is being initialized.
  TRACE: hid_init(): initialising USB subsystem...
usb_os_init: Found USB VFS at /proc/bus/usb
  TRACE: hid_init(): scanning for USB busses...
usb_os_find_busses: Skipping non bus directory devices
usb_os_find_busses: Skipping non bus directory drivers
usb_os_find_busses: Found 001
  TRACE: hid_init(): scanning for USB devices...
usb_os_find_devices: Found 001 on 001
usb_os_find_devices: Found 002 on 001
skipped 1 class/vendor specific interface descriptors
 NOTICE: hid_init(): successfully initialised HID library.
  TRACE: hid_new_HIDInterface(): creating a new HIDInterface instance...
  TRACE: hid_force_open(): forcefully opening a device interface according
to matching criteria...
  TRACE: hid_get_usb_handle(): acquiring handle for a USB device...
  TRACE: hid_find_usb_device(): enumerating USB busses...
  TRACE: hid_find_usb_device(): enumerating USB devices on bus 001...
  TRACE: hid_find_usb_device(): inspecting USB device 001/001[0]...
Check that you have permissions to write to 001/001 and, if you don't, that
you set up hotplug (http://linux-hotplug.sourceforge.net/) correctly.
USB error: could not claim interface 0: Device or resource busy
  TRACE: hid_compare_usb_device(): comparing match specifications to USB
device...
  TRACE: hid_compare_usb_device(): inspecting vendor ID...
  TRACE: hid_compare_usb_device(): no match on vendor ID.
  TRACE: hid_compare_usb_device(): inspecting product ID...
  TRACE: hid_compare_usb_device(): no match on product ID.
  TRACE: hid_compare_usb_device(): no custom matching function supplied.
 NOTICE: hid_find_usb_device(): vendor 0x0000 of USB device 001/001[0] does
not match 0x0c2e.
  TRACE: hid_find_usb_device(): inspecting USB device 001/002[0]...
  TRACE: hid_compare_usb_device(): comparing match specifications to USB
device...
  TRACE: hid_compare_usb_device(): inspecting vendor ID...
  TRACE: hid_compare_usb_device(): match on vendor ID: 0x0c2e.
  TRACE: hid_compare_usb_device(): inspecting product ID...
  TRACE: hid_compare_usb_device(): match on product ID: 0x0200.
  TRACE: hid_compare_usb_device(): no custom matching function supplied.
 NOTICE: hid_find_usb_device(): found a matching USB device 001/002[0].
  TRACE: hid_force_open(): claiming USB device 001/002[0].
 NOTICE: hid_force_open(): successfully claimed USB device 001/002[0].
  TRACE: hid_init_parser(): initialising the HID parser for USB Device
001/002[0]...
  TRACE: hid_init_parser(): allocating space for HIDData structure...
  TRACE: hid_init_parser(): successfully allocated memory for HIDData
strcture.
  TRACE: hid_init_parser(): allocating space for HIDParser structure...
  TRACE: hid_init_parser(): successfully allocated memory for HIDParser
strcture.
 NOTICE: hid_init_parser(): successfully initialised the HID parser for USB
Device 001/002[0].
  TRACE: hid_prepare_hid_descriptor(): initialising the HID descriptor for
USB device 001/002[0]...
  TRACE: hid_prepare_hid_descriptor(): retrieving HID descriptor for USB
device 001/002[0]...
 NOTICE: hid_prepare_hid_descriptor(): successfully initialised HID
descriptor for USB device 001/002[0] (63 bytes).
  TRACE: hid_prepare_report_descriptor(): initialising the report descriptor
for USB device 001/002[0]...
  TRACE: hid_prepare_report_descriptor(): retrieving report descriptor for
USB device 001/002[0]...
 NOTICE: hid_prepare_report_descriptor(): successfully initialised report
descriptor for USB device 001/002[0].
  TRACE: hid_prepare_parser(): setting up the HID parser for USB device
001/002[0]...
  TRACE: hid_reset_parser(): resetting the HID parser for USB device
001/002[0]...
  TRACE: hid_prepare_parser(): dumping the raw report descriptor
  TRACE: hid_prepare_parser(): 0x000: 0x05 0x01 0x09 0x06 0xa1 0x01 0x05
0x07
  TRACE: hid_prepare_parser(): 0x008: 0x19 0xe0 0x29 0xe7 0x15 0x00 0x25
0x01
  TRACE: hid_prepare_parser(): 0x010: 0x75 0x01 0x95 0x08 0x81 0x02 0x95
0x01
  TRACE: hid_prepare_parser(): 0x018: 0x75 0x08 0x81 0x01 0x95 0x05 0x75
0x01
  TRACE: hid_prepare_parser(): 0x020: 0x05 0x08 0x19 0x01 0x29 0x05 0x91
0x02
  TRACE: hid_prepare_parser(): 0x028: 0x95 0x01 0x75 0x03 0x91 0x01 0x95
0x06
  TRACE: hid_prepare_parser(): 0x030: 0x75 0x08 0x15 0x00 0x25 0x65 0x05
0x07
  TRACE: hid_prepare_parser(): 0x038: 0x19 0x00 0x29 0x65 0x81 0x00 0xc0
  TRACE: hid_prepare_parser(): parsing the HID tree of USB device
001/002[0]...
 NOTICE: hid_prepare_parser(): successfully set up the HID parser for USB
device 001/002[0].
 NOTICE: hid_force_open(): successfully opened USB device 001/002[0].
Begin Run() ...
USB_ENDPOINT_IN = 128
  TRACE: hid_interrupt_read(): retrieving interrupt report from device
001/002[0] ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20070102/57bb9279/attachment.htm


More information about the libhid-discuss mailing list