Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically create sdp_record.xml #23

Open
Dreamsorcerer opened this issue May 16, 2021 · 1 comment
Open

Dynamically create sdp_record.xml #23

Dreamsorcerer opened this issue May 16, 2021 · 1 comment

Comments

@Dreamsorcerer
Copy link
Collaborator

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 to Report 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 the 8503 (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.

@Dreamsorcerer
Copy link
Collaborator Author

Dreamsorcerer commented Jun 26, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant