2018-03-19, 13:14
I've finally managed to get PS3 BD remote working on Ubuntu 16.04 LTS without any patches/hacks - IdleTimeout works, custom key mappings work aswell. All you need is to install bluez 5.46 from 17.10 or 5.48 from 18.04. I myself used the 18.04 (Bionic) version 5.48.
Instructions:
1) In case of amd64, download http://mirrors.kernel.org/ubuntu/pool/ma..._amd64.deb and http://mirrors.kernel.org/ubuntu/pool/ma..._amd64.deb .
2) Install the debs:
3) Modify the default /etc/bluetooth/input.conf - you only need 2 options there - IdleTimeout=1 (1 minute idle timeout) and UserspaceHID=false - both options are already there, just commented out and with different default values.
4) Restart bluetooth service:
5) Pair/connect your PS3 BD remote using GUI or console tools like bluetoothctl .
6) Kodi will recognize ~half of the remote keys - the rest needs to be mapped via udev. Create /etc/udev/hwdb.d/99-ps3-bd-remote.hwdb file with the following content:
WARNING: you may need to change the first line with the remote's bus, vendor and product ID. You can get this info with "evtest" command (also you can get all 900xx key codes - just press the remote keys while "evtest" is running). I think that provided values should work - but I'm not sure, maybe the bus ID will be different on your system or something. And of course, you can change the mappings if you don't like those.
7) Rebuild the hwdb.bin file:
8) Retrigger udev:
9) That's it - Kodi should now recognize all your custom key mappings. The remote should disconnect automatically after being idle for 1 minute and enter the sleep mode.
10) UPDATE - my ~/.kodi/userdata/keymaps/custom.xml :
Instructions:
1) In case of amd64, download http://mirrors.kernel.org/ubuntu/pool/ma..._amd64.deb and http://mirrors.kernel.org/ubuntu/pool/ma..._amd64.deb .
2) Install the debs:
Code:
dpkg -i libreadline7_7.0-3_amd64.deb bluez_5.48-0ubuntu3_amd64.deb
4) Restart bluetooth service:
Code:
systemctl restart bluetooth.service
6) Kodi will recognize ~half of the remote keys - the rest needs to be mapped via udev. Create /etc/udev/hwdb.d/99-ps3-bd-remote.hwdb file with the following content:
Code:
evdev:input:b0005v054Cp0306*
KEYBOARD_KEY_9000f=del # KEY_CLEAR
KEYBOARD_KEY_90028=a # KEY_TIME Audio delay control
KEYBOARD_KEY_90064=f11 # KEY_AUDIO keymaps/custom.xml:FullscreenVideo:AudioNextLanguage
KEYBOARD_KEY_90063=f12 # KEY_SUBTITLE keymaps/custom.xml:FullscreenVideo:NextSubtitle
KEYBOARD_KEY_90065=z # KEY_ANGLE Zoom/aspect ratio
KEYBOARD_KEY_90070=tab # KEY_INFO Fullscreen playback
KEYBOARD_KEY_9001a=i # KEY_MENU Info
KEYBOARD_KEY_90040=o # KEY_CONTEXT_MENU Codec info
KEYBOARD_KEY_90081=s # KEY_RED Shutdown menu
KEYBOARD_KEY_90082=f5 # KEY_GREEN keymaps/custom.xml:FullscreenVideo:ActivateWindow(osdvideosettings)
KEYBOARD_KEY_90083=f6 # KEY_YELLOW keymaps/custom.xml:FullscreenVideo:ActivateWindow(osdaudiosettings)
KEYBOARD_KEY_90080=f7 # KEY_BLUE keymaps/custom.xml:FullscreenVideo:ActivateWindow(osdsubtitlesettings)
KEYBOARD_KEY_9000d=c # KEY_OPTION Contextual menu
KEYBOARD_KEY_90010=m # KEY_SCREEN Sidebar
KEYBOARD_KEY_9000f=mute # BTN_0 Mute
KEYBOARD_KEY_90001=volumedown # KEY_SELECT Volume down
KEYBOARD_KEY_90004=volumeup # BTN_START Volume up
KEYBOARD_KEY_9000b=f1 # BTN_TL keymaps/custom.xml:Global:ActivateWindow(videos,movietitles,return)
KEYBOARD_KEY_90009=f2 # BTN_TL2 keymaps/custom.xml:Global:ActivateWindow(videos,tvshowtitles,return)
KEYBOARD_KEY_90002=f3 # BTN_THUMBL keymaps/custom.xml:Global:ActivateWindow(videos,files,return)
KEYBOARD_KEY_9000c=h # BTN_TR TV channels
KEYBOARD_KEY_9000a=e # BTN_TR2 TV EPG
KEYBOARD_KEY_90003=f4 # BTN_THUMBR keymaps/custom.xml:Global:ActivateWindow(settings)
KEYBOARD_KEY_90030=previoussong # KEY_PREVIOUS
KEYBOARD_KEY_90031=nextsong # KEY_NEXT
KEYBOARD_KEY_90033=rewind # KEY_REWIND
KEYBOARD_KEY_90034=fastforward # KEY_FORWARD
KEYBOARD_KEY_90060=comma # KEY_FRAMEBACK
KEYBOARD_KEY_90061=dot # KEY_FRAMEFORWARD
KEYBOARD_KEY_90039=playpause # KEY_PAUSE
KEYBOARD_KEY_90038=stopcd # KEY_STOP
7) Rebuild the hwdb.bin file:
Code:
systemd-hwdb update
Code:
udevadm trigger
10) UPDATE - my ~/.kodi/userdata/keymaps/custom.xml :
Code:
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<Global>
<keyboard>
<f1>ActivateWindow(videos,movietitles,return)</f1>
<f2>ActivateWindow(videos,tvshowtitles,return)</f2>
<f3>ActivateWindow(videos,files,return)</f3>
<f4>ActivateWindow(settings)</f4>
</keyboard>
</Global>
<FullscreenVideo>
<keyboard>
<f5>ActivateWindow(osdvideosettings)</f5>
<f6>ActivateWindow(osdaudiosettings)</f6>
<f7>ActivateWindow(osdsubtitlesettings)</f7>
<f11>AudioNextLanguage</f11>
<f12>NextSubtitle</f12>
</keyboard>
</FullscreenVideo>
</keymap>