1

I'm building a USB keyboard using the HID protocol.

I have been said that, in case of a control-in where the request type is 0x01, I am supposed to reply with the last report. That means that I would have to write the reports both to:

  • the USB endpoint,
  • when there is a control-in request.

I do not do that: I only write the report to the endpoint, and I ignore all the control-in requests, excepting the one asking for the report descriptor. My keyboard works perfectly well, both on Linux (Fedora, Android) and Windows. I don't own a Mac, so I couldn't test on one.

My questions are:

  • Does the spec really ask for the device to send the reports twice, the second times being during a control-in request?
  • If yes, can I safely ignore that part, because it seems that it works well without it?
5
  • The spec is available for you to read. "This request is mandatory and must be supported by all devices."
    – hobbs
    Jan 14, 2023 at 17:58
  • @hobbs Then why does my keyboard work when I ignore it? And it works on totally different OSes.
    – Boiethios
    Jan 14, 2023 at 18:04
  • Also, it's super weird: the host already has the report. What is the need to get it a second time?
    – Boiethios
    Jan 14, 2023 at 18:09
  • Sorry to say this, but I don't think Super User is the correct site for this question. I'm not sure there is a correct site at all.
    – Daniel B
    Jan 15, 2023 at 21:40
  • @DanielB I think they migrated my question because it's more a software one (I guess?) since it's about the protocol.
    – Boiethios
    Jan 17, 2023 at 18:17

0

You must log in to answer this question.

Browse other questions tagged .