Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 953
Torleif Avatar asked Nov 11 '08 07:11

Torleif


1 Answers

Take a look at hidapi: it is C, which answers the C++ bindings question (effectively :)), is cross platform and has a very permissive license.

It doesn't appear to have the callbacks, but...

like image 116
Femi Avatar answered Sep 23 '22 02:09

Femi