Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show hidraw node in udev debugging messages #2221

Merged
merged 3 commits into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/devices/PRO X 2 40A9.text
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
solaar version 1.1.10

Receiver
Device path : /dev/hidraw3
USB id : 046d:C54D
Serial : 8FF3BF7B
Firmware : 07.00.B0008
Bootloader : 00.08
Other : C1.53
Has 1 paired device(s) out of a maximum of 2.
Notifications: (none)
Device activity counters: 1=51

1: PRO X 2
Device path : None
WPID : 40A9
Codename : PRO X 2
Kind : mouse
Protocol : HID++ 4.2
Polling rate : 8 ms (125Hz)
Serial number: <nope>
Model ID: 40A9C09B0000
Unit ID: <nope>
Bootloader: BL1 71.00.B0012
Firmware: MPM 32.00.B0012
Supports 32 HID++ 2.0 features:
0: ROOT {0000} V0
1: FEATURE SET {0001} V0
2: DEVICE FW VERSION {0003} V4
Firmware: Bootloader BL1 71.00.B0012 AB1CDBC0A7D9
Firmware: Firmware MPM 32.00.B0012 40A9DBC0A7D9
Unit ID: <nope> Model ID: 40A9C09B0000 Transport IDs: {'wpid': '40A9', 'usbid': 'C09B'}
3: DEVICE NAME {0005} V2
Name: PRO X 2
Kind: mouse
4: WIRELESS DEVICE STATUS {1D4B} V0
5: CONFIG CHANGE {0020} V0
6: UNIFIED BATTERY {1004} V3
Battery: 96%, discharging.
7: XY STATS {2250} V1
8: WHEEL STATS {2251} V0
9: unknown:2202 {2202} V0
10: MODE STATUS {8090} V2
11: unknown:8061 {8061} V0
12: ONBOARD PROFILES {8100} V0
Device Mode: On-Board
Onboard Profiles (saved): Enable
Onboard Profiles : Enable
13: MOUSE BUTTON SPY {8110} V0
14: unknown:1500 {1500} V0
15: unknown:1801 {1801} V0 internal, hidden, unknown:000010
16: DEVICE RESET {1802} V0 internal, hidden, unknown:000010
17: unknown:1803 {1803} V0 internal, hidden, unknown:000010
18: CONFIG DEVICE PROPS {1806} V8 internal, hidden, unknown:000010
19: unknown:1817 {1817} V0 internal, hidden, unknown:000010
20: OOBSTATE {1805} V0 internal, hidden
21: unknown:1830 {1830} V0 internal, hidden, unknown:000010
22: unknown:1875 {1875} V0 internal, hidden, unknown:000010
23: unknown:1861 {1861} V1 internal, hidden, unknown:000010
24: unknown:1890 {1890} V9 internal, hidden, unknown:000008
25: unknown:18A1 {18A1} V0 internal, hidden, unknown:000010
26: unknown:1E00 {1E00} V0 hidden
27: unknown:1E02 {1E02} V0 internal, hidden
28: unknown:1E22 {1E22} V1 internal, hidden, unknown:000010
29: unknown:1602 {1602} V0
30: unknown:1EB0 {1EB0} V0 internal, hidden, unknown:000010
31: unknown:18B1 {18B1} V0 internal, hidden, unknown:000010
Battery: 96%, discharging.
3 changes: 1 addition & 2 deletions docs/devices/Signature M650 L Mouse B02A.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Solaar version 1.1.3
Key/Button Diversion : {Middle Button:Regular, Back Button:Regular, Forward Button:Regular}
9: HOSTS INFO {1815}
Host 0 (paired): legion15
10: XY STATS {2250}
11: LOWRES WHEEL {2130}
10: XY STATS 11: LOWRES WHEEL {2130}
Wheel Reports: HID
Scroll Wheel Diversion (saved): False
Scroll Wheel Diversion : False
Expand Down
12 changes: 7 additions & 5 deletions lib/hidapi/udev.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ def _match(action, device, filterfn):
return
except Exception as e: # if can't process report descriptor fall back to old scheme
hidpp_short = hidpp_long = None
_log.warn('Report Descriptor not processed for BID %s VID %s PID %s: %s', bid, vid, pid, e)
_log.warn(
'Report Descriptor not processed for DEVICE %s BID %s VID %s PID %s: %s', device.device_node, bid, vid, pid, e
)

filter = filterfn(int(bid, 16), int(vid, 16), int(pid, 16), hidpp_short, hidpp_long)
if not filter:
Expand All @@ -147,8 +149,8 @@ def _match(action, device, filterfn):
# print('*** usb interface', action, device, 'usb_interface:', intf_device, usb_interface, interface_number)
if _log.isEnabledFor(_INFO):
_log.info(
'Found device BID %s VID %s PID %s HID++ %s %s USB %s %s', bid, vid, pid, hidpp_short, hidpp_long,
usb_interface, interface_number
'Found device %s BID %s VID %s PID %s HID++ %s %s USB %s %s', device.device_node, bid, vid, pid, hidpp_short,
hidpp_long, usb_interface, interface_number
)
if not (hidpp_short or hidpp_long or interface_number is None or interface_number == usb_interface):
return
Expand Down Expand Up @@ -200,7 +202,7 @@ def find_paired_node(receiver_path, index, timeout):
if not receiver_phys:
return None

phys = f'{receiver_phys}:{index}'
phys = f'{receiver_phys}:{index}' # noqa: E231
timeout += _timestamp()
delta = _timestamp()
while delta < timeout:
Expand All @@ -221,7 +223,7 @@ def find_paired_node_wpid(receiver_path, index):
if not receiver_phys:
return None

phys = f'{receiver_phys}:{index}'
phys = f'{receiver_phys}:{index}' # noqa: E231
for dev in context.list_devices(subsystem='hidraw'):
dev_phys = dev.find_parent('hid').get('HID_PHYS')
if dev_phys and dev_phys == phys:
Expand Down
3 changes: 3 additions & 0 deletions lib/logitech_receiver/hidpp20.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
UNIFIED_BATTERY=0x1004,
CHARGING_CONTROL=0x1010,
LED_CONTROL=0x1300,
FORCE_PAIRING=0x1500,
GENERIC_TEST=0x1800,
DEVICE_RESET=0x1802,
OOBSTATE=0x1805,
Expand Down Expand Up @@ -115,6 +116,7 @@
THUMB_WHEEL=0x2150,
MOUSE_POINTER=0x2200,
ADJUSTABLE_DPI=0x2201,
EXTENDED_ADJUSTABLE_DPI=0x2202,
POINTER_SPEED=0x2205,
ANGLE_SNAPPING=0x2230,
SURFACE_TUNING=0x2240,
Expand Down Expand Up @@ -154,6 +156,7 @@
MR=0x8030,
BRIGHTNESS_CONTROL=0x8040,
REPORT_RATE=0x8060,
EXTENDED_ADJUSTABLE_REPORT_RATE=0x8061,
COLOR_LED_EFFECTS=0x8070,
RGB_EFFECTS=0x8071,
PER_KEY_LIGHTING=0x8080,
Expand Down