• 1
  • 41
  • 42
  • 43(current)
  • 44
  • 45
  • 56
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS
Question 
Infinitatus Wrote:I was almost there, today i found it:

dbus-send --system --dest=org.bluez --print-reply \
/org/bluez/.../hci0/dev_XX_XX_XX_XX_XX_XX org.bluez.Input.Connect did the job. Rolleyes

I still have one problem, after reboot I have to reconnect my PS3 remote again: If i do, like above, it gives me

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files

But then the remote works. Although it won´t use the input.conf i copied from the xbmc wiki guide. It just use the default buttons.

Huh lost again

Opening a console to activate is not very friendly for my wife who is a total computernoob.
Reply
Sure you are using kitlaan's bluez version?

try this
Code:
sudo apt-get purge bluez

Code:
sudo nano /etc/apt/preferences

And add the following content
Code:
Package: bluez
Pin: release o=Ubuntu
Pin-Priority: -10

Package: bluez
Pin: release o=LP-PPA-kitlaan
Pin-Priority: 900

Then

Quote:sudo apt-get update
sudo apt-get install bluez
Reply
Just to be clear from start it should look like this

Code:
sudo su
apt-get purge bluez
echo deb http://ppa.launchpad.net/kitlaan/ppa/ubuntu oneiric main >> /etc/apt/sources.list
echo deb-src http://ppa.launchpad.net/kitlaan/ppa/ubuntu oneiric main >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6F7177CC

Now we will change the priority of the repos, so we will get bluez package from kitlaan's repo. We will open the following file for edit
Code:
nano /etc/apt/preferences

And add the following content
Code:
Package: bluez
Pin: release o=Ubuntu
Pin-Priority: -10

Package: bluez
Pin: release o=LP-PPA-kitlaan
Pin-Priority: 900

Now we will update and install bluez
Code:
apt-get update
apt-get install bluez
exit
Reply
Thanks, i will look into it, when i am home. (working now).

So i have to use the jaunty version of bluez? because i have seen up to oneiric versions of kitlaans bluez on his website.
Reply
I did used the oneiric version of kitlaan, just checked it and reinstalled it. Playing around with the idle times, I discovered that input.conf worked, but it won´t pick up the changed buttons (input.conf like in the guide)
And like I said before, a reboot disconnects the remote and i have to manually connect it again:
dbus-send --system --dest=org.bluez --print-reply \
/org/bluez/.../hci0/dev_XX_XX_XX_XX_XX_XX org.bluez.Input.Connect

Any other way to connect won´t work (ok unpairing and pairing the ps3 remote)
But no auto connect.

BTW I use XBMC Snipex ppa on a asus E35M-I DELUXE witch has bluetooth on the motherboard.

Another thing I tried: hciconfig hdi0 lm ACCEPT,MASTER -> didn´t work either to auto connect.
Reply
It appears that I'm not alone in experiencing problems recently setting up the communication between a Sony Bluetooth BD/Playstation controller and Linux. These problems have been caused by Oneiric Ubuntu sources leapfrogging Kitlaan's PPA. (The modified code was developed by Kitlaan and Ruff; the changes are pretty extensive in the areas touched, so the bluez project hasn't yet agreed to accept it. Also, http://h00s.net/ps3bdremote.tar.gz, referenced in some of the other postings, is not currently available.)

I found that although running ps3_pair.py appeared to work, and the device was listed when running list-devices, it showed 'Connected = 0' and was not listed when running 'cat /proc/bus/input/devices'.

After a lot of experimenting here's an approach that worked for me on Mythbuntu 11.10 (MythTV on Oneiric Ocelot). Note that this approach assumes that you have access to a graphical interface (if you're using XBMC Live then according to an earlier posting you need to use fluxbox).

This approach is based on information posted on this forum and elsewhere - thanks to all of you for sharing the information (and of course to Ruff and Kitlaan for writing the code).

1. If you already have bluez installed then uninstall it by entering:
Code:
sudo apt-get purge bluez

2. Ensure that your bluetooth receiver (dongle or built in) is listed when you run lsusb. It should display something similar to this:
Code:
Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

3. We need to specify that when we install bluez we want to use Kitlaan's patched version, by doing the following:

Add the following lines at the end of /etc/apt/sources.list

Code:
deb http://ppa.launchpad.net/kitlaan/ppa/ubuntu oneiric main
deb-src http://ppa.launchpad.net/kitlaan/ppa/ubuntu oneiric main
(Change 'oneiric' to the version of Ubuntu that you're running in the previous two lines if it's not 11.10.)

Run the following command:
Code:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6F7177CC

Create a file /etc/apt/preferences.d/bluez-pin-700
which contains the following:

Code:
Package: *
Pin: release o=LP-PPA-kitlaan
Pin-Priority: 700

4. Now install bluez by issuing the following commands:
Code:
sudo apt-get update
sudo apt-get install bluez

5. Check that you have the correct version of bluez by running:
Code:
dpkg -l |grep bluez

The result should be:
Code:
ii  bluez      4.96-0ubuntu3+kitlaan1~oneiric       Bluetooth tools and daemons

(If the result is '4.96-0ubuntu4' then you have the version where Kitlaan's patches have been overwritten.)

6. Restart the bluetooth service:
Code:
sudo service bluetooth restart

7. Obtain and run Kitlaan's pairing program by issuing the following commands:

Code:
cd ~
wget http://kitlaan.twinaxis.com/projects/bluez-ps3remote/ps3pair.tar.gz
tar xvfz ps3pair.tar.gz
cd ~/ps3pair
sudo python ps3_pair.py

Hold the START and ENTER buttons on the PS3 remote; the result should be similar to the following:

Code:
vaughan@myth1110b:~/ps3pair$ sudo python ps3_pair.py
Please HOLD the START and ENTER buttons on the PS3 remote.
Searching for devices, please wait...
Found:
1: 00:06:F5:94:20:29 [BD Remote Control]
Select the device you wish to add [1]: 1
Registering device...  Done

(This causes data about the paired device to be stored in a directory off /var/lib/bluetooth.) (If this doesn't work first time, then keep trying - on one of my systems this only worked on the third or fourth attempt.)

After this, issuing '/usr/share/doc/bluez/examples/list-devices' should show something similar to the following:
Code:
[ /org/bluez/3651/hci0 ]
    Name = myth1110b-0
    Powered = 1
    Devices = dev_00_06_F5_94_20_29
    DiscoverableTimeout = 0
    PairableTimeout = 0
    Discoverable = 0
    Address = 00:15:83:3D:0A:57
    Discovering = 0
    Pairable = 1
    Class = 4849920
    UUIDs = 0x1000 0x1001 0x1112 0x111f 0x110a 0x110c 0x110e 0x1103
    [ /org/bluez/3651/hci0/dev_00_06_F5_94_20_29 ]
        Name = BD Remote Control
        Paired = 0
        Adapter = /org/bluez/3651/hci0
        Alias = BD Remote Control
        Connected = 0
        UUIDs = 0x1124 0x1200
        Address = 00:06:F5:94:20:29
        Services = dbus.Array([], signature=dbus.Signature('o'), variant_level=1)
        Class = 0x00250c
        Trusted = 1
        Blocked = 0

(Note that Connected is set to '0'.)

7. Install the Bluetooth manager by issuing the following:
Code:
sudo apt-get install blueman

8. Run the Bluetooth manager by opening (under X):
Applications->Settings->Bluetooth Manager
It should display a list of known Bluetooth Devices comprising just 'BD Remote Control'.
Right click on 'BD Remote Control' and click on 'Input Service'.
It may display 'Connection Failed: Host is down (112) - this isn't necessarily a problem.
If you then key on the digits (0-9) on the remote control while focus is still on the 'Bluetooth Devices' display then a window should open up which displays the numbers which you key.

If you shift focus to a different window then the results of the keypresses should be displayed in this different window.

If you issue 'cat /proc/bus/input/devices' the output should contain something similar to the following:

Code:
I: Bus=0005 Vendor=054c Product=0306 Version=0000
N: Name="PS3 Remote Controller"
P: Phys=
S: Sysfs=/devices/virtual/input/input4
U: Uniq=
H: Handlers=kbd event4
B: PROP=0
B: EV=3
B: KEY=80000000 0 700000 1083c100 8c00ea 0 6bc00000 1 0 8000 1102 c0000801 801680 0 0 10000ffe


9. Set the IdleTimeout value in /etc/bluetooth/input.conf: remove the '#' from the start of the line and set it to, say, 600 (seconds). (Issue 'sudo service bluetooth restart' after modifying input.conf.) (The bluetooth connection is disconnected after the IdleTimeout period expires; after that, the response to the next keypress on the remote control is delayed while the bluetooth connection is reestablished.)

10. If there is a risk that your system may shut down or suspend before the timeout has expired and terminated the bluetooth connection you may like to refer to the Baswazz posting from April 2011 referencing the bt-disconnect-all script (to prevent the "battery dies in less than a week" issue).

11. With this configuration I found that it worked fine until the system was restarted. After this the remote control had no effect, and nothing was listed when running list-devices. After manually entering 'sudo service bluetooth restart' the control worked again. There may be a more elegant way of doing this, but I found that after adding a line
Code:
service bluetooth restart
before 'exit 0' in /etc/rc.local it would then work OK after restarting the system.

12. Now tailor the keymappings in /etc/bluetooth/input.conf as desired for MythTV/XBMC, and configure lirc if/as necessary.

Hope this of of use - Vaughan
Reply
pumkinut Wrote:You'd need to set up a button for the screenshot command in input.conf.

For example if you wanted to use the Blue button for taking screenshot it would be as such:
Code:
0x80 = KEY_PRINTSCREEN   #BLUE

That's if you're setting up the remote to send keyboard presses, since the default screenshot key is "Print Screen".

This isn't working Sad

Edit: No print screen in input.h? :O
There are scroll-lock and num-lock but not print screen :/
How can we add this?
Reply
Thanks for the detailed how-to, Vaughn! I'm new to this forum and carefully read the first 20 or so pages...but then jumped here to the end. Hopefully I didn't miss anything crucial.

I followed your instructions with exactly the results you described up thru step 8. The Bluetooth Manager successfully displayed the "BD Remote Control" and when I clicked "Input Service", I got the "Connection Failed: Host is down" error as you described.

However, when I pressed the number keys on my remote, it failed to open any window and display those digits. Nor would it get displayed in the terminal window that had focus.

Additionally, "cat /proc/bus/input/devices" only displayed my usb keyboard. When I unplugged it, then it was completely empty. (I have no mouse.)

I am running Mythbuntu 11.10 with all the updates applied. I have also confirmed that I'm indeed using Kitlaan's version of bluez as you described. I tried restarting the bluetooth service, rebooting, and rerunning ps3_pair.py to no avail.

I'm using an Asus BT211 dongle that gets recognized by lsusb as:
Code:
Bus 005 Device 008: ID 0cf3:3005 Atheros Communications, Inc.

I feel like I'm so close...yet so far. Any ideas?

Thanks in advance for everyone's efforts to make this all work!
Reply
Hi CheckeredFlag - I must admit I'm new to the forum too - my posting was based on reading through the recent postings and experimenting. One other observation: I found that when I was running Bluetooth Manager and pressed buttons on the remote control, the coloured symbols showed up on the right of the Bluetooth Manager window, and the indicator of the traffic (bytes uploaded/downloaded) showed at the foot of the window - like in this screenshot that I found on the web here:
http://cdn.blogsdna.com/wp-content/uploa...ger_01.png
But I'm afraid I don't know why it's not working on your system - maybe some other readers can comment.
Reply
Actually, I got it working! I believe I needed a reboot somewhere along the way, but when I did I didn't realize that my dongle was no longer recognized until I removed it and replugged it. Then all was well.

So this seems to be my only issue:
Is there a way after booting to force rescaning usb devices to simulate plugging it in?

I believe I saw one person encountering a similar situation in this thread, but don't recall seeing a solution. Simply restarting the bluetooth daemon doesn't do the trick.
Reply
So are you saying that after a reboot, your Bluetooth dongle is not listed when you run lsusb, until you remove it an plug it in again? If so, it's worth googling wider afield (e.g. Linux forums, etc) as this isn't specifically an XMBC/MythTV/Bluetooth problem.
Reply
Seems that I only have trouble after I power down - a reboot seems ok. It's interesting that lsusb sees the device, but it's not active. It has a tiny blue led that is normally lit when active, but doesn't light till I unplug it and plug it back in after powering up. The led is actually pretty nice because I can tell at a glance whether it's active, yet it's dim enough not to be obnoxious.

After some googling, I've tried using usb_modeswitch to reset it, but it gets an error because the dongle doesn't respond. It appears to reset it fine after it's active though. It's not that big a deal - I can live with it. It should only be a problem after a power failure.
Reply
CheckeredFlag Wrote:Seems that I only have trouble after I power down - a reboot seems ok. It's interesting that lsusb sees the device, but it's not active. It has a tiny blue led that is normally lit when active, but doesn't light till I unplug it and plug it back in after powering up. The led is actually pretty nice because I can tell at a glance whether it's active, yet it's dim enough not to be obnoxious.

After some googling, I've tried using usb_modeswitch to reset it, but it gets an error because the dongle doesn't respond. It appears to reset it fine after it's active though. It's not that big a deal - I can live with it. It should only be a problem after a power failure.

Sorry not followed the details of this but is it a software issue or a hardware issue? If it is the latter then it could be worth trying another dongle. I use the ultra cheap ones from 7dayshop here in the UK and also fleabay. Never had any problems and usually just grab one that is kicking around to put into a system

Martin
Reply
ok took me a couple of days but had great success with ps3 remote and xbmc live just one question I have modified input.conf but cant seem to set a button to take screenshots in xbmc.Also how to eject the cd tray(I have looked at the key commands but cant find it).For my own sanity a little help please!
Check out my Fanart.tv stuff!
...........I also accept disc requests if image not on fanart.tv database !!!!
Reply
leepenny Wrote:ok took me a couple of days but had great success with ps3 remote and xbmc live just one question I have modified input.conf but cant seem to set a button to take screenshots in xbmc.(I have looked at the key commands but cant find it).For my own sanity a little help please!
It's in this thread. Link

The keyboard key is "Print Screen", but the Print Screen key is not in input.h. The source looks like it needs to be changed to accommodate.
Reply
  • 1
  • 41
  • 42
  • 43(current)
  • 44
  • 45
  • 56

Logout Mark Read Team Forum Stats Members Help
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS6