Sony PS3 Remote Code
Status: Beta
Brought to you by:
carlonnheim
File | Date | Author | Commit |
---|---|---|---|
bluez | 2015-10-23 | carlonnheim | [r41] Work on version 1.0 |
src | 2016-03-09 | carlonnheim | [r47] Fixed hanging problem due to blocking reads |
AUTHORS | 2010-01-06 | carlonnheim | [r1] Initial Source Files |
COPYING | 2010-01-06 | carlonnheim | [r1] Initial Source Files |
ChangeLog | 2015-10-27 | carlonnheim | [r43] Work on verion 1.0 |
INSTALL | 2015-10-20 | carlonnheim | [r39] Initial work on version 1.0 |
Makefile.am | 2015-10-28 | carlonnheim | [r44] Work on version 1.0 |
NEWS | 2010-01-06 | carlonnheim | [r1] Initial Source Files |
README | 2015-10-30 | carlonnheim | [r46] First test of version 1.0 |
TODO.tasks | 2010-08-05 | carlonnheim | [r27] Added timed disconnect functionality |
configure.ac | 2015-10-28 | carlonnheim | [r44] Work on version 1.0 |
A collection of applications that allow seamless, configurable and powerful integration of the Sony PS3 Remote with Linux through LIRC. The current version of the Sony PS3 Remote requires a patched bluez daemon (bluetoothd) to run. The distributed tarball will build this patched daemon for you. You need to tell the ./configure script which version you want to build it for by using the option --enable-bluezpatch=<version>. Running make will then download that version of the bluez package, build it and put a patched bluetooth daemon in bluez/bluetoothd-<version>-sonyps3. You will have to replace the currently installed bluetooth daemon with this file manually. The available patch versions are listed in bluez/patches. To figure out what bluez version you are running, you can use "aptitude show bluez" or similar (varies by distribution), running higher minor versions typically works as well. To build you need these development packages (may vary by distribution, this list is for Ubuntu) libglib2.0-dev libdbus-glib-1-dev libgtk2.0-dev You also need these development packages to build the patched bluetoothd binary for bluez version 5.x libusb-dev libudev-dev libical-dev libreadline-dev You will most likely also want to install the package "lirc". To install the package, you need to configure it like the examples below: ./configure --prefix=/usr --sysconfdir=/etc --enable-bluezpatch=5.x --enable-systemd # If you have a Bluez5.x version running on your host and use upstart ./configure --prefix=/usr --sysconfdir=/etc --enable-bluez4 --enable-bluezpatch=4.x --enable-upstart # If you have a Bluez4.x version running on your host and use systemd You can also add --enable-privilegeduser=user to the configuration options. This will set up authorization policies so this user can always configure the remotes (using sonyps3remote_configure). If this option is not given, configuration can only be done by the user currently logged in on the console - so this is very useful on headless systems. Then build and install the package: make sudo make install Then replace bluetoothd with the patched one: # This details your current bluetoothd - note that it may be a symlink, you should replace the physical file ls -l `which bluetoothd` # Replace it, either like so (BlueZ4 installs to /usr/sbin) sudo mv /usr/sbin/bluetoothd /usr/sbin/bluetoothd.bak sudo cp bluez/bluetoothd-4.x-sonyps3 /usr/sbin/bluetoothd # ... or like so (BlueZ5 typically installs to /usr/lib/bluetooth/ and symlinks /usr/sbin/bluetoothd) sudo mv /usr/lib/bluetooth/bluetoothd /usr/lib/bluetooth/bluetoothd.bak sudo cp bluez/bluetoothd-4.x-sonyps3 /usr/lib/bluetooth/bluetoothd Then restart BlueZ, start sonyps3remote and restart lirc (or simply reboot) sudo /etc/init.d/bluetooth restart # If BlueZ is run by a regular initscript sudo systemctl restart bluez # If BlueZ is run by systemd sudo start sonyps3remote sudo /etc/init.d/lirc restart # If LIRC is run by a regular initscript To make it work with LIRC, make sure you have this in /etc/lirc/hardware.conf (before you restart lirc) REMOTE_LIRCD_ARGS="--connect localhost:8888" Also to ensure that the lirc daemon starts, you need something like this in hardware.conf START_LIRCD="true" You can find some options for running the daemon in /etc/default/sonyps3remote. The daemon will put messages to the syslog (tail -f /var/log/syslog), or the systemd log facilities if you are running that. Once the service has started, you can use sonyps3remote_config to set up your remote. You can also edit the configuration file in /etc/sonyps3remote.xml directly. Note that this file is managed by the daemon as well, so for your changes to take effect you must stop the daemon first (stop sonyps3remote), then edit and save the file and then start the daemon again (start sonyps3remote). To test that it works, you can run "irw", this should output remote events to your console. If this works, your bluetooth remote will behave as regular IR LIRC remote from here on. You can use it in any program having LIRC support. Check www.lirc.org for more details. Send any bug reports to sonyps3remote-bugs@lists.sourceforge.net