Repository navigation
Device report and opt-in experimental product ID for untested decks - #2
Merged
Merged
Conversation
ragnarosd --experimental-pid 0x2000 (or RAGNAROS_EXPERIMENTAL_PID) also opens that product ID after the SS552 and drives it with the SS552 protocol, so an owner of a sibling deck can see whether image writes and input work. Off by default; the daemon says EXPERIMENTAL at startup and on attach, ragnarosctl status shows it, and every raw input report is logged while it is on. A single-interface deck is still claimed.
For every vendor-0200 device (or --device VID:PID) it prints Markdown with the IDs and strings, interfaces and endpoints, HID report descriptors, hidraw and USB nodes with their permissions, the udev rules and usbhid quirks that cover it, and the ragnaros, kernel and distro versions. It only reads sysfs and /dev permissions, never opens the device, and leaves out the serial number, hostname and user names. Next steps for an untested deck go to stderr. README: Reporting a new device.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groundwork for evaluating the SS551 (
0200:2000) and other vendor-0200decks. It does not add support for any new device.What
ragnaros diagnose [--device VID:PID]: prints a Markdown report for every vendor-0200device plugged in, ready to paste into an issue. It covers the IDs and strings, interfaces and endpoints (type, max packet, interval), the HID report descriptors from sysfs (hex) with the length each interface declares, the hidraw and/dev/bus/usbnodes with their permissions, the udev rules and usbhid quirks that cover the device, the raw configuration descriptors, and the ragnaros, kernel, distro and libusb versions. Next steps for an untested deck go to stderr, so> report.mdkeeps only the report.ragnarosd --experimental-pid 0x2000(orRAGNAROS_EXPERIMENTAL_PID): after the SS552, the daemon also tries that product ID and drives it with the SS552 protocol. It is off by default. When it is on, the daemon prints EXPERIMENTAL at startup and on attach,ragnarosctl statusshows the device, and every raw input report is logged. A deck with a single interface still gets claimed. Only vendor0200is accepted.sudo chown "$USER" /dev/bus/usb/BBB/DDD, which lasts until the deck is unplugged. The default udev rule is unchanged.Why
For #1 we need the SS551's descriptors and a quick test with the SS552 protocol. With this, the reporter can do both without editing code.
Safety
diagnoseonly reads sysfs files andstats the/devnodes. It never opens the device, so it needs no root and is safe while ragnarosd runs. A test checks that it only opens files read-only and never opens anything under/devor theserialattribute.0200:3001only, with the same error message, the same interface claiming and the same status reply. Tests pin this.How verified
pytest -q(242 passed),compileall,py_compile,bash -n. The changed test files also pass on Python 3.9.test_builtin_usbhid_is_detected) and libusb with a stubCDLL. Fixtures use the SS552's real configuration descriptors.ragnaros diagnoseread-only against the SS552 on my machine while the daemon was running: it showed the IGNORE quirk, the 70-ragnaros rule, both interfaces bound to usbfs, and report descriptor lengths of 54 and 63.Refs #1