=== Getting the PS3 Dual Shock controller working with Raspberry Pi ===
Note that some Bluetooth dongles don't work properly with these drivers. I'm using a cheap CSR-chip-based dongle. Info from http://booting-rpi.blogspot.ro/2012/08/dualshock-3-and-raspberry-pi.html .
* Update the Raspberry Pi: $ sudo apt-get update; sudo apt-get upgrade
* Install Bluetooth: $ sudo apt-get install bluez-utils bluez-compat bluez-hcidump checkinstall libusb-dev libbluetooth-dev joystick
* Check dongle: $ hciconfig
hci0: Type: BR/EDR Bus: USB
BD Address: 00:15:83:CE:A5:7C ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:1489 acl:0 sco:0 events:74 errors:0
TX bytes:1276 acl:0 sco:0 commands:73 errors:0
* Download and compile controller. See http://www.pabr.org/sixlinux/sixlinux.en.html . $ mkdir sixaxis ; cd sixaxis ; wget http://www.pabr.org/sixlinux/sixpair.c ; gcc -o sixpair sixpair.c -lusb
* Plug in the PS3 controller through a USB mini-B cable. Raspberry Pis with not so many ports may need to use a USB hub.
* Run the sixpair program. $ sudo ./sixpair
Current Bluetooth master: 78:dd:08:11:3c:9c
Setting master bd_addr to 00:15:83:ce:a5:7c
* Download and compile the SixAxis joystick manager. During the checkinstall process just accept the defaults. Manager reference: http://qtsixa.sourceforge.net/ Manager manual: http://qtsixa.sourceforge.net/manual.pdf $ wget http://sourceforge.net/projects/qtsixa/files/QtSixA%201.5.1/QtSixA-1.5.1-src.tar.gz
$ tar -xzvf QtSixA-1.5.1-src.tar.gz
$ cd QtSixA-1.5.1/sixad
$ make
$ sudo mkdir -p /var/lib/sixad/profiles
$ sudo checkinstall
* Unplug the SixAxis controller
* Manually pair. $sudo sixad --start
sixad-bin[6851]: started
sixad-bin[6851]: sixad started, press the PS button now
sixad-bin[6851]: unable to connect to sdp session
sixad-bin[6851]: Connected Sony Computer Entertainment Wireless Controller (04:76:6E:4C:06:F8)
* Set to run at bootup. $ sudo update-rc.d sixad defaults
$ sudo reboot
* Test the controller. You should see the values change as you move the joysticks. $ sudo jstest /dev/input/js0