[SOLVED] How can I implement HID protocol ?
[SOLVED] How can I implement HID protocol ?
I do not want to deal with in or out because I do not on Windows, I setup data structure and call a bunch of functions to initialize HID protocol and thus being able to talk to my keyboard or any USB devices.
https://www.codeproject.com/Articles/12 ... -using-HID
https://www.codeproject.com/Articles/12 ... -using-HID
Last edited by Rukog on Sun Aug 08, 2021 4:54 am, edited 1 time in total.
Re: How can I implement HID protocol ?
I know everything about this already, it doesn't say how can I do that in a non Windows environment.Klakap wrote:HID specification is here https://www.usb.org/sites/default/files/hid1_11.pdf
Update:
My current research is at
https://en.wikipedia.org/wiki/Ioctl
https://docs.microsoft.com/en-us/window ... eiocontrol
https://elixir.bootlin.com/linux/latest ... octl.c#L24
Maybe it's all about that, the IOCTL thing
Re: How can I implement HID protocol ?
I apologize, but I do not understand how is this connected with OS development. Shouldn’t this be in General Programming? If you want to parse HID, you need to have written USB driver as first. HID parsing comes when you receive HID protocol from USB device.
Re: How can I implement HID protocol ?
It is, same as viewtopic.php?f=1&t=49913Klakap wrote:I apologize, but I do not understand how is this connected with OS development. Shouldn’t this be in General Programming? If you want to parse HID, you need to have written USB driver as first. HID parsing comes when you receive HID protocol from USB device.
Both of those requests are aiming to handle device communication for further implementation inside an OS.
The USB driver handle HID protocol, it's its nature, a driver is written to offer a gate of communication between PC and device, thus HID protocol for USBD.
What I've wrote is a driver, a user land driver but still a driver, but for windows: https://www.codeproject.com/Articles/12 ... -using-HID
Now I want to write an equivalent driver as the one above for my own OS.
Last edited by Rukog on Sat Aug 07, 2021 12:15 pm, edited 2 times in total.
Re: How can I implement HID protocol ?
HID protocol is not about communicating with USB devices. Communication with USB devices is doing through USB controllers OHCI/UHCI/EHCI/xHCI. When you can communicate with USB device, you can found that it is Human Interface Device, and parse HID protocol to found how you can use data which is device sending to you.
Re: How can I implement HID protocol ?
All of these are related to the PCI thing ?Klakap wrote:... through USB controllers OHCI/UHCI/EHCI/xHCI ...
Re: How can I implement HID protocol ?
Yes, from PCI you read base address of ports of these controllers. But do not be worry about PCI, writing driver for it is not hard thing.
Re: How can I implement HID protocol ?
Ok thanks, I will take a look on that thing lolKlakap wrote:Yes, from PCI you read base address of ports of these controllers. But do not be worry about PCI, writing driver for it is not hard thing.
Re: How can I implement HID protocol ?
In fact, if you want to have from your operation system something more than simply showing something to screen, you have to write PCI driver. In PCI is connected everything, hard disk, CDROM, sound card, USB controllers, network cards...
Re: How can I implement HID protocol ?
Why is it so hard to get the PCI Firmware Specification PDF
https://pcisig.com/firmware-wg-pci-firm ... change-bar
Have to be an org or smth to be able to dl that stuff, it's not the same song for USB spec https://usb.org/hid
I have to search for that like I would do for a torrent lol
(I found it btw, not sure I can share the link here)
https://pcisig.com/firmware-wg-pci-firm ... change-bar
Have to be an org or smth to be able to dl that stuff, it's not the same song for USB spec https://usb.org/hid
I have to search for that like I would do for a torrent lol
(I found it btw, not sure I can share the link here)
Re: [SOLVED] How can I implement HID protocol ?
No, don't share it . There is book on the internet called PCI systems architecture that the publishers made as a free PDF. You could try using that