Alex Rivera | Logout

What is the best USB library to communicate with USB HID devices on Windows?

Asked 2008-11-11T07:00:45.880
20

The library should;

  • Be easy to use and few lines of client code should accomplish much
  • Be as platform independent as possible. (In case of future ports to other platforms)
  • Have C++ bindings.
  • Be mature and stable

I would also like to be notified of most HID events through callbacks.

I have considered the following alternatives:

  • libhid - (Unfortunately?) this is GPL and cannot be used in my application.
  • WDK - Seems to be a bit low-level for my use. I don’t need that kind of control.
  • atusbhid - This has an appropriate level of abstraction, but it is firmly tied to the Windows messaging loop

Are there other alternatives to offer?

Edit
Report

1 Answer

6

If libhid works for you, then perhaps the thing to do would be to write an application (which you would GPL), which uses libhid to talk to devices, then provides whatever you need via a TCP connection. Your real application would connect via TCP to do what it needs. This would obviously be a massive performance hit.

This application would effectively be a 'shim' between libhid and your application. In this case, the shim would exist for legal, not technical, reasons.

I'm not saying it's a good idea, just that it's an idea.

answered 2008-11-11T22:15:33.240

Your Answer