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

cli support for onboard profiles #2243

Merged
merged 10 commits into from
Feb 7, 2024
Merged

cli support for onboard profiles #2243

merged 10 commits into from
Feb 7, 2024

Conversation

pfps
Copy link
Collaborator

@pfps pfps commented Feb 4, 2024

This PR has a CLI interface for dumping and loading the data used by the Onboard Profiles feature. This feature controls the report rate, the resolution, the buttons, and the LEDs of the device. Solaar dumps the entire active Onboard Profiles data, consisting of some bookkeeping information, including profile version and the name of the device, and a sequence of profiles.

Each profile has:

  • enabled: whether the profile is enabled
  • sector: where the profile is stored in device memory; sectors greater than 0xFF are in ROM and cannot be written (use the low byte as the sector to write to Flash)
  • report_rate: a report rate in milliseconds from 1 to 8
  • resolutions: a sequence of five sensor resolutions in DPI
  • resolution_default_index: the index of the default sensor resolution (0 to 4)
  • resolution_shift_index: the index of the sensor resolution used when the DPI Shift button is pressed (0 to 4)
  • buttons: the action for each buttons on the mouse in normal mode
  • gbuttons: the action for each button on the mouse in G-Shift mode
  • angle_snap: enable angle snapping for devices that support it
  • name: a memonic name for the profile
  • red, blue, green: color indicator for the profile
  • lighting: lighting information for logo and side LEDs in normal mode, then for power saving mode
  • power_mode: ??
  • write count: ??
  • ps_timeout: delay in ms to go into power saving mode
  • po_timeout: delay in ms to go from power saving mode to fully off
    Missing or unused parts of a profile are often a sequence of 0xFF bytes.

Button actions can either perform a function (behavior: 9) or send a button click or key press (behaviour: 8).
Functions are:

  • 0: No Action - do nothing
  • 1: Tilt Left
  • 2: Tilt Right
  • 3: Next DPI - change device resolution to the next DPI
  • 4: Previous DPI - change device resolution to the previous DPI
  • 5: Cycle DPI - change device resolution to the next DPI considered as a cycle
  • 6: Default_DPI - change device resolution to the default resolution
  • 7: Shift_DPI - change device resolution to the shift resolution
  • 8: Next Profile - change to the next enabled profile
  • 9: Previous Profile - change to the previous enabled profile
  • 10: Cycle Profile - change to the next enabled profile considered as a cycle
  • 11: G-Shift - change all buttons to their G-Shift state
  • 12: Battery Status - show battery status on the device LEDs
  • 13: Profile Select - select the n'th enabled profile
  • 14: Mode Switch
  • 15: Host Button - switch between hosts (unverified)
  • 16: Scroll Down
  • 17: Scroll Up
    Some devices might not be able to perform all functions.

Buttons can send (type):

  • 0: Don't send anything
  • 1: A button click (value) as a 16-bit bitmap, i.e., 1 is left click, 2 is right, 4 is middle, etc.
  • 2: An 8-bit USB HID keycode (value) plus an 8-bit modifier bitmap (modifiers), i.e., 0 for no modifiers, 1 for control, 2 for shift, etc.
  • 3: A 16-bit HID Consumer keycode (value)

See USB_HID_KEYCODES and HID_CONSUMERCODES in lib/logitech_receiver/special_keys.py for values to use for keycodes.

Buttons can also execute macros but Solaar does not provide any support for macros.

Lighting information is a sequence of lighting effects, with the first for the logo LEDs and the second for the side LEDs. The fields of the effects are:

  • ID: the kind of lighting effect: 0x0 disable, 0x1 fixed color, 0x2 pulse a color, 0x3 cycle through the spectrum, 0x8 a boot effect, 0x9 a demo effect, 0xa breathe a color (like pulse), 0xb ripple, null unknown; only effects supported by the device can be used
  • color: a color parameter for the effect as a 24-bit RGB value
  • intensity: how intense to make the color (1%-100%), 0 for the default (usually 100%)
  • speed: how fast to pulse
  • ramp: how to change to the color
  • period: how fast to perform the effect
  • form: the form of the breathe effect
  • bytes: the raw bytes of other effects

To set up profiles, first run solaar profiles <device name>, which will output a YAML dump of the profiles on the device. Then store the YAML dump into a file and edit the file to make changes. Finally run solaar profiles <device name> <file name> to load the profiles back onto the device. Profiles are stored in flash memory and persist when the device is inactive or turned off. When loading profiles Solaar is careful to only write the flash memory sectors that need to be changed. Solaar also checks for correct profile version and device name before loading a profile into a device.

Keep a copy of the initial dump of profiles so that it can be loaded back to the device if problems are encountered with the edited profiles. The safest changes are to take an unused or unenabled profile sector and create a new profile in it, likely mostly copying parts of another profile.

The onboard profiles setting now allows switching between settings. The UI tracks the profile, the sensitivity, and the report rate when they are changed by switching profiles or by key actions in a profile.

@pfps
Copy link
Collaborator Author

pfps commented Feb 4, 2024

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 #2243, 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/2243/head:pull_2243
git checkout pull_2243

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_2243
git fetch origin pull/2243/head
git reset --hard FETCH_HEAD

@pfps pfps force-pushed the profiles branch 6 times, most recently from 483761b to bf572f4 Compare February 5, 2024 01:49
@Svenum
Copy link
Contributor

Svenum commented Feb 5, 2024

If I want to load the profile I get this error:

Profiles not written: 'str' object has no attribute 'to_bytes'
Here is full debug log with -dd:

2024-02-05 19:13:03,020,020  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw0 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-05 19:13:03,022,022  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw1 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-05 19:13:03,022,022  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 19:13:03,023,023     INFO [MainThread] hidapi.udev: Found device /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 0 2
2024-02-05 19:13:03,024,024  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 19:13:03,024,024     INFO [MainThread] hidapi.udev: Found device /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 1 2
2024-02-05 19:13:03,025,025  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 19:13:03,025,025     INFO [MainThread] hidapi.udev: Found device /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 2 2
2024-02-05 19:13:03,025,025     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw4
2024-02-05 19:13:03,077,077     INFO [MainThread] logitech_receiver.base: New lock 4
2024-02-05 19:13:03,079,079  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 19:13:03,079,079     INFO [MainThread] hidapi.udev: Found device /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 0 2
2024-02-05 19:13:03,080,080  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 19:13:03,081,081     INFO [MainThread] hidapi.udev: Found device /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 1 2
2024-02-05 19:13:03,082,082  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw7 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 19:13:03,082,082     INFO [MainThread] hidapi.udev: Found device /dev/hidraw7 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 2 2
2024-02-05 19:13:03,082,082     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw7
2024-02-05 19:13:03,082,082     INFO [MainThread] logitech_receiver.base: New lock 5
2024-02-05 19:13:04,089,089  WARNING [MainThread] logitech_receiver.receiver: register new device failed for <LightspeedReceiver(/dev/hidraw4,4)> device 2 error read pairing information - non-unifying
2024-02-05 19:13:04,089,089  WARNING [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: looked for device 2, not found
2024-02-05 19:13:05,098,098     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: found new device 1 (407C)
2024-02-05 19:13:06,185,185  WARNING [MainThread] logitech_receiver.receiver: register new device failed for <LightspeedReceiver(/dev/hidraw7,5)> device 2 error read pairing information - non-unifying
2024-02-05 19:13:06,185,185  WARNING [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw7,5)>: looked for device 2, not found
2024-02-05 19:13:06,196,196     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw8
2024-02-05 19:13:06,201,201     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw7,5)>: found new device 1 (407F)
2024-02-05 19:13:06,201,201     INFO [MainThread] logitech_receiver.base: New lock 6
Reading profiles from test.yml
Loading profiles into G502 Gaming Mouse
2024-02-05 19:13:07,330,330  WARNING [MainThread] logitech_receiver.hidpp20: Exception writing onboard profile sector 1
Profiles not written: 'str' object has no attribute 'to_bytes'

Here is the dump:

!OnboardProfiles
buttons: 11
count: 5
gbuttons: 11
profiles:
  1: !OnboardProfile
    angle_snap: 255
    blue: 255
    buttons:
    - !Button {behavior: 8, type: 1, value: 1}
    - !Button {behavior: 8, type: 1, value: 2}
    - !Button {behavior: 8, type: 1, value: 4}
    - !Button {behavior: 8, type: 1, value: 8}
    - !Button {behavior: 8, type: 1, value: 16}
    - !Button {behavior: 8, modifiers: '', type: 2, value: 49}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: 5}
    - !Button {behavior: 9, value: 6}
    - !Button {behavior: 9, value: 2}
    - !Button {behavior: 9, value: 1}
    enabled: 1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 255
    lighting: !!binary |
      CgD/ACcQABsAAAAKAP8AH0AAGwAAAAoA/wAnEAAbAAAACgD/AB9AABsAAAD/
    name: ''
    power_mode: 255
    red: 255
    report_rate: 1
    resolution_default_index: 1
    resolution_shift_index: 0
    resolutions:
    - 400
    - 900
    - 1600
    - 3200
    - 6400
    sector: 1
  2: !OnboardProfile
    angle_snap: 255
    blue: 255
    buttons:
    - !Button {behavior: 8, type: 1, value: 1}
    - !Button {behavior: 8, type: 1, value: 2}
    - !Button {behavior: 8, type: 1, value: 4}
    - !Button {behavior: 8, type: 1, value: 8}
    - !Button {behavior: 8, type: 1, value: 16}
    - !Button {behavior: 9, value: 7}
    - !Button {behavior: 9, value: 8}
    - !Button {behavior: 9, value: 3}
    - !Button {behavior: 9, value: 12}
    - !Button {behavior: 9, value: 2}
    - !Button {behavior: 9, value: 1}
    enabled: 0
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 255
    lighting: !!binary |
      AwAAAAAAH0AAAAADAAAAAAAfQAAAAAMAAAAAAB9AAAAAAwAAAAAAH0AAAAD/
    name: ''
    power_mode: 255
    red: 255
    report_rate: 1
    resolution_default_index: 1
    resolution_shift_index: 0
    resolutions:
    - 400
    - 800
    - 1600
    - 3200
    - 6400
    sector: 2
  3: !OnboardProfile
    angle_snap: 0
    blue: 255
    buttons:
    - !Button {behavior: 8, type: 1, value: 1}
    - !Button {behavior: 8, type: 1, value: 2}
    - !Button {behavior: 8, type: 1, value: 4}
    - !Button {behavior: 8, type: 1, value: 8}
    - !Button {behavior: 8, type: 1, value: 16}
    - !Button {behavior: 9, value: 7}
    - !Button {behavior: 9, value: 4}
    - !Button {behavior: 9, value: 3}
    - !Button {behavior: 9, value: 12}
    - !Button {behavior: 9, value: 2}
    - !Button {behavior: 9, value: 1}
    enabled: 0
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 255
    lighting: !!binary |
      AwAAAAAAH0AAAAADAAAAAAAfQAAAAP//////////////////////////////
    name: ''
    power_mode: 255
    red: 255
    report_rate: 1
    resolution_default_index: 1
    resolution_shift_index: 0
    resolutions:
    - 400
    - 800
    - 1600
    - 3200
    - 6400
    sector: 3
  4: !OnboardProfile
    angle_snap: 0
    blue: 255
    buttons:
    - !Button {behavior: 8, type: 1, value: 1}
    - !Button {behavior: 8, type: 1, value: 2}
    - !Button {behavior: 8, type: 1, value: 4}
    - !Button {behavior: 8, type: 1, value: 8}
    - !Button {behavior: 8, type: 1, value: 16}
    - !Button {behavior: 9, value: 7}
    - !Button {behavior: 9, value: 4}
    - !Button {behavior: 9, value: 3}
    - !Button {behavior: 9, value: 12}
    - !Button {behavior: 9, value: 2}
    - !Button {behavior: 9, value: 1}
    enabled: 0
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 255
    lighting: !!binary |
      AwAAAAAAH0AAAAADAAAAAAAfQAAAAP//////////////////////////////
    name: ''
    power_mode: 255
    red: 255
    report_rate: 1
    resolution_default_index: 1
    resolution_shift_index: 0
    resolutions:
    - 400
    - 800
    - 1600
    - 3200
    - 6400
    sector: 4
  5: !OnboardProfile
    angle_snap: 0
    blue: 255
    buttons:
    - !Button {behavior: 8, type: 1, value: 1}
    - !Button {behavior: 8, type: 1, value: 2}
    - !Button {behavior: 8, type: 1, value: 4}
    - !Button {behavior: 8, type: 1, value: 8}
    - !Button {behavior: 8, type: 1, value: 16}
    - !Button {behavior: 9, value: 7}
    - !Button {behavior: 9, value: 4}
    - !Button {behavior: 9, value: 3}
    - !Button {behavior: 9, value: 12}
    - !Button {behavior: 9, value: 2}
    - !Button {behavior: 9, value: 1}
    enabled: 0
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 255
    lighting: !!binary |
      AwAAAAAAH0AAAAADAAAAAAAfQAAAAP//////////////////////////////
    name: ''
    power_mode: 255
    red: 255
    report_rate: 1
    resolution_default_index: 1
    resolution_shift_index: 0
    resolutions:
    - 400
    - 800
    - 1600
    - 3200
    - 6400
    sector: 5
sectors: 16
size: 255

@Svenum
Copy link
Contributor

Svenum commented Feb 5, 2024

For my G915 Wireless RGB Mechanical Gaming Keyboard I got this:

> solaar profiles 1
Device G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD is either offline or has no onboard profiles

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

For the G915 run solaar -ddd profiles G915. That will show all the information that is obtained from the device. It may be that the G915 uses a different kind of profile.

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

The other problem is caused by a bug handling the modifiers field. Its value is an integer that holds an 8-bit value. I'll update the documentation above.

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

The current version of the PR reports more information when there is an exception loading a profile.

@Svenum
Copy link
Contributor

Svenum commented Feb 5, 2024

The other problem is caused by a bug handling the modifiers field. Its value is an integer that holds an 8-bit value. I'll update the documentation above.

Ok, but this is the original dump form my mouse without modifying it, so this must be an export bug as well

@Svenum
Copy link
Contributor

Svenum commented Feb 5, 2024

For the G915 run solaar -ddd profiles G915. That will show all the information that is obtained from the device. It may be that the G915 uses a different kind of profile.

Here is the output:

2024-02-05 20:19:52,111,111  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw0 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-05 20:19:52,112,112  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw1 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-05 20:19:52,113,113  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 20:19:52,113,113     INFO [MainThread] hidapi.udev: Found device /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 0 2
2024-02-05 20:19:52,114,114  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 20:19:52,114,114     INFO [MainThread] hidapi.udev: Found device /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 1 2
2024-02-05 20:19:52,115,115  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-05 20:19:52,115,115     INFO [MainThread] hidapi.udev: Found device /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 2 2
2024-02-05 20:19:52,115,115     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw4
2024-02-05 20:19:52,167,167     INFO [MainThread] logitech_receiver.base: New lock 4
2024-02-05 20:19:52,167,167    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 030000]
2024-02-05 20:19:52,168,168    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 03DEE9CA1E010207FF00000000000000]
2024-02-05 20:19:52,168,168    DEBUG [MainThread] solaar.cli: [/dev/hidraw4] => <LightspeedReceiver(/dev/hidraw4,4)>
2024-02-05 20:19:52,169,169  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 20:19:52,169,169     INFO [MainThread] hidapi.udev: Found device /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 0 2
2024-02-05 20:19:52,170,170  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 20:19:52,170,170     INFO [MainThread] hidapi.udev: Found device /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 1 2
2024-02-05 20:19:52,171,171  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw7 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-05 20:19:52,171,171     INFO [MainThread] hidapi.udev: Found device /dev/hidraw7 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 2 2
2024-02-05 20:19:52,171,171     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw7
2024-02-05 20:19:52,171,171     INFO [MainThread] logitech_receiver.base: New lock 5
2024-02-05 20:19:52,171,171    DEBUG [MainThread] logitech_receiver.base: (5) <= w[10 FF 83B5 030000]
2024-02-05 20:19:52,173,173    DEBUG [MainThread] logitech_receiver.base: (5) => r[11 FF 83B5 032FD29E000101070000000000000000]
2024-02-05 20:19:52,173,173    DEBUG [MainThread] solaar.cli: [/dev/hidraw7] => <LightspeedReceiver(/dev/hidraw7,5)>
2024-02-05 20:19:52,174,174    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 8102 000000]
2024-02-05 20:19:52,175,175    DEBUG [MainThread] logitech_receiver.base: (4) => r[10 FF 8102 000100]
2024-02-05 20:19:52,175,175    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 8102 000000]
2024-02-05 20:19:52,176,176    DEBUG [MainThread] logitech_receiver.base: (4) => r[10 FF 8102 000100]
2024-02-05 20:19:53,178,178    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 200000]
2024-02-05 20:19:53,179,179    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 200708407C0D0001B300000000000100]
2024-02-05 20:19:53,179,179    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 300000]
2024-02-05 20:19:53,180,180    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 30A502B0E11840A00105000000000000]
2024-02-05 20:19:53,180,180    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 400000]
2024-02-05 20:19:53,181,181    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 400D47393135204B4559424F41524400]
2024-02-05 20:19:53,181,181     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: found new device 1 (407C)
2024-02-05 20:19:53,181,181    DEBUG [MainThread] logitech_receiver.base: (4) pinging device 1
2024-02-05 20:19:53,181,181    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 01 001F 00007C]
2024-02-05 20:19:53,197,197    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 001F 04027C00000000000000000000000000]
2024-02-05 20:19:53,197,197    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000F 00010000000000000000000000000000]
2024-02-05 20:19:53,207,207    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000F 01000100000000000000000000000000]
2024-02-05 20:19:53,207,207    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 010F 00000000000000000000000000000000]
2024-02-05 20:19:53,217,217    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 010F 25000000000000000000000000000000]
2024-02-05 20:19:53,217,217    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000B 00050000000000000000000000000000]
2024-02-05 20:19:53,227,227    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000B 03000000000000000000000000000000]
2024-02-05 20:19:53,227,227    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 0309 00000000000000000000000000000000]
2024-02-05 20:19:53,237,237    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 0309 2C000000000000000000000000000000]
2024-02-05 20:19:53,237,237    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 0319 00000000000000000000000000000000]
2024-02-05 20:19:53,247,247    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 0319 4739313520574952454C455353205247]
2024-02-05 20:19:53,247,247    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 0319 10000000000000000000000000000000]
2024-02-05 20:19:53,257,257    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 0319 42204D454348414E4943414C2047414D]
2024-02-05 20:19:53,257,257    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 031D 20000000000000000000000000000000]
2024-02-05 20:19:53,267,267    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 031D 494E47204B4559424F41524400000000]
2024-02-05 20:19:53,267,267    DEBUG [MainThread] logitech_receiver.base: (4) pinging device 1
2024-02-05 20:19:53,267,267    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 001C 00002500000000000000000000000000]
2024-02-05 20:19:53,277,277    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 001C 04022500000000000000000000000000]
2024-02-05 20:19:53,277,277    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000C 81000000000000000000000000000000]
2024-02-05 20:19:53,287,287    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000C 15000000000000000000000000000000]
2024-02-05 20:19:53,287,287    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1508 00000000000000000000000000000000]
2024-02-05 20:19:53,297,297    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1508 0104010303081000FF36040000000000]
Device G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD is either offline or has no onboard profiles

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

Yes, I was trying to be (too) smart. Just replace that by an integer - 0 for your case. I've patched the bug, but I'm in the middle of adding some other stuff so the patch may not show up for a bit.

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

Your G915 uses a different organization for its onboard profiles than the two that Solaar supports. I'll update the error message, and try to get information on this organization.

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

It might help if you tried to dump the information for your G915.

Patch a function in lib/logitech_receiver/hidpp20.py, changing 0x03 to 0x04, so that it reads:

    def from_device(cls, device):
        response = device.feature_request(FEATURE.ONBOARD_PROFILES, 0x00)
        memory, profile, macro = _unpack('!BBB', response[0:3])
        if memory != 0x01 or profile > 0x04 or macro != 0x01:
            return

The dumping the profiles might do something useful then. Don't use the output to load back in, though!

@pfps
Copy link
Collaborator Author

pfps commented Feb 5, 2024

The current version of the PR deciphers lighting information in supported profiles. As the dump format has changed, you will need to create a new dump file and edit that. See the initial comment for information on the lighting field.

@Svenum
Copy link
Contributor

Svenum commented Feb 5, 2024

I will try all of this tomorrow 👍

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

I have updated to the latest PR version and if I want to load the profile I got:

2024-02-06 16:05:17,919,919  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw0 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-06 16:05:17,920,920  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw1 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-06 16:05:17,920,920  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:05:17,921,921     INFO [MainThread] hidapi.udev: Found device /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 0 2
2024-02-06 16:05:17,921,921  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:05:17,921,921     INFO [MainThread] hidapi.udev: Found device /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 1 2
2024-02-06 16:05:17,922,922  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:05:17,922,922     INFO [MainThread] hidapi.udev: Found device /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 2 2
2024-02-06 16:05:17,922,922     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw4
2024-02-06 16:05:17,974,974     INFO [MainThread] logitech_receiver.base: New lock 4
2024-02-06 16:05:17,975,975  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:05:17,976,976     INFO [MainThread] hidapi.udev: Found device /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 0 2
2024-02-06 16:05:17,977,977  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:05:17,977,977     INFO [MainThread] hidapi.udev: Found device /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 1 2
2024-02-06 16:05:17,978,978  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw8 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:05:17,978,978     INFO [MainThread] hidapi.udev: Found device /dev/hidraw8 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 2 2
2024-02-06 16:05:17,979,979     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw8
2024-02-06 16:05:17,979,979     INFO [MainThread] logitech_receiver.base: New lock 5
2024-02-06 16:05:18,985,985  WARNING [MainThread] logitech_receiver.receiver: register new device failed for <LightspeedReceiver(/dev/hidraw4,4)> device 2 error read pairing information - non-unifying
2024-02-06 16:05:18,985,985  WARNING [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: looked for device 2, not found
2024-02-06 16:05:19,992,992     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: found new device 1 (407C)
2024-02-06 16:05:21,087,087  WARNING [MainThread] logitech_receiver.receiver: register new device failed for <LightspeedReceiver(/dev/hidraw8,5)> device 2 error read pairing information - non-unifying
2024-02-06 16:05:21,087,087  WARNING [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw8,5)>: looked for device 2, not found
2024-02-06 16:05:21,095,095     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw9
2024-02-06 16:05:21,102,102     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw8,5)>: found new device 1 (407F)
2024-02-06 16:05:21,102,102     INFO [MainThread] logitech_receiver.base: New lock 6
Reading profiles from test.yml
Loading profiles into G502 Gaming Mouse
2024-02-06 16:05:22,242,242  WARNING [MainThread] logitech_receiver.hidpp20: Exception writing onboard profile sector 1
Profiles not written: 'NoneType' object has no attribute 'to_bytes'
Traceback (most recent call last):
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/solaar/cli/profiles.py", line 63, in run
    written = profiles.write(dev)
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/logitech_receiver/hidpp20.py", line 1544, in write
    raise e
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/logitech_receiver/hidpp20.py", line 1541, in write
    written += 1 if OnboardProfiles.write_sector(device, p.sector, p.to_bytes(self.size)) else 0
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/logitech_receiver/hidpp20.py", line 1401, in to_bytes
    bytes += self.buttons[i].to_bytes() if i < len(self.buttons) else b'\xff\xff\xff\xff'
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/logitech_receiver/hidpp20.py", line 1337, in to_bytes
    bytes += _int2bytes(self.value, 1) + b'\xff\x00'
  File "/nix/store/10p4007p7p0c7ccfpi4j5hpy3bfv13cl-solaar-flake-1.1.10/lib/python3.10/site-packages/logitech_receiver/common.py", line 288, in int2bytes
    return x.to_bytes(length=count, byteorder='big', signed=signed)
AttributeError: 'NoneType' object has no attribute 'to_bytes'

In the modifier field now stand "0x0" by default. I replaced it with 0 but nothing changed.

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

#2243 (comment)

def from_device(cls, device):
response = device.feature_request(FEATURE.ONBOARD_PROFILES, 0x00)
memory, profile, macro = _unpack('!BBB', response[0:3])
if memory != 0x01 or profile > 0x04 or macro != 0x01:
return

I have done that and now there comes a nice formated profile

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

#2243 (comment)

def from_device(cls, device):
response = device.feature_request(FEATURE.ONBOARD_PROFILES, 0x00)
memory, profile, macro = _unpack('!BBB', response[0:3])
if memory != 0x01 or profile > 0x04 or macro != 0x01:
return

I have done that and now there comes a nice formatted profile

Can you post the profile? It may be that the changes in version 4 don't require any code changes.

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

#Dumping profiles from G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
!OnboardProfiles
buttons: 0x8
count: 0x3
gbuttons: 0x8
name: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
profiles:
  0x1: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 32}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x1
  0x2: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x2
  0x3: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x3
sectors: 0x10
size: 0xff
version: 0x1

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

The exception appears to be caused by a button function field that is None. I see nulls in the yaml file so that is the problem. The question is what is causing these unknown button functions. I may be able to modify the code to be more defensive.

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

It also looks like the unicode name is stored with the bytes reversed. Can you run bin/solaar -ddd profiles 915 and post the output? That will include all the bits in the profiles on the mouse.

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

From the profiles dump it appears that you have your mouse buttons, even the left button, send keys. Is that the case?

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

It also looks like the unicode name is stored with the bytes reversed. Can you run bin/solaar -ddd profiles 915 and post the output? That will include all the bits in the profiles on the mouse.

2024-02-06 16:51:38,094,094  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw0 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-06 16:51:38,095,095  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw1 BID 0003 VID 0000041E PID 00003247: No module named 'hid_parser'
2024-02-06 16:51:38,096,096  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:51:38,096,096     INFO [MainThread] hidapi.udev: Found device /dev/hidraw2 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 0 2
2024-02-06 16:51:38,097,097  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:51:38,097,097     INFO [MainThread] hidapi.udev: Found device /dev/hidraw3 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 1 2
2024-02-06 16:51:38,098,098  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541: No module named 'hid_parser'
2024-02-06 16:51:38,098,098     INFO [MainThread] hidapi.udev: Found device /dev/hidraw4 BID 0003 VID 0000046D PID 0000C541 HID++ None None USB 2 2
2024-02-06 16:51:38,098,098     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw4
2024-02-06 16:51:38,150,150     INFO [MainThread] logitech_receiver.base: New lock 4
2024-02-06 16:51:38,150,150    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 030000]
2024-02-06 16:51:38,151,151    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 03DEE9CA1E010207FF00000000000000]
2024-02-06 16:51:38,151,151    DEBUG [MainThread] solaar.cli: [/dev/hidraw4] => <LightspeedReceiver(/dev/hidraw4,4)>
2024-02-06 16:51:38,152,152  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:51:38,153,153     INFO [MainThread] hidapi.udev: Found device /dev/hidraw5 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 0 2
2024-02-06 16:51:38,153,153  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:51:38,153,153     INFO [MainThread] hidapi.udev: Found device /dev/hidraw6 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 1 2
2024-02-06 16:51:38,155,155  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for DEVICE /dev/hidraw8 BID 0003 VID 0000046D PID 0000C539: No module named 'hid_parser'
2024-02-06 16:51:38,155,155     INFO [MainThread] hidapi.udev: Found device /dev/hidraw8 BID 0003 VID 0000046D PID 0000C539 HID++ None None USB 2 2
2024-02-06 16:51:38,155,155     INFO [MainThread] hidapi.udev: OPEN PATH /dev/hidraw8
2024-02-06 16:51:38,155,155     INFO [MainThread] logitech_receiver.base: New lock 5
2024-02-06 16:51:38,155,155    DEBUG [MainThread] logitech_receiver.base: (5) <= w[10 FF 83B5 030000]
2024-02-06 16:51:38,157,157    DEBUG [MainThread] logitech_receiver.base: (5) => r[11 FF 83B5 032FD29E000101070000000000000000]
2024-02-06 16:51:38,158,158    DEBUG [MainThread] solaar.cli: [/dev/hidraw8] => <LightspeedReceiver(/dev/hidraw8,5)>
2024-02-06 16:51:38,158,158    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 8102 000000]
2024-02-06 16:51:38,159,159    DEBUG [MainThread] logitech_receiver.base: (4) => r[10 FF 8102 000100]
2024-02-06 16:51:38,159,159    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 8102 000000]
2024-02-06 16:51:38,160,160    DEBUG [MainThread] logitech_receiver.base: (4) => r[10 FF 8102 000100]
2024-02-06 16:51:39,167,167    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 200000]
2024-02-06 16:51:39,168,168    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 200708407C0D0001B300000000000100]
2024-02-06 16:51:39,168,168    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 300000]
2024-02-06 16:51:39,169,169    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 30A502B0E11840A00105000000000000]
2024-02-06 16:51:39,169,169    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 FF 83B5 400000]
2024-02-06 16:51:39,170,170    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 FF 83B5 400D47393135204B4559424F41524400]
2024-02-06 16:51:39,170,170     INFO [MainThread] logitech_receiver.receiver: <LightspeedReceiver(/dev/hidraw4,4)>: found new device 1 (407C)
2024-02-06 16:51:39,171,171    DEBUG [MainThread] logitech_receiver.base: (4) pinging device 1
2024-02-06 16:51:39,171,171    DEBUG [MainThread] logitech_receiver.base: (4) <= w[10 01 001C 000047]
2024-02-06 16:51:39,202,202    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 001C 04024700000000000000000000000000]
2024-02-06 16:51:39,202,202    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000A 00010000000000000000000000000000]
2024-02-06 16:51:39,212,212    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000A 01000100000000000000000000000000]
2024-02-06 16:51:39,212,212    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 010B 00000000000000000000000000000000]
2024-02-06 16:51:39,222,222    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 010B 25000000000000000000000000000000]
2024-02-06 16:51:39,222,222    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000D 00050000000000000000000000000000]
2024-02-06 16:51:39,232,232    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000D 03000000000000000000000000000000]
2024-02-06 16:51:39,232,232    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 030C 00000000000000000000000000000000]
2024-02-06 16:51:39,242,242    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 030C 2C000000000000000000000000000000]
2024-02-06 16:51:39,242,242    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 031D 00000000000000000000000000000000]
2024-02-06 16:51:39,252,252    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 031D 4739313520574952454C455353205247]
2024-02-06 16:51:39,252,252    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 031C 10000000000000000000000000000000]
2024-02-06 16:51:39,262,262    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 031C 42204D454348414E4943414C2047414D]
2024-02-06 16:51:39,262,262    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 031C 20000000000000000000000000000000]
2024-02-06 16:51:39,272,272    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 031C 494E47204B4559424F41524400000000]
2024-02-06 16:51:39,272,272    DEBUG [MainThread] logitech_receiver.base: (4) pinging device 1
2024-02-06 16:51:39,272,272    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 0019 0000FE00000000000000000000000000]
2024-02-06 16:51:39,282,282    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 0019 0402FE00000000000000000000000000]
2024-02-06 16:51:39,282,282    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 000F 81000000000000000000000000000000]
2024-02-06 16:51:39,292,292    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 000F 15000000000000000000000000000000]
2024-02-06 16:51:39,292,292    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 150A 00000000000000000000000000000000]
2024-02-06 16:51:39,302,302    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 150A 0104010303081000FF36040000000000]
2024-02-06 16:51:39,302,302    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00000000000000000000000000000000]
2024-02-06 16:51:39,312,312    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 000101000002010000030100FFFF0000]
2024-02-06 16:51:39,312,312    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 00000004000000000000000000000000]
2024-02-06 16:51:39,315,315    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 0002010000030100FFFF0000FFFFFFFF]
2024-02-06 16:51:39,315,315    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00000008000000000000000000000000]
2024-02-06 16:51:39,318,318    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 00030100FFFF0000FFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,318,318    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 0000000C000000000000000000000000]
2024-02-06 16:51:39,321,321    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFF0000FFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,321,321    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 00010000000000000000000000000000]
2024-02-06 16:51:39,324,324    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E 01000000000000000000000000FFFFFF]
2024-02-06 16:51:39,324,324    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00010010000000000000000000000000]
2024-02-06 16:51:39,327,327    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFFFFFFFFFFFFFFFFFFFFFF3C002C01]
2024-02-06 16:51:39,327,327    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00010020000000000000000000000000]
2024-02-06 16:51:39,330,330    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 800200208002003B8002003C8002003D]
2024-02-06 16:51:39,330,330    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155F 00010030000000000000000000000000]
2024-02-06 16:51:39,341,341    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155F 8002003E900DFF01900DFF02900DFF03]
2024-02-06 16:51:39,341,341    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 00010040000000000000000000000000]
2024-02-06 16:51:39,351,351    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,351,351    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 00010050000000000000000000000000]
2024-02-06 16:51:39,361,361    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,361,361    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155F 00010060000000000000000000000000]
2024-02-06 16:51:39,371,371    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,371,371    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 00010070000000000000000000000000]
2024-02-06 16:51:39,374,374    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,374,374    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155F 00010080000000000000000000000000]
2024-02-06 16:51:39,377,377    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,377,377    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155B 00010090000000000000000000000000]
2024-02-06 16:51:39,387,387    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155B FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,387,387    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 000100A0000000000000000000000000]
2024-02-06 16:51:39,390,390    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 46004900580045004400000000000000]
2024-02-06 16:51:39,390,390    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 000100B0000000000000000000000000]
2024-02-06 16:51:39,393,393    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E 00000000000000000000000000000000]
2024-02-06 16:51:39,393,393    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 000100C0000000000000000000000000]
2024-02-06 16:51:39,403,403    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 00000000000000000000000000000000]
2024-02-06 16:51:39,403,403    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 000100D0000000000000000000000000]
2024-02-06 16:51:39,406,406    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 0C000000000000206400000C00000000]
2024-02-06 16:51:39,406,406    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 000100E0000000000000000000000000]
2024-02-06 16:51:39,409,409    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C 0000206400000C000000000000206400]
2024-02-06 16:51:39,409,409    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155B 000100EF000000000000000000000000]
2024-02-06 16:51:39,419,419    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155B 00000C00000000000020640000FFEEE4]
2024-02-06 16:51:39,420,420    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155F 00020000000000000000000000000000]
2024-02-06 16:51:39,429,429    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155F 01000000000000000000000000FFFFFF]
2024-02-06 16:51:39,429,429    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00020010000000000000000000000000]
2024-02-06 16:51:39,439,439    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D FFFFFFFFFFFFFFFFFFFFFFFF3C002C01]
2024-02-06 16:51:39,439,439    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155B 00020020000000000000000000000000]
2024-02-06 16:51:39,442,442    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155B 8002003A8002003B8002003C8002003D]
2024-02-06 16:51:39,442,442    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00020030000000000000000000000000]
2024-02-06 16:51:39,445,445    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 8002003E900DFF01900DFF02900DFF03]
2024-02-06 16:51:39,445,445    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 00020040000000000000000000000000]
2024-02-06 16:51:39,448,448    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,448,448    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 00020050000000000000000000000000]
2024-02-06 16:51:39,459,459    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,459,459    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00020060000000000000000000000000]
2024-02-06 16:51:39,470,470    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,470,470    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00020070000000000000000000000000]
2024-02-06 16:51:39,473,473    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,473,473    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155F 00020080000000000000000000000000]
2024-02-06 16:51:39,483,483    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,483,483    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00020090000000000000000000000000]
2024-02-06 16:51:39,486,486    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,486,486    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 000200A0000000000000000000000000]
2024-02-06 16:51:39,489,489    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 46004900580045004400000000000000]
2024-02-06 16:51:39,489,489    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 000200B0000000000000000000000000]
2024-02-06 16:51:39,499,499    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 00000000000000000000000000000000]
2024-02-06 16:51:39,499,499    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 000200C0000000000000000000000000]
2024-02-06 16:51:39,509,509    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C 00000000000000000000000000000000]
2024-02-06 16:51:39,509,509    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 000200D0000000000000000000000000]
2024-02-06 16:51:39,519,519    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 0C000000000000206400000C00000000]
2024-02-06 16:51:39,519,519    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 000200E0000000000000000000000000]
2024-02-06 16:51:39,522,522    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E 0000206400000C000000000000206400]
2024-02-06 16:51:39,522,522    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 000200EF000000000000000000000000]
2024-02-06 16:51:39,525,525    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C 00000C00000000000020640000FF4B58]
2024-02-06 16:51:39,526,526    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 00030000000000000000000000000000]
2024-02-06 16:51:39,536,536    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 01000000000000000000000000FFFFFF]
2024-02-06 16:51:39,536,536    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00030010000000000000000000000000]
2024-02-06 16:51:39,547,547    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFFFFFFFFFFFFFFFFFFFFFF3C002C01]
2024-02-06 16:51:39,547,547    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 00030020000000000000000000000000]
2024-02-06 16:51:39,550,550    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E 8002003A8002003B8002003C8002003D]
2024-02-06 16:51:39,550,550    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 00030030000000000000000000000000]
2024-02-06 16:51:39,553,553    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A 8002003E900DFF01900DFF02900DFF03]
2024-02-06 16:51:39,553,553    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 00030040000000000000000000000000]
2024-02-06 16:51:39,563,563    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,563,563    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 00030050000000000000000000000000]
2024-02-06 16:51:39,566,566    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,566,566    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1559 00030060000000000000000000000000]
2024-02-06 16:51:39,577,577    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1559 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,577,577    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 00030070000000000000000000000000]
2024-02-06 16:51:39,587,587    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,587,587    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155C 00030080000000000000000000000000]
2024-02-06 16:51:39,597,597    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155C FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,597,597    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155A 00030090000000000000000000000000]
2024-02-06 16:51:39,600,600    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155A FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF]
2024-02-06 16:51:39,600,600    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 000300A0000000000000000000000000]
2024-02-06 16:51:39,603,603    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 46004900580045004400000000000000]
2024-02-06 16:51:39,603,603    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 1558 000300B0000000000000000000000000]
2024-02-06 16:51:39,614,614    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 1558 00000000000000000000000000000000]
2024-02-06 16:51:39,614,614    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 000300C0000000000000000000000000]
2024-02-06 16:51:39,625,625    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 00000000000000000000000000000000]
2024-02-06 16:51:39,625,625    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155E 000300D0000000000000000000000000]
2024-02-06 16:51:39,636,636    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155E 0C000000000000206400000C00000000]
2024-02-06 16:51:39,636,636    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 000300E0000000000000000000000000]
2024-02-06 16:51:39,639,639    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 0000206400000C000000000000206400]
2024-02-06 16:51:39,639,639    DEBUG [MainThread] logitech_receiver.base: (4) <= w[11 01 155D 000300EF000000000000000000000000]
2024-02-06 16:51:39,650,650    DEBUG [MainThread] logitech_receiver.base: (4) => r[11 01 155D 00000C00000000000020640000FF4B58]
#Dumping profiles from G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
!OnboardProfiles
buttons: 0x8
count: 0x3
gbuttons: 0x8
name: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
profiles:
  0x1: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 32}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x1
  0x2: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x2
  0x3: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    - !Button {behavior: 9, value: null}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    - !Button {behavior: null}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: "\u4600\u4900\u5800\u4500\u4400"
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x3
sectors: 0x10
size: 0xff
version: 0x1

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

Did you do anything to set names for the profiles (at any time)?

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

Not that I remember

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

The name for each of them appears to be "FIXED", whatever that is supposed to be for.

@Svenum
Copy link
Contributor

Svenum commented Feb 6, 2024

From the profiles dump it appears that you have your mouse buttons, even the left button, send keys. Is that the case?

no left button is normal left-click

I played a bit with piper (https://github.com/libratbag/piper) a while ago. Maybe that set profile names

@pfps
Copy link
Collaborator Author

pfps commented Feb 6, 2024

Your 915 appears to have three profiles, all the same, all with name "FIXED", all mapping the first five buttons to characters. Even stranger, all the profiles have zeros for all five DPI resolutions. I guess that that means to ignore this aspect of the profile. Even stranger is the mapping of buttons to characters. Try using Solaar to tell the mouse to use profile 1 and see what happens.

There is also some data in the parts of the profile that my documentation says is reserved.

I updated Solaar to do better with the 915 and it should now be able to dump and load for it. Try bin/solaar profiles 915 and post the output. But I don't completely understand what is going on so be very careful loading profiles into the 915.

@Svenum
Copy link
Contributor

Svenum commented Feb 7, 2024

If I use the latest version of this PR I get this again:

Device G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD is either offline or has no onboard profiles

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

Aaah, the patch for profile version 4 is not part of this PR so you'll have to apply it.

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

I should have an update to handle V4 soon.

@Svenum
Copy link
Contributor

Svenum commented Feb 7, 2024

If the given changes to that funciton I am able to create and load a profile dump

!OnboardProfiles
buttons: 0x8
count: 0x3
gbuttons: 0x8
name: G915 WIRELESS RGB MECHANICAL GAMING KEYBOARD
profiles:
  0x1: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 32}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: FIXED
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    reserved: !!binary |
      /////////////zwALAE=
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x1
  0x2: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    green: 0x00
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: FIXED
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    reserved: !!binary |
      /////////////zwALAE=
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x2
  0x3: !OnboardProfile
    angle_snap: 0xff
    blue: 0xff
    buttons:
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 58}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 59}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 60}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 61}
    - !Button {behavior: 8, modifiers: 0x0, type: 2, value: 62}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    - !Button {behavior: 9, value: 0xd}
    enabled: 0x1
    gbuttons:
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    - !Button {behavior: 0xf, bytes: !!binary "/////w==\n"}
    green: 0xff
    lighting:
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    - !LEDEffectSetting {ID: null, bytes: !!binary "DAAAAAAAACBkAAA=\n"}
    name: FIXED
    power_mode: 0xff
    red: 0xff
    report_rate: 0x1
    reserved: !!binary |
      /////////////zwALAE=
    resolution_default_index: 0x0
    resolution_shift_index: 0x0
    resolutions:
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    - 0x0
    sector: 0x3
sectors: 0x10
size: 0xff
version: 0x2

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

Great. And libratbag likely is what changed the profiles.

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

The current version of the PR handles all the data in v4 profiles. You should be able to dump the data, change it, and reload it. You should be able to use Solaar to switch between profiles (although the three profiles you have appear to be all the same).

@Svenum
Copy link
Contributor

Svenum commented Feb 7, 2024

Works great. But my mouse the "G502" only shows 1 Profile in the solaar gui. Is this right? In the dump I can see 5 profiles (if I interpret it right) The Keyboard shows 3 Profiles as expected.

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

Solaar only shows the enabled profiles in the GUI as those are the only ones that can be selected. If you want to have more you have to either add a new (enabled) profile in an unused slot or edit one of the non-enabled profiles.

My G502 has 5 profiles but only one was enabled.

The number of profiles in the profile dump is apparently a marketing decision. My G502 appears to have flash memory for up to 15 profiles. But the memory is shared with the memory for macros (which Solaar doesn't support). My G502 didn't have any macros set up on it, as far as I could tell.

@pfps
Copy link
Collaborator Author

pfps commented Feb 7, 2024

Now to add documentation for profiles. :-(

@pfps pfps merged commit 1bf9384 into pwr-Solaar:master Feb 7, 2024
1 check passed
@pfps pfps deleted the profiles branch February 7, 2024 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants