How to get a seamless remote experience

  Thread Rating:
  • 6 Votes - 4.17 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
LB06 Offline
Fan
Posts: 316
Joined: Aug 2010
Reputation: 10
Location: Europe
Post: #11
gazrat Wrote:Looking forward to part 3 and 4 Smile
Been pulling my hair out trying to get this to work. Option 1 does not work for me, so hopefully the kernel drivers will. I get a response back from ir-keytable but nothing happens in XBMC.

Look forward to the next part
I think you need to modprobe ir-lirc-codec. I forgot that one yesterday. Then restart lirc and reissue the ir-keytable command.

gazrat Wrote:Ok, this all seems to be making sense to me so far (thank again for doing this, best explanation I've found so far on what is happening)

I've modified my keymap to correspond to the response I get when running ir-keytable -t
Loading it seems to work as well

However, I stil don't see the keys listed now when doing a new test



Any idea what I'm missing ? It seems so close to being right !
Did you use the vanilla rc6_copy (or a verbatim copy thereof)? Because it looks like you've got an Xbox 360 Universal Remote, or one that uses the same codes. I recognized the codes, because I also have an Xbox 360 with that remote Smile.

The vanilla rc6_mce file contains codes that are almost the same, but one digit is different. If I'm not mistaken you pressed OK and then UP, right? Look at the difference:

Code:
root@sonata:~# ir-keytable -c -p RC6 -t
Old keytable cleared
Protocols changed to RC-6
Testing events. Please, press CTRL-C to abort.
1309465964.748507: event MSC: scancode = 800f7422
1309465965.593485: event MSC: scancode = 800f741e

Same as yours. I'm using the Xbox 360 remote here. Now look at the codes from the default rc6:

Code:
0x800f0422 KEY_OK
0x800f041e KEY_UP

Notice any difference?
800f7422
800f0422

So you probably have to modify all of them. If you already did that, please give me your config file so I can see what's wrong Smile

edit: it's also possible you forgot to prefix the codes with '0x'?
(This post was last modified: 2011-07-01 00:57 by LB06.)
find quote
gazrat Offline
Junior Member
Posts: 10
Joined: Jun 2009
Reputation: 0
Post: #12
Hi, thanks for the help. Sorry about late reply, weekend got in the way Smile

So, tried it with modprobe and restart. Still nothing...

Quote:root@Gaia:~# modprobe ir-lirc-codec
root@Gaia:~# /etc/init.d/lirc restart
* Stopping remote control daemon(s): LIRC
...done.
* Loading LIRC modules
...done.
* Starting remote control daemon(s) : LIRC
...done.
root@Gaia:~# ir-keytable -c -p RC-6 -w /etc/rc_keymaps/mce_mod -t
Read mce_mod table
Old keytable cleared
Wrote 61 keycode(s) to driver
Protocols changed to RC-6
Testing events. Please, press CTRL-C to abort.
1309796446.387901: event MSC: scancode = 800f741f
1309796446.494901: event MSC: scancode = 800f741f
1309796446.600969: event MSC: scancode = 800f741f
1309796447.497919: event MSC: scancode = 800f7422
1309796447.603962: event MSC: scancode = 800f7422
1309796447.709968: event MSC: scancode = 800f7422
1309796447.816934: event MSC: scancode = 800f7422
1309796450.688026: event MSC: scancode = 800f741e
1309796450.794049: event MSC: scancode = 800f741e
1309796450.901019: event MSC: scancode = 800f741e

That's pressing the DOWN, OK and UP buttons which seem to be mapped correctly.


Heres the config file
Quote:root@Gaia:~# cat /etc/rc_keymaps/mce_mod
# table mce_mod, type: RC6
0x800f7400 KEY_NUMERIC_0
0x800f7401 KEY_NUMERIC_1
0x800f7402 KEY_NUMERIC_2
0x800f7403 KEY_NUMERIC_3
0x800f7404 KEY_NUMERIC_4
0x800f7405 KEY_NUMERIC_5
0x800f7406 KEY_NUMERIC_6
0x800f7407 KEY_NUMERIC_7
0x800f7408 KEY_NUMERIC_8
0x800f7409 KEY_NUMERIC_9
0x800f740a KEY_DELETE
0x800f740b KEY_ENTER
0x800f740c KEY_POWER
0x800f740d KEY_LEFTMETA
0x800f740e KEY_MUTE
0x800f740f KEY_INFO
0x800f7410 KEY_VOLUMEUP
0x800f7411 KEY_VOLUMEDOWN
0x800f7412 KEY_CHANNELUP
0x800f7413 KEY_CHANNELDOWN
0x800f7414 KEY_FASTFORWARD
0x800f7415 KEY_REWIND
0x800f7416 KEY_PLAY
0x800f7417 KEY_RECORD
0x800f7418 KEY_PAUSE
0x800f746e KEY_PLAYPAUSE
0x800f7419 KEY_STOP
0x800f741a KEY_NEXT
0x800f741b KEY_PREVIOUS
0x800f741c KEY_NUMERIC_POUND
0x800f741d KEY_NUMERIC_STAR
0x800f741e KEY_UP
0x800f741f KEY_DOWN
0x800f7420 KEY_LEFT
0x800f7421 KEY_RIGHT
0x800f7422 KEY_OK
0x800f7423 KEY_EXIT
0x800f7424 KEY_DVD
0x800f7425 KEY_TUNER
0x800f7426 KEY_EPG
0x800f7427 KEY_ZOOM
0x800f743a KEY_BRIGHTNESSUP
0x800f7446 KEY_TV
0x800f7447 KEY_AUDIO
0x800f7448 KEY_PVR
0x800f7449 KEY_CAMERA
0x800f744a KEY_VIDEO
0x800f744c KEY_LANGUAGE
0x800f744d KEY_TITLE
0x800f744e KEY_PRINT
0x800f7450 KEY_RADIO
0x800f745a KEY_SUBTITLE
0x800f745b KEY_RED
0x800f745c KEY_GREEN
0x800f745d KEY_YELLOW
0x800f745e KEY_BLUE
0x800f7465 KEY_POWER2
0x800f746e KEY_PLAYPAUSE
0x800f746f KEY_MEDIA
0x800f7480 KEY_BRIGHTNESSDOWN
0x800f7481 KEY_PLAYPAUSE

I'd copied the vanilla rc6 file and then changed the codes from f0 to f7

I'm at a loss here... Thanks for your help....
find quote
LB06 Offline
Fan
Posts: 316
Joined: Aug 2010
Reputation: 10
Location: Europe
Post: #13
First try to get it to work without lirc, so disable lirc.

It's very strange because I copied your file, executed the same command and here it does work:

Code:
ir-keytable -c -p RC-6 -w /etc/rc_keymaps/xb2 -t
Read mce_mod table
Old keytable cleared
Wrote 61 keycode(s) to driver
Protocols changed to RC-6
Testing events. Please, press CTRL-C to abort.
1309798260.825637: event MSC: scancode = 800f740b
1309798260.825666: event key down: KEY_ENTER (0x001c)
1309798260.825677: event sync
1309798260.945630: event MSC: scancode = 800f740b
1309798261.186223: event key up: KEY_ENTER (0x001c)
1309798261.186240: event sync
1309798263.669557: event MSC: scancode = 800f7421
1309798263.669577: event key down: KEY_RIGHT (0x006a)
1309798263.669579: event sync
1309798263.776563: event MSC: scancode = 800f7421
1309798264.026235: event key up: KEY_RIGHT (0x006a)
1309798264.026252: event sync
1309798264.569536: event MSC: scancode = 800f7420
1309798264.569564: event key down: KEY_LEFT (0x0069)
1309798264.569566: event sync
1309798264.675542: event MSC: scancode = 800f7420
1309798264.916249: event key up: KEY_LEFT (0x0069)
1309798264.916269: event sync
1309798265.299526: event MSC: scancode = 800f741e
1309798265.299554: event key down: KEY_UP (0x0067)
1309798265.299556: event sync
1309798265.418498: event MSC: scancode = 800f741e
1309798265.666220: event key up: KEY_UP (0x0067)
1309798265.666240: event sync

Can you post your lsmod and your ir-keytable (without params)?

You should also try it with another remote. Try to use your TV's or STU's or that of your DVD player and load all protocols:

Code:
ir-keytable -c -p RC5,RC6,NEC,SONY,JVC -t

Then press a few buttons that work and create a custom config file based on those keys. Then load the config and test again:

Code:
ir-keytable -c -p RC5,RC6,NEC,SONY,JVC -w /etc/rc_keymaps/test -t
find quote
gazrat Offline
Junior Member
Posts: 10
Joined: Jun 2009
Reputation: 0
Post: #14
Removed lirc completely using apt-get
Same problem.

Created a new config file from scratch using UP, OK and DOWN buttons. No luck there either

Quote: cat /etc/rc_keymaps/test
# table mce-mod
0x800f741e KEY_UP
0x800f7422 KEY_OK
0x800f741f KEY_DOWN
root@Gaia:~# ir-keytable -c -p RC5,RC6,NEC,SONY,JVC -w /etc/rc_keymaps/test -t
Read mce-mod table
Old keytable cleared
Wrote 3 keycode(s) to driver
Protocols changed to NEC RC-5 RC-6 JVC SONY
Testing events. Please, press CTRL-C to abort.
1309815835.952686: event MSC: scancode = 800f741e
1309815836.058697: event MSC: scancode = 800f741e
1309815836.165740: event MSC: scancode = 800f741e
1309815838.431833: event MSC: scancode = 800f7422
1309815838.538822: event MSC: scancode = 800f7422
1309815838.644787: event MSC: scancode = 800f7422
1309815839.401847: event MSC: scancode = 800f741f
1309815839.507843: event MSC: scancode = 800f741f
1309815839.614805: event MSC: scancode = 800f741f
^C

Here's my ir-keytable

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

and my lsmod

Quote:lsmod
Module Size Used by
binfmt_misc 13213 1
parport_pc 32111 0
ppdev 12849 0
snd_hda_codec_realtek 255820 1
rt2860sta 494649 0
snd_hda_intel 24140 3
snd_hda_codec 90901 2 snd_hda_codec_realtek,snd_hda_intel
arc4 12473 2
snd_hwdep 13274 1 snd_hda_codec
snd_pcm 80244 3 snd_hda_intel,snd_hda_codec
ir_lirc_codec 12770 0
lirc_dev 18720 1 ir_lirc_codec
snd_seq_midi 13132 0
ir_sony_decoder 12493 0
snd_rawmidi 25269 1 snd_seq_midi
rt2800pci 18159 0
ir_jvc_decoder 12490 0
ir_rc6_decoder 12490 0
snd_seq_midi_event 14475 1 snd_seq_midi
rt2800lib 43824 1 rt2800pci
crc_ccitt 12595 2 rt2860sta,rt2800lib
rt2x00pci 13986 1 rt2800pci
rc_rc6_mce 12454 0
rt2x00lib 39075 3 rt2800pci,rt2800lib,rt2x00pci
ir_rc5_decoder 12490 0
snd_seq 51291 2 snd_seq_midi,snd_seq_midi_event
i915 450944 5
drm_kms_helper 40745 1 i915
mceusb 17579 0
ir_nec_decoder 12490 0
snd_timer 28659 2 snd_pcm,snd_seq
snd_seq_device 14110 3 snd_seq_midi,snd_rawmidi,snd_seq
mac80211 257001 3 rt2800lib,rt2x00pci,rt2x00lib
cfg80211 156212 2 rt2x00lib,mac80211
eeprom_93cx6 12653 1 rt2800pci
psmouse 73312 0
drm 180037 6 i915,drm_kms_helper
rc_core 25760 9 ir_lirc_codec,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,rc_rc6_mce,ir_rc5_de​coder,ir_nec_decoder,mceusb
eeepc_laptop 19417 0
serio_raw 12990 0
snd 55295 14 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,​snd_seq,snd_timer,snd_seq_device
usbhid 41704 0
i2c_algo_bit 13184 1 i915
lp 13349 0
sparse_keymap 13666 1 eeepc_laptop
soundcore 12600 1 snd
snd_page_alloc 14073 2 snd_hda_intel,snd_pcm
hid 77084 1 usbhid
video 18951 1 i915
parport 36746 3 parport_pc,ppdev,lp
usb_storage 43946 0
uas 17676 0
r8169 42534 0

Any ideas ? I unfortunately don't have another remote to try this with right now. Will try to borrow one...
find quote
LB06 Offline
Fan
Posts: 316
Joined: Aug 2010
Reputation: 10
Location: Europe
Post: #15
Strange. You seem to have load all the right kernel modules (well, it's supposed to happen automatically anyway but you never know) and your config file looks just fine. After you've loaded a config file, does `ir-keytable -r` return the proper table you just loaded?
find quote
gazrat Offline
Junior Member
Posts: 10
Joined: Jun 2009
Reputation: 0
Post: #16
Hmm, not sure. This doesn't seem quite right ??

Quote:root@Gaia:~# ir-keytable -c -p RC5,RC6,NEC,SONY,JVC -w /etc/rc_keymaps/test -t
Read mce-mod table
Old keytable cleared
Wrote 3 keycode(s) to driver
Protocols changed to NEC RC-5 RC-6 JVC SONY
Testing events. Please, press CTRL-C to abort.
1309818422.713694: event MSC: scancode = 800f741e
1309818422.832723: event MSC: scancode = 800f741e
1309818422.925676: event MSC: scancode = 800f741e
^C
root@Gaia:~# ir-keytable -r
scancode 0x7fffffff = KEY_DOWN (0x6c)
Enabled protocols: NEC RC-5 RC-6 JVC SONY
find quote
LB06 Offline
Fan
Posts: 316
Joined: Aug 2010
Reputation: 10
Location: Europe
Post: #17
Nope, should look something like this:

Code:
sudo ir-keytable -r
scancode 0x800f7400 = KEY_NUMERIC_0 (0x200)
scancode 0x800f7401 = KEY_NUMERIC_1 (0x201)
scancode 0x800f7402 = KEY_NUMERIC_2 (0x202)
scancode 0x800f7403 = KEY_NUMERIC_3 (0x203)
...
scancode 0x800f7465 = KEY_POWER2 (0x164)
scancode 0x800f746e = KEY_PLAYPAUSE (0xa4)
scancode 0x800f746f = KEY_MEDIA (0xe2)
scancode 0x800f7480 = KEY_BRIGHTNESSDOWN (0xe0)
scancode 0x800f7481 = KEY_PLAYPAUSE (0xa4)
Enabled protocols: RC-6

I.e. it should just display the table you imported. For some reason this is messed up in your case. Unfortunately I don't have any clue what the problem might be. Could you try to create another file without a comment and without a newline anywhere? So not even an enter after that line.

Did you happen to create your file in Windows and then uploaded it or did you create this file directly (via a shell editor)? I'm asking because ir-keymap seems to be unusually picky about its syntax. Maybe it doesn't like Windows newlines.

Or what if you try it without a config file:

Code:
ir-keytable -c -p RC6 -k 0x800f740b=KEY_ENTER -t

Also, what kernel do you run? You should at least run 2.6.38 if you have an mceusb receiver.
(This post was last modified: 2011-07-05 13:19 by LB06.)
find quote
wsnipex Offline
Team-XBMC packaging monkey
Posts: 1,803
Joined: Jun 2011
Reputation: 49
Thumbs Up    Post: #18
Big thumbs up on this extensive and educational guide!

If I ever have to set everything up again I will for sure make use of it. Right now I'm only using the kernel driver and do the rest in keyboard.xml and gnome keyboard shortcuts(I'm running xbmc on to of metacity). Your guide provides a much cleaner and more generic way though.
find quote
darkscout Offline
Posting Freak
Posts: 2,148
Joined: Jul 2008
Reputation: 12
Post: #19
Read my guide, it looks like you're missing the protocol in the config file.

[Image: aeKO.jpeg]
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
find quote
LB06 Offline
Fan
Posts: 316
Joined: Aug 2010
Reputation: 10
Location: Europe
Post: #20
darkscout Wrote:Read my guide, it looks like you're missing the protocol in the config file.
The protocol can also be defined with the -p switch. Defining the protocol in the config file is not a requirement. It's purely for convenience (and auto configuration).

The symptoms also do not indicate that there's any problem with the protocol. Both ir-keytable and ir-keytable -r indicate that RC6 is being used, which is the correct protocol for an MCE remote. If there was a protocol problem ir-keytable -t shouldn't register anything at all, or maybe faulty codes likes my Bravia remote on the RC5 protocol instead of Sony. But it does register the events properly.

The problem is that the mapping table for some reason doesn't get loaded into memory properly.
find quote
Post Reply