Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 16
How to get a seamless remote experience
#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
Reply
#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.
Reply
#18
Thumbs Up 
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.
Reply
#19
Read my guide, it looks like you're missing the protocol in the config file.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#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.
Reply
#21
Ok, something definitely seems to be wrong my ir-keytable loading the keymap into memory

I'm running 2.6.38 kernel

Quote:root@Gaia:/# uname -r
2.6.38-8-generic

ir-keytable is latest version in repo

Quote:apt-get install ir-keytable
Reading package lists... Done
Building dependency tree
Reading state information... Done
ir-keytable is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

using the -k parameter returns an error

Quote:ir-keytable -c -p RC-6 -k 0x800f7422=KEY_OK -t
Invalid parameter(s)
ir-keytable: -k: (PROGRAM ERROR) Option should have been recognized!?
Try `ir-keytable --help' or `ir-keytable --usage' for more information.

the -w command is being read somehow at least

Quote:root@Gaia:/# ir-keytable -c
Old keytable cleared
root@Gaia:/# ir-keytable -r
Enabled protocols: RC-6
root@Gaia:/# ir-keytable -c -p RC-6 -w /etc/rc_keymaps/finaltest
Read mce-final table
Old keytable cleared
Wrote 3 keycode(s) to driver
Protocols changed to RC-6
root@Gaia:/# ir-keytable -r
scancode 0x7fffffff = KEY_DOWN (0x6c)
Enabled protocols: RC-6

I created a new keymap using nano on the machine called finaltest with the UP, DOWN and OK buttons but still nothing.

Quote:root@Gaia:/# cat /etc/rc_keymaps/finaltest
# table mce-final
0x800f741e KEY_UP
0x800f7422 KEY_OK
0x800f741f KEY_DOWN

root@Gaia:/#

tried it with and without a new line at the end of the file. No luck

Any ideas ? I don't think it would matter if I had another remote to try as ir-keytable is not loading any file.
Reply
#22
I don't think it would matter either.

Strange that -k doesn't work. May be the cause. Could you give me the output of the following code:

Code:
ir-keytable -V && ir-keytable -v && apt-cache show ir-keytable

Also, try running

Code:
ir-keytable -c -p RC-6 -w /etc/rc_keymaps/finaltest -v
Reply
#23
Here you go

Quote:root@Gaia:~# ir-keytable -V && ir-keytable -v && apt-cache show ir-keytable
IR keytable control version 0.8.3
Found device /sys/class/rc/rc0/
Input sysfs node is /sys/class/rc/rc0/input7/
Event sysfs node is /sys/class/rc/rc0/input7/event7/
Parsing uevent /sys/class/rc/rc0/input7/event7/uevent
/sys/class/rc/rc0/input7/event7/uevent uevent MAJOR=13
/sys/class/rc/rc0/input7/event7/uevent uevent MINOR=71
/sys/class/rc/rc0/input7/event7/uevent uevent DEVNAME=input/event7
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=mceusb
input device is /dev/input/event7
/sys/class/rc/rc0/protocols protocol rc-5 (disabled)
/sys/class/rc/rc0/protocols protocol nec (disabled)
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
/sys/class/rc/rc0/protocols protocol jvc (disabled)
/sys/class/rc/rc0/protocols protocol sony (disabled)
/sys/class/rc/rc0/protocols protocol lirc (disabled)
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: RC-6
Repeat delay = 500 ms, repeat period = 33 ms
Package: ir-keytable
Priority: optional
Section: universe/utils
Installed-Size: 576
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Gregor Jasny <[email protected]>
Architecture: i386
Source: v4l-utils
Version: 0.8.3-1
Depends: libc6 (>= 2.4)
Recommends: udev
Filename: pool/universe/v/v4l-utils/ir-keytable_0.8.3-1_i386.deb
Size: 47934
MD5sum: 44cab1fe266912a531a89cedb7f4c3f9
SHA1: 384e60a6947f641584f88ba0a25df3ffb10fa32f
SHA256: 0abb5f9e4877a2f7c5e3373dd34aa0a1279bbb7d83fc043b10b99c5b574203b2
Description: Alter keymaps of Remote Controller devices
This package allows to change the keymap of controller receivers.
Those receivers are found as infrared receivers on DVB sticks or on
framegrabber cards. Via ir-keytable the mapping from a scancode to
the generated event can be customized and made persistent.
Homepage: http://linuxtv.org/downloads/v4l-utils/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

and

Quote:root@Gaia:~# ir-keytable -c -p RC-6 -w /etc/rc_keymaps/finaltest -v
Read mce-final table
Found device /sys/class/rc/rc0/
Input sysfs node is /sys/class/rc/rc0/input7/
Event sysfs node is /sys/class/rc/rc0/input7/event7/
Parsing uevent /sys/class/rc/rc0/input7/event7/uevent
/sys/class/rc/rc0/input7/event7/uevent uevent MAJOR=13
/sys/class/rc/rc0/input7/event7/uevent uevent MINOR=71
/sys/class/rc/rc0/input7/event7/uevent uevent DEVNAME=input/event7
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=mceusb
input device is /dev/input/event7
/sys/class/rc/rc0/protocols protocol rc-5 (disabled)
/sys/class/rc/rc0/protocols protocol nec (disabled)
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
/sys/class/rc/rc0/protocols protocol jvc (disabled)
/sys/class/rc/rc0/protocols protocol sony (disabled)
/sys/class/rc/rc0/protocols protocol lirc (disabled)
Opening /dev/input/event7
Input Protocol version: 0x00010001
Deleting entry 1
Deleting entry 2
Old keytable cleared
7fffffff=0067
7fffffff=0160
7fffffff=006c
Wrote 3 keycode(s) to driver
Protocols changed to RC-6
Reply
#24
Well that looks ok (except the last past). The last thing you could try that I can think of is to uninstall/purge lirc-modules-source and then reboot, because you still have some lirc stuff in your lsmod.

That's the only difference between your situation and mine that I can see (not that my remote didn't work while some lirc stuff was loaded, but ok). And that I run linux-image-2.6.38-8-server (AMD64) instead of linux-image-2.6.38-8-generic (i386), but that shouldn't really make a difference. You could submit a bugreport clearly outlining the steps, the expected result and the realized result.

Sorry I wasn't able to help you.
Reply
#25
Thanks, I really appreciate the help.

I'll try doing the purge and fingers crossed. I'm also going to see if I can borrow a new receiver and remote off a friend too see if that helps at all

Thanks again for the guide and the help
Reply
#26
Hi,
I'm experiencing the same thing than gazrat. I recently bought a origen ae m10 with an imon vfd/ir display an rushing through various installations since then, starting with debian and now struggling with natty.
Since I tried 64 as well as 32 bit natty I can say, they behave differently at some points (by the way upstart is annoying, it drives me crazy, since errors appear and dissappear randomly): Where in natty amd64 ir-keytable can load a table without problems into the driver, the i386 version fails for me.
I guess it's either the kernel module or ir-keytable which has some sort of overflow in the variable that stores the key-code since my remote produces two groups of codes:
0x020000XX - they seem to get to the driver.
0x800ff4XX - they're all replaced with 7fffffff when ir-keytable tries to load them into the driver.
And as I said: In natty amd64 ir-keytable worked - except - lcdproc seems to have problems with the new imon module, but thats another problem and the same in i386.
I've tried to use the old lirc modules build from lirc-modules-source (forced install, since the kernel version is newer, but doesn't support the display). Lcdproc works just fine with the old lirc_imon module but lirc doesn't receive anything from the remote. Since I took the ubuntu sources of lirc and build them for debian squeeze (lirc in squeeze is awfully old) and the just worked with debians 2.6.32 amd64 kernel and I used the same config, the problem is likely between the newer kernel and the old module - so dead end here.
Reply
#27
Does anybody know if it's possible to nest actions in Remote.xml? What I want is to have an alternate action for pressing the "Guide" button when i'm fullscreen in Mytv. But not when i'm playing a DVD. Is this even possible?

I would imagine i could use something as this:
Code:
<keymap>
...
<MyTV>
    <remote>
      <clear>Delete</clear>
    </remote>
    <FullscreenVideo>
      <remote>
        <title>XBMC.ActivateWindow(PVROSDGuide)</title>
        <recordedtv>XBMC.ActivateWindow(Teletext)</recordedtv>
      </remote>
    </FullscreenVideo>
  </MyTV>
</keymap>
Reply
#28
Hello again,
using the old lirc modules wasn't a dead end at all, there was just a change in the ir-codes I can't explain, since everything (except the kernel) is almost the same. I stil got output with cat /dev/lirc0 | xxd so I tried other lircd.conf files

The following should not keep any suprises, but maybe someone find's it usefull anyways.

What I did:

blacklist the new event modules for rc devices in /etc/modprobe.d/blacklist-rc.conf:
Quote:blacklist rc_core
blacklist rc_imon_pad
blacklist imon
blacklist ir_lirc_codec
blacklist ir_sony_decoder
blacklist ir_jvc_decoder
blacklist ir_rc6_decoder
blacklist ir_rc5_decoder
blacklist ir_nec_decoder

I also was used to hide the usb device from usbhid, but since there are other drivers for that device in the kernel, it's not necessary anymore, but if someone is using an older kernel without those event rc modules it might be usefull to create a file /etc/modprobe.d/usbhid-imon.conf with the following (maybe you have to adjust your usb-id, use lsusb -v):
Quote:options usbhid quirks=0x15c2:0x0036:0x0004

next pass the right module options to lirc_imon in /etc/modprobe.d/lirc_imon.conf (the display_type 1 is vfd, ir_protocol 1 is RC-6):
Quote:options lirc_imon display_type=1 ir_protocol=1

install lirc:
Quote:aptitude install lirc

in the package setup I chose
Quote:Remote Control configuration: Soundgraph iMON IR/LCD
IR transmitter, if present: None

the resulting hardware.conf:
Quote:# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Soundgraph iMON IR/LCD"
REMOTE_MODULES="lirc_dev lirc_imon"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
# I don't know why a cfg file is given here, I think it's ignored
# maye its used if /etc/lirc/lircd.conf doesn't exist
REMOTE_LIRCD_CONF="imon/lircd.conf.imon"
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"

the lircd.conf I used:
Quote:begin remote

name OrigenAE_via_iMON
bits 64
eps 30
aeps 100

one 0 0
zero 0 0
gap 139998
ignore_mask 0x0000800000000fff
min_repeat 1
toggle_bit 0

begin codes
KEY_POWER 0x800f040c000002ae
KEY_STOP 0x800f8419000002ae
KEY_RECORD 0x800f0417000002ae
KEY_PAUSE 0x800f8418000002ae
KEY_PLAY 0x800f0416000002ae
KEY_REWIND 0x800f8415000002ae
KEY_FASTFORWARD 0x800f0414000002ae
KEY_PREVIOUS 0x800f841b000002ae
KEY_NEXT 0x800f041a000002ae
KEY_BACK 0x0200002a00000000
KEY_INFO 0x800f040f000002ae
KEY_UP 0x0200005200000000
KEY_LEFT 0x0200005000000000
KEY_OK 0x0200002800000000 # OK -- same code as KEY_ENTER
KEY_RIGHT 0x0200004f00000000
KEY_DOWN 0x0200005100000000
KEY_VOLUMEUP 0x800f0410000002ae
KEY_VOLUMEDOWN 0x800f8411000002ae
KEY_MENU 0x800f040d000002ae # Big ugly windows logo
KEY_CHANNELUP 0x800f0412000002ae
KEY_CHANNELDOWN 0x800f8413000002ae
KEY_MUTE 0x800f840e000002ae
KEY_PVR 0x800f0448000002ae
KEY_DVD 0x800f8424000002ae
KEY_EPG 0x800f0426000002ae
KEY_TV 0x800f8425000002ae
KEY_NUMERIC_1 0x0200001e00000000
KEY_NUMERIC_2 0x0200001f00000000
KEY_NUMERIC_3 0x0200002000000000
KEY_NUMERIC_4 0x0200002100000000
KEY_NUMERIC_5 0x0200002200000000
KEY_NUMERIC_6 0x0200002300000000
KEY_NUMERIC_7 0x0200002400000000
KEY_NUMERIC_8 0x0200002500000000
KEY_NUMERIC_9 0x0200002600000000
KEY_NUMERIC_STAR 0x0220002500000000
KEY_NUMERIC_0 0x0200002700000000
KEY_NUMERIC_POUND 0x0220002000000000
KEY_DELETE 0x0200002900000000
KEY_ENTER 0x0200002800000000
KEY_TEXT 0x800f845a000002ae
KEY_RED 0x800f845b000002ae
KEY_GREEN 0x800f845c000002ae
KEY_YELLOW 0x800f845d000002ae
KEY_BLUE 0x800f845e000002ae
end codes

end remote

begin remote

name MCE_via_iMON_ffdc
bits 32
eps 30
aeps 100

one 0 0
zero 0 0
gap 203992
toggle_bit_mask 0x8000

begin codes
KEY_POWER 0x800f040c
KEY_STOP 0x800f8419
KEY_RECORD 0x800f0417
KEY_PAUSE 0x800f8418
KEY_PLAY 0x800f0416
KEY_REWIND 0x800f8415
KEY_FASTFORWARD 0x800f0414
KEY_PREVIOUS 0x800f841b
KEY_NEXT 0x800f041a
KEY_BACK 0x0200002a
KEY_INFO 0x800f040f
KEY_UP 0x02000052
KEY_LEFT 0x02000050
KEY_OK 0x02000028 # OK -- same code as KEY_ENTER
KEY_RIGHT 0x0200004f
KEY_DOWN 0x02000051
KEY_VOLUMEUP 0x800f0410
KEY_VOLUMEDOWN 0x800f8411
KEY_MENU 0x800f040d # Big ugly windows logo
KEY_CHANNELUP 0x800f0412
KEY_CHANNELDOWN 0x800f8413
KEY_MUTE 0x800f840e
KEY_PVR 0x800f0448
KEY_DVD 0x800f8424
KEY_EPG 0x800f0426
KEY_TV 0x800f8425
KEY_NUMERIC_1 0x0200001e
KEY_NUMERIC_2 0x0200001f
KEY_NUMERIC_3 0x02000020
KEY_NUMERIC_4 0x02000021
KEY_NUMERIC_5 0x02000022
KEY_NUMERIC_6 0x02000023
KEY_NUMERIC_7 0x02000024
KEY_NUMERIC_8 0x02000025
KEY_NUMERIC_9 0x02000026
KEY_NUMERIC_STAR 0x02200025
KEY_NUMERIC_0 0x02000027
KEY_NUMERIC_POUND 0x02200020
KEY_DELETE 0x02000029
KEY_ENTER 0x02000028
KEY_TEXT 0x800f845a
KEY_RED 0x800f845b
KEY_GREEN 0x800f845c
KEY_YELLOW 0x800f845d
KEY_BLUE 0x800f845e
end codes

end remote
The first codes are the ones I used to get from my remote, the second set are the codes I get now and I don't have a clue why the changed. As you can see: They're almost the same, except the trailing 00002ae or 00000000 at the end.

By the way: Does anyone know why irrecord does not work with the imon devices?

Now I installed the old modules:
Quote:aptitude install lirc-modules-source
at this point dkms refuses to install lirc_imon since the kernel version is newer. Thats right, but it doesn't support my imon display anymore, so I forced the installation:
Quote:dkms uninstall -m lirc -v 0.8.7
dkms install -m lirc -v 0.8.7 --force

now a fast:
Quote:depmod -a
update-initramfs -u
to ensure that all modifications to the module config will be considered

With the old lirc_imon driver lcdproc works without problems, no stall of xbmc to loss of contact to the display, as you can observe in syslog after a while.
Reply
#29
konti Wrote:Does anybody know if it's possible to nest actions in Remote.xml? What I want is to have an alternate action for pressing the "Guide" button when i'm fullscreen in Mytv. But not when i'm playing a DVD. Is this even possible?

I would imagine i could use something as this:
Code:
<keymap>
...
<MyTV>
    <remote>
      <clear>Delete</clear>
    </remote>
    <FullscreenVideo>
      <remote>
        <title>XBMC.ActivateWindow(PVROSDGuide)</title>
        <recordedtv>XBMC.ActivateWindow(Teletext)</recordedtv>
      </remote>
    </FullscreenVideo>
  </MyTV>
</keymap>
If <MyTV> is a valid section I don't think it matters whether you override setting from remote.xml or keyboard.xml.
Reply
#30
SirHc Wrote:Hi,
I'm experiencing the same thing than gazrat. I recently bought a origen ae m10 with an imon vfd/ir display an rushing through various installations since then, starting with debian and now struggling with natty.
Since I tried 64 as well as 32 bit natty I can say, they behave differently at some points (by the way upstart is annoying, it drives me crazy, since errors appear and dissappear randomly): Where in natty amd64 ir-keytable can load a table without problems into the driver, the i386 version fails for me.
I guess it's either the kernel module or ir-keytable which has some sort of overflow in the variable that stores the key-code since my remote produces two groups of codes:
0x020000XX - they seem to get to the driver.
0x800ff4XX - they're all replaced with 7fffffff when ir-keytable tries to load them into the driver.
And as I said: In natty amd64 ir-keytable worked - except - lcdproc seems to have problems with the new imon module, but thats another problem and the same in i386.
I've tried to use the old lirc modules build from lirc-modules-source (forced install, since the kernel version is newer, but doesn't support the display). Lcdproc works just fine with the old lirc_imon module but lirc doesn't receive anything from the remote. Since I took the ubuntu sources of lirc and build them for debian squeeze (lirc in squeeze is awfully old) and the just worked with debians 2.6.32 amd64 kernel and I used the same config, the problem is likely between the newer kernel and the old module - so dead end here.
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.

Also thanks for your LIRC guide. Yes, I think the problems were caused by the newer kernel. As I stated in my first post >=2.6.33 and LIRC do not really go hand in hand without some measures (like blacklisting).
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 16

Logout Mark Read Team Forum Stats Members Help
How to get a seamless remote experience9