Latest Update: Bluez 5.12 includes out-of-the-box support for SixAxis (Without LED).|
This is a short info on how i got my SixAxis/Dualshock3 to work using "only" bluez-4.64
and Linux 2.6.34. (Of course with patches, otherwise this text would be pointless).
Those 2 versions were the latest stable releases at the time of writing this.
I know there are several other solutions like QtSixA/sixaxisd around. They even
have some really nice additional features (LED setup) but also some drawbacks.
All the files are here. If you fiddled with this around before you probably don't
need to read the text below.
- Patch your Linux kernel (2.6.34):
Use this patch: linux-2.6.34-sixaxis.patch.
Hopefully it will be included in 2.6.35. Included since 2.6.37
- Patch bluez (4.64) with the cable patch:
Use this patch: bluez-4.64-sixaxis.patch
(I usually rip the latest version out of the Fedora srpm)
Theres a new option called "--enable-cable" that needs to be used for building. While
"--enable-usb" requires libusb-0.x, the cable pairing will need libusb-1.x to be installed.
They can be both installed at the same time, so it's no big deal.
When you plug your controller over USB you'll see something like this in dmesg:
sony xxxx:xxxx:xxxx:xxxx: input,hiddev96,hidraw3: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-xxxx:xx:xx.x-x.x.x/inputx
sony xxxx:xxxx:xxxx:xxxx: Calling sixaxis_set_operational_usb
sony xxxx:xxxx:xxxx:xxxx: Sony PS3 Controller bdaddr: xx:xx:xx:xx:xx:xx
Check if the bluez with cable pair support added the needed entries in
/var/lib/bluetooth/xx:xx:xx:xx:xx:xx. If trusts, sdp and profiles entries
exists, it's usualy a good sign.
After unplugging the controller from the USB cable, you should be able to
use it by pressing the "PS" button. "dmesg" should show this:
input: PLAYSTATION(R)3 Controller as /devices/pcixxxx:xx/xxxx:xx:xx.x/usbx/x-x/x-x.x/x-x.x.x/x-x.x.x:x.x/bluetooth/hcix/hcix:x/inputx
sony xxxx:xxxx:xxxx:xxxx: input,hidraw3: BLUETOOTH HID v0.00 Joystick [PLAYSTATION(R)3 Controller] on xx:xx:xx:xx:xx:xx
Use "jstest" or so to check if it's working. Until Linux 2.6.34 i could connect it,
but i did never get any input data from the device.
To remove it the low level way you can use "hcitool dc xx:xx:xx:xx:xx:xx". It will require
root though. I frankensteined together a quick hack from various dbus voodoo
sources, that does it without root access. You can get the script here: sixdisconnect
All the nice Bluetooth GUI tools will do the job too of course.
I use Gentoo, so i did some ebuilds for the Bluez part.
Update 2: net-wireless/bluez-4.66-r1 ebuilds
Update 3: bluez-sixaxis-4.69.patch
Update 4: net-wireless/bluez-4.69 ebuilds
Update 5: The kernel patch applies cleanly on 2.6.35. Too bad this also means that it's still not included.
Update 6: net-wireless/bluez-4.71 ebuilds
Update 7: bluez-sixaxis-4.71.patch (re-diff of manualy merged recjects from 4.69)
Update 8: net-wireless/bluez-4.72 ebuilds
Update 9: Good news everyone. I just checked out 2.6.37-rc8 and it contains the kernel patch. I still need to put newer bluez patches online.
Update 10: net-wireless/bluez-4.84 ebuilds
Update 11: 80-input-sixaxis.conf copied into /etc/X11/xorg.conf.d should prevent the Sixaxis controller to act as mouse in X
Update 12: bluez-sixaxis-4.84.patch works with bluez-4.87
Update 13: Fedora GIT usualy has the latest SixAxis patches
Update 14: New Fedora GIT usualy has the latest SixAxis patches