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 35.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.
    • edge3000E
      edge3000 @psyke83
      last edited by

      @psyke83 Awesome news, thanks for all your work on this!

      Yeah I wasn't sure if waiting for the LED player slot light was necessary so I just tried as many variations as I could and tried to break things.

      I'm happy to go back to master, now I will start the fun of remapping all my buttons that I've been putting off for so long lol

      After that my next step is trying out the new Kodi, Steam Link and Moonlight streaming.

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

        @psyke83 I went back to master, updated the RetroPie-Setup script to 4.4.8, installed sixaxis. Removed my old pairings from Bluetooth setup. Paired 7 dualshock 3 controllers - all worked fine and the pairing process was better again thanks to your changes.

        However there is 1 minor issue I am having - the first time I boot up and turn on a controller - it lights up player1 LED on the controller then immediately turns off the LED - but the controller is still on and working as player1! Further controllers paired get their proper LEDs of player2, player3 etc

        As a test I installed custombluez and rebooted, and now the LEDs work fine again! Not sure what is different in custombluez that would fix it other than the newer bluez version? All my tests are on official controllers so I didn't think I would need it.

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

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

          -Setup script to 4.4.8, installed sixaxis. Removed my old pairings from Bluetooth setup. Paired 7 dualshock 3 controllers - all worked fine and the pairing process was better again thanks to your changes.
          However there is 1 minor issue I am having - the first time I boot up and turn on a controller - it lights up player1 LED on the controller then immediately turns off the LED - but the controller is still on and working as player1! Further controllers paired get their proper LEDs of player2, player3 etc
          As a test I installed custombluez and rebooted, and now the LEDs work fine again! Not sure what is different in custombluez that would fix it other than the newer bluez version? All my tests are on official controllers so I didn't think I would need it.

          You're running on stretch, right? I encountered this issue when I was first testing the hid-sony driver, but I think the issue was isolated to the older BlueZ version in Raspbian jessie. Unfortunately, I can't seem to reproduce the issue on my installation now; I've tried several times to reboot the Pi, and the first pairing doesn't trigger the issue.

          Did you install any software to manipulate LEDs for other devices? The hid-sony is different to ps3controller in that it exposes userspace-controllable LEDs to /sys/class/leds. If for any reason you have background processes manipulating these, it would affect the controller.

          If the issue is simply that you're running jessie, I highly recommend that you upgrade to stretch. Aside from the LED issue, the timeout functionality won't work (jessie is missing the tool needed to configure the axis deadzones; without calibration, the OS will think that there's constant movement on the analog sticks).

          edge3000E 1 Reply Last reply Reply Quote 0
          • S
            Silent
            last edited by

            Speaking of LEDs, I just noticed something while playing on Pi and when my controller discharged. I was able to resume my gameplay seamlessly by plugging the pad to Pi's USB port. However, seems that unlike on PS3, there is no visual indicator that the pad is charging/has finished charging.

            Is making LEDs blink slowly while charging (iirc that's what happens on PS3) an option?

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

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

              Speaking of LEDs, I just noticed something while playing on Pi and when my controller discharged. I was able to resume my gameplay seamlessly by plugging the pad to Pi's USB port. However, seems that unlike on PS3, there is no visual indicator that the pad is charging/has finished charging.

              Is making LEDs blink slowly while charging (iirc that's what happens on PS3) an option?

              Short answer is no.

              Long answer is... theoretically, you could do it.

              When you connect a controller (either via USB or BT), userspace exposes some useful information:

              • /sys/class/power_supply/sony_controller_battery_(your_mac_here)/ exposes the battery capacity (0-100%, but can only show a rough level rounded to the nearest 25% increment) and status (Charging or Discharging).
                */sys/class/leds/(bus address)::sony{1-4} allows you to check and manipulate each LED (on or off) individually.

              If you really wanted, you could write a userspace tool to manage the LEDs; but I think you could only turn the LEDs on or off, so you'd need to have a process running that constantly manipulates the LEDs in order to emulate the charging pattern. It doesn't seem like it would be a practical solution IMO.

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

                @Silent

                Hmm.... or maybe I'm mistaken and it is possible.
                Looking at one of my controllers:

                $ cat /sys/class/leds/0005:054C:0268.0007::sony1/trigger
                [none] rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic mmc0 rfkill-any rfkill0 sony_controller_battery_e0:ae:5e:61:3e:c8-charging-or-full sony_controller_battery_e0:ae:5e:61:3e:c8-charging sony_controller_battery_e0:ae:5e:61:3e:c8-full sony_controller_battery_e0:ae:5e:61:3e:c8-charging-blink-full-solid
                

                It looks like you can echo one of those option to the node and it might modify the behavior of the LEDs (it's set to none right now). I don't have a USB cable to test at the moment but perhaps you might want to experiment.

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

                  @psyke83 Sounds good! However, I'm not proficient enough to know what do you mean by "node" in this context - I can test it of course, but I may need specific instructions =)

                  EDIT:
                  I just realized half a second after submitting this reply... it's this very file in /leds/, right?

                  EDIT2:
                  I also assume this does not make any semi-permanent changes to the pad itself, does it?

                  EDIT3:
                  FYI my "Status" value for DS3's power supply says "Full", so there's at least three of them, not two.

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

                    @Silent

                    It should be temporary...

                    Try this command:

                    sudo bash -c "echo mmc0 > /sys/class/leds/*::sony4/trigger"
                    

                    This will configure your controller's fourth LED to blink on mmc0 (internal SD card) access - just like the Pi's actual dedicated disk activity LED.

                    Of course, this isn't what you want, but the other options (such as charging-blink-full-solid) theoretically might work.

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

                      Good news and bad news...

                      The good: it's fairly easy to configure the LEDs to use the "blink on charge, solid on full". Here's the change that would do it: https://github.com/RetroPie/sixaxis/compare/master...psyke83:charge_blink

                      The bad: it doesn't seem to work as expected. My controllers still show a solid light even when the controller is in the Charging state. Perhaps it evaluates when to blink the leds based not on the charging state but battery level, and controller reports 100% capacity despite it not being fully charged, due to the limitation of the firmware? I don't know. I'll try discharging my controllers below 100% to see...

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

                        @psyke83 I am running on Stretch and I believe everything was up to date (at least to the point before I started testing the PR). Only noticed this problem between your last version of the sixaxis PR and when I went back to master.

                        I had uninstalled sixaxis before going back to master, then updated retropie_setup script, then installed sixaxis. I did not have any controller related drivers installed at that time other than xpad when I installed sixaxis.

                        At that time I removed all paired controllers and paired them over again. They did their initial shutoffs where the the bluetooth restarts, but then on reboot I noticed pairing the first controller would not light the LED anymore.

                        Thats when I installed custombluez and the problem went away.

                        1 Reply Last reply Reply Quote 0
                        • S
                          snock
                          last edited by

                          I have a compatible Shanhan controller. How do I configure it in ES? I only managed it with cable ... When connecting it with bluetooh, it identifies it (mac included) but it does not appear as connected. How can I configure it later in ES? I have only configured it by cable.

                          I have always used the sf30 pro and it was set up in bluetoth, and add it in ES.

                          usb 1-1.2: new full-speed USB device number 12 using dwc_otg
                          [  934.988452] usb 1-1.2: New USB device found, idVendor=054c, idProduct=0268
                          [  934.988462] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
                          [  934.988466] usb 1-1.2: Product: PS3 GamePad
                          [  934.988469] usb 1-1.2: Manufacturer: SHANWAN
                          [  934.997089] input: SHANWAN PS3 GamePad Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0009/input/input15
                          [  935.063914] input: SHANWAN PS3 GamePad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0009/input/input14
                          [  935.064307] sony 0003:054C:0268.0009: input,hiddev96,hidraw2: USB HID v81.10 Joystick [SHANWAN PS3 GamePad] on usb-3f980000.usb-1.2/input0
                          [  935.843765] usb 1-1.2: reset full-speed USB device number 12 using dwc_otg
                          [  961.144707] usb 1-1.2: USB disconnect, device number 12
                          
                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @snock
                            last edited by

                            @snock Have you tried the step from the Docs to register/pair your controller ? In ES, you need to go to Input Configuration to configure the new controller, after you have paired it.

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

                              @mitu I connect it by bluetooth and then in ES when trying to configure it does not detect it ... it only does it by cable. to connect it I connect the cable about 10 sec, I disconnect and pulse PS.

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

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

                                @mitu I connect it by bluetooth and then in ES when trying to configure it does not detect it ... it only does it by cable. to connect it I connect the cable about 10 sec, I disconnect and pulse PS.

                                Did you make sure to enable third-party support? This will upgrade BlueZ to 5.50.

                                You can check some stuff by opening a bluetoothctl terminal:

                                bluetoothctl
                                

                                While in the bluetooth terminal, check:

                                • version (should report 5.50):
                                [bluetooth]# version
                                Version 5.50
                                
                                • info of DS3 controller. Example:
                                [bluetooth]# devices
                                Device E0:AE:5E:61:3E:C8 Sony PLAYSTATION(R)3 Controller
                                [bluetooth]# info E0:AE:5E:XX:XX:XX
                                Device E0:AE:5E:XX:XX:XX (public)
                                	Name: Sony PLAYSTATION(R)3 Controller
                                	Alias: Sony PLAYSTATION(R)3 Controller
                                	Class: 0x00000508
                                	Icon: input-gaming
                                	Paired: no
                                	Trusted: yes
                                	Blocked: no
                                	Connected: no
                                	LegacyPairing: no
                                	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
                                	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
                                	Modalias: usb:v054Cp0268d0100
                                

                                If the controller profile exists and shows Trusted: yes, the controller should be capable of pairing, but you may need to remap the controller again (as the device name will be different to your USB connection).

                                S 1 Reply Last reply Reply Quote 0
                                • S
                                  Silent
                                  last edited by

                                  Excuse me for asking before checking on my own, but has the latest firmware update (from mid-February) update BlueZ?

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

                                    @psyke83 Thanks, it worked. Following these steps

                                    cd RetroPie-Setup
                                    git remote add psyke83 https://github.com/psyke83/RetroPie-Setup
                                    git fetch psyke83
                                    git checkout sixaxis
                                    
                                    P 1 Reply Last reply Reply Quote 0
                                    • P
                                      psyke83 Global Moderator @snock
                                      last edited by

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

                                      @psyke83 Thanks, it worked. Following these steps

                                      cd RetroPie-Setup
                                      git remote add psyke83 https://github.com/psyke83/RetroPie-Setup
                                      git fetch psyke83
                                      git checkout sixaxis
                                      

                                      No, my sixaxis branch has been merged to master and is no longer needed. Go back to the master branch:

                                      cd RetroPie-Setup
                                      git checkout master
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • V
                                        verawarez
                                        last edited by

                                        Can anybody give me a hand? i can't solve this problems, trying to install custombluez or customhidsony i'm newbie in this stuff

                                        RetroPie-Setup version: 4.4.11 (0f5d8a1)
                                        System: Linux RetrOrangePi 3.4.113-sun8i #4 SMP PREEMPT Sun Sep 2 02:32:16 CEST 2018 armv7l GNU/Linux

                                        i have retrorange pi 4.2 full, i have an orange pi lite, 32gb, solved some problems about some libraries to make videos working on themes, but now i cant install custombluez or customhidsony

                                        when i try to install custombluez
                                        "Could not successfully build custombluez - Updated version of BlueZ Bluetooth stack

                                        Install alongside 'sixaxis' driver if you need to pair third-party (Gasia/Shanwan) DualShock 3 controllers.
                                        Needed only if your distribution's BlueZ version is <5.48. (/home/pi/RetroPie-Setup/tmp/build/custombluez/bluetooth_5.50-1~rpi1_all.deb not found).

                                        Log ended at: Sun Apr 28 13:09:56 CEST 2019
                                        Total running time: 0 hours, 0 mins, 51 secs"

                                        Full log here https://pastebin.com/NukV2fV1

                                        or when i try to install customhidsony this is the log of the error it gave me
                                        https://pastebin.com/6CwT8HV9

                                        Thnks a lot, i want to fix this, i've updated retrorange and then retropie setup, but i cant fix it, i think could be something about the repos and that stuff

                                        Greettings..

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

                                          @verawarez The required dependencies might not be available for your distro - debhelper is missing. What distribution are you using ?

                                          V 1 Reply Last reply Reply Quote 0
                                          • V
                                            verawarez @mitu
                                            last edited by verawarez

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

                                            The required dependencies might not be available for your distro - debhelper is missing. What distribution are you using ?

                                            Thanks a lot for your answer

                                            This info gave me lsb_release -a

                                            No LSB modules are available.
                                            Distribuitor ID: Debian
                                            Description: Debian GNU/Linux 8.11 (jessie)
                                            Release: 8.11
                                            Codename: jessie

                                            Sorry i'm really new in this stuff, i searched for the command to get what distribution i have, i knew it was jessie but not sure that if was complete info, so i've searched for the command

                                            See you, anything else that should i give you to help me?

                                            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.