Use A Cheap PS3 IR Receiver Under Linux


While combing through the clearance rack at my local RadioShack, I found a PlayStation 3 IR USB receiver for the ridiculously low price of $1.97. The device is called the “AUVIO Universal Remote Control Receiver for PlayStation 3”, and carries the model number 1500330. I was unable to find any site or contact information for AUVIO, but the few searches I did online seem to indicate it’s some kind of RadioShack house brand. If your RadioShack doesn’t have any of them in stock, I was able to find a few going on eBay for around $4 at the time of this writing.

AUVIO Universal Remote Control Receiver for PlayStation 3

Knowing a bit about how the PS3 handles input devices, I was willing to bet that this cheap device turned received IR signals into USB Human Interface Device (HID) button presses: in other words, it would look like a USB gamepad to the PS3. Based on this assumption, I took the ~$2 gamble and bought it, with the intention of getting it to work on my Linux machine.

Detecting the Hardware

The first step in trying to get this device to work under Linux was to figure out if the kernel would even recognize it. Going with my assumption that it would show up to the PS3 as some kind of USB HID device, I plugged it in hoping it would show up as either a USB gamepad or keyboard.

Immediately after plugging the device in, I ran the following command:

bash$ dmesg | grep input | tail -2
[14455.700413] input: [highlight color="eg. yellow, black"]PS3 Controller[/highlight] as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input25
[14455.700762] generic-usb 0003:1D57:AF01.000D: input,hidraw1: [highlight color="eg. yellow, black"]USB HID v1.10 Gamepad [PS3 Controller][/highlight] on usb-0000:00:1d.3-1/input0

The command I entered “dmesg | grep input | tail -2” instructed the system to check the kernel logs for any lines containing the word “input”, and to display the last 2 (in chronological order, by default). This returned the very promising information. The first line shows that the kernel has recognized the device as a “PS3 Controller”, and the second line shows that it has attached a standard gamepad driver to it as the first HID input device.

Running the following command, we can quickly see that the standard joystick device node (js0) has been created:

bash$ ls -l /dev/input/js*
crw-rw-r--+ 1 root root 13, 0 2012-04-09 17:56 /dev/input/js0

So far, so good. We now know that not only does the kernel know what a PS3 controller is, but the system has also recognized it as a standard input device and created a corresponding device node for us in /dev.

The next step is to see if we are getting data from the receiver. A quick hack for this is to simply “cat” the output of the device node to the terminal. This will look like random garbage, but what we are watching for is changing random garbage. Upon running the command, the output on the terminal looks like this:

Raw data from /dev/input/js0

But oddly enough, when I started pressing buttons on one of my IR remotes, the data didn’t change. I tried a second remote, and still no results. This was a bit unexpected, as everything was working more or less as I assumed up to this point. Taking a look at the manual for the device, I found the page which explained the whole problem:

So that explains it. As the manual states, to use this receiver you first have to program a universal remote as a Sony one. The packaging is therefore a bit misleading, as this device won’t simply let you read any remote, but will only work with Sony remotes or a universal remote which can at least pretend to be Sony. This is somewhat disappointing, but perhaps not surprising.

As it just so happens, I have a Sony surround sound unit which includes DVD and Blu-ray buttons, so I grabbed that and started pressing buttons. Sure enough, the output in the terminal changed accordingly:

Now we're getting somewhere

Now all we need to do is turn this gibberish into something useful.

About Tom Nardi

Tom is a Network Engineer with focus on GNU/Linux and open source software. He is a frequent submitter to "2600", and maintains a personal site of his projects and areas of research at: .