Note: In recent versions of Lakka, DualShock pairing have been simplified. You can start bluetooth in the Lakka Services and after plugging/unplugging your controller, it should be paired automatically.
If not, read the following guide.
All the following commands have to be executed on your Lakka Box using the Command Line Interface
Enable and start bluetooth service
systemctl enable bluetooth systemctl start bluetooth
Check that the service is active
systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2015-04-07 19:37:50 UTC; 1s ago Main PID: 489 (bluetoothd) Status: "Running" CGroup: /system.slice/bluetooth.service └─489 /usr/lib/bluetooth/bluetoothd
If you get this message
● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: inactive (dead) Condition: start condition failed at Tue 2015-04-07 19:35:48 UTC; 1min 59s ago ConditionPathExists=/storage/.cache/services/bluez.conf was not met
it means you have to create the config file, and restart the service
touch /storage/.cache/services/bluez.conf systemctl start bluetooth
A bluetooth prompt will appear. Type the following:
agent on default-agent power on discoverable on pairable on scan on
The Dualshock 4 is a bit different from the Dualshock 3 in that you should press the “Share” and “PS Home” button at the same time to get it into detection mode. You do not need to have controller connected via USB. Now press the two buttons and the led should start blinking rapidly. You will see output in your terminal similar to this:
[bluetooth]# scan on` Discovery started` [CHG] Controller 00:15:83:0C:BF:EB Discovering: yes [NEW] Device 90:FB:A6:D6:D0:45 90-FB-A6-D6-D0-45 [CHG] Device 90:FB:A6:D6:D0:45 LegacyPairing: no [CHG] Device 90:FB:A6:D6:D0:45 RSSI: 127 [CHG] Device 90:FB:A6:D6:D0:45 Name: Wireless Controller [CHG] Device 90:FB:A6:D6:D0:45 Alias: Wireless Controller [CHG] Device 90:FB:A6:D6:D0:45 LegacyPairing: yes [CHG] Device 90:FB:A6:D6:D0:45 RSSI is nil
Now follow the steps under Authorize the Dualshock controller.
Connect the DualShock 3 to the system using a USB cable and press the button round Playstation button. Watch for connection and disconnection messages and copy the device address (something like 38:C0:96:56:4D:AA). You will see a prompt that asks you to authorize the device:
Authorize service ''service_uuid'' (yes/no):
Authorize it by typing ‘yes’. Disconnect the USB cable from the DualShock 3. Hit the Playstation button again and while it blinks type the following:
Keep trying this command if you see device not available (it will loop between connected and disconnected) until you see something like the following
I usually keep pressing up + enter (repeating the last command)
[CHG] Device <device_addr> Modalias: usb:v054Cp0268d0100 [CHG] Device <device_addr> UUIDs: 00001124-0000-1000-8000-00805f9b34fb 00001200-0000-1000-8000-00805f9b34fb
Now trust the device
Next time you hit the Playstation button it will connect without asking anything else.
Make sure the battery on the controller is decently charged.
If the controller had been previously paired with another device, you might need to press the reset button with a paper clip.
[121113.389793] input: Sony PLAYSTATION(R)3 Controller as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/0003:054C:0268.0048/input/input61 [121113.390269] sony 0003:054C:0268.0048: input,hiddev0,hidraw2: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-0000:00:14.0-2/input0
If the autoconfiguration does not work, you can manually configure your PS3 controller. You need to use the rgui menu driver to do this configuration for now. You can then switch back to lakka. The recent development builds lets you do that from the default XMB menu.
If you had to type power on in bluetoothctl earlier, you will have to do this every time you reboot the system.
A simple way to avoid this is to write a udev rule. Create a file:
# Set bluetooth power up ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
Also, you should add the MAC address of each of your remote controllers in /storage/.cache/services/bluez.conf:
HIDD_OPTIONS="--connect xx:xx:xx:xx:xx:xx --connect xx:xx:xx:xx:xx:xx"
This causes bluez to always try to connect to those controllers.