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

    DualShock 4 Bluetooth issues

    Scheduled Pinned Locked Moved Help and Support
    bluetooth errorbluetooth issuebluetooth pi4playstation
    26 Posts 7 Posters 6.4k 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.
    • mituM
      mitu Global Moderator @endo
      last edited by mitu

      @endo Can you post the contents of the /etc/bluetooth/main.conf file ?

      Is the bluetooth service enabled ?By default it's enabled and automatically started at boot (you can check with systemctl status bluetooth).

      E 1 Reply Last reply Reply Quote 0
      • E
        endo @mitu
        last edited by

        @mitu Below is the main.conf. I posted it as code as it was posting really large otherwise. I haven't modified this file manually at all. I did a restart and verified that the bluetooth service shows as active (running) using systemctl status bluetooth although I still have to execute sudo systemctl restart bluetooth for the controller to automatically reconnect.

        [General]
        
        # Defaults to 'BlueZ X.YZ', if Name is not set here and plugin 'hostname' is not loaded.
        # The plugin 'hostname' is loaded by default and overides the Name set here so
        # consider modifying /etc/machine-info with variable PRETTY_HOSTNAME=<NewName> instead.
        #Name = BlueZ
        
        # Default device class. Only the major and minor device class bits are
        # considered. Defaults to '0x000000'.
        #Class = 0x000100
        
        # How long to stay in discoverable mode before going back to non-discoverable
        # The value is in seconds. Default is 180, i.e. 3 minutes.
        # 0 = disable timer, i.e. stay discoverable forever
        #DiscoverableTimeout = 0
        
        # How long to stay in pairable mode before going back to non-discoverable
        # The value is in seconds. Default is 0.
        # 0 = disable timer, i.e. stay pairable forever
        #PairableTimeout = 0
        
        # Use vendor id source (assigner), vendor, product and version information for
        # DID profile support. The values are separated by ":" and assigner, VID, PID
        # and version.
        # Possible vendor id source values: bluetooth, usb (defaults to usb)
        #DeviceID = bluetooth:1234:5678:abcd
        
        # Do reverse service discovery for previously unknown devices that connect to
        # us. This option is really only needed for qualification since the BITE tester
        # doesn't like us doing reverse SDP for some test cases (though there could in
        # theory be other useful purposes for this too). Defaults to 'true'.
        #ReverseServiceDiscovery = true
        
        # Enable name resolving after inquiry. Set it to 'false' if you don't need
        # remote devices name and want shorter discovery cycle. Defaults to 'true'.
        #NameResolving = true
        
        # Enable runtime persistency of debug link keys. Default is false which
        # makes debug link keys valid only for the duration of the connection
        # that they were created for.
        #DebugKeys = false
        
        # Restricts all controllers to the specified transport. Default value
        # is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
        # Possible values: "dual", "bredr", "le"
        #ControllerMode = dual
        
        # Enables Multi Profile Specification support. This allows to specify if
        # system supports only Multiple Profiles Single Device (MPSD) configuration
        # or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
        # Devices (MPMD) configurations.
        # Possible values: "off", "single", "multiple"
        #MultiProfile = off
        
        # Permanently enables the Fast Connectable setting for adapters that
        # support it. When enabled other devices can connect faster to us,
        # however the tradeoff is increased power consumptions. This feature
        # will fully work only on kernel version 4.1 and newer. Defaults to
        # 'false'.
        #FastConnectable = false
        
        # Default privacy setting.
        # Enables use of private address.
        # Possible values: "off", "device", "network"
        # "network" option not supported currently
        # Defaults to "off"
        # Privacy = off
        
        [GATT]
        # GATT attribute cache.
        # Possible values:
        # always: Always cache attributes even for devices not paired, this is
        # recommended as it is best for interoperability, with more consistent
        # reconnection times and enables proper tracking of notifications for all
        # devices.
        # yes: Only cache attributes of paired devices.
        # no: Never cache attributes
        # Default: always
        #Cache = always
        
        # Minimum required Encryption Key Size for accessing secured characteristics.
        # Possible values: 0 and 7-16. 0 means don't care.
        # Defaults to 0
        # MinEncKeySize = 0
        
        [Policy]
        #
        # The ReconnectUUIDs defines the set of remote services that should try
        # to be reconnected to in case of a link loss (link supervision
        # timeout). The policy plugin should contain a sane set of values by
        # default, but this list can be overridden here. By setting the list to
        # empty the reconnection feature gets disabled.
        #ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb
        
        # ReconnectAttempts define the number of attempts to reconnect after a link
        # lost. Setting the value to 0 disables reconnecting feature.
        #ReconnectAttempts=7
        
        # ReconnectIntervals define the set of intervals in seconds to use in between
        # attempts.
        # If the number of attempts defined in ReconnectAttempts is bigger than the
        # set of intervals the last interval is repeated until the last attempt.
        #ReconnectIntervals=1,2,4,8,16,32,64
        
        # AutoEnable defines option to enable all controllers when they are found.
        # This includes adapters present on start as well as adapters that are plugged
        # in later on. Defaults to 'false'.
        AutoEnable=true
        
        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          The config is ok - it looks like the stock config that's shipped with Raspberry Pi OS/RetroPie.

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

            @mitu Still getting connection issues. (Creating device failed: org.bluez.Error.AuthenticationFailed: Authentication Failed)

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

              @mrttime Sorry, don't have any ideas about this one. You can enable debugging in the bluetooth service - see here - and provide a log from the pairing process (use pastebin.com for posting the log), maybe that will shed some light on the error.

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

                @mitu OK. Thanks anyway. In one last attempt to maybe figure it out when I get to the point of choosing the security mode and select 1 DisplayYesNo the cursor activates at the bottom of the blue screen and when I press the directional buttons I get output that looks like ^[[C^[[3^[[3^[[D^[[B etc. etc. depending on the key I press.

                1 Reply Last reply Reply Quote 0
                • E
                  evancg
                  last edited by evancg

                  I have this exact same issue using a couple of different Retropie images. It might work the very first time I boot the image, but maybe not - and any following boots I have the same problem (also with a Pi 4).

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    evancg @evancg
                    last edited by evancg

                    @mrttime and @endo

                    I'm curious if you have the same issue I noticed I have from this thread:

                    https://www.raspberrypi.org/forums/viewtopic.php?f=140&t=306920

                    On boot, bluetoothctl and do a "list" to see what the MAC address of your bluetooth device on your pi controller.

                    Then perform a sudo systemctl restart bluetooth.service

                    Then go into bluetoothctl and do a list again to see if it's a different MAC address.

                    When I do this, I do get a different MAC address and at that point, I can connect to bluetooth devices as expected. I have no idea why it has this changing MAC address though. I think I've had this issue on 2 different Pi 4 units.

                    Editing: Restarting bluetooth.service doesn't always fix it - it seems more likely that just restarting bluetooth gives it a chance to get the right MAC address (which is why sometimes it always works on a reboot).

                    1 Reply Last reply Reply Quote 0
                    • G
                      GilbertJosé
                      last edited by GilbertJosé

                      Hi there, I have the exact same issue as the OP, so just to sum up :

                      • Raspberry PI 4 8GB bought 3 weeks ago (might be a faulty series ?)
                      • Official Retropie 4.7.1 for RP4/400 up to date
                      • RAW settings, go to bluetooth, pairing a device
                      • Press and hold home+share button on the DS4 to get it into pairing mode
                      • Here the result depends, sometimes there's no device found, sometimes it finds several devices, including my "Wireless Controller"
                      • If it found my DS4, I select "DisplayYesNo" to start pairing while the DS4 is still blinking in pairing mode
                      • At that moment, the DS4 starts to display a solid white LED for like 1 sec, and then just shuts down and does nothing more, where I guess it should get to solid blue for successful pairing
                      • From there, the retropie is just hanging on that "DisplayYesNo" screen and I have to go to remote terminal to reboot it
                      G 1 Reply Last reply Reply Quote 0
                      • G
                        GilbertJosé @GilbertJosé
                        last edited by

                        Here is some log, I hope this can help.
                        So I did stop the bluetooth service (sudo systemctl stop bluetooth.service) and then restarted it with debuging info (sudo bluetoothd -d -n).

                        pi@retropie:~ $ sudo bluetoothd -d -n
                        bluetoothd[1149]: Bluetooth daemon 5.50
                        bluetoothd[1149]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “Name” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
                        bluetoothd[1149]: src/main.c:parse_config() Key file does not have key “MinEncKeySize” in group “GATT”
                        bluetoothd[1149]: src/adapter.c:adapter_init() sending read version command
                        bluetoothd[1149]: Starting SDP server
                        bluetoothd[1149]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0532
                        bluetoothd[1149]: src/plugin.c:plugin_init() Loading builtin plugins
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading hostname plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading wiimote plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading autopair plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading policy plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading neard plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading sap plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading a2dp plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading avrcp plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading network plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading input plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading hog plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading health plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading gap plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading scanparam plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading deviceinfo plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading midi plugin
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading battery plugin
                        bluetoothd[1149]: src/plugin.c:plugin_init() Loading plugins /usr/lib/arm-linux-gnueabihf/bluetooth/plugins
                        bluetoothd[1149]: src/plugin.c:add_plugin() Loading sixaxis plugin
                        bluetoothd[1149]: profiles/health/hdp.c:hdp_manager_start() Starting Health manager
                        bluetoothd[1149]: profiles/input/suspend-none.c:suspend_init()
                        bluetoothd[1149]: profiles/network/manager.c:read_config() /etc/bluetooth/network.conf: Key file does not have key “DisableSecurity” in group “General”
                        bluetoothd[1149]: profiles/network/manager.c:read_config() Config options: Security=true
                        bluetoothd[1149]: plugins/neard.c:neard_init() Setup neard plugin
                        bluetoothd[1149]: plugins/sixaxis.c:sixaxis_init()
                        bluetoothd[1149]: src/main.c:main() Entering main loop
                        bluetoothd[1149]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 0 soft 0 hard 0
                        bluetoothd[1149]: Bluetooth management interface 1.18 initialized
                        bluetoothd[1149]: src/adapter.c:read_version_complete() sending read supported commands command
                        bluetoothd[1149]: src/adapter.c:read_version_complete() sending read index list command
                        bluetoothd[1149]: src/rfkill.c:rfkill_event() RFKILL event idx 1 type 2 op 0 soft 0 hard 0
                        bluetoothd[1149]: src/adapter.c:read_commands_complete() Number of commands: 79
                        bluetoothd[1149]: src/adapter.c:read_commands_complete() Number of events: 40
                        bluetoothd[1149]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
                        bluetoothd[1149]: src/adapter.c:read_index_list_complete() Number of controllers: 1
                        bluetoothd[1149]: src/adapter.c:read_index_list_complete() Found index 0
                        bluetoothd[1149]: src/adapter.c:index_added() index 0
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() System name: BlueZ 5.50
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() Major class: 0
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() Minor class: 0
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d0532
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
                        bluetoothd[1149]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
                        bluetoothd[1149]: src/adapter.c:index_added() sending read info command for index 0
                        bluetoothd[1149]: src/adapter.c:read_info_complete() index 0 status 0x00
                        bluetoothd[1149]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
                        bluetoothd[1149]: src/adapter.c:clear_devices() sending clear devices command for index 0
                        bluetoothd[1149]: src/adapter.c:set_privacy() sending set privacy command for index 0
                        bluetoothd[1149]: src/adapter.c:set_privacy() setting privacy mode 0x00 for index 0
                        bluetoothd[1149]: src/gatt-database.c:btd_gatt_database_new() GATT Manager registered for adapter: /org/bluez/hci0
                        bluetoothd[1149]: src/advertising.c:btd_adv_manager_new() LE Advertising Manager created for adapter: /org/bluez/hci0
                        bluetoothd[1149]: profiles/audio/a2dp.c:media_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: plugins/policy.c:policy_adapter_probe()
                        bluetoothd[1149]: src/adapter.c:set_mode() sending set mode command for index 0
                        bluetoothd[1149]: plugins/hostname.c:hostname_probe()
                        bluetoothd[1149]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
                        bluetoothd[1149]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: profiles/audio/avrcp.c:avrcp_controller_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: src/adapter.c:adapter_service_add() /org/bluez/hci0
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110f-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
                        bluetoothd[1149]: src/adapter.c:add_uuid() sending add uuid command for index 0
                        bluetoothd[1149]: profiles/audio/avrcp.c:avrcp_target_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: src/adapter.c:adapter_service_add() /org/bluez/hci0
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
                        bluetoothd[1149]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
                        bluetoothd[1149]: src/adapter.c:add_uuid() sending add uuid command for index 0
                        bluetoothd[1149]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: profiles/sap/manager.c:sap_server_probe() path /org/bluez/hci0
                        bluetoothd[1149]: Sap driver initialization failed.
                        bluetoothd[1149]: sap-server: Operation not permitted (1)
                        bluetoothd[1149]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
                        bluetoothd[1149]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
                        bluetoothd[1149]: src/adapter.c:load_ltks() hci0 keys 0
                        bluetoothd[1149]: src/adapter.c:load_irks() hci0 irks 0
                        bluetoothd[1149]: src/adapter.c:load_conn_params() hci0 conn params 0
                        bluetoothd[1149]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
                        bluetoothd[1149]: src/adapter.c:add_uuid() sending add uuid command for index 0
                        bluetoothd[1149]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 532
                        bluetoothd[1149]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
                        bluetoothd[1149]: src/adapter.c:set_dev_class() sending set device class command for index 0
                        bluetoothd[1149]: src/adapter.c:set_name() sending set local name command for index 0
                        bluetoothd[1149]: src/adapter.c:set_privacy_complete() Successfully set privacy for index 0
                        bluetoothd[1149]: plugins/hostname.c:property_changed() static hostname: retropie
                        bluetoothd[1149]: plugins/hostname.c:property_changed() pretty hostname:
                        bluetoothd[1149]: plugins/hostname.c:update_name() name: retropie
                        bluetoothd[1149]: src/adapter.c:adapter_set_name() name: retropie
                        bluetoothd[1149]: src/adapter.c:adapter_set_name() alias: retropie
                        bluetoothd[1149]: src/adapter.c:set_name() sending set local name command for index 0
                        bluetoothd[1149]: plugins/hostname.c:property_changed() chassis:
                        bluetoothd[1149]: Loading LTKs timed out for hci0
                        bluetoothd[1149]: Failed to set mode: Failed (0x03)
                        bluetoothd[1149]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
                        bluetoothd[1149]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
                        bluetoothd[1149]: src/adapter.c:load_conn_params_complete() Connection Parameters loaded for hci0
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Name: BlueZ 5.50
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Short name:
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Current alias: BlueZ 5.50
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Name: retropie
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Short name:
                        bluetoothd[1149]: src/adapter.c:local_name_changed_callback() Current alias: retropie
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • P
                          pscotto1234 @mrttime
                          last edited by

                          @mrttime follow these instruction

                          https://raspberrypi.stackexchange.com/questions/122429/raspberry-pi-4-wont-pair-to-bluetooth-devices/123914#123914

                          G 1 Reply Last reply Reply Quote 0
                          • G
                            GilbertJosé @pscotto1234
                            last edited by

                            @pscotto1234 Thanks for that sharing, the link provided does explain and works around the issue pretty well, I can now enjoy my PI4 as I wished

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              seandecoste @GilbertJosé
                              last edited by

                              @GilbertJosé
                              Hey, I’ve been looking for these instructions and I’m glad to have found them. Can you help me with the command for “replacing” commands? Thanks

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM mitu locked this topic on
                              • mituM
                                mitu Global Moderator @seandecoste
                                last edited by

                                @seandecoste Please don't bump very old topics. The user you mentioned hasn't been active for the last 2 years, so I don't think you'll get an aswer from them.

                                If you have an issue, please open a new topic and describe your issue, providing the info asked in https://retropie.org.uk/forum/topic/3/read-this-first.

                                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.