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.
    • 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
                  • S
                    steeeb @psyke83
                    last edited by

                    @psyke83 thanks - I got it recognised in the end and whilst playing the controller seems fine - it was just the initial set up. I think now I know the specifics, setting it up again would be easier I think it needs a quick press rather than a slow press from the sounds of it.

                    Good work.

                    1 Reply Last reply Reply Quote 0
                    • edge3000E
                      edge3000
                      last edited by

                      Sixaxis has been working great for me on my Rpi4 running a new Retropie 4.6 install with all updates. Normally I can connect 7 dualshock 3's at a time without issue. But I found a way to break it partially.

                      @psyke83 I didn't see this mentioned in regards to Sixaxis:

                      If you disable ERTM (to get an Xbox One S controller to pair by bluetooth) or install Xpadneo (it disables ERTM during install) you will lose the ability to connect more than 4 Dualshock 3's at a time!

                      I tested this by disabling ERTM with this line in /etc/modprobe.d/bluetooth.conf
                      options bluetooth disable_ertm=Y

                      After reboot I can only connect 4 dualshock 3's.

                      Delete the file or set to disable_ertm=N
                      And after reboot I can connect 7 dualshock 3's again!

                      Just wanted to mention it in case anyone else runs into a similar problem.

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

                        @psyke83 Hi, I was away since a long time.
                        I'm installing the latest Retropie version on an Rpi 3 and wanted to try the sixaxis driver with a SHANWAN PS3 clone controllor.
                        I was able to pair the controller but not to connect, the led on number 1 turn on solid red for less than a second and then disconnects.
                        Sometimes happens that while doing it, Emulationstation crash.
                        This is the messages on bluetoothctl

                        Agent registered
                        [<span style="color:blue">CHG</span>] Device 00:26:5C:5D:BD:00 Connected: yes
                        [CHG] Device 00:26:5C:5D:BD:00 Name: PLAYSTATION(R)3 Controller
                        [CHG] Device 00:26:5C:5D:BD:00 Alias: PLAYSTATION(R)3 Controller
                        [CHG] Device 00:26:5C:5D:BD:00 Connected: no
                        [CHG] Controller B8:27:EB:75:21:27 Powered: no
                        [CHG] Controller B8:27:EB:75:21:27 Discovering: no
                        Agent unregistered
                        [DEL] Device 00:26:5C:5D:BD:00 PLAYSTATION(R)3 Controller
                        [DEL] Controller B8:27:EB:75:21:27 retropie [default]
                        Agent registered
                        [CHG] Controller B8:27:EB:75:21:27 Powered: yes
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
                        [CHG] Controller B8:27:EB:75:21:27 Alias: BlueZ 5.50
                        [CHG] Controller B8:27:EB:75:21:27 Name: retropie
                        [CHG] Controller B8:27:EB:75:21:27 Alias: BlueZ 5.50
                        [CHG] Controller B8:27:EB:75:21:27 Alias: retropie
                        

                        There is something I can try to solve the problem ?
                        Thank you in advance.

                        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.