How to talk to a custom USB HID device

From: Jim (adirondackmtn_at_yahoo.com)
Date: 01/08/05


Date: 7 Jan 2005 16:21:47 -0800

Hi,

I've been tasked to develop an interface for a customer running SUSE
9.0 to communicate to an embedded device that has a custom HID class on
its USB. I need to send/receive HID reports (main means of
communication), etc.

I've looked through google, read the Prog. Guide for Linux USB Device
Drivers, read a hiddev example, looked over Brad Hard's hiddev stuff
and played with libusb a bit.

The libusb test program didn't run correctly until I logged in as root,
so I fear permissions problems will get in the way of a clean solution.
I can't tell the customer to run his app with system privileges or
change permissions on any device files. As a last resort, I could run
a separate process running libusb with system privileges and have the
customer's user space library IPC to it.

So, that leaves me with two alternatives: writing a device driver or
interfacing to the hiddev events. A device driver seems like overkill
and time consuming. Thus, hiddev appears to be the solution.

So, is hiddev the right approach?? I have a Microsoft win32 interface
that works for this device (using Microsoft's HID interface). If you
know, will hiddev events give me similar capabilities? And: is there
better documentation? Has anyone out there done this already and
willing to share source? I looked at some sources for usb drivers
(mouse, keyboard) hoping they'd use hiddev in a layered approach to the
USB drivers, but no luck. One last question on hiddev--is it stable?
The project I'm working on could mean millions of dollars and we
(meaning I) have to get it right.
Thanks much for your time on this!

Jim



Relevant Pages