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 36.0k 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.
    • P
      psyke83 Global Moderator
      last edited by psyke83

      @MadHorse,

      Thanks for bringing the problem to my attention. It seems that I accidentally left in some unnecessary depends that should fulfilled by the corresponding -dev packages; libical-devshould be sufficient, as it selects libical2 on stretch, but on jessie it probably selects the old package.

      I've updated the PR/branch to remove the excess depends, so it should work for you now.

      P.S. You have the option to install custombluez from binary, but it's also possible to build from source. If building from source fails, then I may need to add more explicit dependencies to the script for jessie. I only have Raspbian stretch installed on my test card at the moment, so let me know if installing from source is broken and I'll re-flash jessie to test.

      In case you're not familiar with git, this should refresh the branch for you due to the branch update being forced, assuming you chose the remote name as psyke83:

      git fetch psyke83
      git reset --hard psyke83/sixaxis
      

      Thanks.

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

        @psyke83
        Thank you for replying me.
        As asked i try to install custombluez from source but it fail with the following error

        make[2]: *** [client/bluetoothctl] Error 1
        Makefile:3183: recipe for target 'all' failed
        make[1]: *** [all] Error 2
        make[1]: Leaving directory '/home/pi/RetroPie-Setup/tmp/build/custombluez/build-area/bluez-5.48'
        dh_auto_build: make -j1 returned exit code 2
        debian/rules:35: recipe for target 'build' failed
        make: *** [build] Error 2
        dpkg-buildpackage: error: debian/rules build gave error exit status 2
        debuild: fatal error at line 1376:
        dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
        gbp:error: 'debuild -i -I -us -uc' failed: it exited with 29
        /home/pi/RetroPie-Setup/tmp/build/custombluez /home/pi/RetroPie-Setup
        /home/pi/RetroPie-Setup
        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. (/home/pi/RetroPie-Setup/tmp/build/custombluez/build-area/bluetooth_5.48-1~rpi1_all.deb not found).
        

        Installing from binary seems to install without problems.
        Let me know if you need the full log if you need me to do some test.

        thank you

        P 1 Reply Last reply Reply Quote 0
        • SanoS
          Sano @psyke83
          last edited by

          @psyke83
          The Hori controller is in fact a PS3 and PS4 compatible controller (with a switch to choose PS3/4 compatibility, but this doesn't seem to affect the driver).
          Will it use the Sony hid driver even if it's seen as a regular USB controller by the OS ?

          Anyway, please feel free to relocate the last few posts to your thread if you think it's more relevant.

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

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

            @psyke83
            The Hori controller is in fact a PS3 and PS4 compatible controller (with a switch to choose PS3/4 compatibility, but this doesn't seem to affect the driver).
            Will it use the Sony hid driver even if it's seen as a regular USB controller by the OS ?

            Anyway, please feel free to relocate the last few posts to your thread if you think it's more relevant.

            Yes, the sony-hid driver is used for both PS3 and PS4 controllers. However, I'm not very familiar with DS4 clone compatibility.

            Without this scriptmodule, the hid-sony kernel driver is used for DS3 pads via USB, while the ps3controller userspace driver claims the input device on the Bluetooth connection, but names the controller differently (without the manufacturer prefix). You may have noticed that on a fresh install, if you map buttons via USB, then install ps3controller and pair, you have to map them again - that's because of the name discrepancy. When using this scriptmodule, the hid-sony driver is used on USB and Bluetooth connections, and thus shares the same name for both.

            What happens if you pair your DS3 pad, unplug the Hori and then plug in again? Does the Hori display a player led for you to tell if it's player 1/2/3/4?

            SanoS 1 Reply Last reply Reply Quote 0
            • SanoS
              Sano @psyke83
              last edited by Sano

              @psyke83
              I have to say that I configured the Hori on the fresh install, then installed sixaxis, and didn't have to reconfigure the HORI.
              Unfortunately too, the Hori controller doesn't have LEDs for player number...

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

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

                @psyke83
                I have to say that I configured the Hori on the fresh install, then installed sixaxis, and didn't have to reconfigure the HORI.
                Unfortunately too, the Hori controller doesn't have LEDs for player number...

                Well, that's the expected behaviour since it's a USB-only pad, right? Only the hid-sony driver will be used, since ps3controlleronly intercepts BT connections. I was talking about actual DS3 controllers re: the name discrepancy.

                1 Reply Last reply Reply Quote 0
                • SanoS
                  Sano
                  last edited by Sano

                  @meleu @psyke83
                  I unplugged the Hori stick and plugged a Dragonrise joystick.

                  The behaviour of the jslist executable is the same :

                  First jslist call with only the USB controller, second just after the DS3 connected (without unplugging the USB controller)

                  pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                  0:DragonRise Inc.   Generic   USB  Joystick  
                  pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                  0:Sony PLAYSTATION(R)3 Controller
                  1:DragonRise Inc.   Generic   USB  Joystick  
                  

                  So apparently the fact that the HORI is a PS3 compatible device is not relevant.

                  Same symptoms :
                  Retroarch (and the OS) considers the USB plugged joystick as the first one, but jslist identifies the DS3 with the index 0.
                  The joystick selection tool updates retroarch config to use the index 0 (the wanted DS3), but index 0 for retroarch is the Dragonrise (or Hori previously).

                  I don't know if I'm clear enough, here... It's 1 am, sorry :)

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

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

                    @meleu @psyke83
                    I unplugged the Hori stick and plugged a Dragonrise joystick.

                    The behaviour of the jslist executable is the same :

                    pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                    0:DragonRise Inc.   Generic   USB  Joystick  
                    pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                    0:Sony PLAYSTATION(R)3 Controller
                    1:DragonRise Inc.   Generic   USB  Joystick  
                    

                    So apparently the fact that the HORI is a PS3 compatible device is not relevant.

                    Same symptoms :
                    Retroarch considers the USB plugged joystick as the first one, but jslist identifies the DS3 with the index 0.
                    The joystick selection tool updates retroarch config to use the index 0 (the wanted DS3), but index 0 for retroarch is the Dragonrise (or Hori previously).

                    I don't know if I'm clear enough, here... It's 1 am, sorry :)

                    I've had a long day too, need to sleep :). I'll pick this up tomorrow and do some testing here, as to be quite frank, I've never used the controller selection functionality, so I'll need to delve into the scripts and see what's happening. The problem is that I've only got two DS3 controllers, so I'm not sure how I'll distinguish changes. The controller LED probably corresponds to the kernel js index; if a script or retroarch etc. changes the LED manually via a sysfs node, then perhaps the node location has changed in the updated driver. I vaguely recall that the new hid-sony driver dropped its LED-specific code to use the generic kernel LED support.

                    1 Reply Last reply Reply Quote 0
                    • SanoS
                      Sano
                      last edited by Sano

                      If you want to reproduce this :

                      • first install @meleu joystick selection
                      • plug only an USB controller (preferably not a DS3 for test purpose)
                      • get the controller index seen by jslist : /opt/retropie/supplementary/joystick-selection/jslist - it should be 0
                      • power on a DS3 and call jslist again - you will have the DS3 with index 0 and the USB controller with the index 1. The LED on the DS3 is player 1 (should in fact be player 2 as it's the second connected controller)
                      • launch a console one player game - the player one controller is the USB one
                      1 Reply Last reply Reply Quote 0
                      • SanoS
                        Sano
                        last edited by Sano

                        Morning tests :
                        More logs, woohoo !
                        Hori detected at boot (as input0):

                        [Sat Mar 10 09:35:27 2018] input: HORI CO.,LTD. Fighting Stick mini 4 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0F0D:0088.0001/input/input0
                        [Sat Mar 10 09:35:27 2018] hid-generic 0003:0F0D:0088.0001: input,hidraw0: USB HID v1.11 Gamepad [HORI CO.,LTD. Fighting Stick mini 4] on usb-3f980000.usb-1.3/input0
                        

                        DS3 connecting through BT (as input1) :

                        [Sat Mar 10 09:37:26 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1
                        [Sat Mar 10 09:37:26 2018] sony 0005:054C:0268.0002: input,hidraw1: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:b3:70:3c
                        

                        Still jslist returns apparently false index and DS3 player 1 LED is on :

                        pi@retropie:~/RetroPie-Setup $ /opt/retropie/supplementary/joystick-selection/jslist 
                        0:Sony PLAYSTATION(R)3 Controller
                        1:HORI CO.,LTD. Fighting Stick mini 4
                        

                        Out of curiosity, I also tried to plug the DS3 through USB, aaaaaannnd :

                        [Sat Mar 10 09:43:32 2018] usb 1-1.5: new full-speed USB device number 5 using dwc_otg
                        [Sat Mar 10 09:43:33 2018] usb 1-1.5: New USB device found, idVendor=054c, idProduct=0268
                        [Sat Mar 10 09:43:33 2018] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
                        [Sat Mar 10 09:43:33 2018] usb 1-1.5: Product: PLAYSTATION(R)3 Controller
                        [Sat Mar 10 09:43:33 2018] usb 1-1.5: Manufacturer: Sony
                        [Sat Mar 10 09:43:33 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:054C:0268.0003/input/input2
                        [Sat Mar 10 09:43:33 2018] sony 0003:054C:0268.0003: input,hiddev0,hidraw1: USB HID v81.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-3f980000.usb-1.5/input0
                        

                        The jslist output is ok, the USB connected DS3 has index 1, and Hori has index 0...

                        pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                        0:HORI CO.,LTD. Fighting Stick mini 4
                        1:Sony PLAYSTATION(R)3 Controller
                        

                        Moreover, adding another DS3 (using BT this time) :

                        [Sat Mar 10 09:46:10 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:0268.0004/input/input3
                        [Sat Mar 10 09:46:10 2018] sony 0005:054C:0268.0004: input,hidraw2: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:b3:70:3c
                        
                        pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                        0:Sony PLAYSTATION(R)3 Controller
                        1:HORI CO.,LTD. Fighting Stick mini 4
                        2:Sony PLAYSTATION(R)3 Controller
                        

                        Here the BT connected DS3 took index 0, Hori shifted to index 1 and USB connected DS3 to index 2...

                        So to resume this mess :
                        USB connected DS3 are listed correctly by jslist (index follows the connection order)
                        BT connected PS3 seem to have precedence : they always take the first controller indexes according to jslist, shifting all other controllers indexes upward.
                        The issue is that OS and retroarch doesn't act the same and apparently rely on connection order for controller indexes.

                        My opinion is that SDL joystick index used in jslist is somewhat different from the OS (and apparently retroarch) used index.
                        It's like the BT connected DS3 always get the lowest index for SDL, instead of taking the next available as it should.

                        Hope this could help.

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

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

                          @psyke83
                          Thank you for replying me.
                          As asked i try to install custombluez from source but it fail with the following error

                          I'll be busy today, but when I get some time, I'll re-flash a jessie image to identify what packages I've missed - which I'm assuming is what's causing the build error.

                          If you can post the full log, it would be helpful. A quick way to identify what may be missing is:
                          sudo apt-get build-dep bluez

                          ...but you may need to edit your sources lists in /etc/apt/ to enable the deb-src lines, and then update your apt-get repository, for it to work.

                          I'll get around to flashing jessie soon, but don't feel obliged to help with the issue of building from source. What will really be helpful from you is feedback on whether Gasia controllers work correctly via Bluetooth. Confirming that both types of third-party controllers work will be a positive step towards knowing if we can phase out the ps3controllerdriver entirely.

                          Thanks!

                          @Sano - much appreciated for the detailed information. I'll look into this soon, but I'm at a bit of disadvantage, as I don't have any controllers besides the two DS3s to test.

                          One thing that you could possibly try is to uninstall customhidsonyafter installing sixaxis. Bluetooth pairing will actually work with the old hid-sony kernel driver. You may need to remap the controller again, and the 10 minute disconnect won't be possible, but it may be helpful to know if the strange controller ordering behaviour differs between different versions of the hid-sonydriver, or if the problem is caused elsewhere.

                          SanoS M 2 Replies Last reply Reply Quote 0
                          • SanoS
                            Sano @psyke83
                            last edited by

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

                            @Sano - much appreciated for the detailed information. I'll look into this soon, but I'm at a bit of disadvantage, as I don't have any controllers besides the two DS3s to test.
                            One thing that you could possibly try is to uninstall customhidsonyafter installing sixaxis. Bluetooth pairing will actually work with the old hid-sony kernel driver. You may need to remap the controller again, and the 10 minute disconnect won't be possible, but it may be helpful to know if the strange controller ordering behaviour differs between different versions of the hid-sonydriver, or if the problem is caused elsewhere.

                            Done !
                            Uninstalled customhidsony and rebooted.
                            The BT DS3 still connect, and the behavior is the same :(
                            dmesg -Toutput :

                            [Sat Mar 10 13:26:31 2018] input: HORI CO.,LTD. Fighting Stick mini 4 as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:0F0D:0088.0001/input/input0
                            [Sat Mar 10 13:26:31 2018] hid-generic 0003:0F0D:0088.0001: input,hidraw0: USB HID v1.11 Gamepad [HORI CO.,LTD. Fighting Stick mini 4] on usb-3f980000.usb-1.3/input0
                            ...
                            [Sat Mar 10 13:27:19 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0002/input/input1
                            [Sat Mar 10 13:27:19 2018] sony 0005:054C:0268.0002: input,hidraw1: BLUETOOTH HID v0.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:b3:70:3c
                            

                            jslist output before and after connecting DS3 by BT :

                            pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                            0:HORI CO.,LTD. Fighting Stick mini 4
                            pi@retropie:~ $ /opt/retropie/supplementary/joystick-selection/jslist 
                            0:Sony PLAYSTATION(R)3 Controller
                            1:HORI CO.,LTD. Fighting Stick mini 4
                            

                            Still retroarch considers the USB stick to be the first controller.
                            Maybe a change in sixaxis driver, or in SDL controller mapping...
                            This was definitely working back with jessie image :(

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

                              @Sano

                              Thanks. Despite it being a PS3-compatible, the hid-sony driver doesn't grab your Hori, as it's using hid-generic. Not sure if that's relevant, though.

                              I'm fairly certain this isn't a stretch issue, but you could confirm it's not by removing sixaxis, customhidsony and custombluez (if you ever installed it), and reinstall the standard ps3controller driver. If the ordering issue is fixed, then at least we'll know it's caused by hid-sony/my PR and not the distribution upgrade.

                              SanoS 1 Reply Last reply Reply Quote 0
                              • SanoS
                                Sano @psyke83
                                last edited by Sano

                                @psyke83
                                As the behaviour is the same with a non-sony compatible USB controller - Dragonrise, see my previous messages - I think we can conclude that the HORI Sony compatibility is not relevant.

                                Edit : removed your branch and installed basic sixad driver, and unfortunately all is back to normal :

                                [Sat Mar 10 13:49:35 2018] input: PLAYSTATION(R)3 Controller as /devices/virtual/input/input3
                                

                                SDL controller indexes are now in the correct (connection) order:

                                pi@retropie:~/RetroPie-Setup $ /opt/retropie/supplementary/joystick-selection/jslist 
                                0:HORI CO.,LTD. Fighting Stick mini 4
                                1:PLAYSTATION(R)3 Controller
                                

                                And the LED on the DS3 is Player 2 (as it should be)...

                                @meleu you can take a breath, mate ;)

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

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

                                  If you can post the full log, it would be helpful. A quick way to identify what may be missing is:
                                  sudo apt-get build-dep bluez

                                  ...but you may need to edit your sources lists in /etc/apt/ to enable the deb-src lines, and then update your apt-get repository, for it to work.

                                  No problem, soon as possible i will report back with the information you asked and will try a gaisa controller to see if it's working.
                                  In the meantime here is the full log

                                  Thank you

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

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

                                    A quick way to identify what may be missing is:
                                    sudo apt-get build-dep bluez
                                    ...but you may need to edit your sources lists in /etc/apt/ to enable the deb-src lines, and then update your apt-get repository, for it to work.

                                    I edited the sources.list file uncommenting deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
                                    Removed custombluez and sixaxis driver to start from scratch.
                                    Then i execute sudo apt-get update and sudo apt-get build-dep bluez and it didn't give any problem

                                    Reading package lists... Done
                                    Building dependency tree
                                    Reading state information... Done
                                    The following NEW packages will be installed:
                                      dh-systemd libcap-ng-dev libdbus-glib-1-dev libical-dev libreadline-dev libreadline6-dev libtinfo-dev
                                    0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
                                    Need to get 0 B/697 kB of archives.
                                    After this operation, 2,282 kB of additional disk space will be used.
                                    Do you want to continue? [Y/n] y
                                    Selecting previously unselected package libcap-ng-dev.
                                    (Reading database ... 92387 files and directories currently installed.)
                                    Preparing to unpack .../libcap-ng-dev_0.7.4-2_armhf.deb ...
                                    Unpacking libcap-ng-dev (0.7.4-2) ...
                                    Selecting previously unselected package libdbus-glib-1-dev.
                                    Preparing to unpack .../libdbus-glib-1-dev_0.102-1_armhf.deb ...
                                    Unpacking libdbus-glib-1-dev (0.102-1) ...
                                    Selecting previously unselected package libical-dev.
                                    Preparing to unpack .../libical-dev_1.0-1.3_armhf.deb ...
                                    Unpacking libical-dev (1.0-1.3) ...
                                    Selecting previously unselected package libtinfo-dev:armhf.
                                    Preparing to unpack .../libtinfo-dev_5.9+20140913-1+deb8u2_armhf.deb ...
                                    Unpacking libtinfo-dev:armhf (5.9+20140913-1+deb8u2) ...
                                    Selecting previously unselected package libreadline6-dev:armhf.
                                    Preparing to unpack .../libreadline6-dev_6.3-8_armhf.deb ...
                                    Unpacking libreadline6-dev:armhf (6.3-8) ...
                                    Selecting previously unselected package libreadline-dev:armhf.
                                    Preparing to unpack .../libreadline-dev_6.3-8_armhf.deb ...
                                    Unpacking libreadline-dev:armhf (6.3-8) ...
                                    Selecting previously unselected package dh-systemd.
                                    Preparing to unpack .../dh-systemd_10.2.2~bpo8+1_all.deb ...
                                    Unpacking dh-systemd (10.2.2~bpo8+1) ...
                                    Processing triggers for man-db (2.7.5-1~bpo8+1) ...
                                    Processing triggers for install-info (5.2.0.dfsg.1-6) ...
                                    Setting up libcap-ng-dev (0.7.4-2) ...
                                    Setting up libdbus-glib-1-dev (0.102-1) ...
                                    Setting up libical-dev (1.0-1.3) ...
                                    Setting up libtinfo-dev:armhf (5.9+20140913-1+deb8u2) ...
                                    Setting up libreadline6-dev:armhf (6.3-8) ...
                                    Setting up libreadline-dev:armhf (6.3-8) ...
                                    Setting up dh-systemd (10.2.2~bpo8+1) ...
                                    

                                    Then installed sixaxis and then i try to install againg custombluez from source but it failed

                                    /home/pi/RetroPie-Setup/tmp/build/custombluez/build-area/bluetooth_5.48-1~rpi1_all.deb not found
                                    

                                    Installed custombluez from binaries and try to pair a Gaisa controller but it is not working.
                                    The lights on the controller keep flashing for a few seconds and then turn off.
                                    With the command dmesg -T it seems that the controller try to connect but it fails

                                    [Sun Mar 11 11:32:12 2018] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
                                    [Sun Mar 11 11:32:12 2018] Bluetooth: HIDP socket layer initialized
                                    [Sun Mar 11 11:32:12 2018] sony 0005:054C:0268.0004: unknown main item tag 0x0
                                    [Sun Mar 11 11:32:12 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0004/input/input3
                                    [Sun Mar 11 11:32:12 2018] sony 0005:054C:0268.0004: input,hidraw2: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:eb:7f:b8
                                    [Sun Mar 11 11:33:07 2018] sony 0005:054C:0268.0005: unknown main item tag 0x0
                                    [Sun Mar 11 11:33:07 2018] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:0268.0005/input/input4
                                    [Sun Mar 11 11:33:07 2018] sony 0005:054C:0268.0005: input,hidraw2: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:eb:7f:b8
                                    

                                    At your disposal if you want me to try anything else.

                                    Thank you again for your help.

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

                                      @MadHorse

                                      I'll sort out the issue building from source, so you don't need worry about that. What would help is to capture some bluetooth logging. In an SSH session, execute bluetoothctl. Once launched, it will print Bluetooth events/errors as well as providing a command prompt (bluetooth#).

                                      Three pieces of information will be helpful (but don't try to pair the controller when capturing output for steps 1-2):

                                      1. Verify that bluetooth upgraded correctly to version 5.48. Type in the console:
                                        version
                                      2. When you launch bluetoothctl, it lists paired devices prefixed with [NEW] - your PS3 controller should be in this list. Query the information of your controller (replace 12:34:56:78:9a:bc with the actual MAC address that's shown for your controller):
                                        info 12:34:56:78:9a:bc
                                      3. While the bluetoothctl console is still open, type nothing, but attempt to pair your controller. Capture any new output that appears during this time for me to inspect.

                                      This should help give me an idea of the next step - thanks.

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

                                        @psyke83

                                        ok, i try what you asked me, started with a newly installed retropie 4.3, i was configuring a retropie for a firend and i used it for tests, but i had to give it back to him.
                                        So, after a full update, the following are the results:

                                        1. The bluetooth version is 5.48
                                          bluetoothctl
                                          [NEW] Controller B8:27:EB:EB:7F:B8 retropie [default]
                                          Agent registered
                                          [bluetooth]# version
                                          Version 5.48
                                          
                                          I don't know if could be usefull, but these are the information when registering the device
                                          [CHG] Controller B8:27:EB:EB:7F:B8 Discovering: yes
                                          [NEW] Device F8:52:1E:8F:5C:7E F8-52-1E-8F-5C-7E
                                          [NEW] Device 00:26:5C:5D:BD:00 Sony PLAYSTATION(R)3 Controller
                                          [CHG] Device 00:26:5C:5D:BD:00 Trusted: yes
                                          [CHG] Device 00:26:5C:5D:BD:00 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
                                          [CHG] Controller B8:27:EB:EB:7F:B8 Discovering: no
                                          [CHG] Device F8:52:1E:8F:5C:7E RSSI is nil
                                          [DEL] Device F8:52:1E:8F:5C:7E F8-52-1E-8F-5C-7E 
                                          
                                        2. Yes, int the list there is my controller [NEW] Device 00:26:5C:5D:BD:00 Sony PLAYSTATION(R)3 Controller here the info
                                          [bluetooth]# info 00:26:5C:5D:BD:00
                                          Device 00:26:5C:5D:BD:00 (public)
                                                  Name: Sony PLAYSTATION(R)3 Controller
                                                  Alias: Sony PLAYSTATION(R)3 Controller
                                                  Paired: no
                                                  Trusted: yes
                                                  Blocked: no
                                                  Connected: no
                                                  LegacyPairing: no
                                                  UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
                                                  Modalias: usb:v054Cp0268d0000
                                          
                                        3. Now, the output when i try to pair the controller:
                                          [CHG] Device 00:26:5C:5D:BD:00 Class: 0x00000540
                                          [CHG] Device 00:26:5C:5D:BD:00 Icon: input-keyboard
                                          [CHG] Device 00:26:5C:5D:BD:00 Connected: yes
                                          [Sony PLAYSTATION(R)3 Controller]#
                                          
                                          At this point after a few seconds the light on the controller turned off, and two more lines are displayed on the console
                                          [CHG] Device 00:26:5C:5D:BD:00 ServicesResolved: no
                                          [CHG] Device 00:26:5C:5D:BD:00 Connected: no
                                          

                                        Hope this can be of help.
                                        If i can do anything else let me know.

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

                                          @MadHorse

                                          This is somewhat encouraging. My guess is that the BlueZ stack has already cached a generic (and incorrect) HID profile for your controller, most likely when you paired via the ps3controller driver or an older BlueZ stack version.

                                          The Shanwan and Gasia controllers do not pass a correct SDP (Service Discovery Protocol) record via Bluetooth, which is needed for BlueZ to know what HID profile to apply. This doesn't matter on a real PS3, but causes problems on BlueZ until version 5.48, where a correct record is now forced for all controllers. When no SDP record is passed to the stack, a controller will enumerate a input-keyboardHID profile and fail to pair correctly.

                                          The potential solution is for you to remove the device from the Bluetooth stack and re-pair so that a new profile will be created. In the bluetoothctl prompt:

                                          remove 00:26:5C:5D:BD:00

                                          Once this is done, go through the process of pairing your controller from the RetroPie bluetooth menu once again.

                                          Hopefully it will pair correctly now, and you'll see Icon: input-gaming in the profile information, indicating that the correct SDP record has been applied.

                                          If you still have no success, the output of this may help:
                                          cat /var/log/syslog | grep -e blue -e sixaxis

                                          1 Reply Last reply Reply Quote 0
                                          • SanoS
                                            Sano
                                            last edited by

                                            @psyke83
                                            Regarding the (apparently) wrong SDL controller index, don't hesitate to ask if you need more informations or tests.

                                            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.