[libhid-discuss] libhid with python: help appreciated
JamesPK
jpearsonkirk at googlemail.com
Thu Sep 8 10:45:36 UTC 2011
Hi,
Apologies for what might be a basic libhid question.
I'm running Ubuntu, and using libhid via Python to communicate with a
HID device (and have used 'lsusb' to glean all the details of the device).
I've started out with the example code here:
http://anonscm.debian.org/viewvc/libhid/trunk/swig/test_libhid.py .I
added the vendor and product ID and the example code itself worked FINE.
I then added some code to the example. From the 'snooping' on the
communication with the device under Windows it needs a control message
with an initialisation string to initialise the device, which I thought
would be:
INIT_SEQ='0x20 0x00 0x08 0x01 0x00 0x00 0x00 0x00'
ret = hid_interrupt_write(hid, 0, INIT_SEQ, 8)
if ret != HID_RET_SUCCESS:
log_error("hid_set_output_report", ret)
But when I added the above spinet to the example and run it I get:
(ALL messages fine up to here)
---------------------
NOTICE: hid_force_open(): successfully opened USB device 006/002[0].
TRACE: hid_reset_parser(): resetting the HID parser for USB device
006/002[0]...
TRACE: hid_dump_tree(): iterating the parse tree for USB device
006/002[0]...
TRACE: hid_reset_parser(): resetting the HID parser for USB device
006/002[0]...
TRACE: hid_interrupt_write(): writing interrupt report to device
006/002[0] ...
WARNING: hid_interrupt_write(): failed to perform interrupt write to
device 006/002[0]: error submitting URB: No such file or directory
---------------------
Any ideas/pointers would be much appreciated.
Thanks
James
More information about the libhid-discuss
mailing list