[libhid-discuss] Still can't interrupt_read() properly
amruth
amruth_pv at yahoo.com
Tue Sep 9 20:37:15 UTC 2008
Hi
We have seen that if interrupt endpoint does have some data, which the application has not read then this kinds of issues are seen.
You need to do clear halt before calling interrupt read. This will clear any invalid USB states.
usb_clear_halt(hid->dev_handle,0x81); //if endpoint is 0x81
usb_reset(hid->dev_handle);
Please make sure you read all the bytes from interrupt endpoint in multiple s of 64.
lsusb -vvv will give info reagrding the size of interrupt endpoint descriptor.
interrupt_read expects size to be accurate otherwise it will stall endpoints and gives incorrect results.
Thanks
Amruth p.v
--- On Tue, 9/9/08, Marian Aldenhövel <marian.aldenhoevel at mba-software.de> wrote:
> From: Marian Aldenhövel <marian.aldenhoevel at mba-software.de>
> Subject: Re: [libhid-discuss] Still can't interrupt_read() properly
> To: "libhid-discuss List" <libhid-discuss at lists.alioth.debian.org>
> Date: Tuesday, September 9, 2008, 2:40 PM
> Hi,
>
> > The issue may be that interrupt is not getting clear
> The USB state is not getting
> > cleared. Please try using usb_clear_halt and it should
> work.
>
> At what point should I try that? Before I send my
> output-report (I am
> expecting a response for each output report)? Before I call
> interrupt_read()?
> Or in response to a error result from interrupt_read()?
>
> Ciao, MM
> --
> Marian Aldenhövel, Rosenhain 23, 53123 Bonn
> http://www.marian-aldenhoevel.de
> "I ran some quick calculations on it. He's about
> 80% on the right
> track. That leaves him only 20% dead when he
> crashes." Bob C
>
>
>
> _______________________________________________
> libhid-discuss mailing list
> libhid-discuss at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss
More information about the libhid-discuss
mailing list