Repository navigation
logitech: factory reset for the PRO X 3 SUPERSTRIKE, and set up a mouse with no profiles - #166
Merged
snekxs merged 2 commits intoOct 5, 2026
Conversation
…se with no profiles Captured over USB while G HUB reset every profile on a linked X3: all five profile sectors got one 255-byte image (CRC 0x2a38, identical to the format 8 fixture) and the directory (CRC 0x4037) lists sectors 1 to 5 with only the first enabled. A reset leaves the directory unchanged. - Format 8 now has a factory image, so resetAllOnboardProfiles works on the X3. - factoryDirectoryForFormat builds the captured directory; isBlankDirectory recognises a directory that lists no profiles (a mouse G HUB never linked). - initializeBlankOnboardProfiles writes the five factory sectors, then the directory, then selects profile 1, reading each back; a failure part-way leaves the directory blank and the mouse back in onboard mode. The write sequence is G HUB's reset sequence. It has not been run against a never-linked mouse, and G HUB's own first-link sequence was not captured.
…f them The factory directory layout (5 profiles) was captured from a PRO X 3 SUPERSTRIKE. The PRO X 2 shares profile format 8, so it also reaches initializeBlankOnboardProfiles, but nothing confirms it has the same layout. Refuse unless the mouse's own getInfo profile count is at least the number of profiles the captured directory lists.
Contributor
Author
|
Added a guard: |
|
🎉 This PR is included in version 0.23.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Part of OpenMouse-Project/openmouse#516 (Logitech mice show no profiles until G HUB has linked them once).
What
resetAllOnboardProfilesworks on it.supportsFactoryReset(8)is now true.initializeBlankOnboardProfiles()gives a mouse with no profiles the factory set without G HUB: the five factory sectors first, then the directory, then profile 1 selected, each read back. The directory is written last, so a failure part-way leaves the mouse as blank as it started, and it is returned to onboard mode.factoryDirectoryForFormat(8, 255)builds the captured directory, andisBlankDirectory()recognises a directory that lists no profiles.Where the bytes come from
Captured over USB (USBPcap) while G HUB reset every profile on a linked PRO X 3 SUPERSTRIKE:
0x2a38. It is byte-identical to the format 8 sector already in the tests, including the HITS defaults (actuation 5, rapid trigger 2 off, haptics 3).00 01 01 ff | 00 02 00 ff | 00 03 00 ff | 00 04 00 ff | 00 05 00 ff, thenffto the end, CRC0x4037: sector 1 enabled, 2 to 5 disabled. It is byte-identical to the directory before the reset, so a reset does not change the directory.What is not verified
initializeBlankOnboardProfileshas not been run against a never-linked mouse. It replays G HUB's reset sequence, captured on a mouse that already had profiles. G HUB's own first-link sequence was not captured, and how a never-linked X3 reacts to these writes is unknown. The code comment and docs say so.nulland the method refuses.Tests
tscis clean. The Logitech test files pass (109). The full suite has 4 failures inmchoseandregistry, which are not Logitech;mchosefails the same way on a cleanmain.