(hid-logitech) Support for non-DJ receivers

From: Filipe Laíns
Date: Wed Jan 06 2021 - 14:10:08 EST


Hey,

Some of the new Logitech receivers do not have the DJ interface, this creates an
issue userspace applications like libratbag, as seen in [1], because we can't
identify the device based on the hidraw PID.

There are two solutions for this:

1) Implement device discovery via the internal Logitech ID in libratbag and all
other userspace apps.

2) Make hid-logitech-dj export a duplicated hidraw node with internal Logitech
ID as PID, just like it does for the DJ interface.

In case you aren't aware of what the DJ interface is, it is essentially a
multiplexing protocol that receivers support. 6 devices could be connected to
the same receiver, hid-logitech-dj enables the DJ mode and the receiver will
essentially perpend the device ID to each HID report. hid-logitech-dj then
creates a HID device for each connected device and routes the HID reports to the
correspondent HID device.

Option 2) would be the easier on userspace, as it keeps the same interface we
use for DJ receivers for other Logitech HID++ receivers and avoids all userspace
apps to have to reimplement the same discovery logic.

Any thoughts?

[1] https://github.com/libratbag/libratbag/pull/1071

Cheers,
Filipe Laíns

Attachment: signature.asc
Description: This is a digitally signed message part