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

Fixes bad handshake on PDP/A controllers due to missing ACME on last chunks… #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ykpmusicstudio
Copy link

…and rumble initialization made too early (before handshake is finished)

Added an authenticated callback to gamepad device that triggers rumble/input initialization.

TODO: handle authentication failure in newly created authenticated callback in gamepad.

bus/protocol: add handling of final ACME on chunked reliable messages
auth/gamepad: add authenticated event to enable input only when gamepad has finished its handshake
wired: increase USB DATA URB to 12 to prevent starving in key exchanges during handshake
.gitignore: remove Microsoft spec from git repo

…chunks and rumble initialization too early (before handshake is properly handled)

Added an authenticated callback to gamepad device that triggers rumble/input initialization.

TODO: handle authentication failure in newly created authenticated callback in gamepad.

bus/protocol: add handling of final ACME on chunked reliable messages
auth/gamepad: add authenticated event to enable input only when gamepad has finished its handshake
wired: increase USB DATA URB to 12 to prevent starving in key exchanges during handshake
.gitignore: remove Microsoft spec from git repo
@ykpmusicstudio
Copy link
Author

ykpmusicstudio commented Sep 15, 2024

This is a pull request for the issue I had with a generic gamepad (id 20d6/a01a) which failed during handshake.
After reviewing Microsoft spec, protocol.c was missing an automatic ACME on last message of chunked transmissions.

When I corrected that behavior I had ENOSPC errors due to all URBs beeing consumed in the pub key exchange that took more than the initial 8. Increased to 12.

These controller abort current command when submitted with a new one, so I needed to delay rumble initialization & input handling initialization after the handshake phase is done otherwise the handshake would break down.

This is a cleaner PR than the initial one submitted a few month earlier.

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

Successfully merging this pull request may close these issues.

1 participant