<span>Hi !<br><br> I use libusb 0.1.12 and libhid from svn (0.2.14 i think) on arm7<br> platform running kernel 2.4.24<br> I wrote a program which read data from a metrologic barcode scanner
<br> I use hid_interrupt_read() function to get data from scanner :<br><br> m_iHIDErrorCode = hid_interrupt_read( m_pHidHandle, USB_ENDPOINT_IN+1,<br> un_pcData, un_uiDataLength, un_uiTimeout );<br><br> With a timeout of 1000, it hangs during an IOCTL_USB_REAPURB in one of
<br> the libusb functions : usb_urb_transfer() ( called by<br> usb_interrupt_read() called by hid_interrupt_read() :) )<br> With a timeout of 0, i can read data from scanner without problems but<br> when i close connection, i was unable to read data from device (my
<br> program is blocked on hid_interrupt_read() function). I need to reboot<br> the cpu<br><br> I test my program into my computer (i386) on Redhat Fedora Core 5 (kernel 2.6.15) and<br> i don't notice any problems to read data from scanner with my program
<br> (and the same librairies compiled for i386).<br><br> Can you explain function hid_set_idle(), i do this after open<br> connection with hid_force_open function :<br> m_iHIDErrorCode = hid_set_idle( m_pHidHandle, 0, 0 );
<br> if (m_iHIDErrorCode != HID_RET_SUCCESS) {<br> fprintf( stderr, "bHidScannerOpen() : hid_set_idle() failed with<br> return code %d\n", m_iHIDErrorCode );<br> return false;<br><br>Can someone help me ?
<br>
<br>Thanks in advance.</span>