RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    SHANWAN / PS3 CONTROLLER Pi3 RETROPIE 3.6 BLUETOOTH SETUP

    Scheduled Pinned Locked Moved Help and Support
    255 Posts 33 Posters 215.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.
    • luetzelL
      luetzel @pablo
      last edited by

      @pablo
      Hi Pablo,
      your controller looks like a "genuine" SONY controller, is that correct? IMHO it shouldn't be necessary to patch bluez for a genuine controller.

      However, the output of sixpair looks suspicious to me. Did you run it as root (sudo ./sixpair)?

      Did you read the posts about the broken internal bluetooth support on Pi3 in this forum?

      When you press the PS button on your controller, does bluetoothctl (at least temporarily) show a "Connected: yes"? for the
      PLAYSTATION(R)3 Controller?

      P 1 Reply Last reply Reply Quote 1
      • P
        pablo @luetzel
        last edited by

        Hi @luetzel ... It's most definitely a generic clone of some description, but it gets picked up everywhere that I can see as if it's a genuine controller.

        The reason why I've been trying this route is because I've had absolutely no luck whatsoever with the mainstream method as implimented in RetroPie by default.

        I definitely did run it as root, yes.

        I will do a bit of experimenting when I'm home later just to be 100% sure about the connection, but it's never been able to connect at all from what I've been able to get out of the terminal. No rumble. Just red flashing lights until it times out.

        My understanding is that the bluetooth, although buggy, should at least be able to establish the connection. Many people have noted here (https://github.com/raspberrypi/linux/issues/1360) that they have had success with the latest kernel.

        Is there any other sort of message dump I could do to try and troubleshoot this?

        luetzelL 1 Reply Last reply Reply Quote 0
        • luetzelL
          luetzel @pablo
          last edited by luetzel

          @pablo
          Hi Pablo,
          so far I haven't had any problems with Pi3 and the onboard bluetooth. As discussed above in this thread with Wolfman100, I was able to pair my PS3 clone on a Pi3/OSMC, on a desktop PC/openSuSE as well as Raspbian/Pi2 with a cheap 0.7 USD USB bluetooth dongle.
          You're looking at essentially the same message dumps as I did. Again here is the output of 'dmesg', after plugging the controller via USB:

          [ 98.814041] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
          [ 98.920401] usb 1-1.2: New USB device found, idVendor=054c, idProduct=0268
          [ 98.920430] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
          [ 98.920447] usb 1-1.2: Product: PS(R) Gaepad [ 98.920462] usb 1-1.2: Manufacturer: ShanWan [ 109.085647] input: ShanWan PS(R) Gaepad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0002/input/input1
          [ 109.091110] sony 0003:054C:0268.0002: input,hiddev0,hidraw1: USB HID v1.10 Joystick [ShanWan PS(R) Ga`epad] on usb-3f980000.usb-1.2/input0

          It shows the same vendor/Product id as your controller. Here is the output of sixpair:

          sudo sixpair
          Current Bluetooth master: 00:1b:10:00:2a:ec
          Setting master bd_addr to 00:1b:10:00:2a:ec

          I noticed that it may take some time until the controller is recognized. If it doesn't work immediately, wait for a minute
          and run sudo sixpair again. You should be able to see a real HW address instead of AA:AA:AA:AA:AA:AA.

          If it doesn't help, check with bluetoothctl what happens when you press the PS button on the controller. While its
          LEDs are flashing, you should see a "Connected" message and the prompt changes to '[PLAYSTATION(R)3 Controller]#'
          When I tried '[PLAYSTATION(R)3 Controller]# pair 01:B6:AD:7F:63:25', I was asked for a passkey for authentication, but one cannot enter a passcode with the controller - that's why sixpair is required.

          sudo bluetoothctl
          [NEW] Controller 00:1B:10:00:2A:EC raspi5 [default]
          [NEW] Device 01:B6:AD:7F:63:25 PLAYSTATION(R)3 Controller
          [NEW] Device 01:B6:52:85:63:25 PLAYSTATION(R)3 Controller
          [NEW] Device 20:73:AB:91:DD:6F Bluetooth V3.0 Keyboard
          [CHG] Device 01:B6:52:85:63:25 Connected: yes

          [PLAYSTATION(R)3 Controller]# info 01:B6:AD:7F:63:25
          Device 01:B6:52:85:63:25
          Name: PLAYSTATION(R)3 Controller
          Alias: PLAYSTATION(R)3 Controller
          Class: 0x000540
          Icon: input-keyboard
          Paired: no
          Trusted: yes
          Blocked: no
          Connected: yes
          LegacyPairing: no
          UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
          Modalias: usb:v054Cp0268d0000

          Intriguingly 'info <hwaddress>' does not reveal a "Paired: yes", even if the controller is successfuly connected.

          However, if it still fails to connect, I would suggest to remove the device with bluetoothctl (remove <hwaddress>),
          before starting a new connection attempt with sixpair. Perhaps there is an old authentication key stored, which prevents
          authentication/pairing with the device.

          After pairing has been successful, 'dmesg' reveals:
          [ 1128.825246] input: PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:11/0005:054C:0268.0007/input/input6
          [ 1128.829122] sony 0005:054C:0268.0007: input,hidraw1: BLUETOOTH HID v0.00 Joystick [PLAYSTATION(R)3 Controller] on 00:1b:10:00:2a:ec

          P 1 Reply Last reply Reply Quote 1
          • P
            pablo @luetzel
            last edited by

            Hi @luetzel

            Regardless of what I do, I always get:

            pi@retropie:~/QtSixA-1.5.1/utils/bins $ sudo ./sixpair
            Current Bluetooth master: aa:aa:aa:aa:aa:aa
            Setting master bd_addr to aa:aa:aa:aa:aa:aa

            I've run sudo sixpair a million times. Nothing happens if I press the PS button on the controller in bluetoothctl either.

            I removed the device with bluetoothctl as suggested and tried to repair resulting in the same issue.

            I have a bit of time this weekend... I will try and investigate this further. I just wish I understood why the Pi3 doesn't have a proper bluetooth address. I'm not sure now if my Pi is faulty or if this is actually the root cause of everyone's Pi3 bluetooth woes... :(

            luetzelL B 2 Replies Last reply Reply Quote 0
            • luetzelL
              luetzel @pablo
              last edited by

              @pablo

              @pablo said in SHANWAN / PS3 CONTROLLER Pi3 RETROPIE 3.6 BLUETOOTH SETUP:

              Hi @luetzel
              [...]
              I have a bit of time this weekend... I will try and investigate this further. I just wish I understood why the Pi3 doesn't have a > proper bluetooth address. I'm not sure now if my Pi is faulty or if this is actually the root cause of everyone's Pi3
              bluetooth woes... :(

              Perhaps you could try an USB dongle instead of the internal BT device. Check the forum, there is a way to disable the onboard BT in /boot/config.txt.

              On the other hand, I'm not sure how the BT controller is recognized for pairing. As far as I understood, the patches
              should enable bluez to do this job, so that sixpair is not necessary. However, it doesn't work without sixpair, yet, at least with my controllers.

              Unfortunately, there's not much documentation available, except several posts on the gmane mailing list http://thread.gmane.org/gmane.linux.bluez.kernel/41069 . I haven't had enough time to dig in the code to see what's going on.

              1 Reply Last reply Reply Quote 1
              • B
                buddhastevend @pablo
                last edited by

                Hi @pablo and @luetzel
                I'm having this same problem with the:
                aa:aa:aa:aa:aa:aa
                Have you had any luck with getting yours to recognize the actual address and not this placeholder?

                P 1 Reply Last reply Reply Quote 0
                • Wolfman100W
                  Wolfman100
                  last edited by

                  @luetzel

                  I'm currently attempting to do my proper build and am getting a bit stuck when it comes to the QTsixA install this time around for some reason,no idea why as this didn't seem to be an issue before...

                  I am trying to do the 'make' for QtSixA but it terminates,I'm assuming because this time some dependencies are missing,I do however have no idea how to install these or how or where to get them...

                  osmc@osmc:~/QtSixA-1.5.1/utils$ make
                  mkdir -p bins
                  cc -O2 -Wall -Wl,-Bsymbolic-functions hidraw-dump.c -o bins/hidraw-dump
                  cc -O2 -Wall -Wl,-Bsymbolic-functions sixpair.c -o bins/sixpair pkg-config --cflags --libs libusb
                  Package libusb was not found in the pkg-config search path.
                  Perhaps you should add the directory containing `libusb.pc'
                  to the PKG_CONFIG_PATH environment variable
                  No package 'libusb' found
                  sixpair.c:9:17: fatal error: usb.h: No such file or directory
                  #include <usb.h>
                  ^
                  compilation terminated.
                  Makefile:12: recipe for target 'tools' failed
                  make: *** [tools] Error 1

                  B luetzelL 2 Replies Last reply Reply Quote 0
                  • B
                    buddhastevend @Wolfman100
                    last edited by

                    Hi @Wolfman100

                    You can download pkg-config and libusb with:

                    sudo apt-get install libusb-dev pkg-config

                    Hopefully this helps.

                    1 Reply Last reply Reply Quote 0
                    • luetzelL
                      luetzel @Wolfman100
                      last edited by

                      @Wolfman100
                      Hi Wolfman,

                      as a rule of thumb: If something like this happens, you have to install the header files, necessary for compilation. If libusb is missing, just do an apt-get install libusb-dev. Usually it is enough to append a '-dev' to the missing library. If it doesn't help, you can search with 'aptitude search <package>' for the desired <package>.
                      You may also find some build instructions within the README of QtSixA.

                      /luetzel

                      1 Reply Last reply Reply Quote 1
                      • Wolfman100W
                        Wolfman100
                        last edited by

                        @buddhastevend @luetzel Thanks guys, will look into this now.:)

                        1 Reply Last reply Reply Quote 0
                        • Wolfman100W
                          Wolfman100
                          last edited by

                          @buddhastevend @luetzel

                          After installing necessary packages I am very happy to report that I have now Paired the controller succesfully first time!

                          I am using the latest 3.8 RetroPie inside OSMC and am hoping that the pairing will survive a reboot as apparently this had been fixed in Retropie 3.8...let's see what happens

                          1 Reply Last reply Reply Quote 1
                          • Wolfman100W
                            Wolfman100
                            last edited by

                            Sweet mother of God it appears that it has indeed survived a reboot and connects first time no-problem!Can also report bluetooth keyboard is also working simultaneously without issues..

                            1 Reply Last reply Reply Quote 1
                            • Wolfman100W
                              Wolfman100
                              last edited by

                              Now all I need to do is locate the Roms folder in 3.8 which seems to have changed location or name....

                              B 1 Reply Last reply Reply Quote 1
                              • B
                                buddhastevend @Wolfman100
                                last edited by

                                @Wolfman100
                                Should be the same location in 3.8:
                                /home/pi/RetroPie/roms

                                At least mine didn't change.

                                I can pick up and see my controllers in bluetooth, they just will not pair. I know it has to do with my Pi3 onboard registering the aa:aa:aa:aa:aa:aa address instead of its actual hwaddress. I cannot find a way to to make it reset itself either.

                                Wolfman100W 1 Reply Last reply Reply Quote 0
                                • Wolfman100W
                                  Wolfman100 @buddhastevend
                                  last edited by

                                  @buddhastevend I'm guessing that you have RetroPi installed as standalone from your filepath?

                                  I have RetroPi installed 'inside' OSMC,so the filepath will be different.

                                  From my rudimentary knowledge,I would suggest possibly re-installing Bluez and making sure that you have the latest QtSixA which is actually version 5.1,not 4.9.

                                  B 1 Reply Last reply Reply Quote 0
                                  • B
                                    buddhastevend @Wolfman100
                                    last edited by

                                    @Wolfman100

                                    Oh yeah. I already have the latest version of Bluez and QtSixA.

                                    Oh yeah, forgot you were running it inside OSMC. It still shouldn't be to different than that though, maybe just buried a couple further down.

                                    I feel like I should play with OSMC now, with retropie inside it.

                                    1 Reply Last reply Reply Quote 0
                                    • P
                                      pablo @buddhastevend
                                      last edited by

                                      Hi @buddhastevend

                                      I am gonna try with a clean 3.8 image tonight and see if the aa:aa:aa:aa:aa:aa situation changes. When I tried to update 3.7 to 3.8 using the setup script it ran through cleanly, but after a reboot I lost any and all access to both wireless and bluetooth. The OS couldn't even detect the devices.

                                      1 Reply Last reply Reply Quote 0
                                      • Wolfman100W
                                        Wolfman100
                                        last edited by

                                        @buddhastevend

                                        You sound like you had similar issues to me.I should imagine that 3.8 may well solve your issue if your correctly follow @luetzels guide.

                                        1 Reply Last reply Reply Quote 0
                                        • Wolfman100W
                                          Wolfman100
                                          last edited by

                                          @luetzel folder problems solved...wierd SSH issue.

                                          One thing though,it appears that the Bluez folder and Sixpair folders are installed so they are visible within the browser in OSMC.Can I move these folders so they are out of view and cannot be messed with and everything will still work correctly?They were not visible before,I think because I must have installed as 'Sudo' Root user

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            buddhastevend
                                            last edited by

                                            Already had 3.8 and updated Bluez and QtSixA. There's something wrong with some people's bluetooth hardware addresses.

                                            I got it working no problem with a dongle I had, so I know it's the onboard bluetooth, and I'm done messing with it for now.

                                            As far as hiding those, I have to play with OSMC more before I could tell you that.

                                            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.