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)



- neil.j1983 - 2010-05-10

kitlaan Wrote:Make sure to "modprobe uinput" (or add it to /etc/modules).

can someone explain what this means, i'm completely lost on this step :S

i've got the remote paired and working, but it doesn;t survive a reboot Sad

Edit - nevermind, i sussed it (i was looking for a folder! not a file) thanks for all the work that has gone into this. xbmc and ubuntu is superb!


lucid input.conf - menno - 2010-05-20

All paired an well great stuff,
but only directional buttons work Sad

What do I need to do to fix that? anyone has a working input conf?
Using latest SVN + ubunto 10.04


- neil.j1983 - 2010-05-21

menno Wrote:All paired an well great stuff,
but only directional buttons work Sad

What do I need to do to fix that? anyone has a working input conf?
Using latest SVN + ubunto 10.04


Here's the one i made:

http://pastebin.com/kpNv40zR

i like this more than the inbuilt one. but it's a personal choice.


Success - federicosacerdo - 2010-05-21

Thanks Kitlaan. Nothing worked until I used your recent patch on bluez-4.64 sources. Used your input.conf from the pastebin, seems to work just fine. Finally my fast-forward button does something useful (it fast-forwards Smile.

I took the liberty of packaging a set of rpms for bluez-4.64 with your patch. Find it here http://sacerdoti.org/prj/xbmc/. The binaries are for Fedora 12.x86_64, but the spec file and src.rpm should allow builds on other rpm-based systems.

I have not tested the IdleTimeout, but the bluetooth pairing is solid, survives reboots, days without activity, etc. I set my dongle to master, perhaps has helped.
sudo hciconfig hdi0 lm ACCEPT,MASTER

Thanks again, nice to have it working.


bluez 4.6.5? - velcroshooz - 2010-05-27

Hey guys, just want to thank everyone involved here, stumbled upon this thread a week ago and had my bdremote running with xbmc in no time, with compiling 4.6.4 with the patch. My question is whether anyone has run into 4.6.5 yet? Im running testing in Arch Linux, and 4.6.5 just hit the repo. Checked out bluez changelog, boy its pretty vague, i cant tell if anything we needed has been implemented. SO, not being a great coder im wondering if the patch will work for 4.6.5 as well? Thanks!

EDIT: Bit the bullet and copied over my 4.6.4 patched build to somewhere safe, installed 4.6.5 - same issues, requires the patch - luckily everything worked fine and kitlaan's patch works great for 4.6.5 as well.


- wittaker25 - 2010-05-29

I'm currently running Ubuntu Lucid.

When I try to run the pairing script, I get the error:

Quote:ERROR:dbus.proxies:Introspect error on org.bluez:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
Traceback (most recent call last):
File "ps3_pair.py", line 93, in <module>
Main()
File "ps3_pair.py", line 20, in __init__
self.adapter = self.manager.GetAdapter()
File "/home/pitch/ps3pair/bluez/utils.py", line 28, in warp
raise errors.parse_dbus_error(exception)
bluez.errors.DBusServiceUnknownError: The name org.bluez was not provided by any .service files

Someone else had an error similar (but not identical) to this a few pages back and kitlaan suggested running dos2unix. I installed the "tofrodos" package and executed the command on the file, but to no effect.

I've been following the directions from the wiki and have made sure that I have all the necessary packages installed: python, python-dbus, bluez, python-gobject, python-bluez, dbus.

I appreciate any help that can be provided.


- kitlaan - 2010-06-03

@wittaker25

The only reason for that problem that I can think of is that the dbus or bluetoothd daemons aren't running (or that there's a problem with them).


- lozbrown85 - 2010-06-05

Hi

I have followed the guide on the wiki but I'm now stuck with the problem that

Code:
cat /proc/bus/input/devices | grep emot

does not return anything, whist this is dealt with in the troubleshooting section which recommends enabling input service in blueman.
however I really would prefer not to install blueman and all the gnome dependencies becuase I'm running as a LIVE install.

Is there another way of doing this?


- Zerogoki - 2010-06-06

I am with lozbrown85, I have been reading through all the forums/wiki guide and I am still having trouble.

To start I am a total linux n00b as I am coming over from sucky windozs. I have a nice little itx ion PC which I would like to load XBMC Live 9.11 directly to since running XBMC in windows = major dropped frames.

So I have XBMC live loaded to an HD and it boots up fine and everything looks good using a mouse/keyboard (no frames dropped what-so-ever).

Now the remote... so here is where I am so far.

After first time booting up into XBMC I log out and get to the terminal, login using the username password I setup.

here are the commands I run:
Code:
sudo apt-get update
sudo apt-get install bluez
sudo apt-get install bluez-utils
sudo apt-get install build-essential
sudo apt-get install libbluetooth-dev

next I get the ps3pair files and link it

Code:
wget http://kitlaan.twinaxis.com/holdingcell/ps3pair.tar.gz
tar xvfz ps3pair.tar.gz
cd ~/ps3pair
sudo python ps3_pair.py

after it is done I start the uinput module. now I am not sure if order matters but I just keep playing with these to get the remote to "sort of" work.

so from what I gathered this starts the module
Code:
sudo modprobe uinput

these commands let me know when it is working
Code:
lsmod | grep uinput
/usr/share/doc/bluez/examples/list-devices
cat /proc/bus/input/devices | grep emot


once I got it connected the directional buttons work (ie. up and down cycle through my previous commands and enter well is enter).

I also go into the /etc/modules and add iunput to the file at the end.

Code:
sudo nano /etc/modules

in the file i add uinput to the end and so it looks like this:
Code:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop
lp
uinput

save it.

next I edit the config file by doing this command:
Code:
sudo nano /etc/bluetooth/input.conf
in here I add my remotes address and add a few key commands as noted in the wiki howto guide: http://wiki.xbmc.org/index.php?title=HOW-TO_Setup_PS3_BD_Remote

so I figure at this point I should be good to go. well when I restart and load XBMC none of my remote buttons work (not even the up and down keys like it did in the terminal mode). So I am not sure what I am doing wrong. I even try holding start and enter to let the remote go into pairing mode but still nothing after mashing buttons like crazy.

I know this thread is a little over a year old and a lot of the earlier posts are not needed or dont work anymore with the newer versions of programs... So does anyone have any advice for those of us that want to run a clean exclusive install of XBMC live 9.11 current without a shell (no ubuntu minimal install or other linux version needed to be loaded first with XBMC on top of) and can maybe create an updated step by step guide for all the n00bs out there that would like to have this awesome program running with BD remote? If possible, it would be great if you could even explain what the commands are doing so we could learn while we setup our system (which is what a lot of us windozs folks need to move away from the crapy M$ software)?


- kitlaan - 2010-06-07

@Zerogoki

Are you using bluez from my PPA? From your steps, it looks like you're using the ones shipped by Ubuntu. That version does NOT have my patch, and so has a hardcoded key mapping that is pretty annoying to get working with XBMC. Since you paired okay, that should be good. (I would re-check by running "list-devices" after a reboot.)



As for your questions, here's some filler to get you started...

The "uinput" kernel module (which you loaded manually via modprobe, and set up to autoload on boot via /etc/modules) is used by the bluez code to inject input (in this case, keyboard keycodes) into the kernel stack. (It's pretty useful, but X11 screws things up later, which is why we need the mapping configuration...)

The new input.conf that my patch allows for, lets you configure a remote timeout, as well as a key mapping. This allows a user to more easily configure both XMBC's keymap and the remote together.


- lozbrown85 - 2010-06-07

kitlaan,

any clues on how to enable the input service on the bluetooth device via the terminal?


- kitlaan - 2010-06-08

lozbrown85 Wrote:any clues on how to enable the input service on the bluetooth device via the terminal?

I've been perusing the blueman sources, trying to determine what it actually does, without any success. I can't see why the input service would be disabled by default, but who knows...


- Zerogoki - 2010-06-08

Hey Kitlaan, thanks for the reply.

So I started over and this time got your repository first then installed bluez and then did the pairing.

However still no change on restart. I tried the "sudo bluetoothd -nd" command and got the "Key file does not have key 'DeviceID' / Unable to get on D-Bus" message that dogk1cker got on post #420. So I tried what you recommended and did "sudo /etc/init.d/bluetooth stop" then sudo bluetoothd -nd" again. This time I get a bunch of stuff on the screen and the last few lines say
Code:
bluetoothd[2070]: Device /org/bluez/2070/hci0/dev_00_26_43_BA_B6_57 has vendor=0x054c product=0x0306 version=0x0100
bluetoothd[2070]: btd_device_ref (0x1a56b18): ref=1
bluetoothd[2070]: probe drivers for /org/bluez/2070/hci0/dev_00_26_43_BA_B6_57
bluetoothd[2070]: Driver match input-hid for /org/bluez/2070/hci0/dev_00_26_43_BA_B6_57
bluetoothd[2070]: hid_device_probe: path /org/bluez/2070/hci0/dev_00_26_43_BA_B6_57
bluetoothd[2070]: btd_device_ref (0x1a56b18): ref=2
bluetoothd[2070]: Registered interface org.bluez.Input on path /org/bluez/2070/hci0/dev_00_26_43_BA_B6_57
bluetoothd[2070]: Adapter /org/bluez/2070/hic0 has been enabled
but then that is it. I press buttons on the remote does nothing. If I press up or down on the keyboard i get commands that look like ^[[A and ^[[B . I let it sit for about an hour like this before I did Ctrl+C to kill the command. restarted, still nothing.

Am I still missing something? I also tried doing this as root by typing "sudo passwd root" then after setting the root password I did "su -" to log in as root before downloading your repository. I also tried doing this without exiting XBMC by doing the Ctrl+Alt+F1 then going back to XBMC (Crtl+Alt+F7) still dont see it working.


- kitlaan - 2010-06-09

@Zerogoki

bluez does look like it's now set up correctly...
But it looks like you need to try re-pairing the remote.


- Zerogoki - 2010-06-09

kitlaan Wrote:@Zerogoki

bluez does look like it's now set up correctly...
But it looks like you need to try re-pairing the remote.

how do I re-pair the remote when I stopped the bluetooth service?

If I try to run "sudo bluetoothd -nd" while the bluetooth is running I get that unable to get on D-bus message. If I stop the bluetooth service (by doing the "sudo /etc/init.d/bluetooth stop" command) the remote stop working.

I did try stopping the bluetooth service, running "sudo bluetoothd -nd" then once its gets to "bluetoothd[xxxx]: Adapter /org/bluez/xxxx/hic0 has been enabled" I tried holding down start+enter to see if maybe that might do something. but I can mash buttons till my fingers hurt, still just sits there in the "sudo bluetoothd -nd" command.