Kodi Community Forum
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS (/showthread.php?tid=50717)



- kubax - 2009-11-05

try running bluetooth -n -d running while useing the remote, and see if there are errors... by your details you gave, it could be almost evrything...

we need more details...

were there any errors during the script from flxfxp?


- folecr - 2009-11-06

pfriederichs Wrote:bluetoothd[3025]: Bluetooth daemon 4.54
bluetoothd[3025]: Enabling debug information
bluetoothd[3025]: parsing main.conf
.
.
.
.
bluetoothd[3025]: Key file does not have key 'DeviceID'
bluetoothd[3025]: Unable to get on D-Bus

Thanks!

It's possible that you have two instances of bluetoothd running, which is why we aren't seeing info that helps to debug.

Try following instructions from post #266.
http://forum.xbmc.org/showpost.php?p=425624&postcount=266
(or just kill all your bluetoothd processes, then run "bluetoothd -nd" as root.)

Hopefully, this should provide some info on what is happening.


- kitlaan - 2009-11-06

For those of you that want a pre-built deb for karmic, the packages on my PPA (amd64 and i386) have been working for me and two other people (that I know about) for the last few days.

The install is a bit easier than the script, since it's a drop-in replacement for the existing package. If you try the package, let me know how it goes! (If anyone wants jaunty debs, let me know.)

I'll be keeping it up-to-date if/when the base karmic version updates; you may have to "hold" the package so it doesn't get replaced until I get new versions out. If no problems show up, I'm going to try to submit the changes to the upstream developers. (If you want to learn to package, this was useful: https://wiki.ubuntu.com/PackagingGuide/Complete)

The input.conf provided in the package can be easily changed to customize the keys. It also gets re-parsed each time the remote is connected, which makes customizing the keys much easier: just timeout/disconnect and reconnect. (For the key strings, see the uinput.h from the bluez source, or /usr/include/linux/input.h. The file also allows configuring multiple remotes with different key maps and timeouts.

I haven't had the time/motivation to package up some pairing/unpairing scripts yet, but I'll get to it if people want.


- Amelandbor - 2009-11-06

I think it would be great if you packaged a complete solution for this or create a new how-to. Because still a lot of people have problems with this. It's working for me right now, but I've had also a lot of difficulties installing it.


- flxfxp - 2009-11-06

kitlaan Wrote:For those of you that want a pre-built deb for karmic, the packages on my PPA (amd64 and i386) have been working for me and two other people (that I know about) for the last few days.

The install is a bit easier than the script, since it's a drop-in replacement for the existing package. If you try the package, let me know how it goes! (If anyone wants jaunty debs, let me know.)

I'll be keeping it up-to-date if/when the base karmic version updates; you may have to "hold" the package so it doesn't get replaced until I get new versions out. If no problems show up, I'm going to try to submit the changes to the upstream developers. (If you want to learn to package, this was useful: https://wiki.ubuntu.com/PackagingGuide/Complete)

The input.conf provided in the package can be easily changed to customize the keys. It also gets re-parsed each time the remote is connected, which makes customizing the keys much easier: just timeout/disconnect and reconnect. (For the key strings, see the uinput.h from the bluez source, or /usr/include/linux/input.h. The file also allows configuring multiple remotes with different key maps and timeouts.

I haven't had the time/motivation to package up some pairing/unpairing scripts yet, but I'll get to it if people want.

What package are you talking about? Is this a reworked package from the one I provided, sounds like it does exactly the same. My deb should work fine on Karmic as far as my testing went.


- kubax - 2009-11-06

Hey,

i'm trying to make a apt repository for my mashines (so i doesn't have to compile it manually ^^)

my first choice was patched bluez... evrything works find, it get's compiled right, and i can apt-get it from my server..

sadly the input.conf doesn't get installed, and i want to add a init.d file (pulled from the original deb file)

any ideas how to change the makefile (i think) to include these 2 files from ./input/input.conf and the init.d file?

would be much easier if i doesn't have to install it manually.. and i think i would try to compile it also agains ubuntu karmic / jaunty (i'm running debian squeeze at the moment.. run's best for me)


ps3_pair.py "No such adapter" - snappca - 2009-11-06

Could someone toss me a bone here? I've been tracking this thread for some time and have yet to get my PS3 remote working. I've got an Asrock 330 with 64-bit Ubuntu Server 9.10 installed and I have XBMC running great in OpenBox with HDMI audio and everything. Point is, I'm *this* close to having my setup finished, yet I can't seem to get my Blu-Link (PS3 compatible) remote to connect.

I've added kitlaan's repo and installed bluez from his PPA.


Here's some of the command output that may be relevent:

Code:
# python ps3_pair.py

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/snappca/bluez/utils.py", line 28, in warp
    raise errors.parse_dbus_error(exception)
bluez.errors.DBusNoSuchAdapterError: No such adapter

Code:
# pgrep -lf blue

43 bluetooth
1187 /usr/sbin/bluetoothd --udev

Code:
# hciconfig

hci0:   Type: USB
        BD Address: 00:00:00:00:00:00 ACL MTU: 1021:4 SCO MTU: 180:1
        UP RUNNING
        RX bytes:47 acl:0 sco:0 events:4 errors:0
        TX bytes:12 acl:0 sco:0 commands:5 errors:1

Code:
# lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 04df:0020 Interlink Electronics
Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I'm at a loss as to why I get the "No such adapter" error in the ps3_pair.py script. It doesn't seem like anyone else has this issue pairing their remote. Did I manage to find the ONE USB dongle that isn't compatible with Linux?

Thanks for whatever help you can spare, hopefully I'm just missing something trivial.


- kubax - 2009-11-06

try running bluetoothd -n -d while trying to connect the remote and post the specific output please..

also, did you sart ps3_pair.py in an X enviroment? this fixed a problem for me (don't know if it's supposed to..)


- flxfxp - 2009-11-06

flxfxp Wrote:What package are you talking about? Is this a reworked package from the one I provided, sounds like it does exactly the same. My deb should work fine on Karmic as far as my testing went.

Sorry, I didnt see your post. Good work on the ppa repo! Last build by you is on version 4.51, will you make more recent builds as well?

Thanks,

Dennis


- kubax - 2009-11-06

flxfxp: just add his patch against 4.5.4, works like a charm... (didn't try newer builds)


- snappca - 2009-11-06

Hrmm....it looks to me as though bluetoothd doesn't seem happy that hci0 does not appear to have an address. Any idea where I should go to t/s that one? I'll obviously be hitting up google.

Code:
bluetoothd[1609]: Bluetooth daemon 4.51  
bluetoothd[1609]: Enabling debug information
bluetoothd[1609]: parsing main.conf        
bluetoothd[1609]: discovto=0                
bluetoothd[1609]: pairto=0                  
bluetoothd[1609]: pageto=8192              
bluetoothd[1609]: name=%h-%d                
bluetoothd[1609]: class=0x000100            
bluetoothd[1609]: discov_interval=0        
bluetoothd[1609]: Key file does not have key 'DeviceID'
bluetoothd[1609]: Starting SDP server                  
bluetoothd[1609]: Loading builtin plugins              
bluetoothd[1609]: Loading audio plugin                
bluetoothd[1609]: Loading input plugin                
bluetoothd[1609]: Loading serial plugin                
bluetoothd[1609]: Loading network plugin              
bluetoothd[1609]: Loading service plugin              
bluetoothd[1609]: Loading hciops plugin                
bluetoothd[1609]: Loading hal plugin                  
bluetoothd[1609]: Loading storage plugin              
bluetoothd[1609]: Loading plugins /usr/lib/bluetooth/plugins
bluetoothd[1609]: Can't load plugin /usr/lib/bluetooth/plugins/netlink.so: /usr/lib/bluetooth/plugins/netlink.so: undefined symbol: debug
bluetoothd[1609]: register_interface: path /org/bluez/1609/any                                                                          
bluetoothd[1609]: Registered interface org.bluez.Service on path /org/bluez/1609/any                                                    
bluetoothd[1609]: /etc/bluetooth/network.conf: Key file does not have key 'Disable'                                                      
bluetoothd[1609]: /etc/bluetooth/network.conf: Key file does not have key 'DisableSecurity'                                              
bluetoothd[1609]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'                                                    
bluetoothd[1609]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'                                                    
bluetoothd[1609]: /etc/bluetooth/network.conf: Key file does not have key 'Interface'                                                    
bluetoothd[1609]: Config options: InterfacePrefix=bnep%d, PANU_Script=(null), GN_Script=(null), NAP_Script=(null), GN_Interface=pan0, NAP_Interface=pan1, Security=true
bluetoothd[1609]: Can't create GN bridge                                                                                                                              
bluetoothd[1609]: input.conf: Key file does not have key 'IdleTimeout'                                                                                                
bluetoothd[1609]: Unix socket created: 9                                                                                                                              
bluetoothd[1609]: audio.conf: Key file does not have key 'AutoConnect'                                                                                                
bluetoothd[1609]: audio.conf: Key file does not have key 'MaxConnected'                                                                                                
bluetoothd[1609]: Telephony plugin initialized                                                                                                                        
bluetoothd[1609]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes"                                                    
bluetoothd[1609]: HCI dev 0 registered
bluetoothd[1609]: child 1610 forked
bluetoothd[1609]: btd_adapter_ref(0x7f3f27d4ac30): ref=1
bluetoothd[1609]: HCI dev 0 up
bluetoothd[1609]: Starting security manager 0
bluetoothd[1609]: Adapter /org/bluez/1609/hci0 without an address
bluetoothd[1609]: Can't read address for hci0: Connection timed out (110)
bluetoothd[1609]: Entering main loop
bluetoothd[1609]: RFKILL event idx 0 type 2 op 0 soft 0 hard 0
bluetoothd[1610]: Can't set link policy on hci0: Connection timed out (110)
bluetoothd[1609]: child 1610 exited



- kubax - 2009-11-06

hmm.. your device is not in pscan mode... doesn't know if this is a problem, but could be a try woth it...

do you have any other bluetooth device to test with?
or search for the spific device, and have a look if you can see some other drivers that fixes the btadd problem...


- snappca - 2009-11-06

Yeah, the more I search around it seems as though the issue may be with the dongle. I guess I'll go spend a few extra bucks and snag another one to test with. I'll post my results once I get another dongle.

On a side note, I'm not exactly sure what to expect once I have this remote paired. Since this box will eventually take over responsibilities for my home server I intend to leave it on 24/7. So what I'm wondering is will the remote eventually auto disconnect to save batteries? If so how do I get it to reconnect when I want to use my XBMC? Right now I just leave XBMC logged in all the time, so I just turn on the TV and away we go.

The last question I have is what the significance of the xbmc-eventclients-ps3 is if the pairing of the remote is done outside of xbmc and the user has to manually map buttons to keys in the keymapping xml file?

Thanks for the info and help


- kubax - 2009-11-06

the remote is send to sleep mode after a given timer (normaly 30 sec. but adjustable through input.conf) when you want to use it again, just smash some buttons.. works realy fine on my two boxes (with one remote and one dongle for both boxes ^^)

the event client thingy is not needed when you use bluez-patched from this thread...


- snappca - 2009-11-06

Hey that is great news about it doing its own timeout. This really sounds like it'll be a sweet system once all is said and done. I'll just remove the xbmc-evenclients-ps3 package if it isn't necessary. Boy it sure will be nice to have my XBMC on the big screen again...it's been years since my original hacked XBOX died and I lost XBMC on the big screen. I've just resigned myself to watching flicks on XBMC on my laptops.