USB hid class: difference between report protocol and boot protocol? (It is used to design a USB keyboard to enter the BIOS)

Source: Internet
Author: User

> 1-for USB-HID class: What is the difference between report protocol and boot protocol?

In short, boot protocol is used on bios, report protocol is used on OS.

The device capability of boot protocol is shown at the interface triad,
(Interfaceclass, interfacesubclass, interfaceprotocol) Field on
Hid interface descriptor.
(Interfaceclass, interfacesubclass, interfaceprotocol) = (3, 1, 1 ):
Boot keyboard
(Interfaceclass, interfacesubclass, interfaceprotocol) = (3, 1, 2 ):
Boot mouse

BIOS checks just this Triad, and it recognizes the device
(Interface) as specified.
BIOS doesn' t actually read out report descriptor from the device;
it assumes that the device has "standard" keyboard or mouse Report
Descriptor (* 1) while the device in Boot Protocol.
after enumeration, BIOS puts set_protocol (BOOT) to switch the
device into Boot Protocol, if the device has boot capability. while
BIOS is running, the device works as keyboard or mouse.
If the device doesn' t have boot capability, BIOS doesn' t enumerate
the device.

At the start up of OS after bios, OS puts bus reset. The device
Gets back to default report protocol.
Usually, OS doesn' t put any set_protocol, the device is held in
Report protocol.
On the enumeration, OS reads out report descriptor of the device,
And it determines the type of HID device, regardless of above
Subclass-protocol field.

(* 1) See hid spec Appendix B: boot interface Descriptors


> 2-for keyboard: the input report format is unique for both
Report/boot protocol?

As I wrote above,
For boot protocol, the report format is fixed one.
For Report protocol, you can define any report format on the report
Descriptor.


> 3-When host send request (get_descriptor) specifying the report
Descriptor type, Will device return the report descriptor including
The input report data (I. e: 8-byte for keyboard )? Or host need
Send request get_report to get the input report?

Device returns just the report descriptor, when host puts
Get_descriptor ().
Actual input report is sent for get_report (input) request, or
In transfer over the interrupt in endpoint.

Tsune

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.