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