Bug 265742 - [PATCH] Sayobot keypad fails to attach: error reading report description
Summary: [PATCH] Sayobot keypad fails to attach: error reading report description
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-08-09 16:44 UTC by crahman
Modified: 2023-04-09 07:40 UTC (History)
0 users

See Also:


Attachments
Add UQ_MS_NO_SETPROTO USB quirk (2.92 KB, patch)
2022-08-09 16:44 UTC, crahman
no flags Details | Diff
Add UQ_MS_NO_SETPROTO USB quirk (2.95 KB, patch)
2023-04-09 07:39 UTC, crahman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crahman 2022-08-09 16:44:00 UTC
Created attachment 235807 [details]
Add UQ_MS_NO_SETPROTO USB quirk

The Sayobot keypads are popular and well made sets of one or more cherry red keys used for playing the osu! rhythm game, but very useful for other applications because the keys can be programmed to perform arbitrary mouse or key actions.

On FreeBSD 13.1, the keypads fail to attach with the error:
  ums1: error reading report description
  device_attach: ums1 attach returned 12

This is caused when the ums mouse driver attempts to use SetProtocol to set the report (non-boot) protocol.  The keypad does not handle this correctly.

The attached patch adds a UQ_MS_NO_SETPROTO quirk to avoid using SetProtocol.

The patch also includes the patch from Bug 234469, which allows a USB endpoint which provides both mouse and keyboard services (the combination of which is not supported by FreeBSD) to act as a keyboard when UQ_UMS_IGNORE is set.

To use the keypad to generate mouse events, add

hw.usb.quirk.0="0x8089 0x0003 0x0000 0xffff UQ_MS_NO_SETPROTO"

to /boot/loader.conf.

To use the keyboard to generate keyboard events, add

hw.usb.quirk.0="0x8089 0x0003 0x0000 0xffff UQ_UMS_IGNORE"

to /boot/loader.conf.
Comment 1 crahman 2022-08-09 17:41:39 UTC
For completeness, it is useful to add that the configuration tool to allow key programming is available on GitHub at https://github.com/Sayobot/Sayo_CLI, and supports Linux, MacOS, and Windows.  It does not look as if it would be difficult to port it to FreeBSD.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:35:11 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 3 crahman 2023-04-09 07:39:40 UTC
Created attachment 241362 [details]
Add UQ_MS_NO_SETPROTO USB quirk

Update patch to apply to 13.2-RELEASE