Sony PS3 BD Remote
Sony uses Bluetooth for wireless controllers including the BD Remote (Blue-ray Disc remote control). This makes for a decent remote option.
Here are the advantages:
- Inexpensive (< $25 USD)
- Reasonable layout (51 buttons with separate arrows/seeking controls)
- Radio Frequency operation (better range - 30 feet/10 metres or better, non-line-of-sight)
- Bluetooth pairing - multiple remotes don't interfere, no picking channels to use
- Good feel to the control
Note: Some remotes (such as that pictured, have a "back" label on the 'cross'/X key, others have it on the "circle"/O. And there are newer PS3 remote controls which are significantly different - they are slightly longer, they can control multiple devices (PS3/AMP/TV) and they have a row of lights to show which device is being controlled.
Contents
Sony PS3 Bluetooth remote controls
There are two different Sony PS3 remote controls around, and they appear to require different processes to get them working. The older ones look like the picture above and take two AA batteries. The newer ones look like this one on Amazon.com: http://www.amazon.com/Media-Blu-ray-Remote-Control-Playstation-3/dp/B0050SX9I2/ - they are slightly longer, take two AAA batteries, and have a row of lights to show which device is being controlled (PS3/AMP/TV).
The PS3 Bluetooth remote control can be put into a 'pairable' state by pressing the START and ENTER buttons on it simultaneously for about five seconds; on the newer PS3 remote control the 'PS3' light will start flashing at this point. The newer PS3 remote controls appear to lose their pairing data if you change/remove their batteries, so it's necessary to re-run part of the pairing process after a battery change.
In case anyone is interested, the power consumption of the newer Sony PS3 remote controls is about 14 mA when there is a bluetooth connection in place, and 0.05 mA when in standby; the power consumption of the older Sony PS3 remote controls is about 14 mA when connected and 0.12 mA when in standby.
The software described below will disconnect after a configurable inactivity timeout expires (say 10 minutes) in order to preserve the remote control battery life. After the connection has been dropped, the first time a user presses a button on the remote control the connection needs to be re-established, which takes a second or so. After that the button presses act practically instantaneously.
Linux installation process
Note: these instructions were written in July 2015 and tested on Mythbuntu 12.04 and Mythbuntu 14.04
1. Ensure that your bluetooth receiver (dongle or built in) is listed when you run lsusb. It should display something similar to this:
Bus 006 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
2. Install the bluetooth software as a service together with various other pre-requisites:
sudo apt-get update sudo apt-get install bluez libdbus-1-dev libglib2.0-dev python-dbus python-gobject
3. The bluetooth stack needs to patched to enable some additional functionality, namely:
- disconnect the bluetooth connection after a configurable timeout period. (This is to preserve the battery life in the remote controllers and avoid the batteries going flat after just a few days.)
- configurable mapping from PS3 remote control buttons to key presses (without requiring LIRC).
These patches were originally developed by Kitlaan (Ted M Lin) and Ruff and subsequently updated/repackaged by readers of this forum: http://forum.kodi.tv/showthread.php?tid=50717
Carry out the following commands:
sudo service bluetooth stop cd ~ mkdir bluetoothwork cd bluetoothwork wget https://www.dropbox.com/s/zwerzydgfiw54zx/bluez-4.101_ps3remote.diff wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.101.tar.gz tar xvfz bluez-4.101.tar.gz cd bluez-4.101 patch -p1 < ../bluez-4.101_ps3remote.diff ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var make sudo make install sudo reboot
4. Check that the bluetooth service is running - if you type:
service bluetooth status
it should display something similar to this:
bluetooth start/running, process 762
5. It's not essential, but when carrying out the following steps it can be useful to run the bluetooth daemon in foreground, as this gives a few more clues as to what is happening. Start another ssh session and type the following:
sudo service bluetooth stop sudo bluetoothd -n -d
6. Download a utility for helping perform the pairing:
cd ~/bluetoothwork wget https://www.dropbox.com/s/62p4ycth8ge0hnv/ps3pair.tar.gz tar xvfz ps3pair.tar.gz cd ps3pair
7. Pair the remote control with the system - type the following:
sudo python ps3_pair.py
Hold the START and ENTER buttons on the PS3 remote control for about five seconds. The result should be similar to the following:
user@myth3:~/bluetoothwork/ps3pair$ sudo python ps3_pair.py Please HOLD the START and ENTER buttons on the PS3 remote. Searching for devices, please wait... Found: 1: 34:C7:31:04:25:1A [Unknown] Select the device you wish to add [1]:
Type the number corresponding to the PS3 remote control or hit return to take the default. The result should be similar to the following:
user@myth3:~/bluetoothwork/ps3pair$ sudo python ps3_pair.py Please HOLD the START and ENTER buttons on the PS3 remote. Searching for devices, please wait... Found: 1: 34:C7:31:04:25:1A [Unknown] Select the device you wish to add [1]: 1 Registering device... Done user@myth3:~/bluetoothwork/ps3pair$
(Among other things, this causes data about the paired device to be stored in a directory off /var/lib/bluetooth.)
The timing can be quite sensitive - so it may be necessary to re-run this operation or else try holding the START and ENTER buttons on the PS3 remote control before running sudo python ps3_pair.py.
8. Run the following command:
/usr/share/doc/bluez/examples/list-devices
This should show something similar to the following:
user@myth3:/var/lib/bluetooth$ /usr/share/doc/bluez/examples/list-devices
[ /org/bluez/2335/hci0 ]
Name = myth3-0
Powered = 1
Devices = dev_34_C7_31_04_25_1A
DiscoverableTimeout = 0
PairableTimeout = 0
Discoverable = 0
Address = 00:15:83:15:A3:10
Discovering = 0
Pairable = 1
Class = 0
UUIDs = 0x1000 0x1001 0x1112 0x111f 0x110c 0x110e
[ /org/bluez/2335/hci0/dev_34_C7_31_04_25_1A ]
Product = 0x0306
Vendor = 0x054c
Name = BD Remote Control
Paired = 0
Adapter = /org/bluez/2335/hci0
Alias = BD Remote Control
Version = 0x0110
Connected = 0
UUIDs = 0x1124 0x1200
Address = 34:C7:31:04:25:1A
Services = dbus.Array([], signature=dbus.Signature('o'), variant_level=1)
Class = 0x00250c
Trusted = 1
Blocked = 0
user@myth3:/var/lib/bluetooth$
In this example:
00:15:83:15:A3:10 is the MAC address of the bluetooth receiver
34:C7:31:04:25:1A is the MAC address of the PS3 remote control
It should show Trusted = 1 -- if it does not then re-run the sudo python ps3_pair.py command.
If the output from running /usr/share/doc/bluez/examples/list-devices shows Connected = 1 then it is not necessary to run the next bluez-test-input connect step.
9. This step usually needs to be run to connect the newer PS3 remote controls, and sometimes needs to be run on the older PS3 remote controls.
Hold the START and ENTER buttons on the PS3 remote control for about five seconds, then type the following:
sudo bluez-test-input connect <device MAC address>
where '<device MAC address>' is the device MAC address shown when running the ps3_pair.py command - for example:
sudo bluez-test-input connect 34:C7:31:04:25:1A
If the command completes without displaying any messages then it has completed successfully.
If when running the command you get the message org.bluez.Error.DoesNotExist: Does Not Exist then it means that the device MAC address is not correct.
10. At this point the system should be receiving key presses from the remote control. If you are running bluetoothd in foreground you should see messages like the following when you press buttons on it:
bluetoothd[2335]: input/fakehid.c:ps3remote_event() Got key: 108 [1] bluetoothd[2335]: input/fakehid.c:ps3remote_event() Got key: 108 [0]
The system should be responding to the button presses, and if you run /usr/share/doc/bluez/examples/list-devices it should show 'Connected = 1'.
11. If at a later point you change/remove the batteries from the newer PS3 remote controls then it will be necessary to re-run the sudo bluez-test-input connect 34:C7:31:04:25:1A step.
12. Run the following commands:
sudo mv /etc/bluetooth/input.conf /etc/bluetooth/input.conf.old sudo cp ~/bluetoothwork/bluez-4.101/input/input.conf /etc/bluetooth/input.conf
This will update the comment about the IdleTimeout parameter (which is specified in seconds) and it will set up the XBMC/Kodi key map.
13. Edit /etc/bluetooth/input.conf and introduce a line in the [General] stanza similar to the following:
IdleTimeout=600
This species the idle timeout (in seconds) before the connection will be disconnected. ('IdleTimeout=600' means 600 seconds, i.e. 10 minutes.) (The IdleTimeout setting is commented out by default.)
14. Edit /etc/bluetooth/input.conf and copy into the [PS3 Remote Map] stanza the contents from below (in place of the XBMC/Kodi key map) and tailor it as you like. The newer PS3 remote controls have two extra buttons (INSTANT back and INSTANT forward) whose codes are not listed in the default input.conf - their values are 0x76 and 0x75 respectively.
15. Restart the bluetooth service in order to make the updates to /etc/bluetooth/input.conf take effect. (Run sudo service bluetooth restart or if running bluetoothd in foreground type Ctrl-C and then sudo bluetoothd -n -d.)
16. The bluetooth stack is smart enough to terminate the bluetooth connection if the bluetooth service is stopped cleanly when the box is shut down. The connection is terminated if you issue sudo kill <bluetooth process ID> but if you issue sudo kill -9 <bluetooth process ID> the connection is left open. (In fact the only way I could make the connection work again after issuing a kill -9 was by taking the batteries out of the PS3 remote control for a few seconds.) So it's worth ensuring that the bluetooth daemon is always shut down cleanly. (If there is a power failure while the bluetooth connection is operating, it's likely that the bluetooth connection will not have been terminated, so it would be worth removing the batteries from the PS3 remote control for a few seconds to prevent them from going flat.)
17. If you are using one of the newer PS3 remote controls, you have the option of using its infra-red capability for controlling the TV directly - here are a couple of links on the subject:
http://slickdeals.net/f/3794932ps3remotecontrolprogramming?page=2
https://www.playstation.com/manual/pdf/CECH-ZRC1U.pdf
Crucially you need to do the following:
- Press the white TV button and the '/CLEAR' Clear button at the same time - the TV button will start flashing
- Enter the three digit code (see the references above for this code) while the TV button is still flashing
- Press the ENTER button - the TV button should light up if you've entered the code properly
Alternative mapping for Play button (and for other control-key combinations)
The approach described so far will map the Play button on the remote control to the Pause/Play action in the MythTV player - this toggles between Pause and Play, and if it's used from Fast Forward or Rewind it puts the player into Pause mode (rather than Play mode). If that's what you want, then you need do no more. There is an alternative action, 'Play', which does not toggle: it puts the player into Play state when used from Fast Forward or Rewind, and it's invoked by typing Ctrl+P on the keyboard. As this patched bluetooth stack does not support mapping to control key combinations a different approach needs to be adopted. (This approach can also be used to launch actions whose default triggers are control characters like, say, Toggle Aspect which is invoked by keying Ctrl+W.)
So in order to invoke the Play (Ctrl+P) function when pressing the Play button on the remote control, do the following:
1. Choose a key which is not already bound to an action. It is possible to use keys in the range F13-F23 (but for some reason it's not possible to use F24). We'll use F13 here.
2. Edit /etc/bluetooth/input.conf to contain the following:
0x32 = KEY_F13 # PLAY = Play (key needs to be bound to action using Setup -> Edit Keys)
3. Restart the bluetooth service in order to make the updates to /etc/bluetooth/input.conf take effect. (Run sudo service bluetooth restart or if running bluetoothd in foreground type Ctrl-C and then sudo bluetoothd -n -d.)
4. In mythfrontend go to Setup -> Edit Keys -> TV Playback -> PLAY
5. By default the only key listed against PLAY will be Ctrl+P.
6. Move the cursor to one of the empty key buttons and press Enter. A message will be displayed saying Press A Key - Waiting for key press.
7. Press the Play button on the remote control. A message will be displayed saying Add key 'Tools'?. Click OK. (For some reason the keys F13-F23 are picked up by mythfrontend as Tools, Launch (7), and other strange key names.)
8. Press Escape. A message will be displayed saying Save changes?. Click OK.
9. After this, pressing the Play button on the remote control should trigger the Play (rather than the Pause/Play) action in the MythTV player.
Sugested input.conf file
This method uses a configuration file (/etc/bluetooth/input.conf) to map remote buttons to keyboard button presses. A suggested configuration file is as follows, and can be tailored as required:
# input.conf - kitlaan custom # Configuration file for the input service # # This section contains options which are not specific to any # particular interface [General] # # Set idle timeout (in seconds) before the connection will # be disconnect (defaults to 0 for no timeout) IdleTimeout=600 # # # # This section contains options that are specific to a device # # change this MAC address to that of your paired device # use "hcitool con" to list active bluetooth connections [00:24:33:94:E5:4B] # # Set a custom idle timeout (in seconds) for this device #IdleTimeout=15 # # This section is the PS3 Remote keymap. It is loaded when bluez starts. # Use 'uinput.h' from bluez sources or '/usr/include/linux/input.h' for # a list of possible KEY_* values. # [PS3 Remote Map] # When the 'OverlayBuiltin' option is TRUE (the default), the keymap uses # the built-in keymap as a starting point. When FALSE, an empty keymap is # the starting point. #OverlayBuiltin = TRUE #buttoncode = keypress # Button label = action with default key mappings 0x16 = KEY_ESC # EJECT = exit 0x64 = KEY_MINUS # AUDIO = cycle audio tracks 0x65 = KEY_W # ANGLE = cycle zoom mode 0x63 = KEY_T # SUBTITLE = toggle subtitles 0x0f = KEY_DELETE # CLEAR = delete key 0x28 = KEY_F8 # /TIME = toggle through sleep 0x00 = KEY_1 # NUM-1 0x01 = KEY_2 # NUM-2 0x02 = KEY_3 # NUM-3 0x03 = KEY_4 # NUM-4 0x04 = KEY_5 # NUM-5 0x05 = KEY_6 # NUM-6 0x06 = KEY_7 # NUM-7 0x07 = KEY_8 # NUM-8 0x08 = KEY_9 # NUM-9 0x09 = KEY_0 # NUM-0 0x81 = KEY_F2 # RED = red 0x82 = KEY_F3 # GREEN = green 0x80 = KEY_F4 # BLUE = blue 0x83 = KEY_F5 # YELLOW = yellow 0x70 = KEY_I # DISPLAY = show information 0x1a = KEY_S # TOP MENU = show guide 0x40 = KEY_M # POP UP/MENU = menu 0x0e = KEY_ESC # RETURN = back/escape/cancel 0x5c = KEY_R # TRIANGLE/OPTIONS = cycle through recording options 0x5d = KEY_ESC # CIRCLE/BACK = back/escape/cancel 0x5f = KEY_A # SQUARE/VIEW = Adjust Playback timestretch 0x5e = KEY_ENTER # CROSS = select 0x54 = KEY_UP # UP = Up/Skip forward 10 minutes 0x56 = KEY_DOWN # DOWN = Down/Skip back 10 minutes 0x57 = KEY_LEFT # LEFT = Left/Skip back 5 seconds 0x55 = KEY_RIGHT # RIGHT = Right/Skip forward 30 seconds 0x0b = KEY_ENTER # ENTER = select 0x5a = KEY_F10 # L1 = volume down 0x58 = KEY_J # L2 = decrease the play speed 0x51 = KEY_HOME # L3 = commercial skip previous 0x5b = KEY_F11 # R1 = volume up 0x59 = KEY_U # R2 = increase the play speed 0x52 = KEY_END # R3 = commercial skip next 0x43 = KEY_F9 # PS button = mute 0x50 = KEY_M # SELECT = menu (as per PS convention) 0x53 = KEY_ENTER # START = select / Enter (matches terminology in mythwelcome) 0x30 = KEY_PAGEUP # PREV = jump back (default 10 minutes) 0x76 = KEY_J # INSTANT BACK (newer RCs only) = decrease the play speed 0x75 = KEY_U # INSTANT FORWARD (newer RCs only) = increase the play speed 0x31 = KEY_PAGEDOWN # NEXT = jump forward (default 10 minutes) 0x33 = KEY_COMMA # SCAN BACK = decrease scan forward speed / play 0x32 = KEY_P # PLAY = play/pause 0x34 = KEY_DOT # SCAN FORWARD decrease scan backard speed / increase playback speed; 3x, 5, 10, 20, 30, 60, 120, 180 0x60 = KEY_LEFT # FRAMEBACK = Left/Skip back 5 seconds/rewind one frame 0x39 = KEY_P # PAUSE = play/pause 0x38 = KEY_P # STOP = play/pause 0x61 = KEY_RIGHT # FRAMEFORWARD = Right/Skip forward 30 seconds/advance one frame 0xff = KEY_MAX
Other Linux resources (may be out of date)
(It is not known whether these still work or are still available.)
Cakemote - Python script that reads key presses
bdremote - Daemon that directs bdremote data to LIRC (a cakemote successor)
myth-btremote - Daemon that supports the bd remote with mythtv's network remote infrastructure
cakemote-mythtv.py - Cakemote script tweak for myth .22 keybindings and multikey press functions removed.
ps3_pair.py and ps3_unpair.py - Python script to pair and unpair your BD Remote (requires dbus-python and pygobject python modules)
uinput kernel module method
xbmc_forum_ps3_remote - Great instructions for getting this going addresses battery issues (page 3)
Additional information. [1]
Additional patches. [2]
HOW-TO_Setup_PS3_BD_Remote - A wiki based on the above xbmc.org forum thread. The only XBMC specific stuff in these instructions is the sample input.conf. You will need to customize this for mythtv.
The Sony PS3 Remote Package
This is a package which you can download and install on your linux machine. It provides a daemon that will manage the connection with one or more PS3 Remotes and forwards your key presses to the LIRC daemon.
The package has the following features:
- Graphical interface - for pairing and configuration
- Combo buttons - you can for example get an up button, a left button along with a upleft button.
- Regular buttons - repeats events while held and optionally generate key up and key down events.
- Mode buttons - allows you to set for example the color buttons to activate different setup for the other keys.
- Shift buttons - allows you to have one button modify the behavior of the other buttons
- Sticky buttons - press once to activate and again to deactivate
- IR Relays - if you have a IR transmitter for other equipment, you can connect the buttons on the remote to transmit those IR signals
This should be the preferred option if you want to control more than the MythTV frontend using the PS3 Remote (e.g. your sound system via IR, other LIRC compatible applications, mouse movements via ircmd etc.).
Installation
Download the tarball from Sourceforge and follow the instructions in the README File
https://sourceforge.net/projects/sonyps3remote/
Disadvantage
The package depends on a patched version of the BlueZ daemon. The package itself helps you to patch and compile the patched daemon, so it is not too complicated (just follow the instructions in the README). This is also the reason there is no binary distribution for the package, you have to compile the package yourself. Anyone familiar with the "./configure; make; make install" approach should not have any problems with this.
Configuration File
Here is a sample lircrc configuration file for MythTV to use as a starting point.
# Toggle subtitles
begin
prog = mythtv
button = subtitle
repeat = 0
delay = 0
config = T
end
# Cycle through zoom and fill modes
begin
prog = mythtv
button = angle
repeat = 0
delay = 0
config = W
end
# Bring up on screen menu
begin
prog = mythtv
button = triangle
repeat = 0
delay = 0
config = I
end
# Go back
begin
prog = mythtv
button = circle
repeat = 0
delay = 0
config = Esc
end
# Up
begin
prog = mythtv
button = up
repeat = 1
delay = 2
config = Up
end
# Left
begin
prog = mythtv
button = left
repeat = 1
delay = 2
config = Left
end
# Enter
begin
prog = mythtv
button = enter
repeat = 0
delay = 0
config = Enter
end
# Right
begin
prog = mythtv
button = right
repeat = 1
delay = 2
config = Right
end
# Down
begin
prog = mythtv
button = down
repeat = 1
delay = 2
config = Down
end
# 1
begin
prog = mythtv
button = 1
repeat = 0
delay = 0
config = 1
end
# 2
begin
prog = mythtv
button = 2
repeat = 0
delay = 0
config = 2
end
# 3
begin
prog = mythtv
button = 3
repeat = 0
delay = 0
config = 3
end
# 4
begin
prog = mythtv
button = 4
repeat = 0
delay = 0
config = 4
end
# 5
begin
prog = mythtv
button = 5
repeat = 0
delay = 0
config = 5
end
# 6
begin
prog = mythtv
button = 6
repeat = 0
delay = 0
config = 6
end
# 7
begin
prog = mythtv
button = 7
repeat = 0
delay = 0
config = 7
end
# 8
begin
prog = mythtv
button = 8
repeat = 0
delay = 0
config = 8
end
# 9
begin
prog = mythtv
button = 9
repeat = 0
delay = 0
config = 9
end
# 0
begin
prog = mythtv
button = 0
repeat = 0
delay = 0
config = 0
end
# Enter/Exit Live TV Browse Mode / brings up menu to allow toggling settings such as Commercial Auto-Skip, Auto-Expire, etc.
begin
prog = mythtv
button = popup_menu
repeat = 0
delay = 0
config = O
end
# Rewind
begin
prog = mythtv
button = scanback
repeat = 1
delay = 2
config = PgUp
end
# Reset Playback Speed
begin
prog = mythtv
button = play
repeat = 0
delay = 0
config = Ctrl+P
end
# Forward
begin
prog = mythtv
button = scanforward
repeat = 1
delay = 2
config = PgDown
end
# Pause / Play
begin
prog = mythtv
button = pause
repeat = 0
delay = 0
config = P
end
# Previous commercial marker
begin
prog = mythtv
button = stepback
repeat = 1
delay = 2
config = Home
end
# Big jump back
begin
prog = mythtv
button = previous
repeat = 1
delay = 2
config = <
end
# Big jump forward
begin
prog = mythtv
button = next
repeat = 1
delay = 2
config = >
end
# Next commercial break marker
begin
prog = mythtv
button = stepforward
repeat = 1
delay = 2
config = End
end
# Open Program Guide
begin
prog = mythtv
button = top_menu
repeat = 0
delay = 0
config = M
end
# Switch between audio streams
begin
prog = mythtv
button = audio
repeat = 0
delay = 0
config = +
end
# Toggle Picture in Picture
begin
prog = mythtv
button = ps
repeat = 0
delay = 0
config = V
end
# Switch Picture in Picture Focus
begin
prog = mythtv
button = select
repeat = 0
delay = 0
config = B
end
# Swap Picture in Picture
begin
prog = mythtv
button = start
repeat = 0
delay = 0
config = N
end
bdremoted method
While the original project has gone unmaintained, there is a maintained fork available at bdremote-ng. The following instructions may no longer be viable.
Get latest source (0.2 at this writing), unpack, and make
cp -p bdremoted /usr/local/sbin/bdremoted
Bluetooth Address of Remote
Hold 'Start' and 'Enter' buttons on the remote
# hcitool scan
Scanning ...
00:19:C1:4F:BE:64 BD Remote Control
#
bdremote Configuration
/etc/bdremote.conf
# Port number for incoming LIRCD connections # Default is 8888 BDREMOTE_PORT= # Disconect timeout for remote in minutes # Default is 60 BDREMOTE_TIMEOUT= # Bluetooth address of remote # Set to address obtained from 'hcitool scan' # Leave empty to disable BDREMOTE_ADDR= # Key repeat rate in repeats per second # Default is 10 BDREMOTE_RATE= # Debug level # Default is 0 BDREMOTE_DEBUG=
bdremote Startup script /etc/init.d/bdremote
#!/bin/sh
#
#
BDREMOTED=/usr/local/sbin/bdremoted
BDREMOTE_CONF=/etc/bdremote.conf
test -f "$BDREMOTED" || exit 0
if [ -f "$BDREMOTE_CONF" ]; then
. "$BDREMOTE_CONF"
fi
case "$1" in
start)
echo -n "Starting bdremote daemon: "
BDREMOTE_ARGS="$BDREMOTE_ARGS ${BDREMOTE_PORT:+-p $BDREMOTE_PORT}"
BDREMOTE_ARGS="$BDREMOTE_ARGS ${BDREMOTE_TIMEOUT:+-t $BDREMOTE_TIMEOUT}"
BDREMOTE_ARGS="$BDREMOTE_ARGS ${BDREMOTE_ADDR:+-a $BDREMOTE_ADDR}"
BDREMOTE_ARGS="$BDREMOTE_ARGS ${BDREMOTE_RATE:+-r $BDREMOTE_RATE}"
BDREMOTE_ARGS="$BDREMOTE_ARGS ${BDREMOTE_DEBUG:+-d $BDREMOTE_DEBUG}"
if [ -z "$BDREMOTE_ADDR" ]; then
echo -n "none configured"
else
start-stop-daemon --start --quiet --exec "$BDREMOTED" -- $BDREMOTE_ARGS
fi
echo
;;
stop)
echo -n "Stopping bdremote daemon: "
start-stop-daemon --stop --quiet --exec "$BDREMOTED"
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/bdremote {start|stop|restart}"
exit 1
esac
exit 0
Configure lircd
Modify /etc/lirc/hardware.conf
# Arguments which will be used when launching lircd LIRCD_ARGS="-H null --connect 127.0.0.1:8888"
Configure bluetooth
hidd doesn't seem to get along with bdremoted. The distribution default seems ok.
/etc/default/bluetooth
BLUETOOTH_ENABLED=1 HIDD_ENABLED=0
Enable startup scripts
# Turn on bdremote before lirc
for runlevel in 2 3 4 5; do
ln -s ../init.d/bdremote /etc/rc${runlevel}.d/S18bdremote
done
for runlevel in 0 1 6; do
ln -s ../init.d/bdremote /etc/rc${runlevel}.d/K82bdremote
done
Test Connectivity
Once you have bluetooth, lircd, and bdremoted up and running, it is a good idea to test that lirc is receiving signals from the remote. Simply run
# irw
and press some keys on the remote. You should see some output like:
0043 00 ps SonyBDRemote 0043 01 ps SonyBDRemote
If you don't see any output, it is likely that your BD remote has not properly paired with your computer. Some people say that
# hidd --search
while holding down start+enter on the remote will pair the remote. However, that did not work for me. Instead, I downloaded cakemote.py, edited it and entered my remote's hardware address, run it and hold start+enter on the remote. This has successfully paired the remote every time for me. irw should now print output when you press keys on the remote.
Some people may need to pair the remote each time the computer boots.
According to this bluez mailing list post, bluez-gnome can be used to permanently pair the device with your computer.
Configure Applications
# ln -s ~/.lircrc ~mythtv/.mythtv/lircrc
~mythtv/.lircrc
include ~/.lirc/mythtv
Mythtv
Some editing of mythtv key bindings required for the lircrc below through Utilities/Setup → Edit Keys Context Action Original Setting New Setting Note Global EJECT <none> Ctrl+4 Eject Removable Media JumpPoints Main Menu <none> Ctrl+1 Main Menu JumpPoints Program Guide <none> Ctrl+2 Program Guide JumpPoints TV Recording Playback <none> Ctrl+3 TV Recording Playback TV Playback SPEEDDEC J Ctrl+J Decrease the playback speed (match with SPEEDINC) TV Playback SPEEDINC U Ctrl+U Increase the playback speed (avoid miskey for TV Frontend→DETAILS) TV Playback STRETCHDEC <none> Ctrl+9 Decrease time stretch speed TV Playback STRETCHINC <none> Ctrl+0 Increase time stretch speed TV Playback TOGGLECC608 <none> Ctrl+8 Toggle VBI CC
~mythtv/.lirc/mythtv
##########
# LIRC mappings for mythtv
# Need to edit key for Global->EJECT
begin
prog = mythtv
remote = SonyBDRemote
button = eject
config = Ctrl+4
end
begin
prog = mythtv
remote = SonyBDRemote
button = audio
config = +
end
begin
prog = mythtv
remote = SonyBDRemote
button = angle
config = W
end
# Need to edit key for desired captioning behavior, e.g.,
# TV Playback->TOGGLECC608 Toggle VBI CC
# TV Playback->TOGGLECC708 Toggle ATSC CC
# TV Playback->NEXTCC Next of any captions
begin
prog = mythtv
remote = SonyBDRemote
button = subtitle
config = Ctrl+8
end
begin
prog = mythtv
remote = SonyBDRemote
button = clear
config = Backspace
end
begin
prog = mythtv
remote = SonyBDRemote
button = time
config = F8
end
begin
prog = mythtv
remote = SonyBDRemote
button = num1
config = 1
end
begin
prog = mythtv
remote = SonyBDRemote
button = num2
config = 2
end
begin
prog = mythtv
remote = SonyBDRemote
button = num3
config = 3
end
begin
prog = mythtv
remote = SonyBDRemote
button = num4
config = 4
end
begin
prog = mythtv
remote = SonyBDRemote
button = num5
config = 5
end
begin
prog = mythtv
remote = SonyBDRemote
button = num6
config = 6
end
begin
prog = mythtv
remote = SonyBDRemote
button = num7
config = 7
end
begin
prog = mythtv
remote = SonyBDRemote
button = num8
config = 8
end
begin
prog = mythtv
remote = SonyBDRemote
button = num9
config = 9
end
begin
prog = mythtv
remote = SonyBDRemote
button = num0
config = 0
end
#begin
# prog = mythtv
# remote = SonyBDRemote
# button = red
# config = XXX
#end
#begin
# prog = mythtv
# remote = SonyBDRemote
# button = green
# config = XXX
#end
#begin
# prog = mythtv
# remote = SonyBDRemote
# button = blue
# config = XXX
#end
#begin
# prog = mythtv
# remote = SonyBDRemote
# button = yellow
# config = XXX
#end
# Need to edit key for TV Frontend->DETAILS
begin
prog = mythtv
remote = SonyBDRemote
button = display
config = U
end
# Need to edit key for JumpPoints->Main Menu
begin
prog = mythtv
remote = SonyBDRemote
button = topmenu
config = Ctrl+1
end
begin
prog = mythtv
remote = SonyBDRemote
button = popup
config = M
end
begin
prog = mythtv
remote = SonyBDRemote
button = return
config = Esc
end
##########
# Need to edit key for JumpPoints->TV Recording Playback
begin
prog = mythtv
remote = SonyBDRemote
button = ps
config = Ctrl+3
end
begin
prog = mythtv
remote = SonyBDRemote
button = select
config = Return
end
begin
prog = mythtv
remote = SonyBDRemote
button = start
config = Space
end
begin
prog = mythtv
remote = SonyBDRemote
button = triangle
config = M
end
begin
prog = mythtv
remote = SonyBDRemote
button = circle
config = Esc
end
# Need to edit key for JumpPoints->Program Guide
begin
prog = mythtv
remote = SonyBDRemote
button = square
config = Ctrl+2
end
begin
prog = mythtv
remote = SonyBDRemote
button = cross
config = I
end
begin
prog = mythtv
remote = SonyBDRemote
button = up
repeat = 1
delay = 4
config = Up
end
begin
prog = mythtv
remote = SonyBDRemote
button = down
repeat = 1
delay = 4
config = Down
end
begin
prog = mythtv
remote = SonyBDRemote
button = left
config = Left
end
begin
prog = mythtv
remote = SonyBDRemote
button = right
config = Right
end
begin
prog = mythtv
remote = SonyBDRemote
button = enter
config = Return
end
begin
prog = mythtv
remote = SonyBDRemote
button = l1
config = Home
end
begin
prog = mythtv
remote = SonyBDRemote
button = r1
config = End
end
# Need to edit key for TV Playback->STRETCHDEC
begin
prog = mythtv
remote = SonyBDRemote
button = l2
config = Ctrl+9
end
# Need to edit key for TV Playback->STRETCHINC
begin
prog = mythtv
remote = SonyBDRemote
button = r2
config = Ctrl+0
end
begin
prog = mythtv
remote = SonyBDRemote
button = l3
config = [
end
begin
prog = mythtv
remote = SonyBDRemote
button = r3
config = ]
end
##########
begin
prog = mythtv
remote = SonyBDRemote
button = play
config = Space
end
begin
prog = mythtv
remote = SonyBDRemote
button = stop
config = Esc
end
begin
prog = mythtv
remote = SonyBDRemote
button = pause
config = P
end
begin
prog = mythtv
remote = SonyBDRemote
button = scanrev
config = <
end
begin
prog = mythtv
remote = SonyBDRemote
button = scanfwd
config = >
end
begin
prog = mythtv
remote = SonyBDRemote
button = prev
config = Q
end
begin
prog = mythtv
remote = SonyBDRemote
button = next
config = Z
end
begin
prog = mythtv
remote = SonyBDRemote
button = steprev
config = Left
end
begin
prog = mythtv
remote = SonyBDRemote
button = stepfwd
config = Right
end
Linux MythTV Networked Bluetooth Remote
This module follows the work of MythControl on source forge and Antion Starikov's work for the PS3 BD remote driver. The two code bases are combined into a single element.
The file can be downloaded at: myth-btremote
The setup is the same as the standard LIRC interface, apart from the LIRC configuration, except that within the archive is a file for compiling/installing the driver, and also a set of files that are listed above, i.e. /etc/myth_btremote.conf, /etc/init.d/myth-btremoted which are useful for registering the daemon as a service.
The configuration file for the remote looks like :
#enter #ps #select #l3 #r3 #start #up #right #down #left #l2 #r2 #l1 #r1 #triangle #circle #cross #square num1 key 1 num2 key 2 num3 key 3 num4 key 4 num5 key 5 num6 key 6 num7 key 7 num8 key 8 num9 key 9 num0 key 0 return key escape #clear #eject #topmenu #time #prev #next #play #scanrev #scanfwd #stop #pause #popup #steprev #stepfwd #subtitle #audio #angle #display #blue #red #green #yellow
All that is needed is to uncomment a line as you decide which key you want to use, and you just assign
an action that is supported by the network interface List of supported commands
Mac OS X
Not so much for free support yet
Remote Buddy
Features virtual keyboard; support for keyspan, ps3bd, wiimote; ~$20/single license, less for more
Remote Buddy - Product Page
WiiLi - GNU Linux Port to Wii: Remote Buddy
DarwiinRemote
Cocoa app to receive/data Nintendo Wii Remote
SourceForge - Source
Hiro Blog - Announcing DarwiinRemote
WiiLi - GNU Linux Port to Wii: DarwiinRemote