pair bluetooth controller lakka

How to Connect a Bluetooth Controller to Lakka (Successfully)

No matter which system you choose for retro gaming, playing with a Bluetooth controller will give you the best experience. Unfortunately, it’s rarely easy to connect a controller, and you might have a hard time figuring out how to do it. Don’t worry, I’ll explain everything for Lakka in this tutorial.

To configure a Bluetooth controller on Lakka, the first step is to enable Bluetooth in the system settings, as it’s disabled by default. Then, depending on the controller, it may connect automatically, but most of the time, command lines are required to complete the pairing.

In this tutorial, I will explain step-by-step how to do this, no matter which controller you have.

By the way, I recommend using the 8BitDo Pro controller which is really above the other models available for an affordable price, or at least a PS4 controller if you already have one (maybe too expensive if you need to buy it).

Getting started on Lakka

So your Bluetooth controller won’t work directly, so you have to start with something else to set up Lakka correctly before doing anything else.

I have an entire tutorial about Lakka here if you need some help with it. Make sure to have Internet access, maybe do a few updates and basic configuration (date/time, keyboard, enable SSH, etc.).

I’m using my Bluetooth keyboard to do this, as there is a dedicated USB adapter. I don’t have anything to configure, so it’s pretty cool. But any USB keyboard or wired controller is ok to start (try to avoid using the one you want to put in Bluetooth for the moment).

My favorite games!
Get a list of my 24 favorites games (with links) to play on Retropie, Recalbox or Lakka
Download now

Once you’re satisfied with your Lakka installation, you can move to the next step.

Related: Tested: The Best Keyboards For Raspberry Pi

Join Our Community!

Connect, learn, and grow with other Raspberry Pi enthusiasts. Support RaspberryTips and enjoy an ad-free reading experience. Get exclusive monthly video tutorials and many other benefits.

Learn more

Enable Bluetooth

For almost everything on Lakka, you can do it directly via the graphic interface or in command lines. I will give you both each time I can, but the interface way is the first one to try.

Enable Bluetooth via the interface

As I told you, the Bluetooth is disabled by default, so the first thing to do is to enable it:

  • In the main menu, open the Settings submenu (the second one).
  • Scroll download to “Services“.
  • Find the Bluetooth line and click on it to enable the service.

It’s ok, Bluetooth is enabled, and you can move to the next step.

Enable Bluetooth in command lines

If you have any issues with the previous method or prefer to do it in the command line, here is how:

  • Enable the SSH service (just above the Bluetooth line in the settings).
  • Connect to your Raspberry Pi (with Putty or any other SSH client).
    You can find the IP address in “System information” in the first menu.

    And the default user and password are: root / root
  • Once connected, enter the three following commands:
    touch /storage/.cache/services/bluez.conf
    systemctl enable bluetooth
    systemctl start bluetooth
  • Check that the service is working correctly:
    systemctl status bluetooth
  • In my case, I got something like this:

    I don’t know if the last line is a problem, but the service is running so it should be ok.

Pairing the Bluetooth controller

Interface / automatic method

In theory, most Bluetooth controllers should pair automatically.
Let’s try this with my first controller (8BitDo SF30 Pro):

My favorite games!
Get a list of my 24 favorites games (with links) to play on Retropie, Recalbox or Lakka
Download now
  • Make sure your controller has enough battery (or charge it before doing this).
  • Plug your controller into a free USB port (use the supplied cable).
  • Lakka should detect it automatically while plugged in:
  • In theory, your controller should now be paired with Lakka, and you can unplug it to use it in Bluetooth. In reality, none of my controllers are working this way, so I’m not even sure if this method can work.

That’s why, in both cases, I had to follow the manual method with the command line.

Command line / manual method

If like me, your controller doesn’t pair directly with a USB connection, you can try this:

  • Access Lakka via SSH (see previous parts).
  • Start a Bluetooth prompt with:
    bluetoothctl
  • Put your controller in pairing mode. The method depends on your controller.
    On 8BitDo, press Start+X for example. The 2 first LEDs should start blinking.
    For a PS4 controller, press PS and Share simultaneously:
    pairing mode for a ps4 controller
    The light should start to blink quickly.
  • Enter the following commands in the prompt:
    agent on
    default-agent
    power on
    discoverable on
    pairable on
    scan on
  • The tool will start detecting any Bluetooth device and display the address.
    For example, for the PS4 controller:

    I started the scan a second time thinking it was too late, but it was not necessary.
    Once you see the controller address, you can start the connection.
  • Type the following command to pair the controller manually:
    connect <ADDRESS>
    In my case:
    connect 1C:96:5A:AD:6F:7E
  • You’ll get a few messages, including a confirmation:
    [CHG] Device 1C:96:5A:AD:6F:7E Connected: yes
    [CHG] Device 1C:96:5A:AD:6F:7E Paired: yes

    If it doesn’t work, try again (for both of mine it worked the second time).

You should now be able to navigate in the Lakka menus with your Bluetooth controller.

That’s it, my two favorite controllers are ready to use. Who wants to play?

Controller configuration

Lakka is a simple system for controller configuration.

On Retropie & others, you need to configure all the buttons for each new controller you plug.
On Lakka, most controllers are detected automatically (as seen previously), and you don’t have anything to do, it will work correctly as soon as you plug it.

But if you want, you can still edit the configuration to make it as you want:

  • Go to the Settings submenu, and select the corresponding input
    lakka input configuration
  • In the submenu, you can configure the main part of your controller individually:
    • Combo
    • Swap OK & Cancel (A & B vs B & A for example)
    • Hot keys
    • Input User X Binds, for all the other buttons

Once done, you can play your favorite game in wireless 🙂
Need a few games ideas? Check my top 12 here.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Auto-reconnect controllers after a reboot

I noticed in the Lakka version I tried that Bluetooth controllers are not connected automatically after a reboot.
So you have to do the same thing each time.
I like this system mainly because it’s easy to use, but I’m very disappointed by this issue. I think it’s pretty new, I don’t remember it (maybe only on Pi4?).

I don’t know if it’s a bug in the recent versions or anything else, but I have found a basic workaround on this Lakka forum.
You can create a script to run the “connect” command automatically on boot (we already have the controller MAC, so we don’t need the other commands).

But I hope that developers will fix this soon, so beginners don’t have to create a script and schedule it for such a basic feature.
Let me know if you find another way.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.

Conclusion

That’s it, you should now be able to connect any Bluetooth controller on Lakka.
If you have any issue with this, feel free to leave a comment in the community with the errors you get, and I will try to help you.

Also, if you love retro-gaming on Raspberry Pi, I have many tutorials on this website that you’ll like, here are a few examples:

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts

One Comment

  1. Where do you find the address of your controller, I am using a 3rd party one, and it does not say what it is.

Comments are closed.