Repository: pwr-Solaar/Solaar

Issue:
Better support for Cordless Desktop Wave (MK550) requested
**Information**
<!-- The version of Solaar in this repository has more features than released vesions.  Update to this version before asking for a new feature. -->
- Solaar version (`solaar --version` and `git describe --tags`): 1.1.10
- Distribution: Fedora
- Kernel version (ex. `uname -srmo`): Linux 6.5.7-200.fc38.x86_64 x86_64 GNU/Linux
- Output of `solaar show` for the target device (if applicable):

<details>

```
solaar version 1.1.10

EX100 Receiver 27 Mhz
  Device path  : /dev/hidraw4
  USB id       : 046d:C517
  Serial       : None
  Has 2 paired device(s) out of a maximum of 4.
  Notifications: wireless (0x000100)

  1: Unknown device 003C
     Device path  : /dev/hidraw5
     WPID         : 003C
     Codename     : ? (003C)
     Kind         : mouse
     Protocol     : HID++ 1.0
     Serial number: 
     The power switch is located on the (unknown).
     Notifications: battery status (0x100000).
     Features: special buttons, scroll accel (0x420000)
     Battery: good, discharging.

  3: Unknown device 0060
     Device path  : /dev/hidraw6
     WPID         : 0060
     Codename     : ? (0060)
     Kind         : keyboard
     Protocol     : HID++ 1.0
     Serial number: 
     The power switch is located on the (unknown).
     Notifications: battery status (0x100000).
     Features: special buttons, scroll accel (0x420000)
     Battery: full, discharging.
```
</details>

I'm using only the keyboard of a Cordless Desktop Wave old keyboard/mouse combination.

The keyboard works fine.

But solaar shows some question marks.

Here is a file that shows some more details of this keyboard: 
[Cordless_Desktop_Wave_installation_guide_25384.1.0.pdf](https://github.com/pwr-Solaar/Solaar/files/13030320/Cordless_Desktop_Wave_installation_guide_25384.1.0.pdf)

Could you please add this model to Solaar?

Please let me know if you need more details.

Remark: The receiver always shows that both the mouse and the keyboard are connected. Which is not the case (because I only use the keyboard).



Discussion:
Solaar is mostly set up to handle newer devices.  Old devices need to be explicitly added.  And then only some of their features are supported.  Also old receivers may not report connection information in a way that Solaar can understand.

It would be possible to add information about the name of your keyboard but that would only add the name.  To add more will require downloading Solaar from this repository and running `./tools/scan-registers.sh 3` from the download directory and then posting the results here.  Even then there are only a few features that Solaar supports for these old devices.


Do you still want to pursue this?
Yes. Sorry, I thought I provided the requested details. I will provide them soon.
I did the scan of the registers: 
[scan_registers.log](https://github.com/pwr-Solaar/Solaar/files/13228131/scan_registers.log)

Adding the name of the keyboard would already be very nice as well.

Currently, many features of the keyboard do already work, like the buttons for the calculator and the power/suspend button.

OK.  It looks as if the mouse has no features beyond battery status but the keyboard has the ability to modify the status of the Fn key.  

I propose calling the devices "Wireless Wave Keyboard K550" and "Wireless Wave Mouse M550" and giving them ids of K550 and M550.  Does this work for you?
Note that the mouse was not connected (I not use that mouse, and probably I do not even have it).

The suggested names are OK for me. Thanks for taking care of this!

Resolving patch:
diff --git a/lib/logitech_receiver/descriptors.py b/lib/logitech_receiver/descriptors.py
--- a/lib/logitech_receiver/descriptors.py
+++ b/lib/logitech_receiver/descriptors.py
@@ -175,6 +175,8 @@ def get_btid(btid):
 
 _D('Wireless Keyboard EX110', codename='EX110', protocol=1.0, wpid='0055', registers=(_R.battery_status, ))
 _D('Wireless Keyboard S510', codename='S510', protocol=1.0, wpid='0056', registers=(_R.battery_status, ))
+_D('Wireless Wave Keyboard K550', codename='K550', protocol=1.0, wpid='0060', registers=(_R.battery_status, ),
+   settings=[_ST.RegisterFnSwap])
 _D('Wireless Keyboard EX100', codename='EX100', protocol=1.0, wpid='0065', registers=(_R.battery_status, ))
 _D('Wireless Keyboard MK300', codename='MK300', protocol=1.0, wpid='0068', registers=(_R.battery_status, ))
 _D('Number Pad N545', codename='N545', protocol=1.0, wpid='2006', registers=(_R.battery_status, ))
@@ -212,6 +214,7 @@ def get_btid(btid):
 
 _D('LX5 Cordless Mouse', codename='LX5', protocol=1.0, wpid='0036', registers=(_R.battery_status, ))
 _D('LX7 Cordless Laser Mouse', codename='LX7', protocol=1.0, wpid='0039', registers=(_R.battery_status, ))
+_D('Wireless Wave Mouse M550', codename='M550', protocol=1.0, wpid='003C', registers=(_R.battery_status, ))
 _D('Wireless Mouse EX100', codename='EX100m', protocol=1.0, wpid='003F', registers=(_R.battery_status, ))
 _D('Wireless Mouse M30', codename='M30', protocol=1.0, wpid='0085', registers=(_R.battery_status, ))
 _D('MX610 Laser Cordless Mouse', codename='MX610', protocol=1.0, wpid='1001', registers=(_R.battery_status, ))


Test patch: