PS3 Controller - Bluez
-
Howdy,
I've got two ShanWan PS3 controllers connected successfully to my Pi2. Pairing using 'sixad' works, but it breaks occasionally connection of my BT-keyboard and mouse.
It seems that bluez support for these controllers (also clones) is almost ready, since some patches appeared in the OpenELEC.tv github repo.
https://github.com/OpenELEC/OpenELEC.tv/tree/master/packages/network/bluez/patches
When I patched bluez 5.39, it compiled without errors, however, the bluez sixaxis plugin failed to load on bluetoothd service start with an "undefined symbol: sdp_data_alloc".
I would like to encourage everyone having trouble with the original or cloned PS3 controllers to post their issues on github, in order to encourage the developers to fix bluez asap.
-
Update
It is now possible to pair PS3 controllers solely using bluez.
Szymon Janc, one of the bluez developers made some patches for bluez, supporting Gasia and Shanwan PS3 clones. They can be found on github and were made for the OpenELEC.tv media centre, however they didn't make it to the master branch, yet.
So here are instructions how to pair your PS3 controller using bluez:
1.) download the bluez-5.39 source from bluez.org
2.) apply the patches found on github: https://github.com/OpenELEC/OpenELEC.tv/tree/openelec-7.0/packages/network/bluez/patches
3.) goto bluez-5.39/src/bluetooh.ver and add the line: sdp_*; into the 'global' section. If you don't do it, the bluetoothd will not load the sixaxis plugin on startup because of undefined symbols
4.) run configure, make, make install
./configure --prefix=/usr --mandir=/usr/share/Current Bluetooth master: DE:AD:BE:EF:00:00
Setting master bd_addr to: 00:1F:81:00:06:20 man --sysconfdir=/etc --localstatedir=/var --enable-sixaxis
make -j3
sudo make install
5.) sudo service bluetooth restart
6.) download QtSixA from http://qtsixa.sourceforge.net/ and follow the instructions in the INSTALL file; you will only need the 'sixpair' program in the 'utils' subdirectory. In case that you have a Gasia/Shanwan clone, you might need a fork of QtSixA, which can be found on github (at the moment I do not remember where I downloaded my copy of QtsixA)
7.) Connect your PS3 controller via USB to the Pi. Wait a few seconds until it starts to rumble. Then run: sudo ./sixpair
If successful, you should see something like:
Current Bluetooth master: DE:AD:BE:EF:00:00
Setting master bd_addr to: 00:1F:81:00:06:20
(I also tried bluetoothctl for pairing, but it always requested a key-code, which one cannot enter using the controller)
8.) disconnect the controller from USB. Its LEDs start flashing. If the pairing is successful, only LED1 will stay on for controller 1 (LED2 for controller 2 and so on)
9.) If you have to pair bluetooth keyboards/mice, simply use the retropie-setup.sh for doing that.
10.) Leave a comment at http://luetzels.raspiblog.com if you like my tutorial!cheers,
/luetzel -
@luetzel - thank you for your work!!! My question to you is Steps 1 thru 4, is that done on the computer or on the actual PI3? If on the computer, is there a program we should use?
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.