Solaar: Add missing HID++ 2.0 features

Created on 1 Dec 2019  路  35Comments  路  Source: pwr-Solaar/Solaar

There's a full list of HID++ 2.0 features at https://github.com/Logitech/cpg-docs/tree/master/hidpp20. We should add those features to the list and start implementing them.

To request documentation about an unimplemented features please open an issue in the repo I linked.

Feature list:

  • [X] ROOT (0x0000)
  • [X] FEATURE_SET (0x0001)
  • [X] FEATURE_INFO (0x0002)
  • [X] DEVICE_FW_VERSION (0x0003)
  • [ ] DEVICE_UNIT_ID (0x0004)
  • [X] DEVICE_NAME (0x0005)
  • [ ] DEVICE_GROUPS (0x0006)
  • [x] DEVICE_FRIENDLY_NAME (0x0007)
  • [ ] KEEP_ALIVE (0x0008)
  • [ ] RESET (0x0020)
  • [ ] CRYPTO_ID (0x0021)
  • [ ] TARGET_SOFTWARE (0x0030)
  • [ ] WIRELESS_SIGNAL_STRENGTH (0x0080)
  • [ ] DFU_CONTROL_LEGACY (0x00C0)
  • [ ] DFU_CONTROL_UNSIGNED (0x00C1)
  • [ ] DFU_CONTROL_SIGNED (0x00C2)
  • [ ] DFU (0x00D0)
  • [X] BATTERY_STATUS (0x1000)
  • [x] BATTERY_VOLTAGE (0x1001)
  • [ ] CHARGING_CONTROL (0x1010)
  • [ ] LED_CONTROL (0x1300)
  • [ ] GENERIC_TEST (0x1800)
  • [ ] DEVICE_RESET (0x1802)
  • [ ] OOBSTATE (0x1805)
  • [ ] CONFIG_DEVICE_PROPS (0x1806)
  • [x] CHANGE_HOST (0x1814)
  • [x] HOSTS_INFO (0x1815)
  • [ ] BACKLIGHT (0x1981)
  • [x] BACKLIGHT2 (0x1982)
  • [ ] BACKLIGHT3 (0x1983)
  • [ ] PRESENTER_CONTROL (0x1A00)
  • [ ] SENSOR_3D (0x1A01)
  • [X] REPROG_CONTROLS (0x1B00)
  • [ ] REPROG_CONTROLS_V2 (0x1B01)
  • [ ] REPROG_CONTROLS_V2_2 (0x1B02)
  • [ ] REPROG_CONTROLS_V3 (0x1B03)
  • [X] REPROG_CONTROLS_V4 (0x1B04)
  • [ ] REPORT_HID_USAGE (0x1BC0)
  • [ ] PERSISTENT_REMAPPABLE_ACTION (0x1C00)
  • [x] WIRELESS_DEVICE_STATUS (0x1D4B)
  • [ ] REMAINING_PAIRING (0x1DF0)
  • [ ] LEFT_RIGHT_SWAP (0x2001)
  • [ ] SWAP_BUTTON_CANCEL (0x2005)
  • [ ] POINTER_AXIS_ORIENTATION (0x2006)
  • [X] VERTICAL_SCROLLING (0x2100)
  • [X] SMART_SHIFT (0x2110)
  • [X] HI_RES_SCROLLING (0x2120)
  • [X] HIRES_WHEEL (0x2121)
  • [X] LOWRES_WHEEL (0x2130)
  • [x] THUMB_WHEEL (0x2150)
  • [X] MOUSE_POINTER (0x2200)
  • [X] ADJUSTABLE_DPI (0x2201)
  • [X] POINTER_SPEED (0x2205)
  • [ ] ANGLE_SNAPPING (0x2230)
  • [ ] SURFACE_TUNING (0x2240)
  • [ ] HYBRID_TRACKING (0x2400)
  • [X] FN_INVERSION (0x40A0)
  • [X] NEW_FN_INVERSION (0x40A2)
  • [X] K375S_FN_INVERSION (0x40A3)
  • [ ] ENCRYPTION (0x4100)
  • [ ] LOCK_KEY_STATE (0x4220)
  • [ ] SOLAR_DASHBOARD (0x4301)
  • [ ] KEYBOARD_LAYOUT (0x4520)
  • [x] KEYBOARD_DISABLE (0x4521)
  • [ ] KEYBOARD_DISABLE_BY_USAGE (0x4522)
  • [x] DUALPLATFORM (0x4530)
  • [x] MULTIPLATFORM (0x4531)
  • [ ] KEYBOARD_LAYOUT_2 (0x4540)
  • [x] CROWN (0x4600)
  • [ ] TOUCHPAD_FW_ITEMS (0x6010)
  • [ ] TOUCHPAD_SW_ITEMS (0x6011)
  • [ ] TOUCHPAD_WIN8_FW_ITEMS (0x6012)
  • [ ] TAP_ENABLE (0x6020)
  • [ ] TAP_ENABLE_EXTENDED (0x6021)
  • [ ] CURSOR_BALLISTIC (0x6030)
  • [ ] TOUCHPAD_RESOLUTION (0x6040)
  • [ ] TOUCHPAD_RAW_XY (0x6100)
  • [ ] TOUCHMOUSE_RAW_POINTS (0x6110)
  • [ ] TOUCHMOUSE_6120 (0x6120)
  • [ ] GESTURE (0x6500)
  • [x] GESTURE_2 (0x6501)
  • [ ] GKEY (0x8010)
  • [ ] MKEYS (0x8020)
  • [ ] MR (0x8030)
  • [ ] BRIGHTNESS_CONTROL (0x8040)
  • [x] REPORT_RATE (0x8060)
  • [ ] COLOR_LED_EFFECTS (0x8070)
  • [ ] RGB_EFFECTS (0X8071)
  • [ ] PER_KEY_LIGHTING (0x8080)
  • [ ] PER_KEY_LIGHTING_V2 (0x8081)
  • [ ] MODE_STATUS (0x8090)
  • [ ] ONBOARD_PROFILES (0x8100)
  • [ ] MOUSE_BUTTON_SPY (0x8110)
  • [ ] LATENCY_MONITORING (0x8111)
  • [ ] GAMING_ATTACHMENTS (0x8120)
  • [ ] FORCE_FEEDBACK (0x8123)
  • [ ] SIDETONE (0x8300)
  • [ ] EQUALIZER (0x8310)
  • [ ] HEADSET_OUT (0x8320)
enhancement help wanted trivial

All 35 comments

@FFY00 Hi! I already added some missing features names in my private repo (taken from libratbag) and will synchronize with your list.
Also, list of already implemented features is good idea, i can try with it, just in what format information should be provided?

That's great, thanks!

Something like this:

  • [X] 0x0003 Device Information
  • [X] 0x1981 Backlight 1
  • [ ] 0x1982 Backlight 2

Markdown:

- [X] `0x0003` Device Information
- [X] `0x1981` Backlight 1
- [ ] `0x1982` Backlight 2

You should be able to just copy the list from the repo I linked and add the missing [ ].

@FFY00 Yes, i understand. But this information should be put somewhere in documentation folder? Maybe wiki? Sorry, not a pro in GitHub infrastructure...

I was thinking of just having it here in this issue to track the progress.

@FFY00 Currently I have 151 features defined (at least by name) but i'm think maybe 20 implemented. I think file like features.md in docs folder will be better? I'll try to create one and provide as PR.

I am not sure. I think it would make more sense to track them here as it's more interactive.

@FFY00 Something like this?

| Feature | ID | Status | Notes |
|----------------------|--------|---------|-----------------------------------------|
| ROOT | 0x0000 | [x] | System |
| FEATURE_SET | 0x0001 | [x] | System |
| FEATURE_INFO | 0x0002 | [x] | System |
| DEVICE_FW_VERSION | 0x0003 | [x] | get_firmware() |
| DEVICE_UNIT_ID | 0x0004 | | |
| DEVICE_NAME | 0x0005 | [x] | get_kind(), get_name() |
| DEVICE_GROUPS | 0x0006 | | |
| DEVICE_FRIENDLY_NAME | 0x0007 | | |
| KEEP_ALIVE | 0x0008 | | |
| RESET | 0x0020 | | aka "Config Change" |
| CRYPTO_ID | 0x0021 | | |
| TARGET_SOFTWARE | 0x0030 | | |
| WIRELESS_SIGNAL_STRENGTH | 0x0080 | | |
| DFUCONTROL_LEGACY | 0x00C0 | | |
| DFUCONTROL_UNSIGNED | 0x00C1 | | |
| DFUCONTROL_SIGNED | 0x00C2 | | |
| DFU | 0x00D0 | | |
| BATTERY_STATUS | 0x1000 | [x] | get_battery() |

Yeah sure. But then replace [X] with Supported or Missing.

@FFY00 Ok, here is a table
See functions in hidpp20.py and settings_templates.py

| Feature | ID | Status | Notes |
|----------------------|--------|-----------|-----------------------------------------|
| ROOT | 0x0000 | Supported | System |
| FEATURE_SET | 0x0001 | Supported | System |
| FEATURE_INFO | 0x0002 | Supported | System |
| DEVICE_FW_VERSION | 0x0003 | Supported | get_firmware() |
| DEVICE_UNIT_ID | 0x0004 | | |
| DEVICE_NAME | 0x0005 | Supported | get_kind(), get_name() |
| DEVICE_GROUPS | 0x0006 | | |
| DEVICE_FRIENDLY_NAME | 0x0007 | | |
| KEEP_ALIVE | 0x0008 | | |
| RESET | 0x0020 | | aka "Config Change" |
| CRYPTO_ID | 0x0021 | | |
| TARGET_SOFTWARE | 0x0030 | | |
| WIRELESS_SIGNAL_STRENGTH | 0x0080 | | |
| DFUCONTROL_LEGACY | 0x00C0 | | |
| DFUCONTROL_UNSIGNED | 0x00C1 | | |
| DFUCONTROL_SIGNED | 0x00C2 | | |
| DFU | 0x00D0 | | |
| BATTERY_STATUS | 0x1000 | Supported | get_battery() |
| BATTERY_VOLTAGE | 0x1001 | | Used in G series mouse? |
| CHARGING_CONTROL | 0x1010 | | |
| LED_CONTROL | 0x1300 | | |
| GENERIC_TEST | 0x1800 | | |
| DEVICE_RESET | 0x1802 | | |
| OOBSTATE | 0x1805 | | |
| CONFIG_DEVICE_PROPS | 0x1806 | | |
| CHANGE_HOST | 0x1814 | | |
| HOSTS_INFO | 0x1815 | | |
| BACKLIGHT | 0x1981 | | |
| BACKLIGHT2 | 0x1982 | | |
| BACKLIGHT3 | 0x1983 | | |
| PRESENTER_CONTROL | 0x1A00 | | |
| SENSOR_3D | 0x1A01 | | |
| REPROG_CONTROLS | 0x1B00 | Supported | Partially, only listing. get_keys() |
| REPROG_CONTROLS_V2 | 0x1B01 | | |
| REPROG_CONTROLS_V2_2 | 0x1B02 | | |
| REPROG_CONTROLS_V3 | 0x1B03 | | |
| REPROG_CONTROLS_V4 | 0x1B04 | Supported | Partially, only listing. get_keys() |
| REPORT_HID_USAGE | 0x1BC0 | | |
| PERSISTENT_REMAPPABLE_ACTION | 0x1C00 | | |
| WIRELESS_DEVICE_STATUS | 0x1D4B | | |
| REMAINING_PAIRING | 0x1DF0 | | |
| ENABLE_HIDDEN_FEATURES | 0x1E00 | | |
| FIRMWARE_PROPERTIES | 0x1F1F | | |
| ADC_MEASUREMENT | 0x1F20 | | |
| LEFT_RIGHT_SWAP | 0x2001 | | |
| SWAP_BUTTON_CANCEL | 0x2005 | | |
| POINTER_AXIS_ORIENTATION | 0x2006 | | |
| VERTICAL_SCROLLING | 0x2100 | Supported | get_vertical_scrolling_info() |
| SMART_SHIFT | 0x2110 | Supported | _feature_smart_shift() |
| HI_RES_SCROLLING | 0x2120 | Supported | get_hi_res_scrolling_info(), _feature_hi_res_scroll() |
| HIRES_WHEEL | 0x2121 | Supported | get_hires_wheel(), _feature_hires_smooth_invert(), _feature_hires_smooth_resolution() |
| LOWRES_WHEEL | 0x2130 | Supported | get_lowres_wheel_status(), _feature_lowres_smooth_scroll() |
| THUMB_WHEEL | 0x2150 | | |
| MOUSE_POINTER | 0x2200 | Supported | get_mouse_pointer_info() |
| ADJUSTABLE_DPI | 0x2201 | Supported | _feature_adjustable_dpi() |
| POINTER_SPEED | 0x2205 | Supported | get_pointer_speed_info(), _feature_pointer_speed() |
| ANGLE_SNAPPING | 0x2230 | | |
| SURFACE_TUNING | 0x2240 | | |
| HYBRID_TRACKING | 0x2400 | | |
| FN_INVERSION | 0x40A0 | Supported | _feature_fn_swap() |
| NEW_FN_INVERSION | 0x40A2 | Supported | _feature_new_fn_swap() |
| K375S_FN_INVERSION | 0x40A3 | Supported | _feature_k375s_fn_swap() |
| ENCRYPTION | 0x4100| | |
| LOCK_KEY_STATE | 0x4220| | |
| SOLAR_DASHBOARD | 0x4301| | |
| KEYBOARD_LAYOUT | 0x4520| | |
| KEYBOARD_DISABLE | 0x4521| | |
| KEYBOARD_DISABLE_BY_USAGE | 0x4522| | |
| DUALPLATFORM | 0x4530| | |
| MULTIPLATFORM | 0x4531| | |
| KEYBOARD_LAYOUT_2 | 0x4540| | |
| CROWN | 0x4600| | |
| TOUCHPAD_FW_ITEMS | 0x6010| | |
| TOUCHPAD_SW_ITEMS | 0x6011| | |
| TOUCHPAD_WIN8_FW_ITEMS | 0x6012| | |
| TAP_ENABLE | 0x6020| | |
| TAP_ENABLE_EXTENDED | 0x6021| | |
| CURSOR_BALLISTIC | 0x6030| | |
| TOUCHPAD_RESOLUTION | 0x6040| | |
| TOUCHPAD_RAW_XY | 0x6100| | |
| TOUCHMOUSE_RAW_POINTS | 0x6110| | |
| TOUCHMOUSE_6120 | 0x6120| | |
| GESTURE | 0x6500| | |
| GESTURE_2 | 0x6501| | |
| GKEY | 0x8010| | |
| MKEYS | 0x8020| | |
| MR | 0x8030| | |
| BRIGHTNESS_CONTROL | 0x8040| | |
| REPORT_RATE | 0x8060| | |
| COLOR_LED_EFFECTS | 0x8070| | |
| RGB_EFFECTS | 0X8071| | |
| PER_KEY_LIGHTING | 0x8080| | |
| PER_KEY_LIGHTING_V2 | 0x8081| | |
| MODE_STATUS | 0x8090| | |
| ONBOARD_PROFILES | 0x8100| | |
| MOUSE_BUTTON_SPY | 0x8110| | |
| LATENCY_MONITORING | 0x8111| | |
| GAMING_ATTACHMENTS | 0x8120| | |
| FORCE_FEEDBACK | 0x8123| | |
| SIDETONE | 0x8300| | |
| EQUALIZER | 0x8310| | |
| HEADSET_OUT | 0x8320| | |

@doctor64 I am going to hide our comments as once your PR gets merged they are no longer relevant.

I should be able to do
KEYBOARD LAYOUT {4520}
KEYBOARD_LAYOUT_2 (0x4540)
if I get the specs.

Those features are low priority as they only export the physical keyboard layout, the keyboard layout that is printed in the keys. There are other features like BACKLIGHT{,2,3} that could be more helpful.

OK. Unfortunately I don't have any keyboard with a backlight, so I don't think I can work on those features.
It would be useful to have a short description of features.

Which unimplemented features do your devices have?

My M310s (WIPD 4031) have both VERTICAL_SCROLLING (0x2100) and MOUSE_POINTER (0x2200). These are reported in solaar show but I don't think there is any interface to change the values.

        19: VERTICAL SCROLLING     {2100}   
            Roller type: standard
            Ratchet per turn: 24
            Scroll lines: 0
        20: MOUSE POINTER          {2200}   
            DPI: 1000
            Acceleration: low
            Override OS ballistics
            No vertical tuning, standard mice

@pfps Accordingly to Logitech docs, features 0x2200 https://lekensteyn.nl/files/logitech/2200_mousepointer.pdf and 0x2100 (see https://drive.google.com/drive/folders/0BxbRzx7vEV7eWmgwazJ3NUFfQ28 file x2100_x2120_vertical_scrolling.pdf ) are informational only. All information reported are shown by solaar show. I'm not sure what it need to be added to GUI

Ha. So also read-only and so nothing to be done.
Maybe there should be some place to put this read-only stuff in the solaar docs.
Perhaps comments in hidpp20.py?

@pfps It's already in docs/features.md. May be some additional comment about read-only needed, but i try to keep table lightweight.

The dump at https://github.com/pwr-Solaar/Solaar/issues/641#issuecomment-604581650 shows that the software also probes for the following features which are not on this list

  • 0x80a3 (packet 225)
  • 0x80d0 (packet 229)
  • 0x80fa (packet 232)

I'd presume they belong to a newer version of HID++.

I'm trying to implement the change-host,
It is working, but how to prevent solaar from saving the selected value to teh config file ?
if i change the value, the device connect to the other host, but as soon as i reconnect to the current host, I get switched back to the other host ( solaar reload the last value and reaply it to the device,)
Thanks

I'm not sure what feature change-host implements. If it is something like a keyboard or mouse switch then that's somewhat outside of what Solaar is set up to easily do. I expect you will have to add a new kind of feature to settings_template.py, one that doesn't apply saved values.

The "change-host" is for devices that support connexion to multiple Host (like the MX series). this fuction allow to change the host (in my case) from my Raspberry back to my computer.
This is what Logitech Flow does.

Ok I will try to implement a stateless feature.
Thans for the tips..

@saue0 There is a another request for this #806
Could you comment there with the command that is needed to change hosts?
@FFY00 suggests that a CLI command could work well and I agree that it would not be hard to code such a command. But I would also like to see what you coded (to shamelessly mine it for other features), can you put in a PR with your changes?

@saue0 I have documentation for 0x1814 change host, which I think is the feature you where using. What code did you add to Solaar to change the host?

@pfps he forked solaar and added some of his change-host code

@barolo Thanks. I didn't realize that I could get a list of forks. I'm looking at his code now.

Sorry for the late response, just commited my last change so you can look at it.

Sorry for the late response, just commited my last change so you can look at it.

I've tested your branch but it only switches momentarily [ I can see led indicator on keys switching ] and reverts back. Is it working for you?

CLI example : "solaar config k850 change-host 01"

image

@barolo , yes with the new version. I have 2 devices and both get switched whit the cli command.
use my latest change and retest please.

@barolo , yes with the new version. I have 2 devices and both get switched whit the cli command.
use my latest change and retest please.

It does indeed work! I can assign it to a sys shortcut or corner gesture, neat!
Numbering from 0 is confusing though and it's a tad slow ;)

Yes, that can be change.

One small bug left, when the command is sent, solaar wait for a response from the receiver, but the device is not present anymore. will need to look into-it

Let's move this conversation to 784
Edit:
Let's move this conversation to #806

@pfps #784 is about layout switching, we're talking about #806 host switching. And sure, let's move

@barolo Yeah, that's twice I've gotten them switched up!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Petross404 picture Petross404  路  5Comments

electriceccentric picture electriceccentric  路  4Comments

notaduck picture notaduck  路  15Comments

Mezzle picture Mezzle  路  17Comments

positron96 picture positron96  路  16Comments