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

    Loosing Bluetooth connection after reboot

    Scheduled Pinned Locked Moved Help and Support
    blu
    14 Posts 3 Posters 6.2k 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.
    • S
      stevep
      last edited by

      I'm using a ps3 wireless controller. It sets up fine via Bluetooth but after you reboot i it looses connection .

      1 Reply Last reply Reply Quote 0
      • M
        motleypixel
        last edited by

        Decided not to create a new topic, just don't see why I should. So before I paste my setup below, I've read this wiki in it's entirity including the troubleshooting sections and every link referenced therein:

        ) The controller pairs, but as this user stated, it doesn't work after a reboot, I have to re-pair every time. If there's no solution then let me know and if there is a solution, then perhaps it needs to be added to the doco lib (and informed in this thread). Thank you.

        Pi Model or other hardware: (B, B+, 2 B, 3, X86 PC etc..): Pi 3 B
        Power Supply used: 5VDC 3A
        RetroPie Version Used: 4.3.7
        Built From: default image from retropie.org.uk with attract mode
        USB Devices connected: keyboard and wired xbox one controller
        Controller used: xbox one wired and trying to make the xbox one s BT reconnect after a reboot
        Error messages received: none unfortunantely
        Log found in /dev/shm/runcommand.log (if relevant):
        Guide used: https://retropie.org.uk/docs/Bluetooth-Controller/
        File: na
        Emulator: na
        Attachment of config files: na
        How to replicate the problem: just re-pair, configure inputs, play, then reboot

        mituM 1 Reply Last reply Reply Quote -1
        • mituM
          mitu Global Moderator @motleypixel
          last edited by mitu

          @motleypixel said in Loosing Bluetooth connection after reboot:

          ) The controller pairs, but as this user stated, it doesn't work after a reboot, I have to re-pair every time. If there's no solution then let me know and if there is a solution, then perhaps it needs to be added to the doco lib (and informed in this thread). Thank you.

          Have you tried - after you pair the bluetooth controller - to use the Set up udev rule for Joypad option in the Bluetooth section after pairing the controlle ?
          When you pair the device, does the same MAC address appears every time, or is it different after each reboot ?

          EDIT: One advice I've seen for SteamOS (Linux) is to make sure to update the controller's firmware via the Xbox app available in the Win 10 Appstore.

          M 1 Reply Last reply Reply Quote 0
          • M
            motleypixel @mitu
            last edited by

            @mitu said in Loosing Bluetooth connection after reboot:

            @motleypixel said in Loosing Bluetooth connection after reboot:

            ) The controller pairs, but as this user stated, it doesn't work after a reboot, I have to re-pair every time. If there's no solution then let me know and if there is a solution, then perhaps it needs to be added to the doco lib (and informed in this thread). Thank you.

            Have you tried - after you pair the bluetooth controller - to use the Set up udev rule for Joypad option in the Bluetooth section after pairing the controlle ?
            When you pair the device, does the same MAC address appears every time, or is it different after each reboot ?

            EDIT: One advice I've seen for SteamOS (Linux) is to make sure to update the controller's firmware via the Xbox app available in the Win 10 Appstore.

            Thanks mitu, I've confirmed no update available for my Xbox One S controller. Now onto the udev rule, where is the wiki doumentation on how to utilize it? I am at ground level here on udev rules, what are they? how are they envoked? what are their limitations? where are the binaries located? etc. etc.

            Thank you,
            Roy

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @motleypixel
              last edited by

              @motleypixel Just press the option for the udev rule, it's just a configuration in the system to associate a certain hardware id to the same device name, not a binary or something to be installed.
              Have you checked if the MAC bluetooth address is the same each time your're re-pairing the controller ?

              M 2 Replies Last reply Reply Quote 0
              • M
                motleypixel @mitu
                last edited by

                @mitu Yes MAC is always same, but for safe measures, since I am currently having to repair each time, I am removing the controller and re-pairing. Let me just select the udev option and see what that does. I'll report back.

                Thank you,
                Roy

                1 Reply Last reply Reply Quote 0
                • M
                  motleypixel @mitu
                  last edited by

                  @mitu okay, wondering if attract mode is causing issues here. When I went back to ES and did a whole new BT configuration, after pairing I then selected the option 1 DisplayYesNo and it thew this error at the bottom of the screen:

                  https://www.flickr.com/photos/motleypixel/24181109927/in/dateposted-public/

                  so I nano'ed again the autostart.sh and my sudo disable ertm line was gone??? what the heck? So I added it back, rebooted into ES and again resetup BT and got it paired, then selected the udev optiion...nice! did I miss this in the wiki somewhere? here's what is said after udev:

                  https://www.flickr.com/photos/motleypixel/27402923999/in/dateposted-public/

                  So I went ahead and configured inputs and then rebooted. Upon booting back into ES it worked like a charm! but that's when the goodness ended.

                  I then switched to attract mode and it lost connection and now w/in attract mode and ES it seems like it's not wanting to pair again...suspect the autostart.sh is reset again. hummm...seems like this BT wireless controller stuff is wasting too much of my valuable time, esp. now since I'm getting ready to leave for a trip...darn, I'm building this image for the brother-in-law and want it rock solid because he's not too computer savy.

                  Any other suggestions?

                  Thank you,
                  Roy

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @motleypixel
                    last edited by mitu

                    @motleypixel Either see if using ES only makes the connection persistent or use another controller with a better compatibility with Linux/Retropie ?

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      motleypixel @mitu
                      last edited by

                      @mitu I have confirmed that ES operation only operates as it should, it auto-reconnects to the Xbox One S BT controller. However, anytime I switch to attract mode it breaks, and I can confirm that the autostart.sh resets and removes the entry I have to have for this xbox BT controller which is to disable ertm. As for the udev entry, did I miss that in the wiki? If not, then perhaps it should be added.

                      I would like to figure out why attract mode is breaking this configuration.

                      Thank you for the help,
                      Roy

                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @motleypixel
                        last edited by

                        @motleypixel said in Loosing Bluetooth connection after reboot:

                        did I miss that in the wiki? If not, then perhaps it should be added.

                        It's not mandatory, but since udev handles - persistent - device naming, I figured out it would help. You should add the etrm fix in the /etc/rc.local file, maybe attract mode messes up the autostart.sh file.

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          motleypixel @mitu
                          last edited by

                          @mitu So make the /etc/rc.local look like this?

                          #!/bin/sh -e

                          rc.local

                          This script is executed at the end of each multiuser runlevel.

                          Make sure that the script will "exit 0" on success or any other

                          value on error.

                          In order to enable or disable this script just change the execution

                          bits.

                          By default this script does nothing.

                          Print the IP address

                          #added as a suggestion from retropie.org forum
                          sudo bash -c 'echo 1 > /sys/module/bluetooth/parameters/disable_ertm'

                          _IP=$(hostname -I) || true
                          if [ "$_IP" ]; then
                          printf "My IP address is %s\n" "$_IP"
                          fi

                          "/opt/retropie/supplementary/retropie-manager/rpmanager.sh" --start --user pi 2>&1 > /dev/shm/rpmanager.log &
                          exit 0

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @motleypixel
                            last edited by

                            @motleypixel Something like this. Hard to see it properly because of the formatting. You don't need sudo before the command, since the script is executed on start from the root account. With proper formatting:

                            # added as a suggestion from retropie.org forum 
                            echo 1 > /sys/module/bluetooth/parameters/disable_ertm
                            
                            _IP=$(hostname -I) || true
                            if [ "$_IP" ]; then
                            printf "My IP address is %s\n" "$_IP"
                            fi
                            
                            /opt/retropie/supplementary/retropie-manager/rpmanager.sh --start --user pi 2>&1 > /dev/shm/rpmanager.log &
                            exit 0
                            
                            M 1 Reply Last reply Reply Quote 0
                            • M
                              motleypixel @mitu
                              last edited by

                              @mitu Thank you...on the road, will be giving this Raspberry Pi 3 setup to my brother-in-law on Christmas...so maybe we'll be able to do some testing early next week. I'll let you know how it goes. Also, for the formatting, I read in the "read first" post or some post about formatting, not following the "code" tags...back in the day I would wrap such text with [code] text to format [/code] I will try to figure that out. Oh and as for the disable ertm in the autostart.sh I'm assuming sudo is needed for that one? Need to test this out on my Linux Mint VM but if you are already root and sudo or sudo su - pi etc. it will still execute correct?

                              Thanks and Merry Christmas!
                              Roy

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @motleypixel
                                last edited by

                                @motleypixel said in Loosing Bluetooth connection after reboot:

                                Oh and as for the disable ertm in the autostart.sh I'm assuming sudo is needed for that one

                                Yes, that would be needed since is executed as the pi user.

                                1 Reply Last reply Reply Quote 0
                                • 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.