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

No joypad autoconfig for Bluetooth devices under Linux #2961

Open
hadess opened this issue May 7, 2016 · 2 comments
Open

No joypad autoconfig for Bluetooth devices under Linux #2961

hadess opened this issue May 7, 2016 · 2 comments

Comments

@hadess
Copy link
Contributor

hadess commented May 7, 2016

Note that I haven't tested this yet, but this looks suspicious:
https://github.com/libretro/RetroArch/blob/master/input/drivers_joypad/udev_joypad.c#L210

With a USB device, no problem, you get the device itself, and you can do the identification.
With a Bluetooth device, and if Bluetooth is handled through a USB dongle (or builtin USB), you get to try and find an "autoconfiguration" for the Bluetooth adapter.
With a Bluetooth device again, and if the Bluetooth adapter is something other than USB (UART over a number of interconnects like SDIO, PCIE, etc.) you end up with nothing.

How about going up to the oldest parent with ID_INPUT_JOYSTICK? That should get you to the top of the device itself.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kivutar
Copy link
Member

kivutar commented May 7, 2016

Hello, I was not aware at all that there were a way to go through the hierarchy of the parents. I just thought that we had no ways of getting the real vid:pid over bluetooth!

What I can tell is, in the autoconfig code, we take a look at 2 things: device name and vid+pid.
In our autoconfig files, we never keep the vid:pid of any bluetooth dongles.

The code loops over all the autoconfig files, and compute a score for cfg. If the cfg matches the 2 criteria, the score will be 2, if it matches only the device name, the score will be 1. If it matches vid and pid, the score will be 1 too.

This way, we still get pairing working over bluetooth (tested with DualShock 3 and 8bitdo) and we avoid to match a cfg for a bluetooth adapter.

@rdlu
Copy link

rdlu commented Feb 25, 2017

As I referenced in the above issue, I tried to make an autoconfig for my ipega PG9021 using the retroarch gui, and it got the vendor id for INTEL (my pci-express bluetooth controller is Intel), and it matched also my PS3 controller, so the vendor and product id for bluetooth is really irrelevant as per current implementation.

It caused my PS3 controller to have all their buttons matching the ipega, not their own profile, maybe it causes strange things for other ppl also, when using multiple controllers on the same BT?

The command hwinfo of linux (pacman -S hwinfo in archlinux) show the correct pid and vid.

Retroarch version: 1.4.1.

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

No branches or pull requests

4 participants