Sony PS3 BD Remote

From MythTV Official Wiki
Revision as of 22:42, 16 May 2008 by Dpou (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sony uses Bluetooth for wireless controllers including the BD Remote (Blueray Disc). The 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, non-line-of-sight)
  • Bluetooth pairing - multiple remotes don't interfere, no picking channels to use

Linux

Cakemote - Python script that reads key presses bdremote - Daemon that directs bdremote data to LIRC (a cakemote successor) Build

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

  1. hcitool scan

Scanning ...

           00:19:C1:4F:BE:64       BD Remote Control

bdremote Configuration

/etc/bdremote.conf

  1. Port number for incoming LIRCD connections
  2. Default is 8888

BDREMOTE_PORT=

  1. Disconect timeout for remote in minutes
  2. Default is 60

BDREMOTE_TIMEOUT=

  1. Bluetooth address of remote
  2. Set to address obtained from 'hcitool scan'
  3. Leave empty to disable

BDREMOTE_ADDR=

  1. Key repeat rate in repeats per second
  2. Default is 10

BDREMOTE_RATE=

  1. Debug level
  2. Default is 0

BDREMOTE_DEBUG=

bdremote Startup script

/etc/init.d/bdremote

  1. !/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

  1. 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

  1. 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

Configure Applications

  1. 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

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