[libhid-discuss] Paths to usage pages / python wrapper
Charles Lepple
clepple at ghz.cc
Thu Nov 13 02:16:44 UTC 2008
On Nov 12, 2008, at 11:28 AM, Sarah Mount wrote:
> Presumably anything with type 0xb0 can be used to set a feature
> report? If I say something like:
>
> path = (0xff000001, 0xff000002)
> buffer = struct.pack('6b27x', 0x1, 0x1, 0x01, 0x01, 0x00, 0x02)
> print 'Sending buffer of size %i to sensor: %s' % (len(buffer),
> repr(buffer))
> ret = hid_set_output_report(hid, path, buffer)
> if ret != HID_RET_SUCCESS:
> sys.stderr.write("hid_dump_tree failed with return code %d.\n"
> % ret)
> else: print 'Sent output report successfully!'
My mistake - to set a feature report, you'd need
hid_set_feature_report (different USB request than sending output
reports).
Still not sure why you got a ValueError, though. Most of the SWIG
functions recognize that integers and longs can be cast to one another.
--
Charles Lepple
More information about the libhid-discuss
mailing list