Repository navigation
feat(devices): add alternate product IDs listed by Options+ - #179
Merged
Merged
Conversation
Logitech Options+ ships these PIDs for devices Logitune already supports, but our descriptors did not list them: - MX Master 3S: 0xb043, a second hardware revision (Options+ model 2b043, same CIDs and 200-8000 DPI range as 0xb034). - MX Master 3S For Business: 0xb044 (model 2b044, same capabilities as 0xb035). - MX Master 2S: 0x4069, its Unifying WPID. - MX Vertical: 0xc08a, its PID over the USB cable. DeviceManager only opens a session for a non-receiver hidraw node when findByPid() matches, so a 3S reporting 0xb043 over Bluetooth was never probed. Receiver-paired devices fell back to name matching, which could not tell the 3S and 3S For Business apart if the firmware name was ambiguous. Tests: a DeviceSpec entry per new PID, so each one is checked against the full descriptor (controls, DPI, hotspots, gestures, features). The parameterized test names now carry the PID to stay unique when one descriptor has several entries. A findByPidAndName case checks that 0xb043 and 0xb044 resolve to their own descriptor regardless of the reported name.
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.
Summary
Logitech Options+ ships these product IDs for devices Logitune already supports, but our descriptors don't list them:
mx-master-3s0xb0432b043, a second "MX Master 3S" revision. Same depot, CIDs 0x52/0x53/0x56/0xC3/0xC4, DPI 200–8000 step 50mx-master-3s-for-business0xb0442b044, same capabilities asb035mx-master-2s0x40696b019lists046d_b019and046d_4069mx-vertical0xc08aeb020lists046d_407b,046d_b020,046d_c08aWhy it matters:
DeviceManager::probeDeviceonly opens a session for a non-receiver hidraw node whenfindByPid()matches. A 3S reportingb043over Bluetooth was never probed. Receiver-paired devices fall back to name matching, so they were less affected, but that fallback can't separate the 3S from the 3S For Business when the firmware name is ambiguous.Wired MX Vertical (
0xc08a): connection label is wrongWith this change, a cable-connected MX Vertical goes through
probeDevicelike this:0x85 0x11) passes on the HID++ interface.0xc08ais not a receiver PID, so it takes the direct branch, andfindByPid(0xc08a)now matches.deviceIndex = 0xFF(kDeviceIndexDirect). That's correct for a wired HID++ 2.0 device; Solaar uses 0xFF for both USB and Bluetooth direct connections.connTypeis hard-coded to"Bluetooth"(DeviceManager.cpp, direct branch). This is wrong for USB.BatteryChipshows the Bluetooth icon and the Easy-Switch page says "Connected via Bluetooth" while the mouse is on its cable.This PR doesn't fix the label. The fix needs the HID bus type.
HIDIOCGRAWINFOalready returnsbustype(BUS_USBvsBUS_BLUETOOTH), butHidrawDevice::DeviceInfodrops it. It's a small follow-up: keepbustypeand label the direct branch from it. Device identity isn't affected, because sessions merge by HID++ serial, not by PID or label.0xc08ais only added tomx-vertical, which matches Options+ (it has no separate For Business model). A wired MX Vertical for Business would therefore resolve to the "MX Vertical" descriptor. The two descriptors differ only in hotspot positions.The MX Vertical
0xFDbutton is intentionally left out. It needs hotspot coordinates.Tests
DeviceSpecentry for each new PID (MX_Master_2S_4069,MX_Master_3S_b043,MX_Master_3S_For_Business_b044,MX_Vertical_c08a). Each one runs the full parameterized suite against its descriptor: controls, DPI, hotspots, gestures and features.…/MX_Master_3S_b034). Without that, two entries for one descriptor would produce duplicate gtest names.DeviceRegistry.FindByPidAndNameResolvesMxMaster3sRevisions:b034/b043resolve to MX Master 3S andb035/b044resolve to MX Master 3S For Business. That holds even when the reported name points at the sibling descriptor.0xb043is removed from the descriptor (7 failures).All of these pass locally on
f6b1431:logitune-tests836/836,logitune-tray-tests9/9,logitune-qml-tests72/72,generate-readme-devices.py --check(the table has no PID column, so README is unchanged), andgenerate_package_deps.py --check. Only descriptor JSON and tests change, so no hardware smoke test.🤖 Generated with Claude Code