Connecting and using the PlayStation 3 BD Remote
I got into my hands here a Bluetooth remote control from Play Station 3.
And I decided to try connecting it to my computer in order to provide more convenience for watching movies. According to an old habit, he armed himself with a tambourine and a large file (because I have Linux installed).
But, everything turned out to be very simple.
Because I have installed Ubuntu 10.04, all further operations will be given as they are in this distribution.
On the Internet, along the way, I found several manuals, but all of them were incomplete, either did not work, or were already outdated.
So, the first thing we need is to pair the remote and the PC.
For Ubuntu version 10.04, all that is needed is already in the regular repositories.
For older versions of the system, you can use this PPA: For other distributions, you can use
this patch is for adding remote support to bluez.
Then we check whether the uinput kernel module is loaded:
If loaded, then everything is in order. If not, add it to the "startup":
Then, put blueman:
and replace the regular bluetooth gnome applet with the blueman-applet applet through Startup Applications.
Everything, now you can pair. We start the search for devices in the blueman applet, press START + ENTER on the remote control and pick up the device. By the way, the remote does not need Passkey: You can also check the remote via xev, as it sends x-events when certain buttons are pressed. Next, you will need to install and configure lirc. We start gnome-lirc-properties (Preferences -> Infrared Remote Control) and we press on Auto-detect. In the list, select the remote:
There you can test the console by pressing the buttons on it (Configuration test section).
The next step is optional, but I did it to simplify the further configuration somewhat.
Edit /etc/lirc/lircd.conf.gnome: I left there only the buttons actually present on the remote control and changed the names of the buttons. Now restart lirc and add it to the autorun services: and test the button presses: Actually, that’s practically all. Now it remains to configure user applications to work with lirc. Vlc and Rhythmbox settings: And teach them how to accept remote control commands from lirc. This is done by modifying the ~ / .lircrc file:
The “button” parameter is the name of the button from /etc/lirc/lircd.conf.gnome (case-sensitive), the “config” parameter is the command sent to the application. The commands accepted by the application can be found in the help:
Similarly, you can configure other applications.
And I decided to try connecting it to my computer in order to provide more convenience for watching movies. According to an old habit, he armed himself with a tambourine and a large file (because I have Linux installed).
But, everything turned out to be very simple.
Because I have installed Ubuntu 10.04, all further operations will be given as they are in this distribution.
On the Internet, along the way, I found several manuals, but all of them were incomplete, either did not work, or were already outdated.
So, the first thing we need is to pair the remote and the PC.
For Ubuntu version 10.04, all that is needed is already in the regular repositories.
For older versions of the system, you can use this PPA: For other distributions, you can use
> sudo apt-get purge bluez
> sudo echo "deb ppa.launchpad.net/kitlaan/ppa/ubuntu jaunty main" >> /etc/apt/sources.list
> sudo echo "deb-src ppa.launchpad.net/kitlaan/ppa/ubuntu jaunty main" >> /etc/apt/sources.list
> sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6F7177CC
> sudo apt-get update
> sudo apt-get install bluez
this patch is for adding remote support to bluez.
Then we check whether the uinput kernel module is loaded:
> lsmod | grep uinput
If loaded, then everything is in order. If not, add it to the "startup":
> sudo echo uinput >> /etc/modules
Then, put blueman:
> sudo aptitude install blueman
and replace the regular bluetooth gnome applet with the blueman-applet applet through Startup Applications.
Everything, now you can pair. We start the search for devices in the blueman applet, press START + ENTER on the remote control and pick up the device. By the way, the remote does not need Passkey: You can also check the remote via xev, as it sends x-events when certain buttons are pressed. Next, you will need to install and configure lirc. We start gnome-lirc-properties (Preferences -> Infrared Remote Control) and we press on Auto-detect. In the list, select the remote:
> grep -i remote /proc/bus/input/devices
N: Name="PS3 Remote Controller"
> sudo aptitude install gnome-lirc-properties lirc
There you can test the console by pressing the buttons on it (Configuration test section).
The next step is optional, but I did it to simplify the further configuration somewhat.
Edit /etc/lirc/lircd.conf.gnome: I left there only the buttons actually present on the remote control and changed the names of the buttons. Now restart lirc and add it to the autorun services: and test the button presses: Actually, that’s practically all. Now it remains to configure user applications to work with lirc. Vlc and Rhythmbox settings: And teach them how to accept remote control commands from lirc. This is done by modifying the ~ / .lircrc file:
begin remote
name ps3-bd
bits 32
begin codes
BTN_0 0x10100
BTN_THUMBL 0x1013d
BTN_THUMBR 0x1013e
BTN_TL 0x10136
BTN_TL2 0x10138
BTN_TR 0x10137
BTN_TR2 0x10139
BTN_START 0x1013b
0 0x1000b
1 0x10002
2 0x10003
3 0x10004
4 0x10005
5 0x10006
6 0x10007
7 0x10008
8 0x10009
9 0x1000a
ANGLE 0x10173
AUDIO 0x10188
BACK 0x1009e
BLUE 0x10191
BREAK 0x1019b
CANCEL 0x100df
CLEAR 0x10163
CLOSE 0x100ce
CONTEXT_MENU 0x101b6
DOWN 0x1006c
EJECTCD 0x100a1
ENTER 0x1001c
ESC 0x10001
EXIT 0x100ae
FORWARD 0x1009f
FRAMEBACK 0x101b4
FRAMEFORWARD 0x101b5
GREEN 0x1018f
HOMEPAGE 0x100ac
INFO 0x10166
LEFT 0x10069
MENU 0x1008b
NEXT 0x10197
OPTION 0x10165
PAUSE 0x10077
PLAY 0x100cf
PREVIOUS 0x1019c
RED 0x1018e
REWIND 0x100a8
RIGHT 0x1006a
SCREEN 0x10177
SELECT 0x10161
STOP 0x10080
SUBTITLE 0x10172
TIME 0x10167
UP 0x10067
YELLOW 0x10190
end codes
end remote
> sudo service lirc restart
> sudo update-rc.d lirc enable
> irw
00000000000100a1 00 EJECTCD ps3-bd
000000000001018e 00 RED ps3-bd
000000000001018f 00 GREEN ps3-bd
0000000000010166 00 INFO ps3-bd
000000000001008b 00 MENU ps3-bd
00000000000101b6 00 CONTEXT_MENU ps3-bd
000000000001001c 00 ENTER ps3-bd
0000000000010165 00 OPTION ps3-bd
0000000000010100 00 BTN_0 ps3-bd
0000000000010136 00 BTN_TL ps3-bd
00000000000100cf 00 PLAY ps3-bd
0000000000010161 00 SELECT ps3-bd
0000000000010077 00 PAUSE ps3-bd
begin
prog = vlc
button = PLAY
config = key-play-pause
end
begin
prog = vlc
button = PAUSE
config = key-play-pause
end
begin
prog = vlc
button = STOP
config = key-stop
end
begin
prog = vlc
button = FORWARD
config = key-jump+short
end
begin
prog = vlc
button = REWIND
config = key-jump-short
end
begin
prog = vlc
button = NEXT
config = key-next
end
begin
prog = vlc
button = PREVIOUS
config = key-prev
end
begin
prog = vlc
button = UP
config = key-nav-up
end
begin
prog = vlc
button = DOWN
config = key-nav-down
end
begin
prog = vlc
button = LEFT
config = key-nav-left
end
begin
prog = vlc
button = ENTER
config = key-nav-activate
end
begin
prog = vlc
button = RIGHT
config = key-nav-right
end
begin
prog = vlc
button = BTN_TL
config = key-vol-up
repeat = 1
end
begin
prog = vlc
button = BTN_TL2
config = key-vol-down
repeat = 1
end
begin
prog = vlc
button = BTN_THUMBL
config = key-vol-mute
end
begin
prog = vlc
button = SCREEN
config = key-toggle-fullscreen
end
begin
prog = vlc
button = FRAMEFORWARD
config = key-frame-next
end
begin
prog = vlc
button = CONTEXT_MENU
config = key-disc-menu
end
begin
prog = vlc
button = AUDIO
config = key-audio-track
end
begin
prog = vlc
button = SUBTITLE
config = key-subtitle-track
end
begin
prog = Rhythmbox
button = PLAY
repeat = 1
config = play
end
begin
prog = Rhythmbox
button = PAUSE
repeat = 0
config = pause
end
begin
prog = Rhythmbox
button = STOP
repeat = 1
config = stop
end
begin
prog = Rhythmbox
button = NEXT
repeat = 1
config = next
end
begin
prog = Rhythmbox
button = PREVIOUS
repeat = 1
config = previous
end
begin
prog = Rhythmbox
button = FORWARD
repeat = 1
config = seek_forward
end
begin
prog = Rhythmbox
button = REWIND
repeat = 1
config = seek_backward
end
begin
prog = Rhythmbox
button = BTN_TL
repeat = 1
config = volume_up
end
begin
prog = Rhythmbox
button = BTN_TL2
repeat = 1
config = volume_down
end
begin
prog = Rhythmbox
button = BTN_THUMBL
repeat = 1
config = mute
end
begin
prog = Rhythmbox
button = EJECTCD
repeat = 1
config = quit
end
The “button” parameter is the name of the button from /etc/lirc/lircd.conf.gnome (case-sensitive), the “config” parameter is the command sent to the application. The commands accepted by the application can be found in the help:
> vlc -H | awk '/--key/ {print "# "$1}'
Similarly, you can configure other applications.