Closed gregopet closed 2 years ago
Solaar can only handle devices that use the Logitech HID++ protocol. It looks as if the G815 might use this protocol. To find out:
Look at output of lsusb
to find ID of device or receiver. (You have done this.)
Provide output of lsusb -vv -d xxxx:yyyy
where xxxx:yyyy is ID of device or receiver. (046d:c33f for you.)
Look at output of grep -H . /sys/class/hidraw/hidraw*/device/uevent
to find directory for the device or receiver, e.g., /sys/class/hidraw/hidraw3/device/uevent:HID_NAME=Logitech USB Receiver
.
Provide contents of the file /sys/class/hidraw/hidrawN/device/report_descriptor
where N was found above. You will have to copy the contents to a file with txt extension before attaching it.
Or, better, install hidrd-convert and provide output of hidrd-convert -o spec /sys/class/hidraw/hidrawN/device/report_descriptor
.
Hi,
First of all, thank you for your work :+1:
Output of lsusb -vv -d
:
It's interesting that the keyboard registers itself at two hidraw
folders, possibly because the keyboard comes with two USB cables (presumably for its USB hub function?). Here's the output of both:
hidrd-convert -o spec /sys/class/hidraw/hidraw0/device/report_descriptor
:
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Keyboard), ; Keyboard (06h, application collection)
Collection (Application),
Usage Page (Keyboard), ; Keyboard/keypad (07h)
Usage Minimum (KB Leftcontrol), ; Keyboard left control (E0h, dynamic value)
Usage Maximum (KB Right GUI), ; Keyboard right GUI (E7h, dynamic value)
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (8),
Input (Variable),
Report Count (1),
Report Size (8),
Input (Constant),
Report Count (3),
Report Size (1),
Usage Page (LED), ; LEDs (08h)
Usage Minimum (01h),
Usage Maximum (03h),
Output (Variable),
Report Count (5),
Report Size (1),
Output (Constant),
Report Count (6),
Report Size (8),
Logical Minimum (0),
Logical Maximum (255),
Usage Page (Keyboard), ; Keyboard/keypad (07h)
Usage Minimum (None), ; No event (00h, selector)
Usage Maximum (FFh),
Input,
End Collection
hidrd-convert -o spec /sys/class/hidraw/hidraw1/device/report_descriptor
:
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Keyboard), ; Keyboard (06h, application collection)
Collection (Application),
Usage Page (Keyboard), ; Keyboard/keypad (07h)
Usage Minimum (None), ; No event (00h, selector)
Usage Maximum (KB Right GUI), ; Keyboard right GUI (E7h, dynamic value)
Logical Minimum (0),
Logical Maximum (231),
Report Size (8),
Report Count (20),
Report ID (1),
Input,
End Collection,
Usage Page (Desktop), ; Generic desktop controls (01h)
Usage (Mouse), ; Mouse (02h, application collection)
Collection (Application),
Report ID (2),
Usage (Pointer), ; Pointer (01h, physical collection)
Collection (Physical),
Usage Page (Button), ; Button (09h)
Usage Minimum (01h),
Usage Maximum (10h),
Logical Minimum (0),
Logical Maximum (1),
Report Count (16),
Report Size (1),
Input (Variable),
Usage Page (Desktop), ; Generic desktop controls (01h)
Logical Minimum (-32767),
Logical Maximum (32767),
Report Size (16),
Report Count (2),
Usage (X), ; X (30h, dynamic value)
Usage (Y), ; Y (31h, dynamic value)
Input (Variable, Relative),
Logical Minimum (-127),
Logical Maximum (127),
Report Size (8),
Report Count (1),
Usage (Wheel), ; Wheel (38h, dynamic value)
Input (Variable, Relative),
Usage Page (Consumer), ; Consumer (0Ch)
Usage (AC Pan), ; AC pan (0238h, linear control)
Report Count (1),
Input (Variable, Relative),
End Collection,
End Collection,
Usage Page (Consumer), ; Consumer (0Ch)
Usage (Consumer Control), ; Consumer control (01h, application collection)
Collection (Application),
Report ID (3),
Logical Minimum (0),
Logical Maximum (1),
Report Size (1),
Report Count (7),
Usage (Scan Next Track), ; Scan next track (B5h, one-shot control)
Usage (Scan Previous Track), ; Scan previous track (B6h, one-shot control)
Usage (Stop), ; Stop (B7h, one-shot control)
Usage (Play Pause), ; Play/pause (CDh, one-shot control)
Usage (Volume Inc), ; Volume increment (E9h, re-trigger control)
Usage (Volume Dec), ; Volume decrement (EAh, re-trigger control)
Usage (Mute), ; Mute (E2h, on/off control)
Input (Variable),
Report Count (1),
Input (Constant),
End Collection,
Usage Page (FF43h), ; FF43h, vendor-defined
Usage (0602h),
Collection (Application),
Report ID (17),
Report Size (8),
Report Count (19),
Logical Minimum (0),
Logical Maximum (255),
Usage (02h),
Input,
Usage (02h),
Output,
End Collection,
Usage Page (FF43h), ; FF43h, vendor-defined
Usage (0604h),
Collection (Application),
Report ID (18),
Report Size (8),
Report Count (63),
Logical Minimum (0),
Logical Maximum (255),
Usage (04h),
Input,
Usage (04h),
Output,
End Collection
I tried disconnecting one of the USB cables and the keyboard still works, but two hidraw
entries remain.
It looks as if this device uses a different interface number than Solaar expects by default. The fix is quite simple though.
Anything I can help test? I'm a developer, though with very limited Python experience, but I can give it a go perhaps?
PR #1459 should add the G815 to Solaar. However Solaar doesn't do macros the same way that Logitech software does. You will probably have to write Solaar rules for the macro keys that simulate keypresses and divert the keys so that they trigger the rules.
To clone and use Solar from its GitHub repository
git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar
Run Solaar as bin/solaar from this directory.
To run PR #1459, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:
git fetch origin pull/1459/head:pull_1459
git checkout pull_1459
To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:
git checkout pull_1459
git fetch origin pull/1459/head
git reset --hard FETCH_HEAD
Thank you, that worked!
If I run bin/solaar show
I now get the following output:
Solaar version 1.1.1
USB and Bluetooth Devices
1: G815 Mechanical Keyboard
Device path : /dev/hidraw1
USB id : 046d:C33F
Codename : G815
Kind : keyboard
Protocol : HID++ 4.2
Polling rate : 1 ms (1000Hz)
Serial number:
Model ID: C33F00000000
Unit ID: 34304708
Bootloader: BOT 84.00.B0003
Firmware: U1 31.02.B0018
Other:
Other:
Other:
Supports 24 HID++ 2.0 features:
0: ROOT {0000}
1: FEATURE SET {0001}
2: DEVICE FW VERSION {0003}
Firmware: Bootloader BOT 84.00.B0003 AAEA
Firmware: Firmware U1 31.02.B0018 C33F
Firmware: Other
Firmware: Other
Firmware: Other
Unit ID: 34304708 Model ID: C33F00000000 Transport IDs: {'usbid': 'C33F'}
3: DEVICE NAME {0005}
Name: G815 RGB MECHANICAL GAMING KEYBOARD
Kind: keyboard
4: RESET {0020}
5: DFUCONTROL SIGNED {00C2}
6: DFU {00D0}
7: REPORT HID USAGE {1BC0}
8: KEYBOARD DISABLE BY USAGE {4522}
9: KEYBOARD LAYOUT 2 {4540}
10: GKEY {8010}
Divert G Keys : False
11: MKEYS {8020}
12: MR {8030}
13: BRIGHTNESS CONTROL {8040}
14: REPORT RATE {8060}
Polling Rate (ms): 1
Polling Rate (ms) : 1
15: RGB EFFECTS {8071}
16: PER KEY LIGHTING V2 {8081}
17: ONBOARD PROFILES {8100}
Device Mode: On-Board
18: unknown:1801 {1801} internal, hidden
19: DEVICE RESET {1802} internal, hidden
20: CONFIG DEVICE PROPS {1806} internal, hidden
21: unknown:18B0 {18B0} internal, hidden
22: unknown:1E00 {1E00} hidden
23: unknown:1EB0 {1EB0} internal, hidden
Battery status unavailable.
I will try to set macros tomorrow because the keyboard stayed at work (I tested the PR remotely) :smile:
I see that your keyboard has G, M, and MR keys. A very recent change to Solaar now supports the notifications that M and MR keys produce.
Diverting the G keys may have effects on how the M and MR keys work.
I could play with the physical keyboard now, I indeed need to divert G keys to receive any events. Those work now, but the M1 through M3 do not. I get python exceptions from Solaar when they are pressed and I would like to report these issues - do I open an issue naming G815 directly, G-keyboards as a group, or M-keys generally, or is this feature still in development and I should wait (you said it was a recent change)?
Please report as a bug. Open a new bug issue with title something like diverting G keys causes Python exceptions
.
Information
solaar --version
orgit describe --tags
if cloned from this repository):solaar 1.1.1
uname -srmo
):Linux 5.16.2-arch1-1 x86_64 GNU/Linux
solaar show
:Describe the bug
I have a G815 keyboard connected via USB cable and I would like to reprogram the macro keys. Solaar doesn't recognize the keyboard.
lsusb
returns it asBus 002 Device 023: ID 046d:c33f Logitech, Inc. G815 Mechanical Keyboard