Date: Sun, 3 Jun 2012 17:29:00 -0500 From: "Engineering" <ee@athyriogames.com> To: "'Alexander Motin'" <mav@FreeBSD.org> Cc: freebsd-usb@freebsd.org Subject: RE: Recommendations for programming HID in FreeBSD 9 Message-ID: <03ae01cd41d8$47569390$d603bab0$@com> In-Reply-To: <4FC9B8C9.9060103@FreeBSD.org> References: <201205280640.q4S6e6L0035127@freefall.freebsd.org> <201206011730.31081.hselasky@c2i.net> <027901cd4011$53ec4ff0$fbc4efd0$@com> <201206011823.30527.hselasky@c2i.net> <028301cd4019$69eafba0$3dc0f2e0$@com> <4FC9B8C9.9060103@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>> if (id != 0) >> copyin(ugd->ugd_data,&id, 1); >> error = uhid_set_report(sc, ugd->ugd_report_type, id, >> NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); > >Hans is right. That code should do the trick. Last year I've fixed uhid >driver to handle multiple report IDs. Even user-level tools are able to >do it now. "id != 0" should be correct condition. According to HID spec, >if device has at least one non-zero report ID, report ID should be >included into any transfer. So now uhid driver assumes that report ID >should be in the first byte of request, if it found some non-zero ID in >descriptor. Thanks to all for your help, I have it working, and am very happy to be up to date in BSD. For the record, one of my HID had different report IDs AND different report sizes, so I had to add my hack to send the size for it to work correctly. The bonus with that is that my touchscreen, which has badly ported HID code from the original USB firmware, and does not correctly report its report sizes, can also work with uhid. Thanks again Sam
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?03ae01cd41d8$47569390$d603bab0$>