remote control, control
bluez and PS3 remotes
The bluez codebase is pretty complete when it comes to the PS3 remote, but it has some oversights in features. The remote never seems to automatically disconnect, which drains the batteries. The key mapping relies on X keysym/keymap configuration, which is a plain headache.
So, we patch the code, and hope for the best! The changes are pretty extensive in the areas touched, so the bluez project hasn't agreed to accept it quite yet.
This code is originally from ruff on the XBMC forums. I have since made tweaks across much of his original patch. But his original work is what matters; grats to him!
- Custom remote keymap via input.conf (with example for XBMC)
- Quick reconnect after timeout
- Remote timeout using seconds
Here are the code patches for the various versions of bluez. I update the patches for new releases at random intervals; usually when something notable comes up in the bluez changelog.
Some of the patches will apply to newer versions, but not always.
To apply the patch, patch -p1 < bluez_ps3remote_XYZ.diff
- bluez_ps3remote_4.91.diff -- patch for bluez 4.91 - 4.94
- bluez_ps3remote_4.76.diff -- patch for bluez 4.76 -- UNTESTED
- bluez_ps3remote_4.69.diff -- patch for bluez 4.69
- bluez_ps3remote_4.66.diff -- patch for bluez 4.66
- bluez_ps3remote_4.64.diff -- patch for bluez 4.64 - 4.65
- bluez_ps3remote_4.60.diff -- patch for bluez 4.60
For those people using Ubuntu, there is a PPA with patched bluez packages. There may be development versions at times, so user beware.
A set of batteries should last around 1.5 years. When your remote starts acting funny (for example, it'll connect, but then will not reconnect after timing out), try replacing the batteries. If it starts working again...
Here are some python scripts to help you pair/unpair your PS3 remote. There are some (many?) instances where the pairing doesn't seem to work. I haven't figured out why things work for some people... Try searching the XBMC forums if you run into trouble.