RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Sony DualShock 3 - call for testers: "sixaxis" script module

    Scheduled Pinned Locked Moved Ideas and Development
    sixaxisdriverbeta
    208 Posts 24 Posters 34.5k 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
      last edited by

      Thanks for testing - I'll add a note in the wiki for this.

      H 1 Reply Last reply Reply Quote 0
      • H
        Headcrab @mitu
        last edited by

        @mitu
        Thanks for your time.
        I hope we get confirmation from other ps3 controller owners at some point.

        1 Reply Last reply Reply Quote 0
        • wmarcioW
          wmarcio
          last edited by wmarcio

          On my pi3b+ with retropie 4.6 on debian 9.11 wont worked, i made the same process...

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

            @wmarcio said in Sony DualShock 3 - call for testers: "sixaxis" script module:

            On my pi3b+ with retropie 4.6 on debian 9.11 wont worked, i made the same process...

            You're using a 3rd party controller, did you run the 'Enable 3rd party controllers' step ?

            wmarcioW 1 Reply Last reply Reply Quote 0
            • H
              Headcrab
              last edited by

              I've done some more testing, and found out that libbluetooth-dev does the trick.
              So for the official ps3 controller these are the steps that work on my end.

              • install sixaxis driver
              • sudo apt-get install libbluetooth-dev
              • reboot
              • Connect the controller over usb
              • Bluetooth menu > "Register and Connect to Bluetooth Device"
              • Follow the on screen instructions
              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Headcrab
                last edited by mitu

                @Headcrab said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                I've done some more testing, and found out that libbluetooth-dev does the trick.

                I think that's a red herring, the package contains only development files, without any impact on the Bluetooth stack that's running on the Pi.

                EDIT: Hm, actually it seems to contain more than that. I'll take a look, but on my system this is not installed and the controller works ok.

                H 1 Reply Last reply Reply Quote 0
                • H
                  Headcrab @mitu
                  last edited by Headcrab

                  @mitu
                  My findings are not based on actual knowledge of what each package does, so you are probably right.

                  But just to be clear, when you say that your controller works fine do you mean that when trying to Register for the first time, it is being discovered without that package being installed?

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

                    @Headcrab said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                    But just to be clear, when you say that your controller works fine do you mean that when trying to Register for the first time, it is being discovered without that package?

                    I never had that package installed and it's not installed now, so yes - discovery and (now) basic controller functionality worked without it. There might by a difference between systems though, I've paired and connected on a Pi4, which has a different BT chipset, so you being on a Pi3B+ might count.

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      Headcrab @mitu
                      last edited by

                      @mitu said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                      I've paired and connected on a Pi4, which has a different BT chipset, so you being on a Pi3B+ might count.

                      I just "borrowed" a rpi4(1gb) from my nas setup so i can test this.

                      I performed these steps:

                      • Burn the "retropie-buster-4.6-rpi4.img" image on the sd card
                      • boot into emulationstation
                      • connect ps3 controller over usb and configure controls, so i can navigate
                      • go to driver packages and install sixaxis
                      • with the controller connected over usb navigate to Bluetooth > "Register and Connect to Bluetooth Device"
                      • follow the instructions to unplug and re-plug the cable (and leave it connected)

                      The outcome was exactly like on my rpi3.

                      • Discovery fails.
                      • If i install libbluetooth-dev and reboot
                      • Discovery succeeds

                      Maybe it's a problem with my controller, i don't know.
                      Also, i do not own a ps3 console, so it is not interfering in any way.

                      P 1 Reply Last reply Reply Quote 0
                      • wmarcioW
                        wmarcio @mitu
                        last edited by

                        @mitu, Hello, thank you, you are always helping people. My controller is original Sony, I always used the same controller, before upgrading to version 4.6, the same controller worked perfectly.

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

                          @wmarcio What version did you run before the upgrade ? Did you install the 4.6 Buster image ? Did you enable support for 3rd party controllers ?

                          wmarcioW 1 Reply Last reply Reply Quote 0
                          • wmarcioW
                            wmarcio @mitu
                            last edited by

                            @mitu

                            I don't remember the previous version exactly, but I always update frequently, it was the last one before I upgraded to 4.6. Yes I did a clean installation for version 4.6 Buster, as I saw that it didn't work, I restored the previous image of raspbian 9.11 stretch and Retropie 4.6, that's when the problem started. Yes, I have enabled support for third party control.

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

                              @wmarcio said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                              I don't remember the previous version exactly, but I always update frequently, it was the last one before I upgraded to 4.6.

                              There's no difference between the previous (4.5.20) and the 4.6 version, except the version tag. There have been no modifications in quite a while for the bluetooth module in RetroPie, so I don't see what change in 4.6 might trigger this problem.

                              Yes I did a clean installation for version 4.6 Buster, as I saw that it didn't work, I restored the previous image of raspbian 9.11 stretch and Retropie 4.6, that's when the problem started. Yes, I have enabled support for third party control.

                              Then I suggest you try the ps3controller package, it might work better with 3rd party controllers.

                              wmarcioW 1 Reply Last reply Reply Quote 0
                              • wmarcioW
                                wmarcio @mitu
                                last edited by

                                @mitu ok, will try It. Thxs again.

                                1 Reply Last reply Reply Quote 0
                                • P
                                  psyke83 Global Moderator @Headcrab
                                  last edited by

                                  @Headcrab

                                  Thanks for your troubleshooting efforts. It seems thatlibbluetooth-devitself doesn't fix your problem, but it triggers installation of the actual needed package - libbluetooth3, which contains the sixaxis plugin for BlueZ. This is quite odd, as I would have expected it to be present in a default Raspbian installation.

                                  I'll do some checking and report back soon.

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

                                    @psyke83 Looks like - in my case - libbluetooth3 is also present, installed as a kodi dependency.

                                    P 1 Reply Last reply Reply Quote 1
                                    • P
                                      psyke83 Global Moderator @mitu
                                      last edited by

                                      @mitu said in Sony DualShock 3 - call for testers: "sixaxis" script module:

                                      @psyke83 Looks like - in my case - libbluetooth3 is also present, installed as a kodi dependency.

                                      That also explains why I didn't notice the issue until now. This PR should fix the issue: https://github.com/RetroPie/RetroPie-Setup/pull/3125

                                      1 Reply Last reply Reply Quote 2
                                      • S
                                        steeeb
                                        last edited by

                                        Thanks for the ongoing work on this.

                                        I can't seem to get my Shanwan controllers to pair. RPI3B+, Buster from download today, upgraded first (both the retropie_setup scripts and 'Yes' to the OS/Kernel when it asks if you want to update that as part of 'Update'.

                                        I've enabled third party support, which installs customhidsony.

                                        I go to Register and Connect to Bluetooth Device, and it takes around 15 seconds for anything to happen weirdly - it used to be instant - then I get the Searching.. screen (with third party support it has the DualShock string - without it, it doesn't). In any case, no devices found. I've even tried custombluez and that doesn't work.

                                        This used to work on an old Stretch build (I grabbed the original PR when sixaxis was first added as a pull request and it worked fine there).

                                        It looks like some error flashes up, I did it via SSH so I could see the error, it appears to be this:

                                        ^[[CTraceback (most recent call last):                                                  │ │  
                                          File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-test-device", line 44, in <module>              │ │                                                                      │ │  
                                            adapter = bluezutils.find_adapter(options.dev_id)───────────────────────────────────┘ │  
                                          File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluezutils.py", line 14, in find_adapter              │                       <  OK  >            <Cancel>                       │  
                                            return find_adapter_in_objects(get_managed_objects(), pattern)────────────────────────┘  
                                          File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluezutils.py", line 9, in get_managed_objects
                                            manager = dbus.Interface(bus.get_object("org.bluez", "/"),
                                          File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
                                            follow_name_owner_changes=follow_name_owner_changes)
                                          File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
                                            self._named_service = conn.activate_name_owner(bus_name)
                                          File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
                                            self.start_service_by_name(bus_name)
                                          File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
                                            'su', (bus_name, flags)))
                                          File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
                                            message, timeout)
                                        dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
                                        
                                        

                                        systemctl status dbus-org.bluez.service

                                        Looks to give:
                                        Active: inactive (dead)
                                        May 05 00:10:04 raspberrypi systemd[1]: Condition check resulted in Bluetooth service being skipped.

                                        The systemd line is added each time Register and Connect is pressed. It's inactive (dead) straight after I log in after boot.

                                        pi@raspberrypi:~ $ service hciuart status
                                        ● hciuart.service - Configure Bluetooth Modems connected by UART
                                           Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
                                           Active: failed (Result: exit-code) since Tue 2020-05-05 00:12:50 BST; 5min ago
                                          Process: 348 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)
                                        
                                        May 05 00:12:20 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
                                        May 05 00:12:50 raspberrypi btuart[348]: Initialization timed out.
                                        May 05 00:12:50 raspberrypi btuart[348]: bcm43xx_init
                                        May 05 00:12:50 raspberrypi systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
                                        May 05 00:12:50 raspberrypi systemd[1]: hciuart.service: Failed with result 'exit-code'.
                                        May 05 00:12:50 raspberrypi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
                                        
                                        pi@raspberrypi:~ $ sudo hciconfig -a
                                        pi@raspberrypi:~ $ sudo systemctl start bluetooth
                                        pi@raspberrypi:~ $ systemctl status bluetooth
                                        ● bluetooth.service - Bluetooth service
                                           Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
                                           Active: active (running) since Tue 2020-05-05 00:19:42 BST; 7s ago
                                             Docs: man:bluetoothd(8)
                                         Main PID: 1097 (bluetoothd)
                                           Status: "Running"
                                            Tasks: 1 (limit: 1772)
                                           Memory: 1.7M
                                           CGroup: /system.slice/bluetooth.service
                                                   └─1097 /usr/lib/bluetooth/bluetoothd
                                        
                                        May 05 00:19:42 raspberrypi systemd[1]: Starting Bluetooth service...
                                        May 05 00:19:42 raspberrypi bluetoothd[1097]: Bluetooth daemon 5.50
                                        May 05 00:19:42 raspberrypi systemd[1]: Started Bluetooth service.
                                        May 05 00:19:42 raspberrypi bluetoothd[1097]: Starting SDP server
                                        May 05 00:19:42 raspberrypi bluetoothd[1097]: Bluetooth management interface 1.14 initialized
                                        

                                        But it still won't pair - that's as far as I can get. Anyone have any ideas?

                                        S 1 Reply Last reply Reply Quote 0
                                        • S
                                          steeeb @steeeb
                                          last edited by steeeb

                                          I've found the issue. Turning off wifi seems to break bluetooth! (It never used to, as I used to have it off beforehand too).

                                          Looks like theres a bug in the latest rpi firmware ^

                                          Only thing now is it seems L/R trigger is set to Axis 2+ and Axis 5+ and it takes like 10 minutes to be able to get EmulationStation to set it when setting up the controller (not checked if it works in game yet) - anyone else had this problem? Setting via USB has the same axis numbers but it's really easy to set.

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            psyke83 Global Moderator
                                            last edited by psyke83

                                            @steeeb

                                            The hid-sonydriver has two problems: it exposes both analog and digital events for the triggers, and in the case of the analog events, the triggers violate the Linux gamepad specification by having the resting position at -32767, when the specification calls for it to start at 0.

                                            Due to these issues, two workarounds are applied to EmulationStation for DualShock controllers during button setup - digital trigger events are ignored, and negative axis events are discarded (as most Linux software can't support analog button events that span both axes).

                                            The latter workaround means that it will only detect the triggers being pressed when at ~50% pressure or higher. I suspect you might be having this problem due to not pressing the buttons firmly enough. It's also possible that if you hold the trigger at <50% pressure (i.e. where it reports a negative axis value) for too long, EmulationStation thinks you are holding down a button with the intention to skip to the next button. I might take a look at the code again and see if that can be fixed, but can't make any promises.

                                            Finally, there's also a slight chance that your controller doesn't have a stable Bluetooth connection due to interference. My Pi model 3B has a revision of Bluetooth that doesn't support hardware flow control, which causes frequent ghost inputs - unless I manually lower the HCI baud rate. I'm not sure if any 3B+ models lack flow control, but it might be worth checking.

                                            S 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.