[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS (/showthread.php?tid=50717)
- kitlaan - 2010-06-09 14:22
Zerogoki Wrote:how do I re-pair the remote when I stopped the bluetooth service?
So either with the bluetooth service stopped and running "sudo bluetoothd -nd", OR just run the bluetooth service. Running manually is useful as it gives more debugging information. Then once you're happy, just ctrl-c out of bluetoothd, and re-start the bluetooth service.
(You may want to run the ps3_unpair script, if list-devices shows your remote.)
Then, in another console, run the ps3_pair script, and follow the instructions. There should be some indication of stuff going on in the bluetoothd output...
If it looks good, ctrl-c out of bluetoothd, and run it again. This time just hit buttons on the remote (no pairing), and it should detect...
- Zerogoki - 2010-06-09 23:27
Thanks again for the replay Kitlaan. I think we are getting close to the root of the problem.
So I did what you said and 1) unpaired my remote. 2) stopped the bluetooth service. 3) I started "sudo bluetoothd -nd" and in another terminal ran the pairing script. When I went back to the bluetoothd terminal screen I saw nothing when I was mashing buttons. then after about 30 sec to a min later of still mashing I saw a bunch of Got Key commands flying up the screen. so far so good (kind of, see below). I tried the "hold PS button" to disconnect and after about 20 seconds i got the following message:
I wasnt sure what this meant but after pressing a button it looked like my remote reconnected because I saw this:
so disregarding the error I continued on. At this point I got the remote commands coming in through bluetooth and looks good. So next I terminated the bluetoothd and restarted it. Now when I go to press buttons, nothing. I kept pressing for like 5 mins and still nothing.
So it seems i am closer but my main problem is when I stop/start the bluetooth service my remote stops working completely. This is probably explains why when I reboot my system the remote doesnt work ( I verified uniput and the bluetooth service starts up on reboot).
My second problem (well question) is what might be the cause of the delay in my initial connection? I mean after I re-pair the remote I would think it would already be connected and sending commands immediately but it takes like I said about 30 sec to a full min before I see the remote commands coming out.
Third, that funky error message when my remote disconnected. I also flipped my off switch and saw the error (see my comment in this thread here on how to add a switch to the BD remote ). but again both times when I turned my remote back on and pressed a button, I saw the Got Key commands again.
- vonb3ta - 2010-06-10 14:02
Hi guys I have basically been following the EXACT steps Zerogoki has been following, but am also getting the exact same responses, here is what I have done:
First I entered the commands:
At the top, then Ctrl+X, saved and exited. Followed by these commands:
After this I followed Zerogoki's footsteps:
Zerogoki Wrote:here are the commands I run:
At this point every time I enter:
====> THE BREAKTHROUGH
After reading the other threads, I tried:
I am going to try to add hciconfig hdi0 lm ACCEPT,MASTER to rc.local and see if I can get this to load every startup.
Zerogoki, you might want to try and put in the terminal
If and when I get this working I will write up a Tutorial for XBMClive users, or I will try to write a script as well
- Zerogoki - 2010-06-10 16:27
Thanks for the info. Actually I have got the remote working (with and without setting the hci0 to MASTER) and have seen it work in XBMC (for me is Ctrl+Alt+F7) when I go back to that screen (see my previous comment above). The problem I am having is after I get the remote working and stop and start the bluetooth service, the remote doesnt reconnect automatically. I have to run the unpair and then the pair script again to get it to work again. Does yours work if you stop/start the bluetooth service ("sudo /etc/init.d/bluetooth stop" then "sudo /etc/init.d/bluetooth start") or if you restart the system?
I did as you suggested and tried setting the hci0 from SLAVE to MASTER after I re-started the bluetooth service (since if I do it before I start the bluetooth service it defaults back to SLAVE) when the remote was working but still the remote never connects again. If I unpair and pair the remote it works again (after about 30 sec of waiting I see my commands).
I ran the "/usr/share/doc/bluez/examples/list-devices" and here is what it says when the remote is working:
Now the only part that has me concerned is the Paired = 0. Maybe this is why it doesnt work between bluetooth sessions.
- Zerogoki - 2010-06-10 20:24
GOOD News!! (for the most part), I some how got my remote to auto connect when I stop/start the bluetooth service. I also got it to work across reboots (yay).
here's what I did. I was reading through faxo comments in post #395 and for some reason I started playing with the "sudo hcitool" commands. I stop and started the bluetooth service (so my remote wasnt working_ and I did an "sudo hcitool cc 00:26:43:BA:B6:57 " which posted some error
I kept playing around with this procedure and after looking at other commands it seems that sudo hcitool <almost anything> 00:26:43:BA:B6:57 " makes the remote work (like running that tool does or sets something up that makes everything fall into place).
So I went into the /etc/rc.local and just added my command (I added "sudo hcitool name 00:26:43:BA:B6:57") just above the "exit 0" and saved it. did a restart and poof! remote works as soon as I am in XBMC.
Well thats one for the books..
I did however download h00s' ps3bdremote file and played with it before getting this to work but I really dont think it did anything for me. So I am going to do a clean install of XBMC live and create a list of commands/steps I did and if I get it working ill post it and have a nice cold beer. Thanks to everyone that helped in getting me this far, if all goes well phase 2 will be getting the buttons setup as I want. but one step at a time.
p.s. I also tested doing "/etc/init.d/bluetooth stop" then "sudo bluetoothd -nd" to see the commands (I had to go into another screen and do my magical "sudo hcitool name 00:26:43:BA:B6:57" command and when I went back to the bluetoothd debug screen I saw my command. I also verified that the time out works too (still getting that weird GLib-CRITICAL" error I posted above but at this point I dont care).
XBMC Live 9.11 with PS3 BD Remote , Yes it really works! - Zerogoki - 2010-06-10 22:38
So.... I did everything from scratch and bibbity bobbity boo, wam bam thank you mam, the remote works in XBMC live!
Here are the step by step instructions I took to get this working. I pretty much did this on my machine while typing this up so I shouldnt be missing anything.
Install XBMC live to a harddrive or USB drive.
After you boot into XBMC for the first time just hit "Ctrl+Alt+F1" to get to the first screen's terminal. Log in using the username password you setup when installing XBMC.
Now the first then we are going to do is an update and install all the software we need for this.
Next we will setup the "uniput" module which is what sends the remote commands into the kernel.
At this point bluetooth should be installed and running. you can confirm by doing: "sudo /etc/init.d/bluetooth status". It should say bluetooth is running.
Next let start the pairing process.
Just to note normally before I run this I like to start holding down the start+enter keys on the remote for a few seconds before I press enter. If it finds something it will post the address with the name (note sometimes the remote's name at first comes up as [unknown]. If only 1 thing comes up just type 1 and enter. It should register the device followed by a "done".
Now if you press the up button on the remote and nothing happens after like a minute (it should cycle through your commands send so far); try this:
Next we will update the bluetooth input file.
Here you want to see the remote's config info. what we want to do is replace where it has [11:22:33:44:55] with your remote's address. dont forget to uncomment the line (remote the # just before it) so it runs when the script runs. If you wnat the remote to time out after lets say 30 seconds, uncomment the line just below that says IdleTimeout=30 (note you can change this to anything you want).
For now lets just skip the editing of the buttons. lets make sure everything is working so far.
Before we restart there is one last thing we should add that I need to get it working 100% . We will open the rc.local file add add the hcitool command to this file.
In the file go just above the last line ("exit 0"), add the command "sudo hcitool name xx:xx:xx:xx:xx" where again the xx's are your remote's address". save it (Ctrl+X, Y, and enter) and now we should be ready for the restart. You should be able to also go back to the XBMC screen (Ctrl+Alt+F7) and see the remote work.
When you restart XBMC the remote should respond to simple commands like up, down, enter, play, and stop, etc. We will need to customize the input.conf and/or key mappings xml file to fully use all the keys.
I just wanted to add that I noticed that when I run the pairing script the very first think I saw after my command was that "[ xxx.xxxxxxx] hci_cmd_task: hci0 command tx timeout" message which is what I get when I run the hcitool command. I am figuring this error is what I needed to have happen when the bluetooth service starts or I reboot to get the remote to work.
Again I wanted to say thanks to Kitlaan for his code and everyone else that commented in this thread on getting this working in XBMC Live. Now where is my beer!?
- vonb3ta - 2010-06-13 12:37
thanks Zerogoki , your technique worked for me
I changed the
Which works as well, thus no need for the Bluetooth address
Anyway I am working on a Shell Script to do all of this in an automated system as well as install any of the Aeon Skins
ps3 patch cannot be applied to bluez 4.66 - logistiker - 2010-06-21 21:31
Ruff: I'm trying to apply your patch to bluez 4.66. It applies but it does not build. It builds on 4.65 correctly. Here's the error it stops on when running make:
- vonb3ta - 2010-06-22 23:15
perhaps my script can help, just use the "install Ps3 remote part" as well as the pair part of the script.
kitlaan PPA -- bluez 4.66 - kitlaan - 2010-06-26 02:09
logistiker Wrote:Ruff: I'm trying to apply your patch to bluez 4.66. It applies but it does not build. It builds on 4.65 correctly.
My latest patch now handles 4.66. The bluez code changed how debug prints worked in the last release. In addition, a bug was fixed where a crash could happen during idle disconnect (thanks Kristian!).
bluez-4.66 packages for lucid and karmic are in the build queue for my PPA. They have NOT been tested, as of this post, so user beware.