Sitemap
Ruben Llibre

Ruben Llibre

How to use your Dual Shock 4 in Playstation 3 using a Raspberry PI (and a DS3)

A tutorial for real human beings

4 min readDec 5, 2013

--

This tutorial was created by a dear friend of mine Olmedo Caba who may have given me permission to post on “a blog, or whatever”. I figured a half authorized tutorial from another person is the perfect way to start this corner of the net. Without further ado here is his (mostly) unedited work:

Introduction

So the DS4 was made available early and proved to be partially compatible with some PS3 games, which was certainly cool, but a small number of them didn’t work because the DS4 is recognized by the PS3 as a third party USB controller, which some games simply don’t support (a developer/publisher imposed decision as opposed to an actual technical restriction). Chief among them to me is GTA V, one of my most played games in recent times and one I wanted to play with the DS4. Furthermore, even on the games that are compatible there are caveats like you can’t use the PS button, no sixaxis controls and no rumble.

Anyway, I was already doing research for a somewhat related project when these news hit and I thought “Hey, the tools exist to overcome part of this obstacle”. It was just a matter of configuring and utilizing them. Well, yesterday I got my very own DS4 and was indeed successful in making it usable with GTA V (and I have no reason to believe it wouldn’t work with other currently incompatible games, but I haven’t tested them) and adding PS button functionality even to the compatible games. Sixaxis and rumble still don’t work though, which makes some games (e.g. Heavy Rain) utterly unplayable.

What you’ll need:

  • 1 DS4 & micro USB cable
  • 1 DS3 & mini USB cable
  • PS3
  • Linux computer (in my case I used a Raspberry Pi)
  • Bluetooth dongle/module that supports getting its address rewritten (I used this one).
  • GIMX — Game Input MultipleXer, magnificent open source software that emulates a DS3 through Bluetooth (all necessary instructions below)
  • Download this Config file

These instructions assume a Raspberry Pi running Raspbian, you may have to ( and probably will have to) adjust accordingly for your chosen platform/distro. If you run out of USB ports on the Raspberry Pi (like I did) you can either do this over SSH+Ethernet, or you could just plug things one at a time as needed. At the end, however, you’ll need to have both the Bluetooth dongle and the DS4 plugged in at once, so plan ahead.

Step 1: Installing and setting up the software tools.

First, we’re going to make sure that the Raspberry Pi firmware is up to date, as some previous version have had issues with USB, and then reboot.

   sudo rpi-update   

When this is done, check that the USB drivers are up to date.

dmesg | grep dwc_otg   

You should be able to find this in the output:

dwc_otg: FIQ split fix enabled           

Now let's install the software packages we need.

sudo apt-get update                                         sudo apt-get install gdebi bluez     wget http://gimx.fr/download/gimx-raspbian.html -O gimx.deb   sudo gdebi gimx.deb    

And disable services that might interfere with usage and/or performance.

sudo service triggerhappy stop      sudo update-rc.d triggerhappy disable  

Step 2: Set up the Bluetooth dongle.

On this step we are going to obtain both the PS3 and DS3's Bluetooth addresses, then we will change the address on the Bluetooth dongle to match the DS3's in order to allow it to pair up to the PS3 directly. For this make sure that the DS3 has been previously paired up to the specific PS3 you want to use.

Get Ruben Llibre’s stories in your inbox

Join Medium for free to get updates from this writer.

With the DS3 plugged in, go ahead and extract the addresses.

sixaddr

This will output the following:

Current Bluetooth master: [PS3's Bluetooth Address]                Current Bluetooth Device Address: [DS3's Bluetooth Address]  

Write down both addresses. You can now safely unplug the DS3, we won’t be needing it anymore. Now with the Bluetooth dongle plugged in we will proceed to extract its address.

bdaddr -i hciN   

N refers to the dongle index (0, if you have only one). The output will the dongle’s current address. You should write this one down as well in case you want to restore it later.

We will now switch its address with the one we extracted from the DS3.

bdaddr -r -i hciN [DS3's Bluetooth Address] 

Confirm the result with:

bdaddr -i hciN   

Step 3: Run it.

Time to make it all work. GIMX has two parts, an emulation server and a client which handles the input conversion. We will pair up the emulator server to the PS3 and run client with the config file (which I have attached) that maps the DS4 buttons to the corresponding DS3 ones.

Place the config file I have linked (PS3_RPI_DS4_usb.xml) in ~/.emuclient/config/. Make sure you have both the DS4 and the Bluetooth dongle plugged in.

Now, in one terminal/SSH session run the emulation server.

emu [PS3's Bluetooth Address] [Bluetooth dongle's index, 0 by default, argument is optional]   

This will pair up the emulator to your PS3 (which should now turn on or register a controller).

Then, in a second terminal/SSH session, run the emulation client with the proper config.

emuclient -c PS3_RPI_DS4_usb.xml    

And that’s it! The DS4 should be working on the PS3 exactly as a DS3 would, albeit without motion sensing or rumble, including a working PS button and compatibility in previously incompatible games.

If you have any questions, doubts, comments or suggestions then please don’t hesitate to tell me or the creator of this tutorial Olmedo!

--

--