• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 56
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS

Went ahead and tried this one, seems nobody else did so far ?

I needed some deps sorted out first:
sudo apt-get install libglib2.0-dev libdbus-1-dev libasound2-dev

Patch went ok (i just copied both posts into one file).
Stopped bluetooth, configured, make'd and installed.
(Figured out i needed the /usr/local/sbin/ executables instead of the ones still in place.)

# /usr/local/sbin/bluetoothd -nd |grep ps3
bluetoothd[16114]: Bluetooth daemon 4.48
bluetoothd[16114]: Enabling debug information
bluetoothd[16114]: parsing main.conf
bluetoothd[16114]: Entering main loop
bluetoothd[16114]: Computer is classified as desktop
bluetoothd[16114]: Setting 0x000104 for major/minor device class
bluetoothd[16114]: Inquiry Failed with status 0x0c
bluetoothd[16114]: child 16116 exited
I do not see:
bluetoothd[14361]: Agent registered for hci0 at :1.688:/org/blueman/agent/adapter/hci0
bluetoothd[14361]: Changing service classes to 0x5a0104
When i press a button i see:
bluetoothd[16114]: adapter_get_device(00:21:4F:B2:3E:13)
bluetoothd[16114]: adapter_create_device(00:21:4F:B2:3E:13)
bluetoothd[16114]: Creating device /org/bluez/16114/hci0/dev_00_21_4F_B2_3E_13
bluetoothd[16114]: btd_device_ref(0xb8975a78): ref=1
bluetoothd[16114]: Removing temporary device /org/bluez/16114/hci0/dev_00_21_4F_B2_3E_13
bluetoothd[16114]: Removing device /org/bluez/16114/hci0/dev_00_21_4F_B2_3E_13
bluetoothd[16114]: btd_device_unref(0xb8975a78): ref=0
bluetoothd[16114]: device_free(0xb8975a78)

It does not seem to detect my remote as a ps3 remote or trigger the effects is has in you log ? Or am i missing some configuration somewhere ?

Edit: maybe my BT dongles (3) are incompatible somehow ?
- ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
- ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) (i appear to have two of these.)
Yes, as it is new instance of bluez, you need to register your device. Either new pairing with blueman, or, as I did, just copied /var/lib/bluetooth/ to new instance's (localstatedir). In your case, /usr/local/var/lib I presume. Clear destination of any entries before copying.
Crap, i don't have blueman, running a rather clean XBMC Live 9.04 Smile
Any suggestions how to pair on the commandline ?
edit: never mind, it's still paired to the 'working' dongle, or at least sending to it:

bluetoothd[3212]: Setting 0x000104 for major/minor device class
bluetoothd[3212]: Changing major/minor class to 0x000104

pressed a button:

bluetoothd[3212]: adapter_get_device(00:21:4F:B2:3E:13)
bluetoothd[3212]: adapter_create_device(00:21:4F:B2:3E:13)
bluetoothd[3212]: Creating device /org/bluez/3212/hci0/dev_00_21_4F_B2_3E_13
bluetoothd[3212]: Removing temporary device /org/bluez/3212/hci0/dev_00_21_4F_B2_3E_13
bluetoothd[3212]: Removing device /org/bluez/3212/hci0/dev_00_21_4F_B2_3E_13
No 'agent' message though. The other adapters don't show this 'get device' message either.. Sad

Edit: do you have any 'pairing' file or something in /var/lib/bluetooth ? Maybe i can add it manually ?
Checking the other adapters's folders, i find there is a 'hidd' file in the working adapter's folder with the device in it. Could that be it ?
something wrong with registration. If you have working pairing - as I said just copy /var/lib/bluetooth/* to /usr/local/var/lib/bluetooth/. This should copy all existing registrations and settings for each dongle. notice however that you need to use the same dongles - settings are bound to BD Address
If you have the time, would you kindly check if you could zip up the /var/lib/bluetooth/devicemac and put it somewhere ?

After checking several sites i think i need /var/lib/bluetooth/<deviceMAC>/pincode file with data to match my remote's mac. (even though it is pincode-less.) Since i'm running XBMC Live there is no gnome/kde applet(s) to install and do the pairing..

The only other way for me to get those is to wipe the xmbc live from disk after i backup 250 gb of movies by FTP.. -> install full 9.04 -> pair, save the files -> go back to live -> recompile bluez. etc.. Smile

ruff as a resume:
I haved paired the ps3 remote using blueman over the default bluez installation of Ubuntu wich is the version 4.39. And is working over xbmc standalone.
I suppose that this bluez version has both the "always connected" and "keymaps" problem (the always connected is true, the blueman show me the remote always transmiting /receiving data)

With your patch over bluez, both problems are resolved?
yes, with this patch it will disconnect BT channel in IdleTimeout seconds, forcing remote to sleep. If timeout specified less then 5sec (or not specified at all) - default 5min timeout will be enforced.
As for keys - yes, this patch (in posts above) is remapping keys to standard keyboard scancodes, also this mapping resembles XBMC keyboard mapping, thus you don't need to customize keymaps for quick start.
However, key remapping will not be submitted to bluez mainstream, as devs rejected it, stating that current mapping is logical, and new XInput2 is capable to handle it.
Will try to push at least option to choose alternate mapping for compatibility efforts. But after initial timeout will be accepted to mainstream.
First of all ruff, thank you for all support.

Ok, I manage to patch and compile bluez 4.47
I copied /var/lib/bluetooth/* to /usr/local/var/lib/bluetooth/
I killed old bluetoothd process and exec bluetoohd -nd from /usr/local/sbin and it works (disconnect and maping)
I have now a silly question of a noob. How can I make ubuntu to start automatically the patched version instead of the original version?

On a side note, I don't understand all consecuences patch reject from the the bluez's team. The 'XInput2' (sorry, I don't know what it is) solved our problems ? (autodisconnect and keymap)

./configure --prefix =/
make install-strip

This will install it into the / instead of /usr prefix.
WARNING it will overwrite your current bluez-version that you installed using apt-get Smile It will break when apt-get update finds a new version of bluez and wants to install it.
(In that case you could probably do a 'make install-strip' from the source folder again to re-break it hehe..)

Question: can you tar/gzip please your /var/lib/bluetooth folder ? and upload it somewhere for me pretty please Big Grin
I am on XBMC-Live and cannot use blueman or other program to pair it.. Sad Sad So i can't get the right data into /var/lib/bluetooth.. since i don't know what is supposed to be there.
If someone tar/gz's that folder for me i would be eternally gratefull, i can adapt it to the mac adress of my remote and all would be well (i think..)
cp /etc/init.d/bluetooth /etc/init.d/bluetooth.orig
patch -p0 <init.patch

--- /etc/init.d/bluetooth       2009-04-24 12:25:43.000000000 +0200
+++ /etc/init.d/bluetooth.local 2009-08-28 20:16:49.000000000 +0200
@@ -20,22 +20,22 @@
# startup control over dund and pand can be changed by editing
# /etc/default/bluetooth






test -f /etc/default/bluetooth && . /etc/default/bluetooth
test -f /etc/default/rcS && . /etc/default/rcS
XInput2 is new input driver for X.Org. It won't solve autodisconnect problem, it will allow to use current keycodes generated by remote.
Autodisconnect will be solved by the patch I submitted to bluez team.
Thank you Asrure
I uploaded the directory to:
I hope you find it usefull
Asure Wrote:If someone tar/gz's that folder for me i would be eternally gratefull, i can adapt it to the mac adress of my remote and all would be well (i think..)
will send mine to pm
I aplied the patch and now i can see in blueman how the remote is disconected.
Thank to all!!!
Thank you both!
Now to get to it to work Smile

Edit: Doesn't work. i changed all the macs to match my bd-remote, but to no avail. Installing Jaunty full now.. Smile
After fooling around for ~3 hrs with the three different dongles i had, i was about to give up.

My problem was extremely simple. The back side of my Asrock ION (near the fan) seems to generate a distortion that disrupts bluetooth transmission. How did i get my BT dongle in front of the fan ? I was using a cheap mini 4 port pen hub like below:
This placed the dongle in front of the fan.. (i had it in the port near the '4' written on top.)
I tilted the dongle UP so it points away from the Asrock and is ~10cm away from the back panel/fan, and moved the dongle to the port below the text 'usb'. Everything now works 100%. Big Grin

Guess that will teach me to use some cheap chinese $5 dongles with (apparently) improper shielding!

Thanks again to ruff and lido for sending the config files, and offcourse to the the patch ruff created!
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 56
Thread Rating:
  • 6 Vote(s) - 5 Average

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