PlayStation3 (PS3) bluetooth remote and LIRC?
#16
Thanks and sorry for the OT!
Reply
#17
Wow, great job d4rk!

Can you give us some little instructions on how to install/configure this?
Reply
#18
Look here: http://wiki.xbmc.org/?title=EventServer

It's all the EventClients including the PS3 Remote.

/Topfs2
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#19
I use http://antst.mine.nu/linuxdriverforsonybdremote and then use lirc. This is better as I do not have to pair the remote all the time and I can use the remote in any program supporting lirc Smile
Reply
#20
Awesome. I will have to try this out.

-Brandon
Reply
#21
I thought I would revive and use this thread to get a complete solution for using the PS3 BD Remote, especially that if you go now to a nearby Liquidating Circuit City, you can get this remote for 17$! dirt cheap.

As already known, the ps3_remote.py works perfectly, however you need to pair it every time you reboot and this is the only issue that needs to be solved.

I tried the tool described in comment #19 but couldn't make it to work, I wonder if anybody has a documented steps for how to use the bdremotedb.

For now I am using the ps3remote.py and reduced the pain of ssh to the box and run the script everytime I did the following.

- create a a file call it <whateveryoucallit>.sh
- add the following lines

#!/bin/bash

sleep 10
cd /home/xbmc/XBMC-FILES/SOURCE-CODE/XBMC/tools/EventClients/Clients/PS3\ BD\ Remote/
./ps3_remote.py 127.0.0.1 9777 &> /dev/null

-save it under /etc/init.d
-execute
%sudo update-rc.d <whateveryoucallit>.sh defaults

- now everytime you reboot it will automatically prompts you to pair your remote, if you missed it, it will prompt you again....


This is a temporary solution, so I wonder if the author of the ps3_remote.py can shed some light on what are the implementation obstacles he faced that prevented him from getting the pairing issue solved and if there is any work in progress.

Gonna start looking at the script in details and see if I can figure out something.

If somebody has another solution please go ahead and post it.
Reply
#22
Back in the day, before the script was modified to use the eventclient, i just had the script loop forever - if it wasn't connected, then try to pair until it connects. It worked for me, but it was far from ideal. At this point, it pretty much works the way you are using it. It needs some work, but i think the bluetooth tools in linux need some help first.

In the mean time, it might help you to note that the key events (outlined somewhere in the forums - probably in this thread, i can't remember) sent by the remote are received by the computer even if the remote isn't paired. Someone out there wrote a script that reads BD data, and if it finds one coming from the remote, it sends a command to LIRC. This method lets you use the remote in an unpaired state, but i don't know if battery life is affected using this method or not. You can find it here: http://antst.mine.nu/linuxdriverforsonybdremote

Good luck
Reply
#23
brandonj Wrote:Back in the day, before the script was modified to use the eventclient, i just had the script loop forever - if it wasn't connected, then try to pair until it connects. It worked for me, but it was far from ideal. At this point, it pretty much works the way you are using it. It needs some work, but i think the bluetooth tools in linux need some help first.

In the mean time, it might help you to note that the key events (outlined somewhere in the forums - probably in this thread, i can't remember) sent by the remote are received by the computer even if the remote isn't paired. Someone out there wrote a script that reads BD data, and if it finds one coming from the remote, it sends a command to LIRC. This method lets you use the remote in an unpaired state, but i don't know if battery life is affected using this method or not. You can find it here: http://antst.mine.nu/linuxdriverforsonybdremote

Good luck


right, this was the tool that I mentioned, but I wasn't able to make it work, I compiled it, ran it but I couldn't get any data when running irw.
Have you tried it? di it work for you?
Reply
#24
Currently, you need to use ps3d.py (executed as root) to have it autoconnect after initial pairing. I haven't tested using the BD Remote with it in a few months.

The reason it needs to run as root is that it needs to listen on certain privileged Bluetooth sockets, specifically L2CAP PSMs 17 and 19.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#25
d4rk Wrote:Currently, you need to use ps3d.py (executed as root) to have it autoconnect after initial pairing. I haven't tested using the BD Remote with it in a few months.

The reason it needs to run as root is that it needs to listen on certain privileged Bluetooth sockets, specifically L2CAP PSMs 17 and 19.

I tried and I can't make it work it is stuck in the while loop

def start_hidd(bdaddr=None, ipaddr="127.0.0.1"):
devices = [ 'PLAYSTATION®3 Controller',
'BD Remote Control' ]
hid = HID(bdaddr)
while True:
if hid.listen():
(csock, addr) = hid.get_control_socket()
device_name = bt_lookup_name(addr[0])
if device_name == devices[0]:


I ran it like this

sudo ./ps3d.py 00:19:C1:5A:31Big Grin1 127.0.0.1
Connecting to Bluetooth device: 00:19:C1:5A:31Big Grin1
Connecting to IP: 127.0.0.1
Starting HID daemon



did it work for you?
Reply
#26
d4rk Wrote:Currently, you need to use ps3d.py (executed as root) to have it autoconnect after initial pairing.

when you mentioned "initial pairing", can you elaborate please, do I need to do other steps from just running ps3d.py ? do I need to pair it with linux directely?
If yes, how would I do it from a command line? I am using the live version.

Thanks
Reply
#27
danillll Wrote:when you mentioned "initial pairing", can you elaborate please, do I need to do other steps from just running ps3d.py ? do I need to pair it with linux directely?
If yes, how would I do it from a command line? I am using the live version.

Thanks

By initial pairing, I mean pairing it once using the ps3_remote.py program. When you run that program, it will prompt you to press start + enter, which will initiate pairing.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#28
I just recently began using XBMC, which is awesome by the way, and bought a PS3 BD Remote for use with XBMC. I use xmbc-linuxport r18760 in Ubuntu 8.10.

The remote works well with ps3_remote.py, but I can't use it at all with bdremoted and ps3d.py doesn't seem to have any effect on operation. However, sporadically the remote times out and won't reconnect even if pressing Enter + Start and/or running ps3d.py concurrently with ps3_remote.py. It doesn't even show up on Bluetooth inquiries until I "reboot" it by replacing the batteries.

Has anyone else experienced this?

I have also read that the remote is supposed to send its keypresses even when not paired, but hcidump does not show any unsolicited traffic.
Reply
#29
Folks,

I still have a little problem understanding the relation between ps3d.py and ps3_remote.py. From the README.txt:
Quote:The remote needs to be paired initially with the 'ps3_remote.py'
program in this directory which you can continue using if you do not
want to run 'ps3d.py' as root.
By "initially" I guess that means on every reboot? I don't mind running ps3d.py as root since it's only the HTPC box, so does this mean I don't need ps3_remote.py?
Quote:The disadvantage of using
'ps3_remote.py' is that pairing is required on every run. Once initial
pairing is done, 'ps3d.py', when run as root, will automatically
detect incoming connections from both the PS3 remote and the Sixaxis
controller.
Is the "disadvantage" a fact, or does it only apply in the case where I don't want to run ps3d.py as root? Though you talk about running ps3d.py as root and pairing with ps3_remote.py, so I assume that you have to use it in any case? Again, "every run" means every system startup?

So is it correct that the only automatic solution (aka: "boot, start xbmc and the remote works") would be to put ps3_remote.py into a startup script as danilll suggests? But then why does it call it every 10 seconds, why not just once? As far as I understand, ps3_remote.py loops until the remote is paired.

As you may noticed, I'm pretty confused. Wink It would be great if someone could roughly describe what each of the two scripts is designed for, and what scenarios of usage there are for a remote control.

Cheers,

-freezy.
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#30
Oh and don't get me wrong: At the moment, running ps3_remote.py on the shell, it works great. Just looking for an automatic solution and a global understanding of this EventClient implementation.
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
PlayStation3 (PS3) bluetooth remote and LIRC?0