Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 16
How to get a seamless remote experience
#31
LB06 just want to say thanks for this post lot of work you put in. Its a very good overview with a lot of usefull detail! Big Grin
Reply
#32
LB06 Wrote:Thank you for testing! So I guess there's a bug in the i386 version of ir-keytable that prevents some scancodes from getting loaded properly. I'll see if I can submit a proper bug report.

I'm not 100% sure if it's really ir-keytables since I tried several self-compiled versions of it as well. Ok it's possible, that this error is existent for some time now, and no one spotted it so far, but it's also possible, it's within the kernel. I don't have more time at the moment to test other Installations, but maybe someone else could check out some latest kernel version for example or debian unstable.
Reply
#33
Thanks for the guide LB06.

After completing the steps to have lirc working with the kernel drivers should I have a fully mapped remote? The only buttons that have any effect in xbmc are up/right/down/left and play pause etc, and its been like this on install (although I had double key presses, but this must have had to do with multiple protocols being used), after setting up the kernel and after the lirc portion of the install. Everything seems to be installed and configured fine. I have a harmony remote programmed as a mce remote which key mappings have worked out of the box with lirc and lucid. The 'ok' button is one that doesnt register with xbmc:

Code:
$ cat /etc/rc.local
ir-keytable -c -p RC6,LIRC -w /etc/rc_keymaps/rc6_mce

Code:
$ sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
        Driver mceusb, table rc-rc6-mce
        Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC
        Enabled protocols: RC-6 LIRC
        Repeat delay = 500 ms, repeat period = 33 ms

Code:
$ lsmod | grep irc
ir_lirc_codec          12898  0
lirc_dev               19232  1 ir_lirc_codec
rc_core                26918  9 ir_lirc_codec,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,rc_rc6_mce,ir_nec_decoder,mceusb

Code:
$ cat /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Linux input layer (/dev/input/eventX)"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
REMOTE_DEVICE="/dev/input/by-id/usb-FINTEK_eHome_Infrared_Transceiver_88636562727801-event-if00"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF="devinput/lircd.conf.devinput"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""

Code:
$ sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1310289132.319176: event MSC: scancode = 800f0422
1310289132.319197: event key down: KEY_OK (0x0160)
1310289132.319199: event sync

Code:
$ cat /etc/lirc/lircd.conf
#Configuration for the Linux input layer (/dev/input/eventX) remote:
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"

Code:
$ sudo irw
0000000080010160 00 KEY_OK devinput

Code:
$ cat /etc/rc_keymaps/rc6_mce
# table rc6_mce, type: RC6
0x800f0422 KEY_OK

Any suggestions?
Reply
#34
XBMC doesn't seem to listen to KEY_OK. Use KEY_ENTER instead.

Also, you should map ALL your keys in /etc/rc_keymaps/rc6_mce. Not just one. You probably have, since you're saying the default keys work, but I'm mentioning it just in case. You should modify the mappings in /etc/rc_keymaps/rc6_mce to suit your needs, because XBMC doesn't listen on all those mappings. KEY_OK was just one example.

I you want to do it properly you should probably start with an empty file and start mapping manually. So have ir-keytable -r open, press a button, copy the scancode, prepend it with "0x" and assign the key that you want.

There's also no reason for you to use lirc afaik. Stop it and disable to lirc protocol. You only want to bridge lirc if you really need functionality that is unavailable through ir-keytable. And just mapping buttons isn't one of them. Using lirc might only complicate the situation.
Reply
#35
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.

***EDIT: see this post for a better method of enabling wakeup on usb devices using udev: http://forum.kodi.tv/showthread.php?tid=...pid1920715

lsusb will list your attached usb devices:
Code:
$ lsusb
Bus 007 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 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[b]Bus 004 Device 002: ID 1934:[u]5168[/u] Feature Integration Technology Inc. (Fintek) F71610A or F71612A Consumer Infrared Receiver/Transceiver[/b]
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 0b38:0010 Gear Head 107-Key Keyboard
Bus 002 Device 005: ID 046d:c049 Logitech, Inc. G5 Laser Mouse
Bus 002 Device 003: ID 0bda:0151 Realtek Semiconductor Corp. Mass Storage Device (Multicard Reader)
Bus 002 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The bold line of text is my usb mce ir receiver. Use the device id (5168 in my case) with the following command to find your device in /sys/bus/usb/devices
Code:
$ grep 5168 /sys/bus/usb/devices/*/idProduct
/sys/bus/usb/devices/4-2/idProduct:5168

Now use that location to check if wakeup from the device is enabled with:
Code:
$ cat /sys/bus/usb/devices/4-2/power/wakeup
disabled

The following command will change this setting to enabled:
Code:
$ sudo sh -c 'echo "enabled" > /sys/bus/usb/devices/4-2/power/wakeup'

This setting will be reset on boot so to enable it on every boot I added the following line to my /etc/rc.local file (the first line is to enable wake up on the usb port, as per this wiki article.)
Code:
echo USB1 > /proc/acpi/wakeup
echo enabled > /sys/bus/usb/devices/4-2/power/wakeup

Make sure /etc/rc.local is executable with the command
Code:
sudo chmod +x /etc/rc.local

This got wake from the remote working for me, and after some testing it seems to work more reliably than on lucid...
Reply
#36
Good point. I didn't really think about this, because my HTPC is also a 24/7 server and NAS, but obviously most HTPCs are put in standby/hibernate when not used. I will reference your post in the FAQ. Thanks!
Reply
#37
Yeah I read that in your guide, but I thought id post it here as this guide helped me get my head around how the remote works with newer kernels and it relates to this thread. I did some more poking around and your reply confirms what I was thinking, that I need to edit the /etc/rc_keymaps/rc6_mce to work with xbmc. Im going to reference /usr/share/xbmc/system/Lircmap.xml to configure my rc6_mce file. Ill see how this works before I remove lirc as I want to use the remote to run scripts via irexec.
Reply
#38
Yes then LIRC is still the only option (bridged or not)
Reply
#39
Just wanted to say that I've managed to get mine working

I used a version of ir-keytables from the linuxtv.org website and followed the first part of these instructions

http://2cheeseburgers.blogspot.com/2010/...erick.html

(I didn't need to rename the RC-6 protocol, but one to watch out for)

Thanks a lot to LB06, your help was much appreciated.

Finally back to using XBMC as it should be used, from the couch Big Grin
Reply
#40
They pull the latest version of ir-keytable. Apparently the bug has already been squashed in git Smile.

Good luck with the remote. Glad it worked out!
Reply
#41
gazrat Wrote:Just wanted to say that I've managed to get mine working

I used a version of ir-keytables from the linuxtv.org website and followed the first part of these instructions

http://2cheeseburgers.blogspot.com/2010/...erick.html

(I didn't need to rename the RC-6 protocol, but one to watch out for)

Thanks a lot to LB06, your help was much appreciated.

Finally back to using XBMC as it should be used, from the couch Big Grin

This worked for me also. Once I downloaded and compiled this version of ir-keytable everything started working just like it was supposed to. Thank you everybody for your help.
althekiller Wrote:I like how this thread went from "specifically sound" to "overclocking." It was a good attempt guys, almost a thread that could be useful in the future.

I really miss althekiller :(
Reply
#42
Ok, I've made some test edits to the /etc/rc_maps/mceusb and to the devinput section of /usr/share/xbmc/system/lircmaps.XML and this has gotten the 'ok' button working on my remote. Looks like I'm going to have to edit some commands in /etc/rc_maps/mceusb and add a few commands to the devinput section of /usr/share/xbmc/system/lircmaps.XML as it doesn't include all the commands I can send from my remote. Glad I'm not going to have to make a keyboard.XML from scratch.

Thanks again for the great guide LB06!
Reply
#43
gazrat Wrote:Just wanted to say that I've managed to get mine working

I used a version of ir-keytables from the linuxtv.org website and followed the first part of these instructions

http://2cheeseburgers.blogspot.com/2010/...erick.html

(I didn't need to rename the RC-6 protocol, but one to watch out for)

Thanks a lot to LB06, your help was much appreciated.

Finally back to using XBMC as it should be used, from the couch Big Grin

absolutely, i found myself stuck trying to figure out why ir-keytable -r wasn't loading the list with -a or -w options.

thinking it was some kind of LIRC interaction problem, or kernel issue, or what-not and it was just a broken version of ir-keytable. only took what, 4 hours to figure that i needed a new ir-keytable.

i also had to change the RC6_MCE table around a bit, (i think swapping ENTER for OK was one of the items i saw elsewhere) as some buttons don't function using the Xorg keyboard interface,

as per the guide, i've added a few functions via XBMC 's lircmaps, but i'm not 100% on changing this yet. i've also found a few new 3rd party apps as remotes that work in case LIRC changes or a kernel module fails, or another update breaks things again.
Reply
#44
For verification: do you have a 32-bits distro?
Reply
#45
I'm failing at the first hurdle –

Code:
ir-keytable -c -p RC5,RC6,NEC,SONY,JVC -w /etc/rc_keymaps/test -t
opening keycode file: No such file or directory

Any idea what I've done wrong?
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 16

Logout Mark Read Team Forum Stats Members Help
How to get a seamless remote experience9
This forum uses Lukasz Tkacz MyBB addons.