Setting up PS3 controllers on Retropie (Gasia/ Shanwan clones)

If you like retro-gaming you probably came across RetroPie, which allows to turn your Raspberry Pi into a retro-gaming machine.

RetroPie supports game-controllers of many different brands, however it can be difficult to configure them, especially if you chose a wireless (bluetooth) controller. I decided for a wireless Sony PS3 controller and purchased a pair of “compatible” devices from Aliexpress a.k.a. Gasia/Shanwan clones.

IMG_7667a

The RetroPie Wiki  provides some useful information on how to pair these controllers with a bluetooth dongle. At the moment RetroPie supports PS3 controllers using the sixad daemon, which is part of the QtSixA package.

The QtSixA  Sixaxis Joystick Manager can connect PS3 hardware, but it takes over bluez/ bluetoothd service and other bluetooth devices, so that keyboards or mice can’t connect when sixad is active.

Thus, I was wondering why there is no ‘native’ bluez support for PS3 devices. A Google search revealed that bluez comes with a ‘sixaxis’ plugin supporting only “genuine” PS3 controllers. However, I found on the gmane mailing list that bluez patches are currently under development, but none of them made it into an official or main developer branch, yet.

BlueZ PS3 support using the Sixaxis plugin

Fortunately Szymon Janc, one of the bluez developers, provided some patches for the OpenELEC.tv Mediacenter. [Update: 2016-09-28] However, development of OpenELEC.tv seems to be dead, since there were no updates for quite a while. Therefore, I do not expect that patches supporting other PS3 clones will be released soon.

Here is a short tutorial on how to use these patches for RetroPie and to fix the annoying PS3 Shanwan/Gasia pairing problem:

117
Leave a Reply

40 Comment threads
77 Thread replies
6 Followers
 
Most reacted comment
Hottest comment thread
32 Comment authors
  Subscribe  
Notify of
ryan groth

For the sake of google searchers everywhere. I picked up a “FiveStar” PS3 clone controller pair for $20 on Amazon. They recognize as gaisa controllers on an RP3. I could not get the native bluetooth stack to recognize the controller OR the retropie default sixaxis driver to recognize the controller. A combination of luetzel’s bluetooth build and supertypo’s qtsixa github repo were the trick. A couple of notes though– I removed bluez native which removes bluetooth-pi3, you have to install THIS bluez package from “make install”, then reinstall package bluetooth-pi3. Remove any old sixaxis and install sypertypo’s version sixaxis and… Read more »

Daniele

Hi Martin, Thank you really much, at the end I finally got my ps3 controller paired with internal RPI 3 bluetooth! After the installation of sixpair I always got: 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 Rebooting rpi everything worked at the first try! Thank you again Daniele

Would you kindly explain how you managed to overcome the invalid MAC issue? With Jessie running fresh on an Rpi3, I installed RetroPie and Kodi, dropped to a shell, pulled the patched BlueZ and QtSixA sources, and compiled. My Gasia controller paired just fine and passed a jstest with flying colors, but my integrated Bluetooth started spitting out a MAC of AA:AA:AA:AA:AA:AA following a reboot D=

Would you kindly explain how you managed to overcome the invalid MAC issue? With Jessie running fresh on an Rpi3, I installed RetroPie and Kodi, dropped to a shell, pulled the patched BlueZ and QtSixA sources, and compiled. My Gasia controller paired just fine and passed a jstest with flying colors, but my integrated Bluetooth started spitting out a MAC of AA:AA:AA:AA:AA:AA following a reboot and won’t snap out of it D=

Crescendo

I refine my approach. Using Luetzels’ patched Bluez, the sixad can share control with Bluez (tested using bt mouse while PS3 Shanwan connected, in Raspbian desktop). No more need of sixad –boot-no or –stop after using retropie, just install this patched Bluez, then Shanwan sixad, reboot, then its working like a boss.. Yes, without this patched Bluez, it can’t share control with sixad. Thanks so much Luetzels….

daniele

Thank you very much for your great job! I’m following your steps on raspberry pi3 with a fresh RetroPie 4 and shanwan ps3 controllers. I get stuck in step 4: after compile and installation of bluez from your repo, when I try to restart bluetooth service I get the messagge: pi@retropie:~ $ sudo service bluetooth restart Failed to restart bluetooth.service: Unit bluetooth.service is masked. To be sure I’ve reboot my raspberry. Going on with your step, whit hciconfig I don’t get any result (internal rpi3 bluetooth is not showed). So I disable the internal rpi3 bluetooth (adding the line “dtoverlay=pi3-disable-bt”… Read more »

daniele

just noticied: pi@retropie:~ $ sudo hciconfig hci0 up pscan iscan pi@retropie:~ $ hciconfig hci0: Type: Primary Bus: USB BD Address: 00:02:72:CF:9E:29 ACL MTU: 1022:8 SCO MTU: 121:3 UP RUNNING ISCAN RX bytes:1052 acl:0 sco:0 events:51 errors:0 TX bytes:698 acl:0 sco:0 commands:51 errors:0 but I’m still missing pscan… Thank you Daniele

Crescendo

I paste the terminal output to pastebin for easier reading…. http://pastebin.com/WjbmtphX

Crescendo

After doing everything exactly described in this post, I still can’t make the controller to connect to RPi3, not even on clean Raspbian install (latest + rpi-update). Could you please shed some light to my problem? This is the terminal output of mine: pi@CF-RPi3:~ $ sudo bluetoothctl [NEW] Controller B8:27:EB:E3:D4:48 CF-RPi3 [default] [NEW] Device 03:81:98:A1:63:25 PLAYSTATION(R)3 Controller [NEW] Device 03:8C:85:9D:63:25 PLAYSTATION(R)3 Controller [bluetooth]# agent on Agent registered [bluetooth]# default-agent Default agent request successful [bluetooth]# pairable on Changing pairable on succeeded [bluetooth]# discoverable on Changing discoverable on succeeded [CHG] Device 03:81:98:A1:63:25 Connected: yes [CHG] Device 03:81:98:A1:63:25 Connected: no [bluetooth]# exit Agent… Read more »

Thomas Messmer

I had also a lot of problems to get Gasia and Shanwan Controllers to work. No solution I found worked. But now I found a realy simple way to get them working. Have a look at this page where I described the very simple solution which was the only one which worked for me!! http://thomas-messmer.com/index.php/howtos/67-retropie-controller-pairing-problems Hopefully It will work for others too.

subs

Hey just to say on a fresh 4.0.2 retropie, i had to : sudo apt-get install libreadline-gplv2-dev libical-dev libjack-dev libusb-dev + it ain’t working for my GAsia controller. No wonder, the sixaxis plugin patches just handle shanwans

Nicky

Hi Martin, I can’t seem to get my controller connected. Connected to USB it says “SHANWAN”, connected over bluetooth it says “PLAYSTATION(R)3Conteroller-PANHAI” It seems like the bluetooth authentication process is not being handled correctly. I’m not familiar enough with bluetooth to know, but could the misspelled name do any wrong? Or could it be something with the “PANHAI’ type bluetooth controller is sending bytes in a different order than expected (cfr : https://github.com/nefarius/ScpToolkit/issues/241) When I try to pair the device with my PS3, it seems to work fine. Log of trying to connect : pi@retropie:~/qtsixa-1.5.0/utils/bins $ sudo bluetoothctl [NEW] Controller… Read more »

Hjalte

Hi again, purged bluez* and had a rerun with the 5.41 version – successfully connected to both controllers simultaneously in the first try, mapped beautifully to /dev/input/js0 & js1. However, after a short while the connection is lost, and I think bluetoothctl is getting confused as to what is connected and what is not, and I can’t reconnect. (btw had to force ISCAN with $hciconfig hci0 piscan). Will give it a go on the raspberry as soon as possible.