[libhid-discuss] Parsing hid_dump_tree()

comicinker comicinker at gmx.de
Tue Apr 22 22:17:59 UTC 2008


Am Dienstag, den 22.04.2008, 08:31 -0400 schrieb Charles Lepple:
> On Apr 21, 2008, at 8:21 PM, comicinker wrote:
> >
> > Am Freitag, den 28.03.2008, 21:01 -0400 schrieb Charles Lepple:
> >>
> >>> AND: How can I get the RECV_PACKET_LEN for this address
> >> automatically?
> >>> Or is it always the same length for each address (6)? The
> >>> test_libhid.c
> >>> doesn't tell where this value is detected.
> >>
> >>
> >> It is in the interface descriptor.
> >
> > I'm still looking for this entry in the interface descriptor. Can
> > somebody give me a hint where it is hidden? Is it really HIDData.Size?
> 
> HIDData.Size is the size of one element, I think. (Sorry, I don't  
> have time to look through the code.)
> 
> I was mistaken - I was thinking of wMaxPacketSize in the endpoint  
> descriptor (not the interface descriptor). I usually either just  
> hardcode that for a given device, or use control transfers instead.
> 

Do I understand it right that you use control transfers for each single
data package? I think I won't tell you something new, but (depending on
the chip architecture and vendor) this causes more operating time on the
chip. I must refrain from using control transfers because my controller
is not fast enough to deliver data and process all control transfer
requests. So my device does not support the get_input_report request. I
must use bulk or interrupt transfers. Oh I just see I should use the
hid_interrupt_read function. Da***

However, I would like to determine the length of a specific report with
a certain report ID, or the maximum length of the biggest report. Do I
have to do it by myself by looping through the whole HIDParser?

Bests,

comicinker


-- 
my public key is on
hkp://pgp.mit.edu:11371
or
ldap://keyserver.pgp.com


More information about the libhid-discuss mailing list