OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 7:26 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 12:59 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
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!

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Last edited by BrightLight on Mon May 22, 2017 9:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 3:13 am 
Offline
Member
Member

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 306
Location: Germany
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.

_________________
managarm


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 3:41 am 
Offline
Member
Member
User avatar

Joined: Sun Sep 19, 2010 10:05 pm
Posts: 1074
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.

_________________
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 9:07 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
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.

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 9:33 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
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.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 9:53 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
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


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Mon May 22, 2017 1:36 pm 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
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. :)

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Sun Jun 04, 2017 11:57 am 
Offline

Joined: Sun Jun 04, 2017 8:46 am
Posts: 1
Location: UK
This article looks very good and was written fully professional. Thanks for sharing and letting know that page like this exists somewhere on web.

_________________
To want to, is to be able to.


Top
 Profile  
 
 Post subject: Re: USB Human Interface Devices Wiki Page
PostPosted: Sun Jun 04, 2017 9:40 pm 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
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?

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: SemrushBot [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group