[libhid-discuss] Trouble with IOCTL_USB_REAPURB

Storm Scratcher stormscratcher at gmail.com
Wed Dec 20 17:58:57 CET 2006


Hi !

 I use libusb 0.1.12 and libhid from svn (0.2.14 i think) on arm7
 platform running kernel 2.4.24
 I wrote a program which read data from a metrologic barcode scanner
 I use hid_interrupt_read() function to get data from scanner :

 m_iHIDErrorCode = hid_interrupt_read( m_pHidHandle, USB_ENDPOINT_IN+1,
 un_pcData, un_uiDataLength, un_uiTimeout );

 With a timeout of 1000, it hangs during an IOCTL_USB_REAPURB in one of
 the libusb functions : usb_urb_transfer() ( called by
 usb_interrupt_read() called by hid_interrupt_read() :) )
 With a timeout of 0, i can read data from scanner without problems but
 when i close connection, i was unable to read data from device (my
 program is blocked on hid_interrupt_read() function). I need to reboot
 the cpu

 I test my program into my computer (i386) on Redhat Fedora Core 5 (kernel
2.6.15) and
 i don't notice any problems to read data from scanner with my program
 (and the same librairies compiled for i386).

 Can you explain function hid_set_idle(), i do this after open
 connection with hid_force_open function :
 m_iHIDErrorCode = hid_set_idle( m_pHidHandle, 0, 0 );
 if (m_iHIDErrorCode != HID_RET_SUCCESS) {
    fprintf( stderr, "bHidScannerOpen() : hid_set_idle() failed with
 return code %d\n", m_iHIDErrorCode );
    return false;

Can someone help me ?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20061220/848392cb/attachment.html


More information about the libhid-discuss mailing list