Hi,

I'm developing code to configure my AipTek USB tablet, and I've
stumbled on two omissions in the hid code. Most importantly, the
device->hiddev structure is not initialized, so it results in null
pointer errors.

Secondly, usb_get_report does return 0 for ok, and <0 for error, and
not the length which hid.c assumes, i've fixed it in a patch. 

Still, I get some really weird results, when I do

        rinfo.report_id = 1;
        rinfo.report_type = HID_REPORT_TYPE_INPUT;
        ioctl(fd, HIDIOCGREPORT, &rinfo))

it sort of works, but creates these messages:
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 4) (numbered) 
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 4) =  01 00 00 00 
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 3 =? 3) =  00 00 00 
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 6) (numbered) 
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 6) =  ae f0 11 c0 a0 08 
Jun 16 15:50:48 dwarf kernel: hid-core.c: undefined report_id 174 received 
Jun 16 15:50:48 dwarf kernel: hid-core.c: report (size 5) =  f0 11 c0 a0 08 
Jun 16 15:50:48 dwarf kernel: hid-core.c: nonzero status in irq -2

That suggests that data is received after the call to usb_get_report
ended. But, if I change the report_type to HID_REPORT_TYPE_FEATURE, I
get the following error:
Jun 16 15:52:05 dwarf kernel: hid-core.c: report (size 3) =  02 00 00 
Jun 16 15:52:05 dwarf kernel: hid-core.c: report (size 2 =? 7) =  00 00 c0 00 00 00 00 
Jun 16 15:52:05 dwarf kernel: hid-core.c: report 2 is too short, (2 < 7)

Maybe, the call to hid_input_report is not correct in hid_read_report,
and should be going to hid_feature_report (which doesn't exist at the
moment)?

Lastly, why does hid_read_report call usb_get_report, but
hid_write_report uses all the urb magic (which I haven't quite figured
out yet).

Grtz
EJ

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to