The Problem:
You may find that while setting up RetroPie on your Raspberry Pi that pairing new Bluetooth controllers results in something like:
- During the "Please choose the security mode - Try the first one, then second if that fails", RetroPie feezes/stops responding
- When pairing, you get the error "Failed to pair: org.bluez.Error.AuthenticationFailed"
If so, then read on as we have a workaround that we have tested with 8Bitdo Controllers!
The Fix:
You need to exit RetroPie settings (go back to the Emulation Station menu) and the exit Emulation Station by pressing F4. This will take you back to the console.
From there, run this command to edit a file:
sudo nano /lib/systemd/system/bluetooth.service
Replace
ExecStart=/usr/lib/bluetooth/bluetoothd
With (the # character will disable old the configuration, then add the new underneath)
#ExecStart=/usr/lib/bluetooth/bluetoothd ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap
This disables the problematic plugin.
Then open this file for editing:
sudo nano /lib/systemd/system/[email protected]
Replace
[Service] Type=simple ExecStart=/usr/bin/bthelper %I
With (the # characters will disable the old configurations, then add the new underneath)
#[Service] #Type=simple #ExecStart=/usr/bin/bthelper %I [Service] Type=simple ExecStartPre=/bin/sleep 2 ExecStart=/usr/bin/bthelper %I ExecStartPost=sudo /etc/init.d/bluetooth restart
After rebooting, sudo bluetoothctl works as expected with pair, trust, and connect for the Bluetooth devices we have tested (mostly 8BitDo controllers).
If you've followed this guide and it's still giving you trouble, head on over to the relevant thread in our Maker Forum, and we'll help you out!