Skip to content

Instantly share code, notes, and snippets.

@romellem
Created October 28, 2021 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romellem/82c81689da98883bfa520f754a8145a7 to your computer and use it in GitHub Desktop.
Save romellem/82c81689da98883bfa520f754a8145a7 to your computer and use it in GitHub Desktop.
Raspberry Pi 4 Model B Rev 1.4 - RetroPie 4.7.1 Bluetooth Setup for 8bitdo Pro 2 Wireless Controller

I was setting up a new RetroPie 4.7.1 build to connect to a new 8bitdo Pro 2 controller.

However, almost every time I'd open Bluetooth config and try to Pair and Connect to Bluetooth Device, I'd see Searching... followed by this error

No devices were found. Ensure device is on and try again

Power cycling the controller / raspberry pi did nothing.

Occasionally it would find my device, but then when I'd try and select the DisplayYesNo security mode option, the computer would freeze.

Power cycling the computer would show the device as added, but I still wasn't able to use it.

When I'd try and remove the device I'd get the following error:

Error removing device:

Error: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready

After some googling, I was able to find some instructions in this thread but they were a bit buried, so I'm copying them here in case I need to run through this again.

  1. Edit the file /lib/systemd/system/bluetooth.service by running

    sudo nano /lib/systemd/system/bluetooth.service
    

    And change the following line

    - ExecStart=/usr/lib/bluetooth/bluetoothd
    + ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap

    This disables the non-working SAP plugin, which is required to make the Bluetooth service run.1

  2. Edit the file lib/systemd/system/bthelper@.service by running

    sudo nano /lib/systemd/system/bthelper@.service
    

    And change the following lines

      [Service]
      Type=simple
    + ExecStartPre=/bin/sleep 2
      ExecStart=/usr/bin/bthelper %I
    + ExecStartPost=sudo /etc/init.d/bluetooth restart
  3. Delete the old configuration (if you had any) for the previously paired device

    sudo rm /etc/udev/rules.d/99-bluetooth.rules
    
  4. Reboot the raspberry pi.

    sudo reboot
    
  5. Run the Retro Pie config script:

    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    
  6. Navigate to Configuration / ToolsBluetooth

  7. Ensure that the "hack" setting is set to OFF.

  8. Move the 8bitdo controller mode to the S position on the bottom to boot into Switch Mode.

  9. Hold the Bluetooth Pair button up top for three seconds until the LED lights begin "rotating" / "bouncing" back and forth. The controller is now in pairing mode.

  10. Select the Pair and Connect to Bluetooth Device option.

  11. After searching, it should now find a Pro Controller device. Select it.

    If no device is found, try exiting to the terminal and running the following commands before trying again

    sudo systemctl daemon-reload
    sudo systemctl restart bluetooth
    
  12. Choose DisplayYesNo as the Security mode.

  13. After successfully paired, select the option to Set up udev rule for Joypad. Accept the defaults.

  14. Hold the Start button down on the controller for 3 seconds to turn off the device.

  15. Reboot the raspberry pi again

    sudo reboot
    
  16. Turn on the controller.

  17. It should now connect and be detected, you'll need to configure the button mappings within Emulationstation, and be all set!

Footnotes

  1. https://raspberrypi.stackexchange.com/a/123914

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