* [email protected] ([email protected]) wrote: > To submitter: I'm not sure what the state is of this PR. It looks like the > problem has not yet been fixed in FreeBSD 6 or 7, but I don't know if it is > still an issue with the new USB stack in 8.x. Do you happen to know if this > PR is still valid against the new USB stack? Thanks!
...after some digging.... First of all, my joystick seem to have at least two reports. Report #0 is empty, report #1 has actual axis/button/... data. With regard to that, usbhidctl is buggy. First of all, static int reportid variable is never written to but is read in 3 places. It seems like it's initialized with zero, and thus the utility tries to work with report #0, giving no data. It seems like reportid should be initialized to -1 which I suppose reports all report secrs. Also, there should be a way to select specific report id with command line flags (likely that was intended usege for this variable). After initializing reportid to -1 I can get report descriptor, and yes, answering original question, it is not truncated. Judging from code rc/lib/libusbhid/descr.c:hid_get_report_desc, the upper limit is now 65535 bytes, which is enough for my device with 1343 byte report descr. However, after using -1 as reportid, usbhidctl still reports wrong sizes: Total input size 0 bytes Total output size 0 bytes Total feature size 0 bytes likely that's because hid_report_size() is called with id=0 (not even reportid). Seems like it doesn't work with id=-1 as well, so the correct way is likely to get sizes from hid_item structs. In either case, libusbhid seems to lack a way to get a number of reports to be able to parse them one by one. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D [email protected] ..: jabber: [email protected] http://www.amdmi3.ru _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "[email protected]"
