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)



- ruff - 2009-11-15

nanny07: Output seems ok, remote is registered, bluez is listening on adapter... can you run hcidump and see the output while pressing the buttons?
Check also if uinput is loaded - lsmod | grep input

purch: remote is seen as simple HID keyboard to the system through uinput driver, thus anything waiting for keyboard input will get the keys. btw, in this condition, when you typing normal keyboard - is the behavoiur the same?


- nanny07 - 2009-11-16

so...

uinput is loaded, but no packet is captured with hcidump (i try also to switch on my phone's bluetooth, no packets)

Is it possible that my dongle isn't work well?
Another question, is "bluez-utils" packet necessary?


- spArcling - 2009-11-16

Hi,

I seem to have the exact same problem as nanny07 (I read through 'all' the pages in this thread) and I'm also using XBMC Live 9.11 Alpha2 (installed to HDD).

"/usr/share/doc/bluez/examples/list-devices" returns suggests the remote is paired but "cat /proc/bus/input/devices | grep emot" doesn't return anything.

I've tried to re-pair many times (using two different dongles) but always the result is the same. The script reports 'done' but it's not working.

Any help would be appreciated.


- purch - 2009-11-16

ruff: I got it working. It was xorg.conf problem. I had to add
Option "GrabDevice" "true"
to the InputDevice section of the PS3 remote. Normal keyboards does not require this.

One last to fix is that when remote goes to sleep xbmc wont reconnect to it after clicking remote buttons. I think it is resuming from sleep state, not some other problem. Restarting xbmc enables the remote again. I have to search some more...


- ruff - 2009-11-16

purch: if you're using patched bluez - remote should work after sleep, in original bluez it doesn't


- purch - 2009-11-16

ruff: I have bluez-4.57-0ubuntu1~kitlaan7~jaunty. I have to disable AutoAddDevice in xorg.conf section "ServerFlags" to keep input devices in their own seats.
One last thing I have in mind is to force bluetooth to keep remote connected and drain the battery :/ Maybe set bluetooth so that it keeps connection open even remote goes to sleep and then waken remote resumes old bluetooth connection. Not sure if posible.


- kitlaan - 2009-11-16

purch Wrote:ruff: I got it working. It was xorg.conf problem. I had to add
Option "GrabDevice" "true"
to the InputDevice section of the PS3 remote. Normal keyboards does not require this.

One last to fix is that when remote goes to sleep xbmc wont reconnect to it after clicking remote buttons. I think it is resuming from sleep state, not some other problem. Restarting xbmc enables the remote again. I have to search some more...

I didn't bother setting up an InputDevice for the remote. I have a feeling that since you did, it's not seeing the new device each time a uinput device gets created. (My PPA version still creates a new uinput connection each time it wakes up; haven't worked on that specific reconnect code yet.)


- gimmmo - 2009-11-17

spArcling Wrote:"/usr/share/doc/bluez/examples/list-devices" returns suggests the remote is paired but "cat /proc/bus/input/devices | grep emot" doesn't return anything.

I have the same situation (xbmc live 9.11a2 on karmic) with "grep emot", but I just proceed with disconnect and reconnect again, "grep emot" still no output. However, after push a few times on the remote button, the remote gets connected and talked to xbmc. It's working!


- pumkinut - 2009-11-17

I'm trying this on 9.11 A2 and when I run the pairing script, I get the following:
Code:
root@XBMCLive:/home/xbmc/.xbmc# sudo python ps3_pair.py
Traceback (most recent call last):
  File "ps3_pair.py", line 1, in <module>
    from bluez.Manager import Manager
  File "/live/image/dotXBMC/bluez/__init__.py", line 20, in <module>
    from Manager import Manager
  File "/live/image/dotXBMC/bluez/Manager.py", line 20, in <module>
    import Adapter
  File "/live/image/dotXBMC/bluez/Adapter.py", line 20, in <module>
    import dbus
ImportError: No module named dbus
I installed bluez from kitlaan's repo, and I also tried installing bluez-utils, other than that it's a stock install.

BTW, uinput is loaded.


- nanny07 - 2009-11-17

@pumkinut: sudo apt-get install python-dbus



no one, can help me?


- spArcling - 2009-11-17

Hi,

I think one question might have to be whether someone has successfully gotten the PS3 remote control to work on a system installed from a 9.11 A2 Live CD... and if so what special thing this person did to make it work.

nanny07 Wrote:@pumkinut: sudo apt-get install python-dbus
no one, can help me?



- kitlaan - 2009-11-18

@spArcling
@nanny07

Can you pastebin the output you get from running "sudo bluetoothd -nd"? That's probably the best way for me to help at the moment.

Did either of you try the lirc method prior, or did you go directly to using the new bluez and pairing?


- TravisF - 2009-11-18

Hi, and thanks all for the excellent information in this thread.

I've followed the instructions in the original post, but I only have the top menu, enter, back, return and enter keys responding in GNOME, and I have basic navigation working in XBMC. All keys on the PS3 remote are responding to evtest and returning codes, but only the above keys can be mapped to actions in the Keyboard Shortcuts applet in GNOME.

How can I assign arbitrary keys on the remote to keystrokes and XF86BlahBlah actions (don't know what those are called), so that I can control other applications except XBMC as well? I'd like to do Alt+Tab, Alt+F4 etc. to manage windows and launch menus in GNOME.


- pumkinut - 2009-11-18

nanny07 Wrote:@pumkinut: sudo apt-get install python-dbus



no one, can help me?
That did it, thanks! Everything is up and running now. Now I just have to tinker with the conf file to get it where I want it.


- nanny07 - 2009-11-18

kitlaan Wrote:@spArcling
@nanny07

Can you pastebin the output you get from running "sudo bluetoothd -nd"? That's probably the best way for me to help at the moment.

Did either of you try the lirc method prior, or did you go directly to using the new bluez and pairing?

I never try the method described in the first page. (also beacuse i don't have a gdm so i can't pair the remote with the applet)
On the other hand i had post the output of blueetoothd command in this post
I never tell you that i use live alpha2
The bad news is that i can't work on the pc untill friday Sad