From 2b5f6b9a744562a0d219da213a74e978cb2b31a9 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 23 May 2017 13:14:28 +0100 Subject: [PATCH] unifying: Correctly open RQR12 devices with original factory firmware It seems reading from the register is fixed in later firmware versions. --- plugins/unifying/lu-device-runtime.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/unifying/lu-device-runtime.c b/plugins/unifying/lu-device-runtime.c index 96487c214..0e1a5622e 100644 --- a/plugins/unifying/lu-device-runtime.c +++ b/plugins/unifying/lu-device-runtime.c @@ -111,6 +111,12 @@ lu_device_runtime_open (LuDevice *device, GError **error) memset (config, 0x00, sizeof (config)); for (guint i = 0x01; i < 0x05; i++) { g_autoptr(LuDeviceHidppMsg) msg = lu_device_hidpp_new (); + + /* workaround a bug in the 12.01 firmware, which fails with + * INVALID_VALUE when reading MCU1_HW_VERSION */ + if (version_bl_major == 0x01 && i == 0x03) + continue; + msg->report_id = HIDPP_REPORT_ID_SHORT; msg->device_id = lu_device_get_hidpp_id (device); msg->sub_id = HIDPP_SUBID_GET_REGISTER;