Page 1 of 1

USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 12:59 am
by BrightLight
Hi.

Since this forum has helped me so much in many ways through the years, I figured I owe the OSDev community a contribution for something it actually is missing. So I wrote on the USB Human Interface Devices Wiki page some general information on HID devices, and some information specific to USB mice. I figured that information and tips on USB seem to be quite rare on the internet, and so since I am working on USB myself, I figured why not leave something on the Wiki that might help someone in the future?

Anyway, could someone proof-read it, and check for any errors I might have overlooked or anything unclear I stated? Thanks!

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 3:13 am
by no92
I have no idea about the technicalities of USB, so all I'm seeing is the style of the article. I must admit that I like what I see so far.

Three minor nitpicky-ish complaints: the page title should be USB Human Interface Devices, not USB Human Input Devices. Also, writing '...' in a wiki article is a style slip up. Lastly, while I wouldn't mind leaving it as it is, the wiki style guide requires the 'Keep reading' section to be named 'See also', with the subheaders 'Articles' for other wiki pages, 'Threads' for forum threads and 'External Links' for everything else.

Otherwise, great contribution.

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 3:41 am
by SpyderTL
Agreed. This page looks good.

After you finish the keyboard section, we're also gonna need a game pad section. I've been working on game pad HID stuff off and on for a while, so if nothing else, I should be able to add some more detail before too long.

It may deserve its own page, though, since the report structure is not fixed.

But, yeah, good work. Thanks.

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 9:07 am
by BrightLight
no92 wrote:the page title should be USB Human Interface Devices, not USB Human Input Devices.
I overlooked this. I made a page called USB Human Interface Devices, and the USB Human Input Devices is simply a redirect page.

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 9:33 am
by Korona
Its always nice to see additions to the wiki :)

One thing that should probably be clarified is that the report formats that you describe only apply to the keyboard and mouse boot protocols and that generic HID devices communicate their report format via the report descriptor.

I saw that you linked your own implementation of the spec. I have a generic report descriptor parser that I might link once it is polished.

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 9:53 am
by BenLunt
I was also going to mention that the report you describe may only apply to the Boot Protocol and the driver should parse the HID Descriptor report to retrieve the exact format of the report. (The Boot Protocol was included so that a boot application didn't have to include a parser just to be able to boot the system. A lot of thought and engineering went into the USB, I am completely impressed by the years of work that went/goes into it.)

If you plan to document how to parse the HID descriptor, this could take a whole new page.

Just to clarify, it is not the device attached that will emulate a PS/2 device, but the UHCI/OHCI/EHCI/xHCI controller that does so. You probably meant that, it just sounds like it could be either way.

One of the things I have planned for a future edition of my book is a great more detail on HID devices. I currently show how to parse a Mouse and Keyboard HID descriptor, but plan to go into much more detail.

It is a lot of work, so thank you for efforts on the Wiki. I am sure it will help many.

Ben

Re: USB Human Interface Devices Wiki Page

Posted: Mon May 22, 2017 1:36 pm
by BrightLight
I've clarified the difference between the boot protocol and the report protocol and how to distinguish between them, and clarified that the report structures I define are usable with the boot protocol only. Hopefully I can write something on USB keyboards sometime this week or next week. If someone here has an opensource USB HID implementation, feel free to link it in the "external links" section. :)

Re: USB Human Interface Devices Wiki Page

Posted: Sun Jun 04, 2017 11:57 am
by palmsa
This article looks very good and was written fully professional. Thanks for sharing and letting know that page like this exists somewhere on web.

Re: USB Human Interface Devices Wiki Page

Posted: Sun Jun 04, 2017 9:40 pm
by BrightLight
palmsa wrote:This article looks very good and was written fully professional. Thanks for sharing and letting know that page like this exists somewhere on web.
I'm happy to help. :)

About this article, I wrote about USB keyboards, and maybe someone could help me proof-read it, or point out anything unclear?