[HowTo] Installing RetroPie alongside OSMC RC (the easy way)

Plug-in USB Bluetooth dongle
Go to My OSMC → Network → Bluetooth
Enable Bluetooth

If Bluetooth isn’t listed you probably don’t have a compatible dongle.

SSH into your RPi device

The command ‘hciconfig’ should display something like this:

hci0:	Type: BR/EDR  Bus: USB
	BD Address: XX:XX:XX:XX:XX:XX  ACL MTU: 1021:8  SCO MTU: 64:1
	UP RUNNING 
	RX bytes:1212 acl:0 sco:0 events:72 errors:0
	TX bytes:2150 acl:0 sco:0 commands:72 errors:0

All necessary build and tool packages:

sudo apt-get update
sudo apt-get install build-essential checkinstall pkg-config joystick lib-usbdev libbluetooth-dev -y

Build the tool which pairs your PS3 controller with your bluetooth device:

wget http://www.pabr.org/sixlinux/sixpair.c
gcc -o sixpair sixpair.c -lusb

Build the Sixaxis Manager which will let use use the controller as an input over bluetooth and USB:

wget http://sourceforge.net/projects/qtsixa/files/QtSixA%201.5.1/QtSixA-1.5.1-src.tar.gz
tar xfvz QtSixA-1.5.1-src.tar.gz

wget https://bugs.launchpad.net/qtsixa/+bug/1036744/+attachment/3260906/+files/compilation_sid.patch
patch ~/QtSixA-1.5.1/sixad/shared.h < compilation_sid.patch

cd QtSixA-1.5.1/sixad
make
sudo mkdir -p /var/lib/sixad/profiles
sudo checkinstall

Create a profile for the controller:

sudo nano /var/lib/sixad/profiles/default
enable_leds 1
enable_joystick 1
enable_input 0
enable_remote 0
enable_rumble 1
enable_timeout 0
led_n_auto 1
led_n_number 1
led_anim 1
enable_buttons 1
enable_sbuttons 1
enable_axis 1
enable_accel 0
enable_accon 0
enable_speed 0
enable_pos 0

Connect your controller with USB to the RPi and run the following command:

cd /home/osmc
sudo ./sixpair

If that succeeded, you can unplug the controller and test if the controller connects with your bluetooth device:

sudo hciconfig hci0 pscan
sudo sixad —start

If the worked you can setup Sixaxis Manager as a service and start it

sudo update-rc.d sixad defaults
sudo service sixad start

You can use the joystick test utility to see of all buttons work:

sudo jstest /dev/input/js0

I tried to make some udev rules to make everybody’s life easier, but that didn’t work for one.
Add ‘hciconfig hci0 pscan’ at the end of /etc/rc.local just before exit 0.

To make it automatically that when you attach an controller with usb to the system, make this udev rule:

sudo nano /etc/udev/rules.d/99-sixpair.rules
ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="usb", RUN+="/home/osmc/sixpair"

Hope this helps most of you, there is still some controller configuration to be done, please have a look here where I got most of the stuff from.

2 Likes