Kodi Community Forum
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS (/showthread.php?tid=50717)



- flxfxp - 2009-10-08

see this part of the log:
Code:
(Reading database ... 148398 files and directories currently installed.)
Unpacking bluez-patched (from bluez-patched_4.54-1_i386.deb) ...
dpkg: error processing bluez-patched_4.54-1_i386.deb (--install):
trying to overwrite `/etc/bluetooth/main.conf', which is also in package bluez
You have to uninstall bluez. be sure that /etc/bluetooth/main.conf is also gone.
If it has problems getting on D-Bus, reboot.


- flxfxp - 2009-10-08

Allfodr Wrote:@flxfxp With updated installation procedure this works like a charm, I just want to say thanks to all involved.

It was a whole lot of effort trying to automate everything, from the driver to the adding of the devices, but it sure payed off Smile

If you notice that some buttons aren't working, don't be afraid, I'm still very busy assigning all buttons. I'm currently updating the deb online at least once a day with new button features. Be sure to also check this thread if I make any changes to the Keymap.xml. To remove the package do "sudo -r bluez-patched"
and the reinstall using "sudo -i bluez-patched_4.54-1_i386.deb"

If you like to create your own deps, I created this raw but handy script:
Code:
#!/bin/bash

########################################################################

case "$1" in
  create)
    echo
        echo "start!"
        rm debs/*.*
    dh_make -m -f bluez-patched-4.54.tar.gz
    ./configure
    make clean
    make
    fakeroot debian/rules binary
    mv ../*.deb debs/
    rm ../bluez-patched_4.54.orig.tar.gz
    echo
    echo "Done building deps"
    echo
        ;;
  buildenv)
    echo
    if [ "$(id -u)" != "0" ]; then
    echo "Sorry, you must execute this option with sudo."
    exit 1
    fi
    echo "Installing required tools..."
    apt-get install build-essential dh-make debhelper devscripts libnl1 putty-tools -y
    apt-get build-dep bluez -y
    echo
    echo "Done installing required tools"
    echo
        ;;
  *)
    echo
        echo "Usage: $SCRIPTNAME {create|buildenv}" >&2
    echo
        echo "Create: creates a deb in the debs folder"
        echo "Buildenv: installs all tools needed for compiling"
    echo
        exit 1
        ;;
esac

exit 0

Be sure that the folder name of your bluez is something like bluez-patched-4.54 and it also holds the bluez-patched-4.54.tar.gz original package

you can download the whole package for building deps yourself here:
http://flx.me/script/bluez-patched-4.54.tar.gz


- LAGMonkey - 2009-10-08

flxfxp Wrote:see this part of the log:
Code:
(Reading database ... 148398 files and directories currently installed.)
Unpacking bluez-patched (from bluez-patched_4.54-1_i386.deb) ...
dpkg: error processing bluez-patched_4.54-1_i386.deb (--install):
trying to overwrite `/etc/bluetooth/main.conf', which is also in package bluez
You have to uninstall bluez. be sure that /etc/bluetooth/main.conf is also gone.
If it has problems getting on D-Bus, reboot.

*facepalm*

Yep, that did the trick. Although i have added the command "hciconfig hci0 reset" to my rc.local (at the bottom just above "exit 0") im still having to issue it once ive loaded to desktop in order to get everything going. Any ideas about how i can get the command issued later in the boot cycle?

I've noticed that the "Prev" and "Next" buttons are the opposite way round (Prev skips forward - Next skips backward).

But apart from all that, thank you for the effort. Its really appreciated Nod


- flxfxp - 2009-10-10

Good to hear! If those buttons are wrong for you (working fine for me btw), change them in Keymap.xml.

flxfxp Wrote:I've uncommented IdleTimeout and set it to 180, 3 minutes.
It doesn't get picked up. Still disconnects after 15 secs
ruff, if you have the time, could you please look into this and reply?

Thanks,

Dennis

p.s: Would you also happen to have a list of how to use every keyboard key using fakehid.c (indexes such as plus and minus keys)
edit: Nevermind, found them in uinput.h


- akex - 2009-10-12

Hi, thanks for all you have done so far.

I used your script to connect my ps3 remote to ubuntu and it works.

The only problem i have, is the key mapping. It seems, the ps3 remote buttons are not recognized as a keyboard keys. For instance, when i press the 6 or 8 key on the remote, the sound go down and even if i modify the Keymap.xml it doesn't change the behavior of the remote.

Any help ?

Thanks Smile


- flxfxp - 2009-10-12

what version of bluetoothd do you have? Start it with bluetoothd -nd to check


- akex - 2009-10-12

So, here is what i have when i start bluetoothd with -nd

Code:
xbmc@MyXBMC:~$ bluetoothd -nd
bluetoothd[5268]: Bluetooth daemon
bluetoothd[5268]: Enabling debug information
bluetoothd[5268]: parsing main.conf
bluetoothd[5268]: discovto=0
bluetoothd[5268]: pairto=0
bluetoothd[5268]: pageto=8192
bluetoothd[5268]: name=%h-%d
bluetoothd[5268]: class=0x000100
bluetoothd[5268]: inqmode=0
bluetoothd[5268]: Key file does not have key 'DeviceID'
bluetoothd[5268]: Unable to get on D-Bus



- flxfxp - 2009-10-12

reboot


- akex - 2009-10-12

Still the same


- flxfxp - 2009-10-12

strange, reinstall the deb, reboot. Are you sure you dont have the old bluez package installed?


- akex - 2009-10-12

Still the same. I install this one (from ur website) bluez-patched_4.54-1_i386.deb


- Hexus - 2009-10-13

flxfxp Wrote:Ok, here is a new installation procedure that uses 4.54 by ruff with his powersave and keymap patches. I edited most of the keys maps to have them working in xbmc without lirc. The only downside is that it has to build from source, which requires the entire toolbox plus time to compile.
This can be fixed as soon as I know how to properly make deps.

Procedure:
Code:
apt-get install libnl1 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 -y
            wget http://flx.me/script/bluez-patched_4.54-1_i386.deb
            dpkg -i bluez-patched_4.54-1_i386.deb
            wget http://flx.me/script/ps3_pair.tar.gz
             tar -xzvf ps3_pair.tar.gz
            rm ps3_pair.tar.gz
             echo modprobe uinput > /etc/rc.local
            echo /usr/local/sbin/bluetoothd >> /etc/rc.local
            echo "exit 0" >> /etc/rc.local
            echo "<keymap>" > /home/xbmc/.xbmc/userdata/Keymap.xml
            echo " <global>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "  <keyboard>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f1>XBMC.ActivateWindow(osdaudiosettings)</f1>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f2>XBMC.ActivateWindow(osdaudiosettings)</f2>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f3>XBMC.ActivateWindow(videolibrary)</f3>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f4>XBMC.ActivateWindow(videofiles)</f4>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f5>XBMC.ActivateWindow(MyMusic)</f5>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f6>XBMC.ActivateWindow(MyPictures)</f6>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f7>XBMC.ActivateWindow(Weather)</f7>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f11>skipprevious</f11>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f12>skipnext</f12>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "  </keyboard>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "   </global>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo " <FullscreenVideo>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "    <keyboard>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f11>bigstepback</f11>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <f12>bigstepforward</f12>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "        <menu>ShowVideoMenu</menu>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "    </keyboard>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo " </FullscreenVideo>" >> /home/xbmc/.xbmc/userdata/Keymap.xml
            echo "</keymap>" >> /home/xbmc/.xbmc/userdata/Keymap.xml

flxfxp, what additional packages are needed for this procedure to start to work? I'm trying to install it on XBMCLive and constantly getting this error:

Code:
(T: XBMCLive)root@XBMCLive:~# tar -xzvf ps3_pair.tar.gz
bluez/
bluez/.svn/
bluez/.svn/tmp/
bluez/.svn/props/
bluez/.svn/prop-base/
bluez/.svn/text-base/
bluez/.svn/tmp/props/
bluez/.svn/tmp/prop-base/
bluez/.svn/tmp/text-base/
bluez/ServiceInterface.pyc
bluez/BlueZInterface.pyc
bluez/BaseInterface.pyc
bluez/errors.pyc
bluez/utils.pyc
bluez/Device.pyc
bluez/Adapter.pyc
bluez/Manager.pyc
bluez/__init__.pyc
bluez/BlueZInterface.py
bluez/ServiceInterface.py
bluez/utils.py
bluez/Adapter.py
bluez/__init__.py
bluez/Device.py
bluez/errors.py
bluez/BaseInterface.py
bluez/Manager.py
bluez/Agent.py
bluez/Agent.pyc

gzip: stdin: decompression OK, trailing garbage ignored
bluez/.svn/dir-prop-base
bluez/.svn/format
bluez/.svn/all-wcprops
bluez/.svn/entries
bluez/.svn/text-base/Makefile.am.svn-base
bluez/.svn/text-base/BlueZInterface.py.svn-base
bluez/.svn/text-base/ServiceInterface.py.svn-base
bluez/.svn/text-base/utils.py.svn-base
bluez/.svn/text-base/Adapter.py.svn-base
bluez/.svn/text-base/__init__.py.svn-base
bluez/.svn/text-base/Device.py.svn-base
bluez/.svn/text-base/errors.py.svn-base
bluez/.svn/text-base/BaseInterface.py.svn-base
bluez/.svn/text-base/Manager.py.svn-base
bluez/.svn/text-base/Agent.py.svn-base
ps3_pair.py
tar: Child returned status 2
tar: Error exit delayed from previous errors

Thanks!


minimyth - logistiker - 2009-10-13

For those of you who would like a different solution from xbmc, I submitted Ruff's patches to minimyth and they were committed the same day. Wow that's fast!

http://code.google.com/p/minimyth/source/detail?r=5662

Thanks again Ruff.

Hey Ruff, why the hell are the bluez maintainers taking so long to integrate your patches? You would think that they would at least integrate the battery patch.


- flxfxp - 2009-10-13

Hexus Wrote:flxfxp, what additional packages are needed for this procedure to start to work? I'm trying to install it on XBMCLive and constantly getting this error:

Code:
ps3_pair.py
tar: Child returned status 2
tar: Error exit delayed from previous errors

Thanks!

Its just a problem with the tar, no big deal.


- flxfxp - 2009-10-13

akex Wrote:Still the same. I install this one (from ur website) bluez-patched_4.54-1_i386.deb

No idea, I'm not a bluez dev. I merely created a deb out of the patched binary files. Maybe other can help?