-
Notifications
You must be signed in to change notification settings - Fork 277
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
Incompatibility with bluetooth "input" plugin #8
Comments
Note: Due to the restart workaround, you can not emulate multiple controllers if the bluez "input" plugin is enabled (Emulation of multiple controllers also require multiple Bluetooth adapters). |
I ran into issues here as well with ubuntu 19.10. My issue was that the adapter, Thanks for for putting together this package- I look forward to using it! |
What is the fundamental cause of this situation? Is this a bug? Is it a bug in bluez? |
The ports we have to use to emulated the controllers are well known ports reserved for Bluetooth human interface devices. The input plugin handles those devices and the ports are taken if the input plugin is enabled. After some trial and error I'm surprised that the restart hack is working that well, but it still comes with annoying issues. It's one of the reasons the package needs to run as root. I haven't found a better solution yet, other than disabling the plugin. |
The Switch can not connect to the ports of the emulated controller, if the "input" plugin in Bluez is enabled.
However, other Bluetooth input devices can't be connected, if the "input" plugin is disabled.
The currently implemented workaround is a restart of the Bluetooth stack, after sockets for the emulated controller are registered. If you have a similar use case like in issue #6, you need to reconnect your device after that restart.
If you don't need to connect any other Bluetooth input devices and want to avoid bluetooth restarts, you can disable the "input" plugin.
In order to do that, change the following line in
/lib/systemd/system/bluetooth.service
fromExecStart=/usr/lib/bluetooth/bluetoothd
to
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=input
and restart Bluetooth with
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
The text was updated successfully, but these errors were encountered: