[libhid-discuss] Inconsistency while reading data from the usb device

Xiaofan Chen xiaofanc at gmail.com
Thu Dec 9 05:23:02 UTC 2010


On Thu, Dec 9, 2010 at 8:12 AM, shiva vadla <shiva473 at gmail.com> wrote:
> Hello All,
> I am trying to read the card data from a credit card reader (usb device)
> using interrupt endpoint. I can open and claim the hid interface and read
> the data from the card reader. But if I close and delete the hid interface
> after i am done reading and try to read the data again for the next card
> swipe, i miss the first packet (8 bytes) of the data on every alternate
> read. I am not sure why this is happening. If i do not close the hid
> interface and keep my program running, i do not see any issues. Any help is
> appreciated.

Just a guess, what if you reset the hid interface before closing
the interface?


-- 
Xiaofan



More information about the libhid-discuss mailing list