Kodi Community Forum

Full Version: [LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i mean, i try to pair my bdremote without the applet (only with the demon) and without the script but i don't know if the remote is really connected or not

is there a sort of command that i can use to know it? If only there was a led in the remote... (damn sony)
you can check whether remote is connected by executing
root@ruff:~# cat /proc/bus/input/devices | grep emot
N: Name="PS3 Remote Controller"
root@ruff:~#
You can also check by running /usr/share/doc/bluez/examples/list-devices
ty all, I'll try it this weekend
Hey people!
I still havent got my ps3 bd to run, but what i opt for is that the 1st post in this topic is updated including kitlaan's debt etc.

I am not sure anymore what and what not to install and to do. I also have a shitload of blueman, bluez, blue-applet and whatnot kind of packages installed.

I would, and I am sure a lot of others appreciate a nice new clean little how to on how to 1.) install this on a clean system and 2.) maybe suggest what packages in general to remove to start this again from scratch.

Thnx a lot in advance!
Hey Ruff, any word yet on your patches from bluez? Also, do you know why bluetoothd is tacking the CPU to 100%?
(T: XBMCLive)root@XBMCLive:/home/temp/bdremotescript# ./ps3_pair.py
from: can't read /var/mail/bluez.Manager
./ps3_pair.py: line 2: import: command not found
./ps3_pair.py: line 3: import: command not found
./ps3_pair.py: line 4: import: command not found
./ps3_pair.py: line 5: import: command not found
./ps3_pair.py: line 7: syntax error near unexpected token `('
./ps3_pair.py: line 7: `def handler(signum, frame):'

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 90, in <module>
Main()
File "ps3_pair.py", line 18, in __init__
self.adapter = self.manager.GetAdapter()
File "/home/temp/bdremotescript/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

Any comments?
have you installed bluez?

sudo apt-get install bluez
(T: XBMCLive)root@XBMCLive:/home/xbmc# aptitude show bluez
Package: bluez
State: installed
Automatically installed: no
Version: 4.57-0ubuntu1~kitlaan4
Priority: optional
Section: admin
Maintainer: Ubuntu Developers <[email protected]>
Uncompressed Size: 1253k
Depends: libbluetooth3 (>= 4.57-0ubuntu1~kitlaan4), libc6 (>= 2.4), libdbus-1-3 (>= 1.1.1), libglib2.0-0 (>= 2.16.0), libnl1,
libusb-0.1-4 (>= 2:0.1.12), module-init-tools, makedev | udev, lsb-base, dbus
Suggests: python-gobject, python-dbus
Conflicts: bluez-utils (<= 3.36-3)
Replaces: bluez-audio, bluez-input, bluez-network, bluez-serial, bluez-utils (<= 4.9)
Description: Bluetooth tools and daemons
This package contains tools and system daemons for using Bluetooth devices.

BlueZ is the official Linux Bluetooth protocol stack. It is an Open Source project distributed under GNU General Public
License (GPL).


yups

bluethoothd isnt working though :S
I now removed bluez and installed bluez from jaunty again
and bluetoohd hd and ps3_pair.py are working again....
When i try to install patched bluez though (bluez-patched_4.54-1_i386.deb)

i get

Unpacking bluez-patched (from bluez-patched_4.54-1_i386.deb) ...
dpkg: error processing bluez-patched_4.54-1_i386.deb (--install):
trying to overwrite `/etc/dbus-1/system.d/bluetooth.conf', which is also in package bluez
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
bluez-patched_4.54-1_i386.deb

//edit

latest and gratest

(T: XBMCLive)root@XBMCLive:/home/xbmc# bluetoothd -nd
bluetoothd[3587]: Bluetooth daemon 4.54
bluetoothd[3587]: Enabling debug information
bluetoothd[3587]: parsing main.conf
bluetoothd[3587]: discovto=0
bluetoothd[3587]: pairto=0
bluetoothd[3587]: pageto=8192
bluetoothd[3587]: name=%h-%d
bluetoothd[3587]: class=0x000100
bluetoothd[3587]: discov_interval=0
bluetoothd[3587]: Key file does not have key 'DeviceID'
bluetoothd[3587]: Starting SDP server
bluetoothd[3587]: Loading builtin plugins
bluetoothd[3587]: Loading audio plugin
bluetoothd[3587]: Loading input plugin
bluetoothd[3587]: Loading serial plugin
bluetoothd[3587]: Loading network plugin
bluetoothd[3587]: Loading service plugin
bluetoothd[3587]: Loading hciops plugin
bluetoothd[3587]: Loading hal plugin
bluetoothd[3587]: Loading storage plugin
bluetoothd[3587]: Loading plugins /usr/local/lib/bluetooth/plugins
bluetoothd[3587]: register_interface: path /org/bluez/3587/any
bluetoothd[3587]: Registered interface org.bluez.Service on path /org/bluez/3587/any
bluetoothd[3587]: /etc/bluetooth/network.conf: Key file does not have key 'Disable'
bluetoothd[3587]: /etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'
bluetoothd[3587]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[3587]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[3587]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'
bluetoothd[3587]: Config options: InterfacePrefix=bnep%d, PANU_Script=(null), GN_Script=(null), NAP_Script=(null), GN_Interface=pan0, NAP_Interface=pan1, Security=true
bluetoothd[3587]: Can't create GN bridge
bluetoothd[3587]: input.conf: Key file does not have key 'IdleTimeout'

(bluetoothd:3587): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Key file does not have group 'PS3 Remote'
Segmentation fault


this is with patched bluez, as i understand you first need to install the patch.deb and only after that install jaunty basic bluez? otherwise some errors due to overwriting of files.
If you're using the "patched" bluez, I recommend that you uninstall all of the regular bluez packages. Then just install the "patched" deb.

I'll see about building a Jaunty system to see if I can find out problem you're having with the version in the Jaunty PPA. The original version in Jaunty (4.32) is pretty darn old, so the 4.57 backport to Jaunty from Karmic may not have been done right.

For the pairing, you'll probably need the "python-bluez" package. The other errors you're seeing with the pair script is probably because it has Windows EOLs (need to dos2unix the file).
kitlaan Wrote:I'll see about building a Jaunty system to see if I can find out problem you're having with the version in the Jaunty PPA. The original version in Jaunty (4.32) is pretty darn old, so the 4.57 backport to Jaunty from Karmic may not have been done right.

I found a few bugs in my Jaunty code; a new build has been submitted to launchpad, so a new version is available now. (I've also pushed the fixes to my Karmic code, so a new package will show up there too.)
Here's the entire setup, from scratch. (Hopefully I didn't miss anything, as I'm going from memory and going back through the posts.)

Note: No LIRC required. These steps currently only work with the Sony PS3 Remote. Packages are available for Ubuntu Karmic and Jaunty.

  1. Install PPA: kitlaan PPA.
  2. Update and upgrade at least the bluez package. Also install the python-bluez package.
  3. Make sure the uinput kernel module is loaded. If not, run sudo modprobe uinput and add "uinput" to the file /etc/modules.
  4. Get the pairing program ps3_pair.tar.gz. Extract the archive (tar xvf ps3_pair.tar.gz) and run the script (python ps3_pair.py), while holding the ENTER and START keys on the remote for 7+ seconds. It should detect the remote.
  5. Run "/usr/share/doc/bluez/examples/list-devices" to verify that the remote is paired (and connected). Also, running "cat /proc/bus/input/devices | grep emot" should show the remote.
  6. Customize the file "/etc/bluetooth/input.conf" for button mappings and timeout values.
  7. At this point, the remote should connect (and auto-disconnect after a timeout, if configured). The d-pad is probably the best way to test it within xbmc. If you have a terminal active, pressing the number buttons should type the number.

For people that want to go from source, the latest patch is here (applies cleanly to bluez 4.51 and higher). I hope to submit the patch upstream, but haven't quite figured out the steps for that yet.

Whew. I hope that's all of it.
i think i got further but not there yet;
# Run "/usr/share/doc/bluez/examples/list-devices" to verify that the remote is paired (and connected).

Output;

(T: XBMCLive)root@XBMCLive:/home/temp/bdremotescript# /usr/share/doc/bluez/examples/list-devices
[ /org/bluez/3022/hci0 ]
Name = BlueZ
Powered = 1
Devices = dev_00_24_33_98_D2_E3
DiscoverableTimeout = 180
PairableTimeout = 0
Discoverable = 0
Address = 00:0A:3A:72:B6:B7
Discovering = 0
Pairable = 1
Class = 655620
[ /org/bluez/3022/hci0/dev_00_24_33_98_D2_E3 ]
Name = BD Remote Control
Paired = 0
Adapter = /org/bluez/3022/hci0
Alias = BD Remote Control
Connected = 0
UUIDs =
Address = 00:24:33:98Big Grin2:E3
Class = 0x00250c
Trusted = 1

* Seems very postive to me






Also, running "cat /proc/bus/input/devices | grep emot" should show the remote.

Output;

(T: XBMCLive)root@XBMCLive:/home/temp/bdremotescript# cat /proc/bus/input/devices | grep emot
(T: XBMCLive)root@XBMCLive:/home/temp/bdremotescript#

* Its not there, i listed without grep to make double sure, this does not have a positive result Sad


# At this point, the remote should connect (and auto-disconnect after a timeout, if configured). The d-pad is probably the best way to test it within xbmc. If you have a terminal active, pressing the number buttons should type the number.

Q: loading the module trough /etc/modules is enough to get all of this working after reboot? No repairing, or starting of any other script necessary?


I hope we can solve my problem,
THnx so far for your updates!
menno Wrote:(T: XBMCLive)root@XBMCLive:/home/temp/bdremotescript# /usr/share/doc/bluez/examples/list-devices
[ /org/bluez/3022/hci0 ]
Name = BlueZ
Powered = 1
Devices = dev_00_24_33_98_D2_E3
DiscoverableTimeout = 180
PairableTimeout = 0
Discoverable = 0
Address = 00:0A:3A:72:B6:B7
Discovering = 0
Pairable = 1
Class = 655620
[ /org/bluez/3022/hci0/dev_00_24_33_98_D2_E3 ]
Name = BD Remote Control
Paired = 0
Adapter = /org/bluez/3022/hci0
Alias = BD Remote Control
Connected = 0
UUIDs =
Address = 00:24:33:98Big Grin2:E3
Class = 0x00250c
Trusted = 1

Looks like it's paired up right, but the remote doesn't seem to be connected. The cat /proc/bus/input/devices verifies that it isn't connected. Can you paste the output of:
Code:
sudo /etc/init.d bluetoothd stop
sudo bluetoothd -nd
# wait a few seconds, and then press buttons on the remote


menno Wrote:Q: loading the module trough /etc/modules is enough to get all of this working after reboot? No repairing, or starting of any other script necessary?

Correct. Once the "uinput" module is added to /etc/modules, and you've paired once already, you shouldn't have to do anything new to just have it work.