XBMC Community Forum  

Go Back   XBMC Community Forum > Help and Support > XBMC General Help and Support > XBMC for Linux and XBMC Live Specific Support

XBMC for Linux and XBMC Live Specific Support Need help with XBMC for Linux or XBMC Live, or think you've found a bug? Discuss it here.

Reply
 
Thread Tools Search this Thread Display Modes
Old 2009-11-02, 12:17   #1
Cosmic Cobold
Junior Member
 
Join Date: Nov 2009
Posts: 7
Cosmic Cobold is on a distinguished road
Thumbs up [LINUX] HOW-TO Sony Bluetooth BD PS3 on Ubuntu 9.04 and 9.10 with LIRC

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 ) 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!

Last edited by Cosmic Cobold; 2009-11-06 at 23:03. Reason: Bug in description
Cosmic Cobold is offline   Reply With Quote
Old 2009-11-02, 13:26   #2
akex
Junior Member
 
Join Date: Oct 2009
Posts: 22
akex is on a distinguished road
Default

Nice.

how about power saving ? You know that bluetooth drain ps3 remote battery if it stills connect.
akex is offline   Reply With Quote
Old 2009-11-02, 13:56   #3
Amelandbor
Member
 
Amelandbor's Avatar
 
Join Date: Oct 2009
Location: Netherlands
Posts: 44
Amelandbor is on a distinguished road
Default

Quote:
Originally Posted by akex View Post
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.
Amelandbor is offline   Reply With Quote
Old 2009-11-02, 16:08   #4
Cosmic Cobold
Junior Member
 
Join Date: Nov 2009
Posts: 7
Cosmic Cobold is on a distinguished road
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 modes
Cosmic Cobold is offline   Reply With Quote
Old 2009-11-02, 22:06   #5
TREX6662k5
Member+ (Donator)
 
TREX6662k5's Avatar
 
Join Date: Oct 2006
Location: London, United Kingdom
Posts: 166
TREX6662k5 is on a distinguished road
Default

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
__________________
WYSIWYG

Last edited by TREX6662k5; 2009-11-02 at 22:26.
TREX6662k5 is offline   Reply With Quote
Old 2009-11-04, 15:03   #6
wild_oscar
Junior Member
 
Join Date: May 2009
Posts: 16
wild_oscar is on a distinguished road
Default

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

Last edited by wild_oscar; 2009-11-04 at 15:06.
wild_oscar is offline   Reply With Quote
Old 2009-11-05, 19:59   #7
Cosmic Cobold
Junior Member
 
Join Date: Nov 2009
Posts: 7
Cosmic Cobold is on a distinguished road
Default

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 lot
Cosmic Cobold is offline   Reply With Quote
Old 2009-11-06, 12:06   #8
bob72
Junior Member
 
Join Date: Nov 2009
Posts: 3
bob72 is on a distinguished road
Default

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
bob72 is offline   Reply With Quote
Old 2009-11-06, 22:58   #9
Cosmic Cobold
Junior Member
 
Join Date: Nov 2009
Posts: 7
Cosmic Cobold is on a distinguished road
Default

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.
Cosmic Cobold is offline   Reply With Quote
Old 2009-11-08, 18:19   #10
firaX
Member
 
Join Date: Oct 2009
Posts: 40
firaX is on a distinguished road
Default

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
firaX is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:11.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2010, XBMC Project