Archive:Set up PS3 BD Remote: Difference between revisions
>Repvik m (Newer versions are patched for ps3 bd.) |
m (Karellen moved page HOW-TO:Set up PS3 BD Remote to Archive:Set up PS3 BD Remote without leaving a redirect: Outdated. Hardware from 2010) |
||
(25 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
This HOW-TO explains how to | This HOW-TO explains how to set up the remote control for the Sony PlayStation 3 to use with XBMC for Linux. You'll need a Bluetooth dongle and of course the remote control. All these information can be found [http://forum.kodi.tv/showthread.php?t=50717 here] at the forum. | ||
==Installation== | == Installation == | ||
===BlueZ=== | === BlueZ === | ||
Note: Newer versions of bluez have been released which appear to have this patch already. I didn't need to patch 4.63 to get BD working on ubuntu 10.04 | Note: Newer versions of bluez have been released which appear to have this patch already. I didn't need to patch 4.63 to get BD working on ubuntu 10.04 | ||
''Note:'' Kitlaan now has patches up to Bluez-4.69, and the patch is required for 4.64 - 4.69 | |||
The latest versions of the patch are available at: http://kitlaan.twinaxis.com/projects/bluez-ps3remote/ | |||
<pre>sudo apt-get purge bluez | <pre>sudo apt-get purge bluez | ||
cd | sudo apt-get install libdbus-1-dev libglib2.0-dev python-dbus python-gobject | ||
wget http://kitlaan.twinaxis.com/ | cd ~ | ||
wget http://www.kernel.org/pub/linux/bluetooth/bluez-4. | wget http://kitlaan.twinaxis.com/projects/bluez-ps3remote/bluez_ps3remote_4.91.diff | ||
tar xvfz bluez-4. | wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.91.tar.gz | ||
cd bluez-4. | tar xvfz bluez-4.91.tar.gz | ||
patch - | cd bluez-4.91 | ||
./configure | patch -p1 < ../bluez_ps3remote_4.91.diff | ||
make | ./configure && make | ||
sudo checkinstall --fstrans=no --install=yes --pkgname=bluez --pkgversion "4. | sudo checkinstall --fstrans=no --install=yes --pkgname=bluez --pkgversion "4.91-patched" | ||
</pre> | </pre> | ||
When starting bluetoothd, check /var/log/syslog to make sure the config files are read. If bluetoothd searches for them at /usr/etc, you'll have to create symlinks: | |||
<pre> | |||
sudo ln -s /etc/bluetooth/input.conf /usr/etc/bluetooth/input.conf | |||
sudo ln -s /etc/bluetooth/audio.conf /usr/etc/bluetooth/audio.conf | |||
sudo ln -s /etc/bluetooth/serial.conf /usr/etc/bluetooth/serial.conf | |||
</pre> | |||
Or, using [https://launchpad.net/~kitlaan/+archive/ppa kitlaan's PPA]: | Or, using [https://launchpad.net/~kitlaan/+archive/ppa kitlaan's PPA]: | ||
<pre> | <pre> | ||
sudo apt-get purge bluez | sudo apt-get purge bluez | ||
sudo | sudo add-apt-repository ppa:kitlaan/ppa | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install bluez | sudo apt-get install bluez | ||
</pre> | </pre> | ||
===Kernel module=== | === Kernel module === | ||
Check if the uinput module is running: | Check if the uinput module is running: | ||
<pre>lsmod | grep uinput</pre> | <pre>lsmod | grep uinput</pre> | ||
Line 36: | Line 45: | ||
</pre> | </pre> | ||
===Pairing=== | === Pairing === | ||
Please note that the pairing script requires that the dbus-python and pygobject python modules are installed. They are normally installed on a default 9.04 Jaunty. | Please note that the pairing script requires that the dbus-python and pygobject python modules are installed. They are normally installed on a default 9.04 Jaunty. | ||
(If you need them added, apt-get install python-dbus and python-gobject.) | (If you need them added, apt-get install python-dbus and python-gobject.) | ||
<pre>cd ~ | <pre>cd ~ | ||
wget http://kitlaan.twinaxis.com/ | wget http://kitlaan.twinaxis.com/projects/bluez-ps3remote/ps3pair.tar.gz | ||
tar xvfz ps3pair.tar.gz | tar xvfz ps3pair.tar.gz | ||
cd ~/ps3pair | cd ~/ps3pair | ||
Line 47: | Line 56: | ||
Now press START+Enter on your PS3 remote for at least 7 seconds, then it should detect the remote. Then run | Now press START+Enter on your PS3 remote for at least 7 seconds, then it should detect the remote. Then run | ||
<pre>/usr/share/doc/bluez/examples/list-devices</pre> | <pre>/usr/share/doc/bluez/examples/list-devices</pre> | ||
to verify that the remote is paired (and connected). If list-devices is not installed into /usr/share, check the bluez source tree, it should be in there. | to verify that the remote is paired (and connected). If list-devices is not installed into /usr/share, check the bluez source tree, it should be in there. Also, running | ||
<pre>cat /proc/bus/input/devices | grep emot</pre> | <pre>cat /proc/bus/input/devices | grep emot</pre> | ||
should show the remote. | should show the remote. If it does not show up, you may not have the uinput module loaded. | ||
Then customize the file "/etc/bluetooth/input.conf" for button mappings and timeout values (Example [http://pastebin.com/m5e951b8b here]). 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. | Then customize the file "/etc/bluetooth/input.conf" for button mappings and timeout values (Example [http://pastebin.com/m5e951b8b here]). 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. | ||
===Example input.conf=== | ''Note:'' - The pairing scripts are not required by some distro's - just install Blueman and set up your BD remote as an input service and trust the device - this way you dont explicitly need to pair the device - it simply becomes a keyboard extension. The input.conf below will take care of key mapping. | ||
=== Example input.conf === | |||
A more advanced bluetooth input.conf is probably lurking in the depths of [http:// | A more advanced bluetooth input.conf is probably lurking in the depths of [http://forum.kodi.tv/showthread.php?t=50717 this thread], however here's an example to get you started. The first thing you'll need to change in this is your BD Remote's hardware address (i.e. change 00:1E:3D:B6:12:7E to your remote's address) | ||
<pre> | <pre> | ||
Line 74: | Line 85: | ||
[00:1E:3D:B6:12:7E] | [00:1E:3D:B6:12:7E] | ||
# | # | ||
# Set a custom idle timeout | # Set a custom idle timeout for this device. With kitlaan's patch, idle timeout is in *seconds* instead of minutes! | ||
IdleTimeout= | IdleTimeout=90 | ||
Line 142: | Line 153: | ||
</pre> | </pre> | ||
==Troubleshooting== | == Troubleshooting == | ||
===Pairing=== | === Pairing === | ||
After pairing, running <pre>cat /proc/bus/input/devices | grep emot</pre> doesn't list your device, and you've got ''uinput'' loaded <pre>lsmod | grep uinput</pre> | After pairing, running <pre>cat /proc/bus/input/devices | grep emot</pre> doesn't list your device, and you've got ''uinput'' loaded <pre>lsmod | grep uinput</pre> | ||
* Install blueman <pre>sudo apt-get install blueman</pre> | * Install blueman <pre>sudo apt-get install blueman</pre> | ||
Line 151: | Line 162: | ||
* Go to a terminal and try pushing some buttons on the remote, it should work. | * Go to a terminal and try pushing some buttons on the remote, it should work. | ||
[[Category: | [[Category:Hardware-Archived]] | ||
Latest revision as of 07:41, 12 July 2020
This HOW-TO explains how to set up the remote control for the Sony PlayStation 3 to use with XBMC for Linux. You'll need a Bluetooth dongle and of course the remote control. All these information can be found here at the forum.
Installation
BlueZ
Note: Newer versions of bluez have been released which appear to have this patch already. I didn't need to patch 4.63 to get BD working on ubuntu 10.04
Note: Kitlaan now has patches up to Bluez-4.69, and the patch is required for 4.64 - 4.69
The latest versions of the patch are available at: http://kitlaan.twinaxis.com/projects/bluez-ps3remote/
sudo apt-get purge bluez sudo apt-get install libdbus-1-dev libglib2.0-dev python-dbus python-gobject cd ~ wget http://kitlaan.twinaxis.com/projects/bluez-ps3remote/bluez_ps3remote_4.91.diff wget http://www.kernel.org/pub/linux/bluetooth/bluez-4.91.tar.gz tar xvfz bluez-4.91.tar.gz cd bluez-4.91 patch -p1 < ../bluez_ps3remote_4.91.diff ./configure && make sudo checkinstall --fstrans=no --install=yes --pkgname=bluez --pkgversion "4.91-patched"
When starting bluetoothd, check /var/log/syslog to make sure the config files are read. If bluetoothd searches for them at /usr/etc, you'll have to create symlinks:
sudo ln -s /etc/bluetooth/input.conf /usr/etc/bluetooth/input.conf sudo ln -s /etc/bluetooth/audio.conf /usr/etc/bluetooth/audio.conf sudo ln -s /etc/bluetooth/serial.conf /usr/etc/bluetooth/serial.conf
Or, using kitlaan's PPA:
sudo apt-get purge bluez sudo add-apt-repository ppa:kitlaan/ppa sudo apt-get update sudo apt-get install bluez
Kernel module
Check if the uinput module is running:
lsmod | grep uinput
If that's not the case:
sudo modprobe uinput echo uinput >> /etc/modules
Pairing
Please note that the pairing script requires that the dbus-python and pygobject python modules are installed. They are normally installed on a default 9.04 Jaunty. (If you need them added, apt-get install python-dbus and python-gobject.)
cd ~ wget http://kitlaan.twinaxis.com/projects/bluez-ps3remote/ps3pair.tar.gz tar xvfz ps3pair.tar.gz cd ~/ps3pair sudo python ps3_pair.py
Now press START+Enter on your PS3 remote for at least 7 seconds, then it should detect the remote. Then run
/usr/share/doc/bluez/examples/list-devices
to verify that the remote is paired (and connected). If list-devices is not installed into /usr/share, check the bluez source tree, it should be in there. Also, running
cat /proc/bus/input/devices | grep emot
should show the remote. If it does not show up, you may not have the uinput module loaded.
Then customize the file "/etc/bluetooth/input.conf" for button mappings and timeout values (Example here). 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.
Note: - The pairing scripts are not required by some distro's - just install Blueman and set up your BD remote as an input service and trust the device - this way you dont explicitly need to pair the device - it simply becomes a keyboard extension. The input.conf below will take care of key mapping.
Example input.conf
A more advanced bluetooth input.conf is probably lurking in the depths of this thread, however here's an example to get you started. The first thing you'll need to change in this is your BD Remote's hardware address (i.e. change 00:1E:3D:B6:12:7E to your remote's address)
# input.conf - kitlaan custom # Configuration file for the input service # This section contains options which are not specific to any # particular interface [General] # Set idle timeout (in minutes) before the connection will # be disconnect (defaults to 0 for no timeout) #IdleTimeout=30 # This section contains options that are specific to a device [00:1E:3D:B6:12:7E] # # Set a custom idle timeout for this device. With kitlaan's patch, idle timeout is in *seconds* instead of minutes! IdleTimeout=90 # This section is the PS3 Remote keymap. It is loaded when bluez starts. # Use 'uinput.h' from bluez sources or '/usr/include/linux/input.h' for # a list of possible KEY_* values. # [PS3 Remote Map] # When the 'OverlayBuiltin' option is TRUE (the default), the keymap uses # the built-in keymap as a starting point. When FALSE, an empty keymap is # the starting point. #OverlayBuiltin = TRUE 0x16 = KEY_E # EJECT 0x64 = KEY_A # AUDIO 0x65 = KEY_Z # ANGLE 0x63 = KEY_T # SUBTITLE 0x0f = KEY_DELETE # CLEAR 0x28 = KEY_GRAVE # TIMER 0x00 = KEY_1 # NUM-1 0x01 = KEY_2 # NUM-2 0x02 = KEY_3 # NUM-3 0x03 = KEY_4 # NUM-4 0x04 = KEY_5 # NUM-5 0x05 = KEY_6 # NUM-6 0x06 = KEY_7 # NUM-7 0x07 = KEY_8 # NUM-8 0x08 = KEY_9 # NUM-9 0x09 = KEY_0 # NUM-0 0x81 = KEY_F7 # RED 0x82 = KEY_F8 # GREEN 0x80 = KEY_F9 # BLUE 0x83 = KEY_F10 # YELLOW 0x70 = KEY_I # DISPLAY 0x1a = KEY_S # TOP MENU 0x40 = KEY_M # POP UP/MENU 0x0e = KEY_ESC # RETURN 0x5c = KEY_C # TRIANGLE/OPTIONS 0x5d = KEY_BACKSPACE # CIRCLE/BACK 0x5f = KEY_TAB # SQUARE/VIEW 0x5e = KEY_SPACE # CROSS 0x54 = KEY_UP # UP 0x56 = KEY_DOWN # DOWN 0x57 = KEY_LEFT # LEFT 0x55 = KEY_RIGHT # RIGHT 0x0b = KEY_ENTER # ENTER 0x5a = KEY_F1 # L1 0x58 = KEY_F2 # L2 0x51 = KEY_F3 # L3 0x5b = KEY_F4 # R1 0x59 = KEY_F5 # R2 0x52 = KEY_F6 # R3 0x43 = KEY_HOMEPAGE # PS button 0x50 = KEY_INSERT # SELECT 0x53 = KEY_HOME # START 0x33 = KEY_R # SCAN BACK 0x32 = KEY_PLAY # PLAY 0x34 = KEY_F # SCAN FORWARD 0x30 = KEY_PAGEUP # PREVIOUS 0x38 = KEY_STOP # STOP 0x31 = KEY_PAGEDOWN # NEXT 0x60 = KEY_COMMA # SLOW/STEP BACK 0x39 = KEY_PAUSE # PAUSE 0x61 = KEY_DOT # SLOW/STEP FORWARD 0xff = KEY_MAX
Troubleshooting
Pairing
After pairing, running
cat /proc/bus/input/devices | grep emot
doesn't list your device, and you've got uinput loaded
lsmod | grep uinput
- Install blueman
sudo apt-get install blueman
- Open System->Preferences->Bluetooth Manager.
- If your device is listed (it should be), right click it and select Input service.
- Go to a terminal and try pushing some buttons on the remote, it should work.