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

Disable descriptor check for BT passthrough in some cases #4385

Merged
merged 1 commit into from Nov 4, 2016

Conversation

leoetlino
Copy link
Member

@leoetlino leoetlino commented Oct 25, 2016

Some adapters don't have the correct interface class, so they are not recognised as Bluetooth adapters. It seems that apart from hardcoding VIDs/PIDs (which is how it's done in the Linux kernel, and which I'm not very fond of), there is no other way to detect if a device is a Bluetooth adapter or not.

So I think adding an option to disable the descriptor check is the only sane way to allow such adapters to be used.

While this solution seems best for maintainability, it's not terribly user friendly. Does someone have any better idea?


This change is Reviewable

@@ -45,6 +45,19 @@ static bool IsWantedDevice(libusb_device_descriptor& descriptor)
return descriptor.idVendor == vid && descriptor.idProduct == pid;
}

constexpr u8 SUBCLASS = 0x01;
constexpr u8 PROTOCOL_BLUETOOTH = 0x01;

This comment was marked as off-topic.

@slaren
Copy link

slaren commented Oct 25, 2016

With this change I was able to use an Asus BT-400 (VID_0B05&PID_17CB&REV_0112) successfully with a 3rd party WiiMote. Previously it would refuse to use the adapter.

@leoetlino leoetlino changed the title Add option to disable descriptor check for BT passthrough [RFC] Add option to disable descriptor check for BT passthrough Oct 27, 2016
Some adapters don't have the correct interface class, so they are not
recognised as Bluetooth adapters. It seems that apart from hardcoding
VIDs/PIDs (which is how it's done in the Linux kernel, and which I'm
not very fond of), there is no other way to detect if a device is a
Bluetooth adapter or not.

This change makes Dolphin skip the descriptor check when trying to find
a usable adapter for Bluetooth Passthrough if the use of a specific
adapter was forced; it is assumed that the user knows what they are
doing if they hand-edited their config file.

This allows such adapters to be used.
@leoetlino leoetlino changed the title [RFC] Add option to disable descriptor check for BT passthrough Disable descriptor check for BT passthrough in some cases Oct 28, 2016
@degasus
Copy link
Member

degasus commented Nov 4, 2016

This sounds fine. Valid the type on auto detection, but accept every manually configured device.

@degasus degasus merged commit 234691a into dolphin-emu:master Nov 4, 2016
@leoetlino leoetlino deleted the disable-bt-check branch November 4, 2016 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants