[libhid-discuss] Some help?
Charles Lepple
clepple at ghz.cc
Thu Aug 2 01:16:20 UTC 2007
[BTW, please subscribe to the list, or you may not get replies from
people who reply only to the list.]
On Aug 1, 2007, at 3:05 PM, Peter Stuge wrote:
> On Wed, Aug 01, 2007 at 12:28:59PM -0500, Justin Williams wrote:
>> Hey guys... I've ran into a problem with the libhid. Well, not so
>> much libhid, more my lack of understanding of the USB Bus system.
>
> I recommend checking out the USB spec, it's not too bad.
specifically, the HID Class Definition:
http://www.usb.org/developers/hidpage/#Class_Definition
>> Since this is a card reader, I need to get the handle on it, etc,
>> then simply loop and read when data is available.
>
> Is it impossible for you to let the card reader work as a normal
> keyboard through the kernel HID driver and just have your program
> read stdin? That is by far the easiet way to get the data.
I would guess that the Linux kernel HID driver wouldn't expose this
as a keyboard (it uses a non-keyboard usage page: 0xff00), but you
might also be able to read events from the evdev interface (/dev/
input/event* or something).
This appears to be the catch-all for non-standard usage pages:
http://lxr.linux.no/source/drivers/hid/hid-input.c#L610
As far as the usage path to use, what do you get when you modify the
sample code to connect to your device? It should dump a list of usage
paths for the report descriptor.
--
Charles Lepple
More information about the libhid-discuss
mailing list