Author Topic: USB HID misused for simple data transfer  (Read 21626 times)

WaSaKa

  • Member
  • ***
  • Posts: 1
USB HID misused for simple data transfer
« on: June 04, 2010, 08:45:59 am »
Hello Jan

I'm about to implement USB communication between a device and a PC. Most of the time the amount of data is small and if there's more, transfer speed is not critical. Thus I conclude that a HID class device is appropriate (to omit a special driver).
Actually the device has no human interface at all and I only want to bidirectionally transfer bunches of bytes without any meaning on the level of USB. The meaning is up to the application for both, the host and the device.
All I can find are examples of mice, keyboards etc. and I am more or less stuck, not getting any further. The specification documents are very vague. After having gone through all the example descriptor tables shipped with the USB.org descriptor tool, I do not see any rule of how such a table is built up, no information on what item comes after another, what is allowed and what not (as is the case in any programming language).
 
Now my question: Does your book provide the information I need? Or do you possibly know of an example of that kind of misuse of the HID class (using the simplest possible report structure to fit the need)?

Thanks and regards
Walter

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB HID misused for simple data transfer
« Reply #1 on: June 04, 2010, 09:31:32 am »
Thank you for posting to the forum.

HIDs don't have to have a human interface and can easily handle applications that transfer small amounts of data with low or moderate throughput needs. I have example host and device code for a generic HID on my HID page:

http://www.janaxelson.com/hidpage.htm

USB Complete has three chapters on HIDs and covers generic (non-keyboard, mouse) applications.

http://www.janaxelson.com/usbc.htm

Jan
« Last Edit: June 29, 2015, 10:27:46 am by Jan Axelson »