Using PS3 Sixaxis Controller as a Joystick via Bluetooth

From LinuxMCE
Revision as of 03:39, 11 August 2009 by Ray N (Talk | contribs)

Jump to: navigation, search


Introduction

It is VERY easy to set up your PS3 Controller to act as a bluetooth joystick that can be used for changing channels in MythTV. This howto does not outline how to set up the controller with MythTV. Just to get the system recognising it.

Bluetooth Pairing

The pairing process is done with the controller connected via USB.

Install Requirements

You must have the libusb-dev and libusb-0.1-4 packages installed.

sudo apt-get install libusb-dev libusb-0.1-4

USB Pairing

Connect the controller to a USB port.

Download sixpair.c (save to a directory such as /home/linuxmce) and compile sixpair using

gcc -o sixpair sixpair.c -lusb

Run sixpair

sudo ./sixpair

sixpair will echo

Current Bluetooth master: xx:xx:xx:xx:xx:xx
Setting master bd_addr to xx:xx:xx:xx:xx:xx

Disconnect the USB cable

Bluetooth Monitoring

Stop the BlueTooth service

sudo /etc/init.d/bluetooth stop

Make sure all hcid processes are stopped

sudo killall hcid

Run HIDP daemon in terminal

sudo hidd --server --nocheck -n

Press the PS button on the Sixaxis hidd should echo

hidd[pid]: Bluetooth HID daemon
hidd[pid]: New HID device 00:19:C1:xx:xx:xx (Sony Computer Entertainment Wireless Controller)

Press Ctrl+C to end the process Start the BlueTooth service

sudo /etc/init.d/bluetooth start

That should be all you need to get your LinuxMCE box recognising the PS3 Controller as a joystick via bluetooth.

Known Issues

  • The Sixaxis will not be hot pluggable. If turning on the Sixaxis after Ubuntu is already running you will have to toggle between alt+f1 and back to alt+f7.

Additional Notes

  • All four lights on the back of the controller will flash even if the LinuxMCE box doesnt detect the controller, as at this point, LinuxMCE has no way of assigning controllers a number.