Skip to content

Skip redundant SDP HID query when descriptor is already available#203

Open
diegoparrilla wants to merge 2 commits into
ricardoquesada:developfrom
diegoparrilla:synthetic-HID-descriptor
Open

Skip redundant SDP HID query when descriptor is already available#203
diegoparrilla wants to merge 2 commits into
ricardoquesada:developfrom
diegoparrilla:synthetic-HID-descriptor

Conversation

@diegoparrilla
Copy link
Copy Markdown

Summary

This PR fixes fake Bluetooth Xbox controllers that connect/authenticate/L2CAP successfully but then stall in SDP HID-descriptor query and get deleted by connection timeout.

What is the real change

If a HID descriptor is already present (e.g. injected by name-match for Xbox Wireless), Bluepad32 no longer starts an extra SDP HID-descriptor query.

Why we are doing this

Some cheap and dirty gamepads ($3-$5 in some marketplaces) pretend to be Xbox BT variants and expose VID/PID = 0x0000/0x0000 but can still be identified by name and assigned a synthetic HID descriptor.

Before this fix, Bluepad32 still attempted SDP HID query even though it already had a descriptor. On affected devices this query can stall, and the device is later dropped by connection timeout.

Why this is important

Makes fake Xbox BT pairing/ready flow deterministic on problematic firmwares/clones.

Validation

Tested with generic "Shanwan" models easy to find in Aliexpress (https://www.aliexpress.com/w/wholesale-shanwan.html ). They must be configured in Xbox 360 mode.

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