From 481511b6c27b68359a3b4041d2202cd8761e8a1e Mon Sep 17 00:00:00 2001 From: kacpi2442 Date: Mon, 15 Apr 2019 15:40:40 +0200 Subject: [PATCH] Added basic support for Lenovo dongle --- lib/logitech_receiver/base_usb.py | 3 +++ packaging/debian/solaar.udev | 3 +++ rules.d/42-logitech-unify-permissions.rules | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/lib/logitech_receiver/base_usb.py b/lib/logitech_receiver/base_usb.py index c0dc84b6..3a908fe0 100644 --- a/lib/logitech_receiver/base_usb.py +++ b/lib/logitech_receiver/base_usb.py @@ -30,6 +30,7 @@ _GENERIC_DRIVER = ('hid-generic', 'generic-usb') # each tuple contains (vendor_id, product_id, usb interface number, hid driver) _unifying_receiver = lambda product_id: (0x046d, product_id, 2, _UNIFYING_DRIVER) _nano_receiver = lambda product_id: (0x046d, product_id, 1, _GENERIC_DRIVER) +_lenovo_receiver = lambda product_id: (0x17ef, product_id, 1, _GENERIC_DRIVER) # standard Unifying receivers (marked with the orange Unifying logo) @@ -50,6 +51,7 @@ NANO_RECEIVER_C526 = _nano_receiver(0xc526) NANO_RECEIVER_C52e = _nano_receiver(0xc52e) NANO_RECEIVER_C531 = _nano_receiver(0xc531) NANO_RECEIVER_C534 = _nano_receiver(0xc534) +NANO_RECEIVER_6042 = _lenovo_receiver(0x6042) del _unifying_receiver, _nano_receiver @@ -68,4 +70,5 @@ ALL = ( NANO_RECEIVER_C52e, NANO_RECEIVER_C531, NANO_RECEIVER_C534, + NANO_RECEIVER_6042, ) diff --git a/packaging/debian/solaar.udev b/packaging/debian/solaar.udev index 2a891650..773d2ae4 100644 --- a/packaging/debian/solaar.udev +++ b/packaging/debian/solaar.udev @@ -34,6 +34,9 @@ ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c534", GOTO="solaar_apply" +# Lenovo nano receiver +ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6042", GOTO="solaar_apply" + GOTO="solaar_end" # diff --git a/rules.d/42-logitech-unify-permissions.rules b/rules.d/42-logitech-unify-permissions.rules index 1fbc7329..ed052555 100644 --- a/rules.d/42-logitech-unify-permissions.rules +++ b/rules.d/42-logitech-unify-permissions.rules @@ -34,6 +34,10 @@ ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c521", GOTO="solaar_apply" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c525", GOTO="solaar_apply" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c534", GOTO="solaar_apply" +# Lenovo nano receiver +ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6042", GOTO="solaar_apply" + + GOTO="solaar_end" LABEL="solaar_apply"