|
From: Nikolai K. <sp...@gm...> - 2010-07-20 16:31:09
|
On 07/20/2010 07:51 PM, Alan Stern wrote: > Those "operations" being carried out by your tool set, right? No, since this is an input device it should be operated by a human. The hid-dump tool only requests input on interrupt endpoints. > This is already done in some cases. I don't know to what extent it is > true for other input devices that don't work with Linux; I have one such device myself and I've seen kernel fix the report descriptors. > my guess is that more often the problem is lack of a proper driver rather > than errors in the descriptors. Well, that could be. However, there is the HID specification a lot of (quite simple) devices should conform to, the generic HID driver, the evdev interface, the evdev driver in X.org - and yet some of these devices don't work yet. There should be some work left to do :) > Regardless, you should discuss this with the maintainer of the usbhid > subsystem: Jiri Kosina<jk...@su...>, mailing list > <lin...@vg...>. He knows more about it than anybody else. Thanks for Jiri's contact :) I'm already subscribed to linux-usb. I did HID report descriptor library/tool announcement there. Actually I find myself quite reluctant to ask this question since the answer could possibly void my work purpose :) Still I think whatever was already developed is quite useful anyway. > It's possible to obtain the report descriptors by running "lsusb -v". Yeah, hid-dump does that already too, only in native (binary) format which makes it easier to change them. > So you must be concerned with how to obtain the reports. Exactly. > How do you envision the tool working? Do you mean the "wizard" tool or hid-dump? Anyway, here is the plan. The hid-dump does the usual libusb setup like opening device, detaching and claiming interfaces. It finds all the HID interfaces of the specified device or just uses the specified one. Then it should send Set_Idle request with wValue set to zero to specify that any reports should be sent when and only if the state is changed. After that it should dump whatever is received via interrupt IN endpoints to stdout continuously. It should also support output pausing/resuming with, say, SIGUSR1/SIGUSR2. It already supports report descriptor dumping to some extent. You can see whatever is already implemented here: https://digimend.svn.sourceforge.net/svnroot/digimend/hid-dump/trunk/ The "wizard" (a shell script) should ask the user to do various input actions like touching the tablet surface with the pen, drawing a circle, crossing boundaries, etc. For every such action the HID reports should be recorded, between them recording should be paused and action description should be inserted into the output. You can see the old, evdev-dumping code here to get the idea: https://digimend.svn.sourceforge.net/svnroot/digimend/diag-wizard/trunk/digimend-diag Sincerely, Nick |