[LINUX] HOW-TO Sony Bluetooth BD PS3 on with on Ubuntu 9.04 and 9.10 with LIRC
#1
Thumbs Up 
Hi,

I got my BD Remote working with XBMC and LIRC in the following way:

1. Prerequisites
sudo apt-get cmake libbluetooth-dev lirc
YOU should know your BD remote Bluetooth address before
YOU MUST HAVE SUCCESSFULLY PAIRED THE BD DONGLE WITH YOUR REMOTE ONLY ONCE BEFORE
THIS CAN ALSO BE ON ANOTHER MACHINE. THE PS3 BD REMOTE REMEMBERS THE LAST DEVICE IT WAS SUCCESFULLY CONNECTED TO.


2. Download latest bdremoteng from
http://code.google.com/p/bdremote-ng/downloads/list

3. extract the content of the source archive file to /usr/src so you have /usr/src/bdremote-ng-0.4

4. Build bdremoteng
cd /usr/src/bdremote-ng-0.4/build
sudo ./gen.sh
cd /usr/src/bdremote-ng-0.4/build/linux/
sudo make

5. You should have now a bdremoteng we will copy that file
sudo cp /usr/src/bdremote-ng-0.4/build/linux/bdremoteng /usr/local/bin/

6. Now edit your /etc/rc.local file (change the Bluetooth adress)
Code:
/etc/init.d/bluetooth stop
sleep 1
/usr/local/bin/bdremoteng -a 00:1E:3D:1A:E0:21 -p 8888 -t 20 &
sleep 1
# only required on Ubuntu 9.10, no /var/run/lirc directory on reboot
mkdir /var/run/lirc
/usr/sbin/lircd -H null --connect 127.0.0.1:8888
sleep 1
/etc/init.d/bluetooth start
# only required on Ubuntu 9.10, no /dev/lircd device so XBMC could not connect
ln -s /var/run/lirc/lircd /dev/lircd
exit 0

7. Reboot
sudo shutdown -r now

8. Open a command shell
irw /dev/lircd
Press some buttons on remote can take a couple of seconds until you should see some out put like this
Code:
0083 00 yellow SonyBDRemote
0083 00 yellow SonyBDRemote
0082 00 green SonyBDRemote
0081 00 red SonyBDRemote
...

9. copy Lircmap.xml to ~/.xbmc/userdata
Code:
<lircmap>
  <remote device="SonyBDRemote">
        <obc101>1</obc101>
        <obc102>2</obc102>
        <obc103>3</obc103>
        <obc104>4</obc104>
        <obc105>5</obc105>
        <obc106>6</obc106>
        <obc107>7</obc107>
        <obc108>8</obc108>
        <obc109>9</obc109>
        <obc110>0</obc110>
        <obc111>enter</obc111>
        <obc112>up</obc112>
        <obc113>right</obc113>
        <obc114>down</obc114>
        <obc115>left</obc115>
        <obc116>circle</obc116>
        <obc117>stop</obc117>
        <obc118>pause</obc118>
        <obc119>ps</obc119>
        <obc120>prev</obc120>
        <obc121>next</obc121>
        <obc122>play</obc122>
        <obc123>scanrev</obc123>
        <obc124>scanfwd</obc124>
        <obc125>cross</obc125>
        <obc126>eject</obc126>
        <obc127>select</obc127>
        <obc128>l3</obc128>
        <obc129>r3</obc129>
        <obc130>start</obc130>
        <obc131>l2</obc131>
        <obc132>r2</obc132>
        <obc133>l1</obc133>
        <obc134>r1</obc134>
        <obc135>triangle</obc135>
        <obc136>topmenu</obc136>
        <obc137>time</obc137>
        <obc138>square</obc138>
        <obc139>return</obc139>
        <obc140>clear</obc140>
        <obc141>popup</obc141>
        <obc142>steprev</obc142>
        <obc143>stepfwd</obc143>
        <obc144>subtitle</obc144>
        <obc145>audio</obc145>
        <obc146>angle</obc146>
        <obc147>display</obc147>
        <obc148>blue</obc148>
        <obc149>red</obc149>
        <obc150>green</obc150>
        <obc151>yellow</obc151>
  </remote>
</lircmap>

10. copy remote.xml to /home/xbmc/.xbmc/userdata/keymaps/remote.xml (the location somewhat changed in latest XBMC versions I also have this file in the userdata folder Big Grin) Use the content from the Keymap.xml described in that thread:
http://www.xbmc.org/forum/showthread.php?t=51842

11. reboot and XBMC should know your remote

I tested this on Ubuntu 9.0.4 and 9.10. and XBMC Installation.
Thanks to the following posters:
http://www.xbmc.org/forum/showthread.php?t=51842
http://ubuntuforums.org/archive/index.php/t-874284.html

Have fun!
Reply
#2
Nice.

how about power saving ? You know that bluetooth drain ps3 remote battery if it stills connect.
Reply
#3
akex Wrote:Nice.

how about power saving ? You know that bluetooth drain ps3 remote battery if it stills connect.

As I understand from the google code page it does do a time out after 60 seconds.

I'm wondering if you can wake from bluetooth with this script.
Reply
#4
Smile 
AFAIK bdremoteng does support powersaving.

I can't test wake on Bluetooth over USB because my Point of View ION Mainboard does not support stand by modesSad
Reply
#5
I currently use this method, but using the older bdremoted. Works well. (I've set my timeout to 3 minutes)

Instead of starting bluetooth twice, I've removed /etc/init.d/bluetooth from start-up and created my own script that only starts whats needed for the remote to work (bluetooth audio etc are all stopped)

(Works on Hardy)
start-stop-daemon --start --quiet --exec /usr/local/sbin/bdremoted -- -p 8888 -a xx:xx:xx:xx:xx:xx -t 3
start-stop-daemon --start --quiet --exec /usr/sbin/hcid -- -x -s
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- -H null --connect 127.0.0.1:8888
Reply
#6
Hi!
I am actually the ubuntuforums poster you refer in your original post! Glad to see it was helpful!

Where did you put the Lircmap and Keymap files? I copied them to ~/.xbmc/userdata and ~/.xbmc/userdata/keymaps respectively but I can't seem to use the remote (even though irw works).
Don't you have an extra "xbmc" in


10. copy remote.xml to /home/xbmc/.xbmc/userdata/keymaps/remote.xml

Does the file need to be called remote.xml? I have a Keymap.xml and can't seem to make the remote work inside xbmc. I've also tried with remote.xml but no luck...
Reply
#7
Hi wild_oscar,

most trouble I had was with the latest changes of XBMC and the name/location of Keymap.xml. I found out that keymap.xml did not longer work and is now remote.xml which I placed in /home/xbmc/.xbmc/userdata/keymaps/remote.xml and /home/xbmc/.xbmc/userdata/remote.xml.
There are a lot of new threads regarding that particular issue.
The bdremotng daemon solution is less errorphrone than patching bluez. The battery drain is also low since bdremoteng does not require a permanent connection to the remote.
My girl friend likes XBMC a lotBig Grin
Reply
#8
I have retried this method. I removed everything todo with bluetooth and started from scratch.

Slightly furhter along now as the bdremote daemon does not crash on startup for me.

However it still does not work for me. Checking the debug output all I see in the bdremote log is 'no data on capture device' repeated over and over, and using irw shows nothing when I press keys.

Does anything else other than what you have posted here need to be done first? Should the remote be paired using some method? Any other packages required to be installed?

Thanks
Reply
#9
Hmm. The only thing I'm thinking of is that I paired the remote once with the same bluetooth dongle as I had installed Ubuntu 9.0.4 before with the Gnome bluetooth utility. Later I installed 9.10 but I did never pairing again, and the remote worked like a charm with bdremoteng. If I switch to another dongle my remote will not longer work in XBMC.
The remote remembers the BD address of the last succesfully paired dongle. I paired the dongle on another machine with gnome applet and pin 0000 and after that my dongle was working again after plugging in into XBMC box and rebooted. So in my tutorial I miss some important step.
Will fix this.
Nod
Reply
#10
I followed all steps. I also paired the remote to my dongle (on a windows machine). The Ps3 no longer turns on with the remote, so i assume it is paired. On XBMClive (9.11) i get everything started up (all three programs). Previously i deleted all autostart entries for bluetooth and lirc.

irw /dev/lircd does not get me any button presses Sad
Reply
#11
i also have a problem (irw doesn't catch any signal) and i think it's a problem of pair the dongle with the remote. I don't understand why Sony doesn't build in the remote a small damn led for some feedback, but this is another story...

I'm using a XBMClive 9.11alpha (so no GUI and no applet) and when i try to connect i follow this command:
Code:
hcitool scan
sudo hcitool cc ad:dr:es:ss

The first one, to take the address of my remote; the second one to connect with it.
After this step i don't know how to see if my remote is still connect or not. (if only there was a led...)
Anyone can help me?
Reply
#12
I am running Jaunty,
followed your guide,and all was good until irw /dev/lircd

no repsonse whatsover Sad

I found this in syslog

lircd-0.8.4a[2354]: could not get file information for /dev/lirc0
lircd-0.8.4a[2354]: default_init(): No such file or directory
lircd-0.8.4a[2354]: Failed to initialize hardware

//edit
http://pastebin.com/m68d031fd
Reply
#13
The pairing only worked with the gnome bluetooth applet and the PIN 0000. hcitool pairing did not work. I also paired the dongle and the remote on another machine and after that plugged the dongle into the XBMC box and it worked. I could not pair the dongle with hcitool cc command.
@menno your log is indicating another lircd is already running that will not work

#
lircd: there seems to already be a lircd process with pid 2366
#
lircd: otherwise delete stale lockfile /var/run/lircd.pid
Reply
#14
do you have a /dev/lircd file? if not check my comments on that
Reply
#15
Hi,

Thanks for the set instructions. I'm a newb to linux so I did a clean install of Karmic and the PS3 remote works great but unfortunately it breaks the connections to my bluetooth keyboard and mouse. Does anyone else have this problem?

Any comments or suggestions would be greatly appreciated, thanks Smile
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO Sony Bluetooth BD PS3 on with on Ubuntu 9.04 and 9.10 with LIRC1