Discussion:
[libhid-discuss] Libhid
Info
2011-06-21 09:42:23 UTC
Permalink
Hello, I have to use libhid in python. I tried test_libhid, and I'm able
to open and close the hid port, get the identification and parameters of
the hid port.
I don't understand how to read and write packets on the port, I searched
on the web other examples and documentation but I found nothing.
Can anyone help me?

Thanks


Sol Invictus srl
P.zza D. Chiesa, 13
38068 - Rovereto (TN)
web-site: http://www.solinvictus.it
Please consider the consequences for our environment before printing
this
e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20110621/bdc378af/attachment.html>
Charles Lepple
2011-06-22 02:17:02 UTC
Permalink
Post by Info
Hello, I have to use libhid in python. I tried test_libhid, and I'm
able to open and close the hid port, get the identification and
parameters of the hid port.
I don't understand how to read and write packets on the port, I
searched on the web other examples and documentation but I found
nothing.
Can anyone help me?
There are comments in test_libhid.c. It's not Python, but the function
names are the same.
Xiaofan Chen
2011-06-22 03:26:39 UTC
Permalink
Post by Info
Hello, I have to use libhid in python. I tried test_libhid, and I'm
able to open and close the hid port, get the identification and
parameters of the hid port.
I don't understand how to read and write packets on the port, I
searched on the web other examples and documentation but I
found nothing.
Can anyone help me?
Depending on the HID device, you may or may not want
to use libhid. The strong point of libhid lies in the HID parser.

If it is a generic HID device then you may want to take a look
at HIDAPI which is cross-platform.
http://www.signal11.us/oss/hidapi/

Rough Python wrapper for HIDAPI.
http://permalink.gmane.org/gmane.comp.python.pyusb.user/752

If you are using Windows only, pywinusb can be used for
HID device.
http://code.google.com/p/pywinusb/

BTW, there is another libhid on github now, the name is
unfortunate since the author did not know the existence of this libhid.
http://bfoz.github.com/libhid/index.html

--
Xiaofan

Loading...