Open Dreamsorcerer opened 3 years ago
Having played with a few more devices, it seems that some don't have a report ID, and so this would need to be inserted in. Others have report IDs (when they have multiple purposes), these would instead need the existing report IDs mapped to a different number to avoid collisions.
There are also cases where a filter is still needed, some devices seem to have vendor-specific code in the kernel, which won't run when we send our vendor ID. In these cases a custom filter is still needed to fix up the behaviour or to remap buttons etc.
The overview says that there is a standard keyboard/mouse descriptor for the project. However, it does not seem like there is really a standard mouse descriptor. Many people have reported issues with a mouse not working, and this seems to be due to the sdp_record not matching the mouse. For example, my mouse has
Report Size (16)
while the RPi defaults toReport Size (12)
, which results in the mouse sending an extra byte more than what the receiver expects and messes things up.Rather than relying on hardcoded descriptors, it should be possible to rewrite sdp_record.xml each time a device is paired.
To fix my mouse, I just replaced the full descriptor for the mouse with the one reported by
hid-recorder
. The only change I needed to make was adding back in the8503
(Report ID (3)).Doing this dynamically should allow most (all?) devices to work seamlessly out-of-the-box including any extra features the device has.