|
From: Alan S. <st...@ro...> - 2010-07-20 19:06:02
|
On Tue, 20 Jul 2010, Nikolai Kondrashov wrote: > On 07/20/2010 09:00 PM, Alan Stern wrote: > > I get it. Then the answer to your original question is easy: You don't > > need to worry about parsing report descriptors, variable report > > lengths, or anything else. Simply transfer individual maxpacket-sized > > buffers and dump whatever you get. All reports (except possibly the > > longest) will terminate with a short packet. In any case, the hid-dump > > program wouldn't need to parse the reports or determine their > > boundaries. > Thank you, this is an answer I've hoped for :)! However, I think I've tried > something like this. I mean, simply providing a large buffer and hoping the > transfer will terminate when the report is finished, and it didn't work. > I guess I did something wrong then. Don't use a _large_ buffer -- use a buffer that is the maxpacket size. Of course, the problem is that you generally won't know when a report is finished. Fortunately it looks like you don't really care, so long as all the data can be dumped. Alan Stern |