[original post moved to end for brevity - or should I just delete it when

From: Hans Petter Selasky [mailto:hsela...@c2i.net] 
>man usbhid
>Else use LibUSB to access the device.

Thank you for replying

I should point out that the usbhid.cpp compile below is my file - I didn't
know there was a 'real' usbhid.

Usbhid looks great, but it is probably a little higher level than I need. I
should mention that the devices I am talking with are a known quantity - I
wrote the firmware on some of them, and have extensive datasheets on the
rest. I just need to get a usage page, or VID and PID so I can tell which
one is which, i.e. who's at uhid0 and who's at uhid3.

I had been researching libusb for a while, but their webpage says it is not
recommended for HID devices and to use HIDAPI, which does not seem to be on
BSD. I saw your version, and it looks great! I wish I had that a few years
ago when you helped me with getting an isochronous device working on BSD
7.0. However, due to time constraints, I'd rather not write a HID front end
using that if I don't need to.

I see uhid is still around - is there any reason not to just use that?

I already have cross-platform HID code that used to work with uhid - I
suspect my problem might just be that the headers I need have moved or
changed. I will grep...

According to the uhid man page, these should all still exist somewhere:
> usbhid.cpp:35: error: 'usb_ctl_report_desc' does not name a type
> usbhid.cpp:157: error: 'usb_ctl_report' was not declared in this scope
> usbhid.cpp:174: error: 'USB_SET_REPORT' was not declared in this scope
> usbhid.cpp:331: error: 'USB_GET_REPORT_DESC' was not declared in this 

Or is uhid being obsoleted?


On Thursday 31 May 2012 18:30:56 Engineering wrote:
> Hi all, I hope this is the right place to ask this
> I am in process of migrating an embedded system from BSD 7.0 to 9.0, 
> as we need upgraded video card drivers which will not compile on the old
> To confuse matters a bit, I believe it was 7.0 with some of HPS 
> updated USB stack worked in.
> The system has 4 HID devices attached, and I need to read data and set 
> feature reports to talk to them.
> I had been using read() and ioctl() - with the evolution of BSD, is 
> there a different recommended way to do this?
> I also need open() and to be able to get the usage page, to tell one 
> device from another.
> If I recall, at the time the uhid driver had problems with devices 
> that had feature reports of varying sizes - I see I hacked it a bit to 
> allow the application to specify the size of the report. Is this still the
> I of course will be looking into this myself, but initial compile 
> gives me the following errors - does this ring a bell to anyone?
> Thanks,
> Sam
> Compiling usbhid.cpp...
> usbhid.cpp:35: error: 'usb_ctl_report_desc' does not name a type

freebsd-usb@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to