[libhid-discuss] Trouble with IOCTL_USB_REAPURB

Charles Lepple clepple at ghz.cc
Tue Jan 2 15:59:06 CET 2007


On Jan 2, 2007, at 5:55 AM, Storm Scratcher wrote:

> 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

That's a kernel/host controller problem.

Are you sure the timeout (in milliseconds) is long enough?

> I just asked you a problem about closing hid connection : with  
> timeout=0 (hid_interrupt_read), how closing hid connection ?

You could try sending a signal to your process.

> 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.

Hmm... how are you doing that? libhid isn't really designed to be  
multi-threaded (since the underlying libusb library is not) but if  
you terminate the program with ctrl-C or another signal, you should  
be able to run the program again.

-- 
Charles Lepple
clepple at ghz.cc





More information about the libhid-discuss mailing list