• 1
  • 51
  • 52
  • 53(current)
  • 54
  • 55
  • 56
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS
So I'm fairly lost, I tried fostersimported directions, followed them to a T (copy/pasted into SSH). Everything looked like it went through fine, but nothing is working in Kodi or in desktop mode in a terminal (tried hitting number keys). I then added the keymap directions from Dragulus, still no go. There doesnt seem to be any gui program/settings available when in desktop mode for bluetooth devices. It seems to be paired, as when I try again it says already exists. Any ideas? Heres what it says when I check:

Quote:rob@Kodi:~$ /usr/share/doc/bluez/examples/list-devices
[ /org/bluez/557/hci0 ]
Name = Kodi-0
Powered = 1
Devices = dev_64_D4_BD_6B_E2_XX
DiscoverableTimeout = 0
PairableTimeout = 0
Discoverable = 0
Address = 54:27:1E:E8:37:XX
Discovering = 0
Pairable = 1
Class = 0
UUIDs = 0x1000 0x1001 0x1112 0x111f 0x110c 0x110e
[ /org/bluez/557/hci0/dev_64_D4_BD_6B_E2_XX ]
Product = 0x0306
Vendor = 0x054c
Name = BD Remote Control
Paired = 0
Adapter = /org/bluez/557/hci0
Alias = BD Remote Control
Version = 0x0110
Connected = 0
UUIDs = 0x1124 0x1200
Address = 64:D4:BD:6B:E2:XX
Services = dbus.Array([], signature=dbus.Signature('o'), variant_level=1)
Class = 0x00250c
Trusted = 1
Blocked = 0
Reply
Thanks very much to fostersimported for your posting of 2015-06-14 21:58 - very useful.

I've written up a few things that I've discovered through playing around with this just in case they're of use to anyone:

1. It's worth noting that /etc/bluetooth/input.conf contains an IdleTimeout setting, which is commented out by default. It's good for the remote controller battery life to use this since the power consumption is about 100 times less on standby than when connected. In fact when editing this file there should be an example in ~/bluez-4.101/input/input.conf as a result of the tar and patch operations above. Note that the idle timeout before the connection will be disconnected is in seconds, not minutes, so it's probably worth setting something like 'IdleTimeout=600' (600 seconds, i.e. 10 minutes).

2. When trying to pair the remote controls it can be useful to run the bluetooth daemon in foreground - in another ssh session type the following:
Code:
sudo service bluetooth stop
sudo bluetoothd -n -d


3. There are two different Sony PS3 remote controls around, and they appear to require different processes to get them working.

The older ones look like http://www.remotecentral.com/wn000383.jpg and take two AA batteries. The newer ones look like this one on Amazon.com: http://www.amazon.com/Media-Blu-ray-Remo...te+control - they are slightly longer, take two AAA batteries, and have a row of lights to show which device is being controlled (PS3/AMP/TV).

For the the older ones it's sufficient to run 'sudo python ps3_pair.py' as described above.

Whereas the only way I could make one of the newer ones work is by doing the following:

stop and restart bluetooth service (bluetoothd) (not always necessary but it can cure some problems)
Then run:
Code:
sudo python ps3_pair.py
It will display
Code:
Please HOLD the START and ENTER buttons on the PS3 remote.
Searching for devices, please wait...
Press START and ENTER simultaneously for about five seconds on the PS3 remote - 'PS3' light will start flashing

It will display something like:

Code:
Found:
1: 34:C7:31:04:25:1A [Unknown]
Select the device you wish to add [1]:

Press return - it will then display:
Code:
Registering device...  Done

After that, if you run
Code:
/usr/share/doc/bluez/examples/list-devices
it should show :
Code:
Trusted = 1

After this the remote control may work, or it may be necessary to do the following:

Press START and ENTER simultaneously for about five seconds on the PS3 remote - 'PS3' light will start flashing
Then type:
Code:
sudo bluez-test-input connect <device ID>
(where you replace <device ID> with whatever unique ID was displayed when you ran 'sudo python ps3_pair.py')

After that, if you run
Code:
/usr/share/doc/bluez/examples/list-devices
it should show :
Code:
Connected = 1

And more annoyingly, with the newer remote controls, I found that if you change the batteries you then need to re-run the START + ENTER and 'sudo bluez-test-input connect <device ID>' operation.

And finally, if you get the message
Code:
dbus.exceptions.DBusException: org.bluez.Error.AlreadyConnected: Already Connected
when trying to do any of the above then try stopping and restarting the bluetooth daemon.
Reply
I was hoping this would fix my problem but I can't seem to get it to work. I have the newer PS3 remote which blinks. I'm still at the point where it says Trusted = 1, but Connected = 0. What line is the <device ID> you speak of? I tried the Name = xxx and the Devices = xxx and Address = xxx lines, but all of them I get this message:

Quote:Traceback (most recent call last):
File "/usr/bin/bluez-test-input", line 37, in <module>
device = adapter.FindDevice(args[1])
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.DoesNotExist: Does Not Exist

I'm doing this while the Ps3 remote light is blinking and with the second bluetoothd ssh window open, and I also tried restarting it.
Reply
(2015-07-01, 18:22)RobNJ Wrote: What line is the <device ID> you speak of?

<device ID> is what was displayed when you ran 'sudo python ps3_pair.py' - so '34:C7:31:04:25:1A' (without the quotes) in my case - which seems to be the same as the Address = XXX value from list-devices.

Did the 'sudo python ps3_pair.py' command run OK? What was the output?

Was there anything shown in the bluetoothd output?

I get 'org.bluez.Error.DoesNotExist: Does Not Exist' if, say, I issue 'sudo bluez-test-input connect 34:C7:31:04:25:1B' instead of 'sudo bluez-test-input connect 34:C7:31:04:25:1A'.
Reply
Ohh.. I think i was using the wrong Address = line, i didnt notice they were different. after correcting that, sudo bluez-test-input connect <device ID> goes through correctly, and I get Connected = 1. The remote now works in Kodi. Do I need to set up a timeout for the remote to turn off to save battery life?
Reply
Good - glad that worked. I've had another look at the output from running list-devices - the first Address = xxx line seems to be the ID of the bluetooth dongle/receiver, and the second Address = xxx line is the ID of the remote control.

Yes, I'd recommend setting something like
IdleTimeout=600
in /etc/bluetooth/input.conf
Reply
Great, I will edit the conf file. Thanks for the help it seems I was just one command short of making it work. Does this method work if I wanted to try a different bluetooth remote (like the Amazon FireTV)?
Reply
(2015-07-04, 05:00)RobNJ Wrote: Does this method work if I wanted to try a different bluetooth remote (like the Amazon FireTV)?

Sorry - I have never tried any other bluetooth remotes. Let us know how you get on if you try the Amazon Fire TV remote control!
Reply
It should in principle. The patch is really for Xorg input whereby the number of keys recognized by Xorg is increased.
Reply
I tried it, yes it works. I reinstalled the batteries and according to Amazon help that gives you 5 minutes to pair the remote, or it says just hold the home button for 5-10 seconds. It was detected when I ran ps3_pair and I had to use the sudo bluez-test-input connect to get Connected = 1. All the buttons on the little FireTV remote seem to work, just need to change the keymap.
Reply
However, kind of a bummer, I've noticed if i turn off or reboot the system, it loses its pairing and goes back to connected = 0. tried holding the home button and that doesnt reconnect it, have to use sudo bluez-test-input connect every time to get it to reconnect. what a shame
Reply
It will show 'connected = 1' only when there is a connection in place. So if you reboot your system it will initially show 'connected = 0'. But if you then press a key on the remote control the PS3 light on it will flash briefly and it should re-establish the connection (which it can do, because it is now trusted). Pressing the keys on the remote control should now control your system, and at that point it will show 'connected = 1'.
Reply
I was referring to the FireTV Stick remote that I tried to use with this same method, which works great but fails to reconnect after a reboot, even if i mash all the keys or hold the home key down. As far as the PS3 remote goes, it seems the brand new batteries died in it. I'm confused how IdleTimeout of 600 (it says that value is minutes not seconds) would not wind up draining the batteries?
Reply
(2015-07-04, 19:54)RobNJ Wrote: As far as the PS3 remote goes, it seems the brand new batteries died in it. I'm confused how IdleTimeout of 600 (it says that value is minutes not seconds) would not wind up draining the batteries?
Did you check that the session had been terminated after the idle timeout period had expired (by, for example, running bluetoothd in foreground)?

As a result of running the 'patch' command it patches ~/bluez-4.101/input/input.conf which then includes the comment that the idle timeout is in seconds. And that is borne out by testing. When I measured it, the power consumption of one of the newer Sony PS3 remote controls (that takes two AAA batteries) was 14 mA when connected and 0.05 mA when in standby. So provided bluetoothd disconnects the session then the remote control goes into standby, and draws about 280 times less power than when connected.
Reply
Well, I gave up on it and tried Openelec/FireTV Stick remote. The GUI bluetooth pairing menu is a breathe of fresh air compared to copy pasting all of these commands into a Kodibuntu SSH. All works great. But hopefully my previous issues will help anyone else trying to get the Ps3 remote working, the only command that the tutorials on the previous page were missing was the 'sudo bluez-test-input connect <device ID>'
Reply
  • 1
  • 51
  • 52
  • 53(current)
  • 54
  • 55
  • 56

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