[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: [LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS (/showthread.php?tid=50717) |
[LINUX] Sony PlayStation 3 Blu-ray Disc Remote (PS3 BD) + LIRC + XBMC = SUCCESS - pakojones - 2009-05-10 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 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 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 We are looking for the info on the line Code: H: Handlers=kbd event6 3.- Configure LIRC To configure LIRC we must edit /etc/lirc/hardware.conf and include the following lines: Code: REMOTE="ps3" 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 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 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 I hope you find this guide useful. J. Excellent first post! - crego - 2009-05-11 That's a great first post! - freezy - 2009-05-11 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. - Pvt_Ryan - 2009-05-11 can this be done from the command line? so we don't need to use the applet? - freezy - 2009-05-12 Another thing: Pressing a button for a longer time doesn't repeat the button (like scrolling down a list). Did you notice that too? - b_balthasar - 2009-05-15 Thanks very much for the howto pakojones, it worked a treat. Similar to freezy I had to add Code: uinput Code: KERNEL=="uinput", MODE="0666" 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 - freezy - 2009-05-15 Does it work also after reboot? Still issues with that. And how about the repeating when pressing a button? - b_balthasar - 2009-05-15 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 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). - pakojones - 2009-05-16 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 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! - Anastrophe - 2009-05-16 Great work. Looking forward to all the issues getting sorted out - pakojones - 2009-05-17 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/product/index.asp?sid=537817525&code=GUBTCR41&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. - xavius - 2009-05-17 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 - b_balthasar - 2009-05-17 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 - xavius - 2009-05-17 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. - wipmonkey - 2009-05-18 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. |