HIDagent -- What It IS, and What It DOES


In general, USB code is inherently complicated: the very fact that USB is easy for users to use, makes it hard for designers to design. 


Hm32 LaunchLogo CS6 HA 800x400


On the one hand, using USB Human Interface Device (HID) class has very significant advantages over other USB approaches:

  • No device drivers ever need to be installed on the Host PC : all desktop operating systems have always had HID device drivers built in
  • A HID class device is fully self-describing : it can tell the Host computer everything about the data that it needs to send to and from the device, down to the size in bits of every data item, and even what the data item is used for

But on the other hand, making use of all the extra capabilities of using HID class is very difficult for designers, unless they have a tool like HIDmaker.

  • Essentially ALL approaches, other than HIDmaker, require the developer to have deep knowledge of the USB Spec, and the USB Human Interface Device (HID) class spec, AND deep knowledge of the complicated USB APIs for USB in the Operating System.


The original HIDmaker tool took 3 years to perfect. The main problem was designing a modern, object oriented HIDmaker Software Framework(c) that was simultaneously extremely powerful, yet very easy to use -- even by novice programmers  -- and which could be efficiently generated, for both the Host and Peripheral device, without requiring the designer to have deep knowledge of USB or advanced programming techniques.

In other words, we had to find a way to solve, once and for all, all of the most difficult problems that a USB developer faces -- at least for developers working under Windows.  More about the details in a moment.

So, how well did this work out? 


Here's What Our Customers Say:

I once got a phone call from a new HIDmaker customer.  He was all excited, because he had just gotten his first USB project working only 4 hours after opening our package.  I congratulated him, but then laughed heartily and said:

"But that's OK.  We forgive you.  You'll get better at it!"

And that was true.  Now he can do the same thing in under an hour.

Here is a direct quote from another customer, a few months later:

BigOpenQuote2Hi, my name is Matt Hocking. Firstly I would like to congratulate you on creating this great USB tool. You should be really proud of yourself as it is indeed a high quality and well refined piece of technology. I programmed the microchip PICDEM USB FS board to transfer data and control I/O on my first attempt in 10 minutes, without even  eading your users guide, for VB.NET and PBP. Very impressive! I was literally cheering!

I then read your users guide and was again impressed with how easy it was to understand your framework.BigCloseQuote2

- Matt Hocking

Robotic Engineer



Actually, ten minutes is about right -- you can get a simple project to run and communicate in as little as 10 minutes, once you get familiar with HIDmaker.

The figure below shows why this is so.  It shows the key software objects that exist in a project that HIDmaker has generated.

Object Win

The main window, on the left, is rather generic looking user interface, because we cannot know in advance what your Host side user interface should look like. Even so, this main window is a real GUI program, which our users then modify to their needs.

The green box just to the right of the main window, labeled <THidDev> , defines a class that represents your peripheral device, which has a USB Vendor ID, a Product ID, and which declares all the data items that your device will send back and forth.  Each one of those data items is represented by a smart class called TOneHidVar (the multiple blue boxes).  A TOneHidVar object represents each transfer variable, and knows the name, the size in bits, the data direction, and lots more, about each individual data item = "USB transfer variable" in your project.

The red box labeled THIDagent is the very smart software "agent" that does all the heavy lifting. Our HIDagent object is the key part of our HIDmaker Software Framework, which hides the complexity of USB and the Windows APIs.  HIDagent provides a very simple and clean API that is based on lists of connected USB HID devices, all the USB Interfaces in each of those devices, and all the variables that each of those USB Interfaces can send or receive.

Since the code that is generated for each project relies upon HIDagent to do the complicated (and sometimes ugly) USB API work, the code that our customers deals with is exceptionally straightforward, clean, easy to use and maintain.

Even after all these years, HIDmaker still does things that nobody else seems to do:

  • Automatic packing and unpacking of odd sized variables, down to individual variables.  (Your project needs that.)
  • Ability to handle HID Input Reports, Output Reports, and Feature Reports that span multiple packets.  (Your project needs that.)
  • Automatic notification of your Host program when your device has been attached or detached.  (Your project needs that.)
  • Multiple USB Interfaces if needed -- which can be used as separate data channels
  • And much more   

That's because, to this day, HIDmaker is unique in the world.  There is no full equivalent anywhere.

I really want to emphasize this:  HIDagent is the KEY to making USB code that is both easy and powerful.


Now admitttedly, HIDmaker generates a rather bland looking main window -- it's a real GUI program, but it's not likely to look like what YOUR project would need to look like.  The next figure shows what our customers do:

Customize UI

Since modern object oriented compilers make it easy to change the look and feel of a program, the figure shows that our customers simply delete our controls and subsitute their own user interface, matched to the USB data that is already working in the code that HIDmaker generated for them. 

Our customers have found this to be an exceptionally easy task.