Core Electronics Forum

Workaround for the RetroPie Bluetooth Security Bug

We have just shared a new tutorial: “Workaround for the RetroPie Bluetooth Security Bug”

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!

Read more

3 Likes

okay I get into sudo/nano bluetooth and change Execstart to #Execstart but I dont know how to exit or save these changes what do I do from there?

2 Likes

okay I go into sudo nano bluetooth.service and change Execstart to #Exec and add --noplugin. But I dont know how to exit or save these changes. What do I do?

2 Likes

Hi David,

I’ve linked a nano text editor guide below, to summarise:

If you want to save the changes you’ve made, press Ctrl + O. To exit nano, type Ctrl + X. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press N in case you don’t, or Y in case you do. It will then ask you for a filename. Just type it in and press Enter.

https://wiki.gentoo.org/wiki/Nano/Basics_Guide#:~:text=other%20bad%20things.-,Saving%20and%20exiting,you%20want%20to%20save%20it.

3 Likes

Hi James,

Thanks your workaround is great and I have been able to connect my 8but do controllers to my pi4 using it, however I wondered if there was a way to get them to connect on boot rather than having to use the workaround every time. Currently when I reboot they do not pair automatically.

Thanks very much for your efforts and any help that you can offer

2 Likes

Hi J,

Hmmm, if you followed the guide, they should remain paired between restarts (or at least that’s what I found). Do they appear on the list of already paired devices after a restart? You should just be able to hit start to get the controller to attempt connection.

Keen to get to the bottom of this!
-James

1 Like

Hi James,

Thanks for your quick response. I’ve not been home for the last few days, but the controller did remain on the list of registered devices. When I get back home next week, I will try a fresh install and give the workaround another go and update with my findings.

Thanks for your help

Best wishes
James

1 Like

Hi J,

If you go into the bluetooth setup in the retropie script, there is an option for ‘Configure Bluetooth Connect Mode’. If you set that to ‘Background’ it should auto connect your bluetooth controllers on startup.

2 Likes

Anyone had any luck getting 8BitDo Pro 2 controllers working on their Pi4? I’ve been pulling my hair out!

I have them paired to my Pi4 but they wont connect :frowning: They work if I connect using USB-C and the controllers work on my windows pc, but i’ve spent hours trying to fault find with no joy.

I’ve tried the above security workaround.

2 Likes

Hi Martin,

Have you made sure you’re using Xinput or DirectInput (X + Start, B + Start when turning on respectively)?

That’s the only thing I can think of, but I’ll look into this further if the above doesn’t work
-James

EDIT: have you set your region with raspi-config? Bluetooth and WiFi are blocked before doing that I believe

Hi Martin,

Yes, it’s always worked fine for me, though I know some people have run into bluetooth issues. Here’s a forum post I made in the past explaining my process:

1 Like

Hi James and Martin,

Sorry for the delayed response to you both, I haven’t been home for a bit and only just got a chance to dabble with my pi this morning.

Thanks for your suggestions, but I still haven’t been able to get this to reconnect on start up. I already had retropie set to background so tried a fresh install. Followed the workaround as per the instructions and then pair, Trust connect in
Bluetoothctl

Controller connects fine but then when I shutdown or reboot it won’t connect automatically. It still shows as a paired device in Bluetoothctl and shows up as a registered and connected device in the retropie config settings, however it doesn’t connect when selecting connect to all registered devices within retropie.

It connects straight away if I use bluetoothctl and manually connect.

This doesn’t seem to be the case for other people so I’m wondering if I’m missing something or if it’s possible to run a script to auto connect at start / in the background?

Thanks for any help possible

Best wishes
J

1 Like

Hi J,

My understanding is that when you push a button on the controller with it off, it’ll try and connect to its last paired device, which should be your Pi.

If it doesn’t behave like this, you can definitely run a script to connect automatically!

let us know how you go!
-James