Skip to content

TinyUSB Toggle between HID_PROTOCOL_BOOT and HID_PROTOCOL_REPORT #1632

Open

Description

@moc32

Toggling mouse interface protocol between boot and report on Logitech K270/M185 blocks the ongoing interrupt endpoint transfer. This works for several KM devices. The only difference between those device and the Logitech K270/M185 or K220/M150 is the the wMaxPacketSize parameter. On the Logitech combo devices the value is 20 bytes for mouse endpoint and 8 bytes for keyboard endpoint. For the other devices the wMaxPacketSize is less than or equal to 8 bytes.

I have modified the tinyusb bare api example to add the protocol toggling.
ex_host_bare_api.zip

Activity

  1. moc32 commented on Feb 8, 2024

    @moc32
    Author

    This issue might look trivial but It looks like an issue with the hardware controller. After toggling the report protocol, the keyboard endpoint get blocked. The host sends request to the keyboard endpoint and the keyboard is replying the IN request but the host is not sending the ACK and restart the IN transfer without firing any interrupt.

  2. peterharperuk commented on Feb 8, 2024

    @peterharperuk
    Contributor

    @P33M does this make any sense to you?

  3. moc32 commented on Feb 13, 2024

    @moc32
    Author

    Hello @peterharperuk, @P33M @hathach,
    Do you have any idea of what is going on here?
    You can easily reproduce the issue by building the attached example project.
    After building the project, you can load the UF2 file on the pico board then connect a Logitech wireless KM (ex. K270/M185 or K220/M150) and click "R" to switch mouse to report mode or "B" to switch it to boot mode.
    You can also connect a wired keyboard using a hub since the PICO has only one USB port and in this case the switching works. The switching works also with combo devices from microsoft.
    The only difference between the logitech combo devices and other tested devices is that the the mouse interface wMaxPacketSize is 20 bytes where it is 8bytes or less for other devices.

  4. peterharperuk commented on Feb 13, 2024

    @peterharperuk
    Contributor

    No. You might have to do better to convince me this is a Pico issue and not just a tinyusb problem

  5. added this to the none milestone on May 19, 2024
  6. kilograham commented on May 19, 2024

    @kilograham
    Contributor

    moving to none until we know this is an SDK issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions