[libhid-discuss] Announce hidmon and some questions and remarks about libhid

Frederik Reiß frederik.reiss at gmx.de
Tue Jan 23 16:21:06 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Charles Lepple schrieb:
> On Jan 23, 2007, at 8:51 AM, Frederik Reiß wrote:
> 
> 
> Well, judging by the code in hidmon, you know enough about the
> programming interface needed. If you want, you could take the hid.h
> header and add some function prototypes for things that you feel are
> missing.
I think the API is relative complete. If i would be an developer of
libhid my plan would be this (I haven't looked at the parser for now):

* figure out a way to get the needed buffer size for hid_get_*_report
from the parser, and not by "asking" the "user"
* fix the bit/byte problem in hid_get_item_value
* get hid_get_item_string and get hid_get_item_value to work
* add hid_set_item_string to libhid
* find an elegant way to deal with the path parameter (i like your
cookie idea)

> I have some Python code in the libhid source tree that I am using to
> prototype a new HID parser, but it's nowhere near the point that I could
> start writing C source from it.
To rewrite the parser looks like a hard task. But most of the stuff in
hidparser.c seems to be "playing around" with bits an bytes.

> Another idea that we kicked around in the pre-0.2.0 days was having
> multiple backends - on Linux, you could choose between libusb and the
> kernel hiddev interface, and this could even allow porting to Win32.
Good idea, i have done this in hidmon, but for now only the libhid
works. I stopped working on the hiddev backend in hidmon because i ran
in to some poblems with telling the hiddev interface the path it should use.

> Then again, libhid came about because the Linux hiddev IOCTL interfaces
> did not properly support collections of HID usages, and that problem has
> been fixed since the early 2.6 kernels.
I think another big advantage of libhid is that it's easier to use than
the Linux hiddev interface.

Fred
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtificLHece3p3gARAsVXAKCWF7Zj1cPFGoBGLqbZRX7S82pTCACg0BSl
sNDSzQq61767LYseElL3i7g=
=zt22
-----END PGP SIGNATURE-----



More information about the libhid-discuss mailing list