Sixaxis on Linux with bluez-utils 3.36 ======================================= * Author: Christian Birchinger * Last modified: 11. Jan 2009 Most infos are based on: http://www.pabr.org/sixlinux/sixlinux.en.html I'm running Gentoo but everything can be adapted to any other distro. Be sure you build bluez-utils 3.36 with the legacy "hidd" daemon. You need it only once (once per joystick not once per boot) to register the Sixaxis joystick. On Gentoo this is the "old-daemons" USE-flag. Running "hcidump" and "dbus-monitor" really help when problems occur. Example values: * sixaxis address 00:1E:3D:11:11:11 * host bluetooth address 11:22:33:44:55:66 - Plug the Sixaxis controller into a USB port and register the address by running the Linux sixpair tool. After the hardware address is configured unplug the cable again. # ./sixpair Current Bluetooth master: DE:AD:BE:EF:11:11 Setting master bd_addr to 11:22:33:44:55:66 - Stop the bluetooth service (hicd) "/etc/init.d/bluetooth stop" This is needed because the now included input plugin already provides bluetooth input hid support. - Run "hidd --server --nocheck -n" If "--nocheck" doesn't exist, "security none;" in "/etc/bluetooth/hcid.conf" could be required. This can be reverted once the Sixaxis is added as trusted. - Start the bluetooth service again "/etc/init.d/bluetooth start" - Kill the hidd process (ctrl-C) and start it again. - Press the "PS"-button Something like this should appear: hidd[1234]: New HID device 00:1E:3D:11:11:11 (Sony Computer Entertainment Wireless Controller) The following file should get created (maybe not before the service gets stooped): /var/lib/bluetooth/11:22:33:44:55:66/hidd - Kill the hidd process (ctrl-C). - Stop the bluetooth service "/etc/init.d/bluetooth stop" - Copy, rename or append "/var/lib/bluetooth/11:22:33:44:55:66/hidd" to "/var/lib/bluetooth/11:22:33:44:55:66/input" - Create or append the following line to /var/lib/bluetooth/00:00:00:00:00:00/trusts (Yes, the directory is an all zeros hardware address): "00:1E:3D:11:11:11 input" (without the double quotes) Or use this command once the bluetooth service is started again: dbus-send --print-reply --system --type=method_call --dest=org.bluez \ /org/bluez/service_input org.bluez.Service.SetTrusted \ /string:'00:1E:3D:11:11:11' - Restart the bluetooth service so the input plugin is active again. You also don't need the "hidd" anymore as daemon unless you want to add another Sixaxis joystick. At this point, your Sixaxis should automatically register itself whenever you press the "PS" button. Again, everything is nicely visible with the "hcidump" and "dbus-monitor" tools. You can clearly see when the joypad gets a permission denied because the trust is missing and similar problems. If you use "evdev" in Xorg, it can be really painful because the input plugin also registers a "mouse" input device, not just the correct "js" and "event". "evdev" in Xorg will then automatically add the left analog stick as mouse which runs at absolute coordinates. I don't know why the Bluez input plugin is broken that way, because the old hidd did not add this mouse device. In USB mode, it's also fine. My reports on the mailing list got ignored so far, so if you know how to fix this, please let me know. "hidd --unplug 00:1E:3D:11:11:11" should "unplug" the Sixaxis again.