How to get a seamless remote experience - 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: How to get a seamless remote experience (/showthread.php?tid=104541) |
- koekiemonster - 2011-09-15 First off: many thanks for your tutorial, it helped me understand a lot about the remote. My remote (logitech harmony, connecting to an OVU412000/00 philips reciever) worked out of the box when configured in the logitech software as an mediacenter-pc -> microsoft -> MCE remote. (and of course mapping some buttons to it in the logitech software) after some testing i also tuned down the number of signals it's sending (troubleshooting section, responding too much, change the value from 3 to 0) some other info: Code: Linux hans-ubuntu-ion 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux so now my problem: when i'm in plain ubuntu (nautilus for instance) the resonse is perfect: tapping down once steps 1 down, tapping 3 times steps down 3 items, holding the button starts scrolling a little faster. however when i'm inside XBMC, it gets messy. pressing a button once works, pressing it two times sometimes works, sometimes steps down only 1. but when pressing a button 3 times fast, it jumps a lot of items (something between 4 to 10 or more). i've tried all sort of things with the interkey delay in the harmony software: no difference. also fiddeling with the repeat delay and repeat period in the ir-keytable doesn't change anything. (not strange, ubuntu is working fine, its XBMC that's acting funny) I was hoping that your remote controller knowledge also extends a bit into XBMC itself, can you help me with this anoying problem? - stefanwa - 2011-09-20 koekiemonster Wrote:so now my problem: I'm in the same boat. Haven't found a solution yet. Anyone else? RE: [Linux] How-to get a seamless remote experience - boosted - 2011-10-19 stefanwa Wrote:I'm in the same boat. Haven't found a solution yet. Anyone else? I had the same problem. I couldn’t hold down the volume button, single presses only. After lots of testing my remote now works perfectly. I use Lubuntu 11.10 x64. I used LB06‘s ‘2.3 Let the kernel cooperate with LIRC’ I modified /usr/share/xbmc/system/Lircmap.xml - the <remote device="linux-input-layer"> part. I used irw to get the correct key codes. Doing this got rid of the arrow key problems. My reciever [ 6.946884] IR RC6 protocol handler initialized [ 7.046704] lirc_dev: IR Remote Control driver registered, major 249 [ 7.053178] IR LIRC bridge handler initialized [ 7.054414] Registered IR keymap rc-rc6-mce [ 7.054454] input: Media Center Ed. eHome Infrared Remote Transceiver (0609:031d) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/rc/rc0/input10 [ 7.054485] rc0: Media Center Ed. eHome Infrared Remote Transceiver (0609:031d) as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/rc/rc0 [ 7.054512] rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0 [ 7.054597] mceusb 2-1.4:1.0: Registered SMK eHome Infrared Transceiver on usb2:3 [ 7.054606] usbcore: registered new interface driver mceusb my files /etc/rc_maps.cfg Code: #driver table file /etc/rc_keymaps/rc6_mce Code: # table rc6_mce, type: RC6 /usr/share/xbmc/system/Lircmap.xml Code: <lircmap> /etc/lirc/hardware.conf Code: # /etc/lirc/hardware.conf /etc/lirc/lircd.conf Code: # /etc/lirc/lircd.conf I also have 'ir-keytable -c -w /etc/rc_keymaps/rc6_mce -p RC-6,LIRC' added to /etc/rc.local otherwise my remote doesn't work. I can also start xbmc from the remote with the green button. I have 'irexec' in 'Desktop Session Settings' /home/rick/.config/autostart/IRexec.desktop (for lxde) Code: [Desktop Entry] and /home/rick/Scripts/startXBMC.sh (set permissions to executable) Code: #!/bin/bash and /home/rick/.lircrc Code: # Start XBMC RE: [Linux] How-to get a seamless remote experience - TehCrucible - 2012-04-18 Thank you boosted and LB06 for your excellent info. Sorry to dig up this thread again but I have one issue now after following boosted's post above (as I had the problem with double keypresses etc). My problem is that the custom mappings I had previously set in rc6_mce are no longer responding as they did before I re-installed LIRC and modified the files as above. What I am trying to do is program the "Clear" (0x800f040a) key to send the ESC (rather than the DELETE) key signal through the ir-keytable (or linix driver or whatever you call it) to close an instance of zsnes and return me to xbmc. This was working previously with just the linux driver configured but not since configuring it to "co-operate" with LIRC. Weird thing is that when testing under irw and ir-keytable -t the button IS sending the KEY_ESC code. Its just no longer closing zsnes like it was originally. I can only assume that the command is getting caught in LIRC somewhere and not passing through to the program, but my Lircmap.xml has no entries to either KEY_ESC, KEY_DELETE or the "Clear" button/function. For reference, my config files match that exactly of bossteds post above except for the entry in rc6_mce has been modified to KEY_ESC. Im stumped. Any ideas? Thanks in advance. EDIT: Seems that when XBMC is running (as it is in the background when zsnes is open) that ir-keytable is not registering any input. irw reads fine. I'm sure this somehow makes the answer painfully obvious to some but I still cant quite work out exactly why. RE: [Linux] How-to get a seamless remote experience - LB06 - 2012-04-22 (2012-04-18, 01:51)TehCrucible Wrote: Thank you boosted and LB06 for your excellent info.Maybe it's too obvious but can't you just disable lirc, if only to test if it really is LIRC blocking the events for ir-keytable? RE: [Linux] How-to get a seamless remote experience - boosted - 2012-04-23 (2012-04-18, 01:51)TehCrucible Wrote: Thank you boosted and LB06 for your excellent info. Could you create another script for the <ESC> key. Not sure if it will work or how you send the <ESC> eg /home/rick/.lircrc # Send <ESC> begin prog = irexec button = KEY_ESC config = /home/rick/Scripts/ESC.sh end and /home/rick/Scripts/ESC.sh (set permissions to executable) # Exit zsnes esc fi exit RE: [Linux] How-to get a seamless remote experience - beschmid - 2012-05-23 (2011-07-10, 13:46)teeedubb Wrote: One thing worth mentioning is that to resume from the remote with newer kernels you need to enable wake up on the actual receiver device aswell as the usb port. lsusb gave me: lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc. GD01 MX VFD Display/IR Receiver Bus 006 Device 002: ID 20e8:5821 Bus 006 Device 003: ID 04b4:0060 Cypress Semiconductor Corp then "grep 0038 /sys/bus/usb/devices/*/idProduct" gives me: /sys/bus/usb/devices/3-2/idProduct:0038 So... cat /sys/bus/usb/devices/3-2/power/wakeup: "cat: /sys/bus/usb/devices/3-2/power/wakeup: No such file or directory" What the?! Not sure where to go from here. Any ideas? RE: [Linux] How-to get a seamless remote experience - brando56894 - 2012-06-05 This was an amazing guide, great job! I spent a few hours searching around trying to figure out how to get a MCE remote that came with my Dad's old Dell XPS to work with XBMC but only about 4 or 5 buttons would work out of the box with LIRC. I knew it worked because it worked partially when I was running OpenELEC with their MCE remote service. After having problems with LIRC and scouring the web I found your guide, even being a geek it took me a little while to understand. I finally got (almost) everything mapped and it so much more convenient to use than the XBMC Android app which I had been using previously, especially since I want my parents to be able to use XBMC since they don't have smart phones. The two mapping I can't seem to figure out are for opening a smart playlist I have called New Episodes (just want to view the contents of it, not play it) and for opening a specific plugin (PseudoTV). RE: [Linux] How-to get a seamless remote experience - beschmid - 2012-06-09 I had everything working great thanks to this guide, until I had to replace my CPU fan. After starting the system, my Harmony remote stopped working. The only thing things that I changed were the CPU fan and I changed one of my USB keyboard dongles to a different USB port. I am using the IR reciever that came with my case "IMON" that plugs via usb into the back of my motherboard. #lsusb: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc. GD01 MX VFD Display/IR Receiver Bus 006 Device 002: ID 20e8:5821 Bus 006 Device 003: ID 0a5c:200a Broadcom Corp. Bluetooth dongle So I know its plugged in, but #dmesg does not show anything in reference to it being plugged in? Does anyone have any suggestions to troubleshoot this? Sorry if this is cluttering up this thread. If so, let me know and I will delete it. Re: [Linux] How-to get a seamless remote experience - brando56894 - 2012-06-09 It's probably registered at a different input, see what ir-keytable) says. RE: [Linux] How-to get a seamless remote experience - cpelliott - 2012-06-09 With my RC6 remote (HA-IR01SV) only a few keys work. The arrows, enter (not OK), volume, mute, stop and power work. The others don't. When a console is selected, the remote produces keyboard input to the console. I tried using ir-keytable to point to the right keymap, but no change. No sure if lirc or v4l is handling the IR. Any pointers would be appreciated. Info below: xbmc.x86_64 11.0-1.fc17 lirc.x86_64 0.9.0-8.fc17 Bus 003 Device 002: ID 1784:0011 TopSeed Technology Corp. # ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event9) with: Driver mceusb, table rc-rc6-mce Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other Enabled protocols: RC-6 Repeat delay = 500 ms, repeat period = 125 ms usbcore: registered new interface driver uvcvideo USB Video Class driver (1.1.1) IR RC6 protocol handler initialized IR JVC protocol handler initialized IR Sony protocol handler initialized IR SANYO protocol handler initialized input: MCE IR Keyboard/Mouse (mceusb) as /devices/virtual/input/input12 IR MCE Keyboard/mouse protocol handler initialized lirc_dev: IR Remote Control driver registered, major 249 rc rc0: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 0 IR LIRC bridge handler initialized # lsmod | grep -i ir ir_lirc_codec 13021 0 lirc_dev 19504 1 ir_lirc_codec ir_mce_kbd_decoder 13248 0 ir_sanyo_decoder 12839 0 ir_sony_decoder 12713 0 ir_jvc_decoder 12751 0 ir_rc6_decoder 12874 0 ir_rc5_decoder 12710 0 ir_nec_decoder 12915 0 rc_core 26730 11 ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,mceusb,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder,rc_rc6_mce # uname -r 3.4.0-1.fc17.x86_64 Example for OK button (which doesn't work with xbmc): # ir-keytable -t Testing events. Please, press CTRL-C to abort. 1339277333.322200: event MSC: scancode = 800f0422 1339277333.322204: event key down: KEY_OK (0x0160) 1339277333.322205: event sync 1339277333.457221: event MSC: scancode = 800f0422 1339277333.457222: event sync 1339277333.706408: event key up: KEY_OK (0x0160) 1339277333.706410: event sync RE: [Linux] How-to get a seamless remote experience - brando56894 - 2012-06-10 Please post your rc_rc6_mce file, it sounds like you don't have anything mapped correctly. That's how mine was at first. RE: [Linux] How-to get a seamless remote experience - cpelliott - 2012-06-10 I think rc6_mce is ok since ir-keytable -t gives reasonable output for all keys. It's like lirc is not using the keytable files. Before I installed v4l-utils, there were no keytable files and xbmc behaves the same now that they are there. Calling ir-keytable with the correct protocol and file doesn't seem to affect xbmc. I'm not sure what to do when ir-keytable -t works perfectly, but xbmc only recognizes a few of the keys. Keys that Linux handles (KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_MUTE) work fine. Is there anything I need to configure in xbmc to get it to accept keys like KEY_OK? Is there any debugging I can enable in xbmc to figure this out? Code: # table rc6_mce, type: RC6 RE: [Linux] How-to get a seamless remote experience - brando56894 - 2012-06-10 It may look like it's working correctly but actually it isn't. What you see from ir-keytable is just the commands that the remote is sending, Linux nor XBMC understand those except for volume, mute and up/down/left/right. All that proves is that your receiver is communicating with the remote successfully, which is the first step (obviously! )The first thing you should do is remove lirc, you're not going to need it, ir-keytable is the new replacement for lirc. I know it's a little time consuming but you may want to run ir-keytable -t and go through each button sequentially and write down it's offset (only the last two digits should change per key so you shouldn't have to write down the whole offset, at least that's how mine was) and corresponding function on the remote since all the functions listed in the keymap probably aren't included on the remote, you don't want to be mapping functions to non-existent keys and wondering why the hell they don't work, do you? You need to take a look at XBMC's keyboard.xml (mentioned in the first post) and make those keys match your rc_rc6_mce file. For example, to get Channel - to scroll down a page while in your library, but to have it decrease channels in something like PseudoTV your rc_rc6_mce file should say 0x800f0413 KEY_PAGEDOWN instead of 0x800f0413 KEY_CHANNELDOWN since your remote is actually emulating your keyboard, you want XBMC to see it as a keyboard not a remote. You should copy /lib/udev/keymaps/rc_rc6_mce to /etc/rc_keymaps and name it something like rc_rc6_xbmc and edit that file, not the original one in /lib, you also need to place your custom keymaps (the XML file not the one from /lib) for XBMC (for example, if you want to make one button do multiple actions depending on the window you're at) in ~/.xbmc/userdata/keymaps Here's my ~/.xbmc/userdata/keymaps/rc6-remote.xml and here's my /etc/rc_keymaps/rc6_mce_xbmc To set your mappings and see if they're set correctly run sudo ir-keytable -c -w /etc/rc_keymaps/whatever you named your file; ir-keytable -t if everything is set correctly the buttons should show what you have them mapped to (channel - would show KEY_PAGEDOWN instead of KEY_CHANNELDOWN) I know it's a little wordy, but this is how it's exactly explained in the "let the kernel do everything" section Hope that cleared a lot up for you, I'm a huge geek and it took me a good 30-45 minutes to even figure out what the hell I was doing. Once you understand what's actually going on it's pretty simple. Essentially, your remote sends an offset (0x4357348), ir-keytable corresponds that offset to whatever you have set in the keymap, then XBMC does the corresponding action that's set to the ir-keytable keymap. You can even use it outside of XBMC and it will print things just like you're using a keyboard. It's actually pretty nifty. Once you have everything setup the way you want it to, you need to have it autoload the keymap from /etc I put mine in /etc/bash.bashrc I hope I've included everything I learned, I must have edited this damn post about ten times! lol If this helped please +Rep it! RE: [Linux] How-to get a seamless remote experience - cpelliott - 2012-06-11 Thank you for the help. The rc6_mce_xbmc file supplied by brando56894 was very helpful. I didn't end up using the xml file at the moment, but I might if I want to customize anything. After adding the file to /etc/rc_keymaps and modifying /etc/rc_map.cfg, I was good to go. |