feat(linux): allow configuring real wiimotes with known bluetooth addresses #13240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the option to configure real Wiimotes by specifying their Bluetooth addresses in the configuration file. This allows off-brand Wiimotes to work without using the Bluetooth Passthrough option, if you know their Bluetooth addresses beforehand.
Despite correctly setting the LAP to
0x9e8b00
(Limited Inquiry Access Code (LIAC)) inWiimoteScannerLinux::FindWiimotes
while scanning, which is indeed enough to make off-brand / knock-off Wiimotes respond to a Bluetooth Inquiry, some (several? all?) bluetooth adapters seem to override and ignore this given LAP value when performing the Inquiry, and actually use the0x9e8b33
value (General Inquiry Access Code (GIAC)) as if a null pointer have been given tohci_inquiry
, as inspection of USB/Bluetooth packets by Wireshark indicate. Off-brand Wiimotes don't respond to inquiries with this LAP.If one happens to know the Bluetooth address of their Wiimote (for example, by checking
BluetoothPassthrough.LinkKeys
after using Bluetooth Passthrough, or other means such as directly usinglibusb
to force the adapter to use the correct LAP in the Inquiry), then it's enough to add those addresses to the vector of found Wiimotes.Since this a niche use case and I only happen to know and have tested in Linux, this change only affects the
WiimoteScannerLinux
backend. It's likely that it could be added to other backends, but I'm unfamiliar with these.If no addresses are given or this config section does not exist, behavior is completely unchanged.