Mailing List Archive

IRKEYTABLE Problems
I built a new Frontend, and am now on the hardest part of this, in my
opinion.  Getting my remote to work with it.

I am using a URC9910 JP1 capable remote.  I used  Windows Media Center
v2 upgrade to program it.

This has worked with LIRC in the past, and worked with KODI out of the box.

This is on Ubuntu 16.04, and I thought I would give irkeytable a try.

This is my remote:

mythuser@mythfrontend1:~$ sudo ir-keytable
[sudo] password for mythuser:
Found /sys/class/rc/rc0/ (/dev/input/event13) with:
    Driver mceusb, table rc-rc6-mce
    Supported protocols: unknown other lirc rc-5 jvc sony nec sanyo
mce-kbd rc-6 sharp xmp
    Enabled protocols: lirc rc-6
    Name: Media Center Ed. eHome Infrared
    bus: 3, vendor/product: 1784:0008, version: 0x0101
    Repeat delay = 500 ms, repeat period = 125 ms


Then I pressed some buttons on the remote and got this:

mythuser@mythfrontend1:~$ sudo ir-keytable -t -d /dev/input/event13
[sudo] password for mythuser:
Testing events. Please, press CTRL-C to abort.
1515465521.100104: event type EV_MSC(0x04): scancode = 0x800f0422
1515465521.100104: event type EV_KEY(0x01) key_down: KEY_ENTER(0x001c)
1515465521.100104: event type EV_SYN(0x00).
1515465521.236089: event type EV_MSC(0x04): scancode = 0x800f0422
1515465521.236089: event type EV_SYN(0x00).
1515465521.518509: event type EV_KEY(0x01) key_up: KEY_ENTER(0x001c)
1515465521.518509: event type EV_SYN(0x00).
1515465529.420214: event type EV_MSC(0x04): scancode = 0x800f0419
1515465529.420214: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
1515465529.420214: event type EV_SYN(0x00).
1515465529.524209: event type EV_MSC(0x04): scancode = 0x800f0419
1515465529.524209: event type EV_SYN(0x00).
1515465529.660159: event type EV_MSC(0x04): scancode = 0x800f0419
1515465529.660159: event type EV_SYN(0x00).
1515465529.934503: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
1515465529.934503: event type EV_SYN(0x00).
1515465533.804277: event type EV_MSC(0x04): scancode = 0x800f040a
1515465533.804277: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
1515465533.804277: event type EV_SYN(0x00).
1515465533.908261: event type EV_MSC(0x04): scancode = 0x800f040a
1515465533.908261: event type EV_SYN(0x00).
1515465534.044233: event type EV_MSC(0x04): scancode = 0x800f040a
1515465534.044233: event type EV_SYN(0x00).
1515465534.318514: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
1515465534.318514: event type EV_SYN(0x00).
1515465536.356309: event type EV_MSC(0x04): scancode = 0x800f0416
1515465536.356309: event type EV_KEY(0x01) key_down: KEY_P(0x0019)
1515465536.356309: event type EV_SYN(0x00).
1515465536.460250: event type EV_MSC(0x04): scancode = 0x800f0416
1515465536.460250: event type EV_SYN(0x00).
1515465536.596285: event type EV_MSC(0x04): scancode = 0x800f0416
1515465536.596285: event type EV_SYN(0x00).
1515465536.878474: event type EV_KEY(0x01) key_up: KEY_P(0x0019)
1515465536.878474: event type EV_SYN(0x00).
1515465539.076198: event type EV_MSC(0x04): scancode = 0x800f0412
1515465539.076198: event type EV_KEY(0x01) key_down: KEY_PAGEUP(0x0068)
1515465539.076198: event type EV_SYN(0x00).
1515465539.212318: event type EV_MSC(0x04): scancode = 0x800f0412
1515465539.212318: event type EV_SYN(0x00).
1515465539.470520: event type EV_KEY(0x01) key_up: KEY_PAGEUP(0x0068)
1515465539.470520: event type EV_SYN(0x00).

Then I put this in a file:

mythuser@mythfrontend1:~$ cat mykeytable
0x800f0422 KEY_ENTER
0x800f0419 KEY_STOP (0x80)
0x800f040a KEY_ESC
0x800f0416 KEY_P (0xcf)
0x800f0412 KEY_PAGEUP (0x192) # CHANNELUP


and

mythuser@mythfrontend1:~$ sudo ir-keytable --write mykeytable -d
/dev/input/event13
Wrote 5 keycode(s) to driver



The arrow buttons worked from the beginning.  Doing this got the enter
button to work.  The play, exit, channel up and stop buttons do not work.

Where am I going wrong?






_______________________________________________
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: IRKEYTABLE Problems [ In reply to ]
On 1/8/2018 9:05 PM, Jack McGee wrote:
> I built a new Frontend, and am now on the hardest part of this, in my
> opinion.  Getting my remote to work with it.
>
> I am using a URC9910 JP1 capable remote.  I used  Windows Media Center
> v2 upgrade to program it.
>
> This has worked with LIRC in the past, and worked with KODI out of the box.
>
> This is on Ubuntu 16.04, and I thought I would give irkeytable a try.
>
> This is my remote:
>
> mythuser@mythfrontend1:~$ sudo ir-keytable
> [sudo] password for mythuser:
> Found /sys/class/rc/rc0/ (/dev/input/event13) with:
>     Driver mceusb, table rc-rc6-mce
>     Supported protocols: unknown other lirc rc-5 jvc sony nec sanyo
> mce-kbd rc-6 sharp xmp
>     Enabled protocols: lirc rc-6
>     Name: Media Center Ed. eHome Infrared
>     bus: 3, vendor/product: 1784:0008, version: 0x0101
>     Repeat delay = 500 ms, repeat period = 125 ms
>
>
> Then I pressed some buttons on the remote and got this:
>
> mythuser@mythfrontend1:~$ sudo ir-keytable -t -d /dev/input/event13
> [sudo] password for mythuser:
> Testing events. Please, press CTRL-C to abort.
> 1515465521.100104: event type EV_MSC(0x04): scancode = 0x800f0422
> 1515465521.100104: event type EV_KEY(0x01) key_down: KEY_ENTER(0x001c)
> 1515465521.100104: event type EV_SYN(0x00).
> 1515465521.236089: event type EV_MSC(0x04): scancode = 0x800f0422
> 1515465521.236089: event type EV_SYN(0x00).
> 1515465521.518509: event type EV_KEY(0x01) key_up: KEY_ENTER(0x001c)
> 1515465521.518509: event type EV_SYN(0x00).
> 1515465529.420214: event type EV_MSC(0x04): scancode = 0x800f0419
> 1515465529.420214: event type EV_KEY(0x01) key_down: KEY_STOP(0x0080)
> 1515465529.420214: event type EV_SYN(0x00).
> 1515465529.524209: event type EV_MSC(0x04): scancode = 0x800f0419
> 1515465529.524209: event type EV_SYN(0x00).
> 1515465529.660159: event type EV_MSC(0x04): scancode = 0x800f0419
> 1515465529.660159: event type EV_SYN(0x00).
> 1515465529.934503: event type EV_KEY(0x01) key_up: KEY_STOP(0x0080)
> 1515465529.934503: event type EV_SYN(0x00).
> 1515465533.804277: event type EV_MSC(0x04): scancode = 0x800f040a
> 1515465533.804277: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
> 1515465533.804277: event type EV_SYN(0x00).
> 1515465533.908261: event type EV_MSC(0x04): scancode = 0x800f040a
> 1515465533.908261: event type EV_SYN(0x00).
> 1515465534.044233: event type EV_MSC(0x04): scancode = 0x800f040a
> 1515465534.044233: event type EV_SYN(0x00).
> 1515465534.318514: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
> 1515465534.318514: event type EV_SYN(0x00).
> 1515465536.356309: event type EV_MSC(0x04): scancode = 0x800f0416
> 1515465536.356309: event type EV_KEY(0x01) key_down: KEY_P(0x0019)
> 1515465536.356309: event type EV_SYN(0x00).
> 1515465536.460250: event type EV_MSC(0x04): scancode = 0x800f0416
> 1515465536.460250: event type EV_SYN(0x00).
> 1515465536.596285: event type EV_MSC(0x04): scancode = 0x800f0416
> 1515465536.596285: event type EV_SYN(0x00).
> 1515465536.878474: event type EV_KEY(0x01) key_up: KEY_P(0x0019)
> 1515465536.878474: event type EV_SYN(0x00).
> 1515465539.076198: event type EV_MSC(0x04): scancode = 0x800f0412
> 1515465539.076198: event type EV_KEY(0x01) key_down: KEY_PAGEUP(0x0068)
> 1515465539.076198: event type EV_SYN(0x00).
> 1515465539.212318: event type EV_MSC(0x04): scancode = 0x800f0412
> 1515465539.212318: event type EV_SYN(0x00).
> 1515465539.470520: event type EV_KEY(0x01) key_up: KEY_PAGEUP(0x0068)
> 1515465539.470520: event type EV_SYN(0x00).
>
> Then I put this in a file:
>
> mythuser@mythfrontend1:~$ cat mykeytable
> 0x800f0422 KEY_ENTER
> 0x800f0419 KEY_STOP (0x80)
> 0x800f040a KEY_ESC
> 0x800f0416 KEY_P (0xcf)
> 0x800f0412 KEY_PAGEUP (0x192) # CHANNELUP
>
>
> and
>
> mythuser@mythfrontend1:~$ sudo ir-keytable --write mykeytable -d
> /dev/input/event13
> Wrote 5 keycode(s) to driver
>
>
>
> The arrow buttons worked from the beginning.  Doing this got the enter
> button to work.  The play, exit, channel up and stop buttons do not work.
>
> Where am I going wrong?

I had similar issues with my StreamZap remote after upgrading to 16.04
recently. ir-keytable testing indicated that the --write was taking
effect, but it never worked in Myth. It turns out X/Myth wouldn't
notice the changes until a reboot, but on reboot it reverts back to the
default mappings, so catch-22.

The issue is to ensure the keytable is changed/loaded at every boot.
(From memory) In my case I put my map file at /etc/rc_keymaps/streamzap
and it was automatically read based on name. If yours isn't you may
have to edit /etc/rc_maps.cfg for it to load the right file, which I
think is used by an automatic udev rule. (Other options are a rc.local
script or your own udev rule.) Regardless, if ir-keytable shows the
right keys right after you boot, then it should work in MythTV.

https://feeding.cloud.geek.nz/posts/streamzap-remotes-and-evdev-in-mythtv/

One additional note: The remote will act like a keyboard. I normally
set my repeat delay to 250ms, but this was too short and I got a lot of
doubled keypresses in MythTV. I had to increase the repeat delay to
400ms or so, but that best value to use could depend on the remote.
(Perhaps the --delay or --period parms to ir-keytable could help here if
a rc script is used? They never helped me, but now that I think about
it I probably never got them to persist through a reboot, so I don't know.)

John
_______________________________________________
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: IRKEYTABLE Problems [ In reply to ]
On Tue, Jan 9, 2018 at 5:16 PM, John Marshall <mythtv@marshallparty.org> wrote:
> On 1/8/2018 9:05 PM, Jack McGee wrote:
>>
> I had similar issues with my StreamZap remote after upgrading to 16.04
> recently. ir-keytable testing indicated that the --write was taking effect,
> but it never worked in Myth. It turns out X/Myth wouldn't notice the
> changes until a reboot, but on reboot it reverts back to the default
> mappings, so catch-22.
>

I'm pretty sure that it's not so much an actual reboot as apposed to
the keytable settings in effect when X starts. So some of this may
depend on how you actually start mythtv. On my gentoo frontend I have
mythtv starting automatically at boot using a line like this in
/etc/inittab:

c8:2345:respawn:/sbin/mingetty --autologin mythtv tty8

The mythtv user in my case is set to start fluxbox and mythfrontend in
it's ~/.xinitrc file. The respawn there means that exiting the
frontend actually restarts X. Any ir-keytable changes I make as root
get recognized by the frontend as long as I simply do that. As a
matter of fact, I was able to test using a new iguanair USB receiver
in place of my existing serial receiver by doing that just
yesterday...all without rebooting.

I have script that loads the proper keytable and sets the correct
protocol that's run at boot from a file I added at
/etc/local.d/ir-keytable.start.

So long story short, I believe X is recognizing it as a keyboard with
it's current settings when X is started.

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: IRKEYTABLE Problems [ In reply to ]
On 1/10/2018 1:15 AM, Tom Dexter wrote:
> On Tue, Jan 9, 2018 at 5:16 PM, John Marshall <mythtv@marshallparty.org> wrote:
>> On 1/8/2018 9:05 PM, Jack McGee wrote:
>>>
>> I had similar issues with my StreamZap remote after upgrading to 16.04
>> recently. ir-keytable testing indicated that the --write was taking effect,
>> but it never worked in Myth. It turns out X/Myth wouldn't notice the
>> changes until a reboot, but on reboot it reverts back to the default
>> mappings, so catch-22.
>>
>
> I'm pretty sure that it's not so much an actual reboot as apposed to
> the keytable settings in effect when X starts. So some of this may
> depend on how you actually start mythtv. On my gentoo frontend I have
> mythtv starting automatically at boot using a line like this in
> /etc/inittab:

Yes, I believe it does just require an X restart. The thought slipped
my mind until later, but it's an important one because, as you noticed,
restarting X to test could be easier/faster than a full reboot.
_______________________________________________
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: IRKEYTABLE Problems [ In reply to ]
On Wed, 10 Jan 2018 09:42:49 -0600, you wrote:

>On 1/10/2018 1:15 AM, Tom Dexter wrote:
>> On Tue, Jan 9, 2018 at 5:16 PM, John Marshall <mythtv@marshallparty.org> wrote:
>>> On 1/8/2018 9:05 PM, Jack McGee wrote:
>>>>
>>> I had similar issues with my StreamZap remote after upgrading to 16.04
>>> recently. ir-keytable testing indicated that the --write was taking effect,
>>> but it never worked in Myth. It turns out X/Myth wouldn't notice the
>>> changes until a reboot, but on reboot it reverts back to the default
>>> mappings, so catch-22.
>>>
>>
>> I'm pretty sure that it's not so much an actual reboot as apposed to
>> the keytable settings in effect when X starts. So some of this may
>> depend on how you actually start mythtv. On my gentoo frontend I have
>> mythtv starting automatically at boot using a line like this in
>> /etc/inittab:
>
>Yes, I believe it does just require an X restart. The thought slipped
>my mind until later, but it's an important one because, as you noticed,
>restarting X to test could be easier/faster than a full reboot.

Restarting X on Ubuntu 16.04 is simple:

systemctl restart lightdm
_______________________________________________
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: IRKEYTABLE Problems [ In reply to ]
On 01/10/2018 06:06 PM, Stephen Worthington wrote:
> On Wed, 10 Jan 2018 09:42:49 -0600, you wrote:
>
>> On 1/10/2018 1:15 AM, Tom Dexter wrote:
>>> On Tue, Jan 9, 2018 at 5:16 PM, John Marshall <mythtv@marshallparty.org> wrote:
>>>> On 1/8/2018 9:05 PM, Jack McGee wrote:
>>>>>
>>>> I had similar issues with my StreamZap remote after upgrading to 16.04
>>>> recently. ir-keytable testing indicated that the --write was taking effect,
>>>> but it never worked in Myth. It turns out X/Myth wouldn't notice the
>>>> changes until a reboot, but on reboot it reverts back to the default
>>>> mappings, so catch-22.
>>>>
>>>
>>> I'm pretty sure that it's not so much an actual reboot as apposed to
>>> the keytable settings in effect when X starts. So some of this may
>>> depend on how you actually start mythtv. On my gentoo frontend I have
>>> mythtv starting automatically at boot using a line like this in
>>> /etc/inittab:
>>
>> Yes, I believe it does just require an X restart. The thought slipped
>> my mind until later, but it's an important one because, as you noticed,
>> restarting X to test could be easier/faster than a full reboot.
>
> Restarting X on Ubuntu 16.04 is simple:
>
> systemctl restart lightdm

Thanks gentlemen. Problem sorted out now thanks. Just added the
correct info to rc6_mce and overwrote the file in /lib/udev/rc_keymaps/
_______________________________________________
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