Mailing List Archive

Just not getting ir-keytables?
I'm experimenting with an MCE USB receiver and my existing TIVO34
remote. I've gotten to where I know the correct device and protocol
(NEC seems to be working).

I've gotten as far as mapping a few key codes to the values I've
received using ir-keytable -t and have added a few to a file as:

0x3085c031 KEY_0
0x3085d026 KEY_1
0x3085d02a KEY_2

...and as per stuff I've read:

ir-keytable -w /home/tom/tivo_rc -d /dev/input/event2

Which says it wrote 3 key codes to the driver.

Maybe I'm just really stupid...but now what? How do I actually use it?
My understanding is that ends up emulating a keyboard but how? Is
there some other iteration of the ir-keytable command that facilitates
that?

Silly, but I am just not getting this at all.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Fri, Aug 25, 2017 at 5:44 PM, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> I'm experimenting with an MCE USB receiver and my existing TIVO34
> remote. I've gotten to where I know the correct device and protocol
> (NEC seems to be working).
>
> I've gotten as far as mapping a few key codes to the values I've
> received using ir-keytable -t and have added a few to a file as:
>
> 0x3085c031 KEY_0
> 0x3085d026 KEY_1
> 0x3085d02a KEY_2
>
> ...and as per stuff I've read:
>
> ir-keytable -w /home/tom/tivo_rc -d /dev/input/event2
>
> Which says it wrote 3 key codes to the driver.
>
> Maybe I'm just really stupid...but now what? How do I actually use it?
> My understanding is that ends up emulating a keyboard but how? Is
> there some other iteration of the ir-keytable command that facilitates
> that?
>
> Silly, but I am just not getting this at all.
>
> Tom

I've gotten as far as a) creating a map table, b) loading it with the
-w, and c) testing that mapping with ir-keytable -t, and all my
assignments appear to be correct.

But again...what now? Should the remote be acting like a keyboard or
something now? Everything I read seems to stop there, but the only
place I can even see a trace of it working is with the ir-keytable
tests.

What am I missing!?? I've spent all week in remote control
hell...somebody please help...

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Fri, Aug 25, 2017 at 7:06 PM, Tom Dexter <digitalaudiorock@gmail.com> wrote:
> On Fri, Aug 25, 2017 at 5:44 PM, Tom Dexter <digitalaudiorock@gmail.com> wrote:
>> I'm experimenting with an MCE USB receiver and my existing TIVO34
>> remote. I've gotten to where I know the correct device and protocol
>> (NEC seems to be working).
>>
>> I've gotten as far as mapping a few key codes to the values I've
>> received using ir-keytable -t and have added a few to a file as:
>>
>> 0x3085c031 KEY_0
>> 0x3085d026 KEY_1
>> 0x3085d02a KEY_2
>>
>> ...and as per stuff I've read:
>>
>> ir-keytable -w /home/tom/tivo_rc -d /dev/input/event2
>>
>> Which says it wrote 3 key codes to the driver.
>>
>> Maybe I'm just really stupid...but now what? How do I actually use it?
>> My understanding is that ends up emulating a keyboard but how? Is
>> there some other iteration of the ir-keytable command that facilitates
>> that?
>>
>> Silly, but I am just not getting this at all.
>>
>> Tom
>
> I've gotten as far as a) creating a map table, b) loading it with the
> -w, and c) testing that mapping with ir-keytable -t, and all my
> assignments appear to be correct.
>
> But again...what now? Should the remote be acting like a keyboard or
> something now? Everything I read seems to stop there, but the only
> place I can even see a trace of it working is with the ir-keytable
> tests.
>
> What am I missing!?? I've spent all week in remote control
> hell...somebody please help...
>
> Tom

Duuuuuhhh.

OK...I had to restart X in order to see it as a keyboard...ffs.

Sorry for the noise.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On 25/08/17 23:44, Tom Dexter wrote:

> Maybe I'm just really stupid...but now what? How do I actually use it?
> My understanding is that ends up emulating a keyboard but how? Is
> there some other iteration of the ir-keytable command that facilitates
> that?

As a starter you could just start a terminal window and let it have
focus. For me, pressing a '1' button on the remote displays a
corresponding '1' in the terminal, same as if you pressed a '1' on the
keyboard.

Also, IIRC, X automagically picks up the new keyboard. Perhaps you need
to restart it for this to happen, don't really remember.

Cheers!

--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
Tom

You might find this helpful.

http://lists.mythtv.org/pipermail/mythtv-users/2015-February/376311.html

If you need any further info please don't hesitate to let me know.



On 26 August 2017 at 08:24, Alec Leamas <leamas.alec@gmail.com> wrote:
> On 25/08/17 23:44, Tom Dexter wrote:
>
>> Maybe I'm just really stupid...but now what? How do I actually use it?
>> My understanding is that ends up emulating a keyboard but how? Is
>> there some other iteration of the ir-keytable command that facilitates
>> that?
>
>
> As a starter you could just start a terminal window and let it have focus.
> For me, pressing a '1' button on the remote displays a corresponding '1' in
> the terminal, same as if you pressed a '1' on the keyboard.
>
> Also, IIRC, X automagically picks up the new keyboard. Perhaps you need to
> restart it for this to happen, don't really remember.
>
> Cheers!
>
> --alec
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Sat, Aug 26, 2017 at 1:56 PM, Another Sillyname
<anothersname@googlemail.com> wrote:
> Tom
>
> You might find this helpful.
>
> http://lists.mythtv.org/pipermail/mythtv-users/2015-February/376311.html
>
> If you need any further info please don't hesitate to let me know.
>
>
>

Thanks! Actually my main point of confusion was that the remote simply
wasn't getting seen as a keyboard until I restarted X. I did however
start another thread about the fact that I can assign KEY_F13 to a key
in ir-keytable and the tests indicate that it works, but for some
reason MythTV doesn't recognize it, even though F13 in MythTV does
work in lirc. If you have any ideas there I'd appreciate it.

One thing I was curious about was this: When I installed (compiled
under Gentoo) ir-keytable I noticed that the media-libs/libv4l
required by media-tv/v4l-utils appears to build based on the current
kernel pointed to by /usr/src/linux. Does this mean that that always
needs to be recompiled for new kernels? I'd sort of assume so.

Thanks again!
Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
Hoi Tom,

Saturday, August 26, 2017, 9:39:42 PM, you wrote:

> One thing I was curious about was this: When I installed (compiled
> under Gentoo) ir-keytable I noticed that the media-libs/libv4l
> required by media-tv/v4l-utils appears to build based on the current
> kernel pointed to by /usr/src/linux. Does this mean that that always
> needs to be recompiled for new kernels? I'd sort of assume so.

I see no dependencies pointing to the kernel except for through
virtual/os-headers to sys-kernel/linux-headers.
But if a recompile is needed it will indicate it.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
Tom

I think you may have what I'd define as a 'workflow' issue.

My suggestion would be.

Once you have the remote working then open a terminal session and run
ir-keytable -v -t

Press every single key on the remote and make a note of what that key outputs

Now open /etc/rc_keymaps/'the keymap file you're actually using'

Also open https://www.mythtv.org/wiki/Keybindings

So:-

Let's say when you press the Play key on the remote ir-keytable -v -t
outputs '00FC678 PLAY'

You probably want this to actually output KEY_PLAY rather then PLAY,
so looking at your /etc/rc_keymaps/'the keymap file you're actually
using' find the '00FC678 PLAY' line (yours will be a different value
obviously) and edit PLAY to KEY_PLAY.

save /etc/rc_keymaps/'the keymap file you're actually using'

CTR-C ir-keytable to kill it

reboot (I had to reboot as the bindings for the keymaps from
/etc/rc_keymaps/'the keymap file you're actually using' are set in the
kernel at boot time then, although this may not still be true).

start a mythfrontend session

using your normal keyboard navigate to a valid media file and start
it, then pause it.

now using the remote see if the PLAY button works as it should.

If it does you now know the principla is working correctly and it just
becomes a matter of 'mapping' the syntax of the keybindings correctly,
so reopen the /etc/rc_keymaps/'the keymap file you're actually using'
and edit every single button to give you the output you want it to
generate.

Here's an example of a chunk of my edited rc6_mce file



# table rc6_mce, type: RC6

# 0x800f0400 is usually KEY_NUMERIC_0 - same for all numbers
0x800f0400 KEY_0
0x800f0401 KEY_1
0x800f0402 KEY_2
0x800f0403 KEY_3
0x800f0404 KEY_4
0x800f0405 KEY_5
0x800f0406 KEY_6
0x800f0407 KEY_7
0x800f0408 KEY_8
0x800f0409 KEY_9

0x800f040a KEY_DELETE
0x800f040b KEY_ENTER
0x800f040c KEY_SLEEP
0x800f040e KEY_MUTE

# 0x800f040f is usually KEY_INFO
0x800f040f KEY_I

# 0x800f0410 is usually KEY_VOLUMEUP
0x800f0410 KEY_F11
# 0x800f0411 is usually KEY_VOLUMEDOWN
0x800f0411 KEY_F10

# 0x800f0412 is usually KEY_CHANNELUP
0x800f0412 KEY_PAGEUP
# 0x800f0413 is usually KEY_CHANNELDOWN
0x800f0413 KEY_PAGEDOWN

# 0x800f0414 is usually KEY_FASTFORWARD
0x800f0414 KEY_U
# 0x800f0415 is usually KEY_REWIND
0x800f0415 KEY_J

# 0x800f0416 is usually KEY_PLAY
0x800f0416 KEY_P

# 0x800f0417 is usually KEY_RECORD
0x800f0417 KEY_R

# 0x800f0418 is usually KEY_PAUSE
0x800f0418 KEY_P

# 0x800f0419 is usually KEY_STOP
0x800f0419 KEY_ESC

# 0x800f041a is usually KEY_NEXT
0x800f041a KEY_Z

# 0x800f041b is usually KEY_PREVIOUS
0x800f041b KEY_H

0x800f041c KEY_NUMERIC_POUND
0x800f041d KEY_NUMERIC_STAR
0x800f041e KEY_UP
0x800f041f KEY_DOWN
0x800f0420 KEY_LEFT
0x800f0421 KEY_RIGHT

# 0x800f0422 is usually KEY_OK
0x800f0422 KEY_ENTER

#0x800f0423 is usually KEY_EXIT
0x800f0423 KEY_ESC



Hope this makes sense and you can work through the correct mappings,
it's not that complicated, but it is very confusing because you need
to understand how the 'flow' is working before you can crack it.

If you need any further help just let me know.

Tony

On 26 August 2017 at 20:57, Hika van den Hoven <hikavdh@gmail.com> wrote:
> Hoi Tom,
>
> Saturday, August 26, 2017, 9:39:42 PM, you wrote:
>
>> One thing I was curious about was this: When I installed (compiled
>> under Gentoo) ir-keytable I noticed that the media-libs/libv4l
>> required by media-tv/v4l-utils appears to build based on the current
>> kernel pointed to by /usr/src/linux. Does this mean that that always
>> needs to be recompiled for new kernels? I'd sort of assume so.
>
> I see no dependencies pointing to the kernel except for through
> virtual/os-headers to sys-kernel/linux-headers.
> But if a recompile is needed it will indicate it.
>
>
> Tot mails,
> Hika mailto:hikavdh@gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Sun, Aug 27, 2017 at 8:50 AM, Another Sillyname
<anothersname@googlemail.com> wrote:
> Tom
>
> I think you may have what I'd define as a 'workflow' issue.
>
> My suggestion would be.
>
> Once you have the remote working then open a terminal session and run
> ir-keytable -v -t
>
> Press every single key on the remote and make a note of what that key outputs
>
> Now open /etc/rc_keymaps/'the keymap file you're actually using'
>
> Also open https://www.mythtv.org/wiki/Keybindings
>

I think you may have misunderstood the extent of the issue I have. All
of my keys are mapped in ir-keytables correctly and assigned to the
right MythTV key bindings, and all of them are working with the
exception of F13 (I also tried F14) which I have assigned to
TOGGLECC608. I originally had MythTV setup to use the tilde character,
but as far as I can see ir-keytables has no key code I can use for
that. Here's the ir-keytables test using F14:

ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1503845237.134479: event type EV_MSC(0x04): scancode = 0x3085c033
1503845237.134479: event type EV_KEY(0x01) key_down: KEY_F14(0x0001)
1503845237.134479: event type EV_SYN(0x00).
1503845237.390417: event type EV_KEY(0x01) key_up: KEY_F14(0x0001)
1503845237.390417: event type EV_SYN(0x00).

If I use LIRC instead, that remote button works in MythTV with this
entry in ~/.lircrc:

begin
prog = mythtv
button = ENTER
config = f14
end

Just to clarify, the Enter button I'm using on this TIVO34 remote is a
small button on the far lower right for which I never had any other
purpose, and have always used for that CC function.

However it appears that the F13 and F14 keys specifically (haven't
tried the higher ones) simply can't recognized by MythTV via
ir-keytables. It's something specific to them.

If I have to I can make it work by un-assigning an existing mapping to
a key I can use and using that, but I was hoping to avoid that.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On 27/08/17 17:06, Tom Dexter wrote:

>
> If I have to I can make it work by un-assigning an existing mapping to
> a key I can use and using that, but I was hoping to avoid that.
>


One alternative is to use lirc with the devinput driver. This way, you
can still have application-specific mappings using lircrc while using
the kernel decoding.

Cheers!
--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Sun, Aug 27, 2017 at 2:11 PM, Alec Leamas <leamas.alec@gmail.com> wrote:
>
>
> On 27/08/17 17:06, Tom Dexter wrote:
>
>>
>> If I have to I can make it work by un-assigning an existing mapping to
>> a key I can use and using that, but I was hoping to avoid that.
>>
>
>
> One alternative is to use lirc with the devinput driver. This way, you can
> still have application-specific mappings using lircrc while using the kernel
> decoding.
>
> Cheers!
> --alec
>

Nobody's actually replied to several of my emails regarding exactly
what it is that gets used in the kernel under what circumstances. Very
early on you said that ir-lirc-codec was only used in conjunction with
devinput, which clearly does not seem to be the case. Here's what I
had during all my previous attempts using /dev/lirc0 and the default
driver:

Aug 24 09:50:57 mythfront kernel: rc rc0: lirc_dev: driver
ir-lirc-codec (serial_ir) registered at minor = 0

Others using the default driver seem to have confirmed that serial_ir
needs that as well. This appears to be why I get no /dev/lirc0 device
at all unless I enable IR_LIRC_CODEC. To further confuse things, the
old kernels with lirc_serial did NOT require this at all...did NOT
create any rc0 at all, and seem to show lirc_serial itself as being
the driver:

Aug 24 11:01:32 mythfront kernel: lirc_serial lirc_serial.0: lirc_dev:
driver lirc_serial registered at minor = 0

Aside from moving lirc_serial out of staging and changing it to
serial_ir, the above seems to indicate a significant restructuring of
how this all works. All insanely confusing.

Now back to the devinput driver: At one point I in fact tried that and
had no more luck than with the default driver...however I'd like to be
clear on using that:

If I understand correctly, the driver in the lirc_options.conf would
of course be the devinput, and the the device would be the path to the
proper event device under /dev/input(??). Assuming that's correct
exactly what is it that would be used in the kernel for that setup
other than serial_ir? Does it too require LIRC and IR_LIRC_CODEC. Does
it use any of the IR raw decoders.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
>>Nobody's actually replied to several of my emails regarding exactly
>>what it is that gets used in the kernel under what circumstances. 
OK, I'm probably not understanding on what "it" is, but have you tried something like....
lircd -H devinput -d /dev/xxxx
Re: Just not getting ir-keytables? [ In reply to ]
Hi!

On 27/08/17 22:35, Tom Dexter wrote:

> If I understand correctly, the driver in the lirc_options.conf would
> of course be the devinput, and the the device would be the path to the
> proper event device under /dev/input(??).

Right (but in the long run you'd probably use one of the stable links
under /dev/input/by_id).

> exactly what is it that would be used in the kernel for that setup
> other than serial_ir? Does it too require LIRC and IR_LIRC_CODEC. Does
> it use any of the IR raw decoders.

Frankly, I have no idea. The basic answer for most (almost all?) users
on this list is that the kernel loads whatever modules required for a
specific hardware. Compiling in static modules is a special case - I
don't know if it's even possible.

Furthermore, as you say, you have already asked this question on this
list without any useful answer. IMHO, you should then try a
kernel-specific forum (linux-media?) for this question unless someone
else pops up on this list here and now.


Cheers!
--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Just not getting ir-keytables? [ In reply to ]
On Sun, Aug 27, 2017 at 7:30 PM, David Krainess <davidkrainess@yahoo.com> wrote:
>
>>>Nobody's actually replied to several of my emails regarding exactly
>>>what it is that gets used in the kernel under what circumstances.
>
> OK, I'm probably not understanding on what "it" is, but have you tried
> something like....
>
> lircd -H devinput -d /dev/xxxx
>

Hi...I didn't see this until today as apparently gmail is flagging all
you're emails as spam(?). In answer to the question, yes I did try
lirc using devinput and had no luck with that either. Note however
that apparently those who are using serial_ir successfully are doing
so with the default driver. My best guess is that I may be running
into an x86-only issue somewhere, possibly in ir-lirc-codec.

In any case, ir-keytable works flawlessly with serial_ir and the
in-kernel NEC decoder, do I've switched to that.

Tom
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org