• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 56
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS
#1
Thumbs Up 
Hi,

This is my first post, but I read often the forum.

I have found a way to make the PS3 BD Remote to work with LIRC and any application that uses it, including of course XBMC :-)

I'll try to explain how I did it.

I use Ubuntu Jaunty, maybe it works with other Linux distros.

NOTE: The language I use on the desktop is Spanish, so maybe the translations to English I make are not so accurate, and sorry for my poor English Blush

1.- Install blueman

For that, you must include the PPA for blueman

Include the following lines to /etc/apt/sources.list
deb http://ppa.launchpad.net/blueman/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/blueman/ppa/ubuntu jaunty main

After that execute:

Code:
sudo apt-get update
sudo apt-get install blueman


2.- Pair the PS3 BD Remote

Normally after installing blueman, will appear the bluetooth icon on the top bar of the gnome desktop, if not, you must execute the applet:

Code:
blueman-applet

Once we have the blueman applet running, we click with the secondary mouse button on the bluetooth icon and select "Configure new device".
While the remote is in discovery mode (pressing enter + start for 5 secconds) we will see our remote on the device list, click on it and click "next", the wizard will offer 3 options "random key", "my own key", and "not pairing", we select "not pairing" and click next. On the next screen will see 2 options "input service" and "don't connect", we select "input service and click next.
Now we have the remote paired permanently with the PC, to check it, open "devices" right clicking on the bluetooth icon, and will see the "BD Remote Control" paired, on the right it will show the signal strength. On the devices list there is a button to trust on a device, we must trust on "BD Remote Control", it will show a little yellow star on the icon.
This has created a input device, to see it execute:

Code:
cat /proc/bus/input/devices

this will show the actual input devices on your system and will have something like this

Code:
I: Bus=0005 Vendor=054c Product=0306 Version=0000
N: Name="PS3 Remote Controller"
P: Phys=
S: Sysfs=/devices/virtual/input/input8
U: Uniq=
H: Handlers=kbd event6
B: EV=3
B: KEY=80000000 0 700000 1083c100 8c00ea 0 6bc00000 1 0 8000 1102 c0000801 801680 0 0 10000ffe

We are looking for the info on the line
Code:
H: Handlers=kbd event6
In my case the the remote is "event6"


3.- Configure LIRC

To configure LIRC we must edit /etc/lirc/hardware.conf and include the following lines:
Code:
REMOTE="ps3"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/event6"

The last line include the name of the input device that was created on the previous step, in my case "/dev/input/event6"

Then restart LIRC
Code:
sudo /etc/init.d/lirc restart


4.- Learn the remote codes of the PS3 BD Remote

You may record your own codes with the command:
Code:
sudo irrecord --device=/dev/input/event6 --driver=devinput PS3.rem
Where "/dev/input/event6" is your input device. And follow the instructions.

NOTE: The PS3 remote send one event when you press a key, and another event when you release it, so when irrecord needs a key pressed we must press many times different keys.

Or use the one I created

Code:
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.8.4a(devinput) on Sun May  3 19:43:29 2009
#
# contributed by
#
# brand:                       PS3
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

  name  ps3
  bits           32
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  gap          102974
  toggle_bit_mask 0x8001019C

      begin codes
          1                        0x80010002
          2                        0x80010003
          3                        0x80010004
          4                        0x80010005
          5                        0x80010006
          6                        0x80010007
          7                        0x00010008
          8                        0x80010009
          9                        0x8001000A
          0                        0x8001000B
          eject                    0x800100A1
          audio                    0x80010188
          angle                    0x80010173
          subtitle                 0x80010172
          clear                    0x80010163
          time                     0x80010167
          red                      0x0001018E
          green                    0x8001018F
          yellow                   0x80010190
          blue                     0x80010191
          display                  0x80010166
          top_menu                 0x8001008B
          popup                    0x800101B6
          return                   0x80010001
          options                  0x80010165
          back                     0x8001009E
          view                     0x80010177
          x                        0x80010100
          enter                    0x8001001C
          up                       0x80010067
          down                     0x8001006C
          left                     0x00010069
          right                    0x8001006A
          l1                       0x80010136
          l2                       0x80010138
          l3                       0x8001013D
          r1                       0x80010137
          r2                       0x80010139
          r3                       0x8001013E
          select                   0x80010161
          start                    0x8001013B
          ps                       0x800100AC
          rew                      0x800100A8
          play                     0x800100CF
          ffw                      0x8001009F
          prev                     0x0001019C
          stop                     0x80010080
          next                     0x80010197
          slow_rew                 0x800101B4
          pause                    0x80010077
          slow_ffw                 0x800101B5
      end codes

end remote


5.- Test it

The last step is test it, so we execute irw and pressing keys on the remote will see something like this:
000000008001001c 00 enter ps3
0000000080010067 00 up ps3


6.- Configure XBMC (Lircmap.xml and Keymap.xml)

Actually I am on this step Laugh

I hope you find this guide useful.

J.
Reply
#2
Thumbs Up 
That's a great first post!
Reply
#3
After adding uinput to /etc/modules, installing bluetoothd and disabling network security, I got it working. Now on reboot, lirc exists since it doesn't find the device created by blueman yet. How did you solve that problem? Also it seems I have to configure blueman all over again at each reboot.
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#4
can this be done from the command line? so we don't need to use the applet?
MC1 (SD & HD): Asus A8N SLI, AMD x2 4600+, 2GB DDR 400 Cosair, Palit Nvidia 9400GT 1GB (Passive), ARTIC 500W PSU, Lian Li PC-C32B, Samsung 250GB SATA
MC2 (SD&HD): RaspberryPi
MC3 (SD&HD): RaspberryPi
NAS1: HP Prolient Microserver N40L 2Gb Ram, 250Gb OS Disk, 1x2TB HDD ext4, 5.25" to 3.5" disk drive added to ODD Slot for OS disk

Blog: http://ninet.org
Reply
#5
Another thing: Pressing a button for a longer time doesn't repeat the button (like scrolling down a list). Did you notice that too?
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#6
Thanks very much for the howto pakojones, it worked a treat.

Similar to freezy I had to add
Code:
uinput
to /etc/modules and
Code:
KERNEL=="uinput", MODE="0666"
to /etc/udev/rules.d/40-permissions.rules (which no longer exists on ubuntu 9.04 so I created it) before running
Code:
cat /proc/bus/input/devices

but I don't have any problems connecting the remote - any keypress and it's paired immediately.

Only tried it with mythtv so far, any xbmc config files gratefully recieved :p
Reply
#7
Does it work also after reboot? Still issues with that. And how about the repeating when pressing a button?
Running XBMC on my HTPC, tablet, phone and pinball machine.
Always read the XBMC online-manual, FAQ and search the forums before posting. Do NOT e-mail Team-XBMC members asking for support. For troubleshooting and bug reporting, make sure you read this first.
Reply
#8
freezy Wrote:Does it work also after reboot? Still issues with that. And how about the repeating when pressing a button?

Yes it connects fine after a reboot.
No joy yet with the repeat setting in ~/.lircrc. I wonder if it's related to the second event when you release each button.

Also, a few of the event codes for /etc/lirc/lircd.conf in the codeblock above are for button releases. The keydown events all start with 0x800, in particular
Code:
7                        0x80010008
red                      0x8001018E
left                     0x80010069
prev                     0x8001019C

Edit: As a temporary fix to the lack of button repeats I'm using the l1, l2 and l3 buttons to map 75%, 50% and 25% volume.
Keymap.xml and Lircmap.xml uploaded here (post character limit).
Reply
#9
Hi again!

freezy Wrote:Another thing: Pressing a button for a longer time doesn't repeat the button (like scrolling down a list). Did you notice that too?

Yes, I notice, b_balthasar is right, the PS3 remote sends a event when a key is pressed, and another one when it's released, but I don't know the way to configure LIRC to repeat until another event occurs Confused

freezy Wrote:After adding uinput to /etc/modules, installing bluetoothd and disabling network security, I got it working. Now on reboot, lirc exists since it doesn't find the device created by blueman yet. How did you solve that problem? Also it seems I have to configure blueman all over again at each reboot.

When I wrote the howto it worked fine for me, after a reboot when I press a key on the remote automaticly reconnects, but now I tried to use the remote with another computer with another BT dongle, and I am in the same situation than you, I have to "connnect input device" every reboot, and I don't know how to solve it :confused2: now I am working on it.

Cheers!
Reply
#10
Great work. Looking forward to all the issues getting sorted out
Reply
#11
Hi,

freezy Wrote:Does it work also after reboot?

After many tests I think that this problem is because the usb dongle, I have two, and only with one of them it works fine.
The two usb dongles are:
Energy Sistem (http://www.energysistem.com/es-es/item/linnker_1550_t) this one works fine
Billionton (http://www.billionton.com/website/produc...BTCR41&m=1) this one doesn't work fine

I make the same steps with every one, and only with the Energy Sistem it works.

Maybe you can try with another dongle to confirm this.
Reply
#12
I've followed the instructions exactly, but cannot get xbmc to recognize any extra commands. It appears to be treating the remote as a mouse. I am using b_balthasar's keymap and lircmap.

Could someone please post their hardware.conf and any other related lirc config files. This is my first time using lirc and I'm struggling quite a bit :-P
Reply
#13
xavius Wrote:Could someone please post their hardware.conf and any other related lirc config files.

My /etc/lirc/lircd.conf is copied from pakojones and my /etc/lirc/hardware.conf is posted below.
Do you get any response when running irw from the terminal?

Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="ps3"
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/event6"
REMOTE_MODULES=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="false"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""
Reply
#14
Wow, do I feel retarded. I hadn't added it to /etc/lirc/lircd.conf. :-P

Thanks b_balthasar :-D I never would have noticed had you not mentioned it.
Reply
#15
This solution would work much better for me if it would timeout after 30 or 60 seconds so as not to burn through batteries as quickly. I know I can hold the PS logo button for 6-8 seconds and it will disconnect... but I'll forget and leave it connected until the batteries are dead. Sad
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 56

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