Discussion:
[libhid-discuss] get report size in python
Gabriel Rossetti
2009-09-30 10:12:31 UTC
Permalink
Hello everyone,

I am trying to get the report size from my device (in python). I tried
(omitted tests & Co.):

hid.hid_init()
__hidDevice = hid.hid_new_HIDInterface()
matcher = hid.HIDInterfaceMatcher()
matcher.vendor_id = vendorId
matcher.product_id = productId
hid.hid_force_open(__hidDevice, 0, matcher, 5)
minReportSize = __hidDevice.hid_data.PhyMin <-- error here
maxReportSize = __hidDevice.hid_data.PhyMax

but I get an error.

I read : http://libhid.alioth.debian.org/doc/structHIDInterface__t.html

and this should work, any ideas on what I'm doing wrong?

Thank you,
Gabriel Rossetti
Charles Lepple
2009-09-30 12:57:36 UTC
Permalink
Post by Gabriel Rossetti
I am trying to get the report size from my device (in python). I
hid.hid_init()
__hidDevice = hid.hid_new_HIDInterface()
matcher = hid.HIDInterfaceMatcher()
matcher.vendor_id = vendorId
matcher.product_id = productId
hid.hid_force_open(__hidDevice, 0, matcher, 5)
minReportSize = __hidDevice.hid_data.PhyMin <-- error here
maxReportSize = __hidDevice.hid_data.PhyMax
but I get an error.
What error do you get?

What does 'print dir(__hidDevice.hid_data)' return?

Loading...