Sony DualShock

This article describes the use of Sony DualShock 3 and DualShock 4 controllers via USB and Bluetooth.

Prerequisites
This article assumes that USB and Bluetooth have been previously configured.

Hardware

 * DualShock 3


 * DualShock 4

Kernel
The recommended minimum version to use is Linux 3.15. This release adds full support for the DualShock 4. This release also fixes the DualShock 3 blinking LED issue when connected via Bluetooth.

USB

 * Connect the DualShock 3 or DualShock 4 to the system using a USB cable and press the button.

Bluetooth
The recommended minimum version to use is BlueZ 5.14. This release adds full support for the DualShock 4. This release also incorporates DualShock 3 setup and pairing support which was added in BlueZ 5.12. It is possible to use the DualShock 3 with earlier versions of BlueZ (including BlueZ 4), but the sixpair utility would then be required to pair with the DualShock 3.

DualShock 3

 * Connect the DualShock 3 to the system using a USB cable and press the button.


 * Start bluetoothctl.


 * Enable the agent and make the Bluetooth adapter discoverable and pairable.


 * Disconnect the USB cable from the DualShock 3.

Authorize service [agent] Authorize service (yes/no): yes
 * Allow the service authorization request.


 * Trust the DualShock 3.


 * Turn the DualShock 3 off when it's no longer in use.


 * Press the button to use the DualShock 3 again.

DualShock 4

 * Start bluetoothctl.


 * Enable the agent and make the Bluetooth adapter discoverable and pairable.


 * Scan for devices.


 * Put the DualShock 4 into pairing mode by pressing and holding the and  buttons until the light bar starts flashing.


 * Pair with the DualShock 4.

Authorize service [agent] Authorize service (yes/no): yes
 * Allow the service authorization request.


 * Trust the DualShock 4.


 * Turn the DualShock 4 off when it's no longer in use.


 * Press the button to use the DualShock 4 again.

External resources

 * Gentoo Forums - Sixaxis via bluetooth