Sony DualShock

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

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

Hardware

 * DualShock 3 / Sixaxis


 * DualShock 4

Kernel
The recommended minimum version of Linux to use is 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 of BlueZ to use is 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

 * Start bluetoothctl.


 * Enable the agent and set it as default.


 * Power on the Bluetooth controller, and set it as discoverable and pairable.


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


 * Discover the DualShock 3 MAC address


 * Disconnect the USB cable from the DualShock 3.


 * Allow the service authorization request.


 * Trust the DualShock 3.


 * The DualShock 3 is now paired.


 * Turn the DualShock 3 off when it's no longer in use by pressing and holding the button for 10 seconds.


 * Press the button to use the DualShock 3 again.

DualShock 4

 * Start bluetoothctl.


 * Enable the agent and set it as default.


 * Power on the Bluetooth controller, and set it as 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.


 * Discover the DualShock 4 MAC address


 * Pair with the DualShock 4.


 * Allow the service authorization request.


 * Trust the DualShock 4.


 * The DualShock 4 is now paired.


 * Turn the DualShock 4 off when it's no longer in use by pressing and holding the button for 10 seconds.


 * Press the button to use the DualShock 4 again.

Troubleshooting

 * Imitation DualShock 3 controllers are not supported by BlueZ and will not work via Bluetooth.

External resources

 * Sixaxis via bluetooth