RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Bluetooth controller auto-connect and auto-re-pair

    Scheduled Pinned Locked Moved Help and Support
    bluetoothpro controllerjoy-consauto connectpairing
    1 Posts 1 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • eberhabE
      eberhab
      last edited by eberhab

      Hi all,

      tl;dr: Sharing a script [1] which might improve reliability of auto-connecting to paired Bluetooth controllers and the option to automatically re-pair controllers which repeatedly fail to connect. This is particularly helpful if you use your controllers with multiple consoles.

      In more detail: I am currently using RetroPie 4.7 on a Raspberry Pi 4B and Pi 2B installed via SD card image and updated to version 4.7.19.

      With this installation I am using two Nintendo Pro Controllers and two Nintendo Joy-Cons using the recommended drivers [2]. Those are the only input devices connected to the Raspberry Pi(s).

      Using this setup I repeatedly face the following issues:

      • Sometimes Bluetooth auto connect options on the RetroPie (on boot/ in background) are not consistently re-connecting to paired devices and I am left with no available/ working input option.
      • If the Pro- /Joy-Controllers had been connected to the Nintendo Switch, they have to be (manually) re-paired on the RetroPie.
      • Connecting to paired devices sometimes repeatedly fails for unknown reasons. Deleting and re-pairing the device usually solves the problem.
      • Manually connecting and/ or pairing a controller is not trivial, especially if you have no second input device that is currently connected. This leaves you with either having to attach a wired keyboard and/ or logging in via ssh to re-pair at least one of your controllers.

      In order to address these problems I started scripting an alternative auto-connect [1] script with the following features:

      • Define a list of owned devices based on a simple text file
      • Try to connect to an owned and paired device if it comes online
      • Try to automatically re-pair an owned device if connect fails repeatedly.

      This has given me some very good results over the past months, so I would like to share with you. Using the tool I never have to log in manually to fix an issue with a Bluetooth device. Maybe it can be useful for some of you who are also not that happy with the reliability of Linux <-> Bluetooth connections. Also If you had similar issues with Bluetooth controllers and/ or specifically Pro Cons, and know of a different approach to solve it, I'd be happy to hear from you.

      Last, I will also check out latest vanilla RetroPie 4.8 and see how Bluetooth works there. But likely the problem with having to re-pair Pro controller after use with the Switch will remain in any case.

      If you found this information useful, feel free to check out the script(s) under:

      https://github.com/eberhab/bluetooth-repair

      Enjoy!

      Best
      Benjamin

      [1] https://github.com/eberhab/bluetooth-repair
      [2] https://retropie.org.uk/docs/Nintendo-Switch-Controllers/

      1 Reply Last reply Reply Quote 1
      • YFZdudeY YFZdude referenced this topic on
      • First post
        Last post

      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.