<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 5/24/2019 5:42 AM, Stephen
Worthington wrote:<br>
</div>
<blockquote type="cite"
cite="mid:lmreeep18t322a58fesboovls3jlnjg7su@4ax.com">
<pre class="moz-quote-pre" wrap="">On Thu, 23 May 2019 22:33:10 -0400, you wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I think I just spent the last couple of days going down LIRC blind
alleys. Can someone point me to a current guide to setup an MCE
receiver/blaster? Or, maybe, just some sample files with settings that
apply to this version of LIRC?
Don
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I have not run a blaster for a long time, so I can not help with that.
I only did it before the config changed. I hope the LIRC
documentation will help with that:
<a class="moz-txt-link-freetext" href="http://www.lirc.org">http://www.lirc.org</a>
<a class="moz-txt-link-freetext" href="http://www.lirc.org/html/configuration-guide.html">http://www.lirc.org/html/configuration-guide.html</a>
The LIRC docs do have decent information about how to configure a
remote also.
Here is information on my working MCE setup. The first thing to
remember is that LIRC has finally been upgraded from the ancient
version in 16.04 to a modern version in 18.04. So its config files
are different, and there is a new Python program lirc-setup to run to
set it up. The old /etc/lirc/hardware.conf file is no longer used.
You need to run lirc-setup (I think it needs to be run as root) and
tell it to download the MCE remote config file (devinput) and
configure LIRC to use that. It may already be set up that way as
default, but there are some names to change to make it work.
Here is my setup:
root@mypvr:/lib/udev/rc_keymaps# ll rc6* hauppauge
-rw-r--r-- 1 root root 2838 Feb 11 2018 hauppauge
-rw-r--r-- 1 root root 1475 Feb 11 2018 rc6_mce
These are the files I use for my Hauppauge and MCE remotes. They are
the key mappings used by ir-keytable. You need to run ir-keytable -t
and check that each key on your remote is producing a keystroke listed
in the rc6_mce file. If you find a key that is not working, then you
will need to set up a modified copy of the rc6_mce file - let me know
and I will tell you how. Remember to stop lircd when using
ir-keytable:
sudo systemctl stop lircd
This is the first LIRC config file:
root@mypvr:/etc/lirc# cat lirc_options.conf
# These are the default options to lircd, if installed as
# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
# manpages for info on the different options.
#
# Some tools including mode2 and irw uses values such as
# driver, device, plugindir and loglevel as fallback values
# in not defined elsewhere.
[lircd]
nodaemon = False
driver = devinput
device = auto
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
#effective-user =
#listen = [address:]port
#connect = host[:port]
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...
[lircmd]
uinput = False
nodaemon = False
# [modinit]
# code = /usr/sbin/modprobe lirc_serial
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...
# [lircd-uinput]
# add-release-events = False
# release-timeout = 200
# release-suffix = _EVUP
The lirc_options.conf file is largely unchanged - just check that it
says "driver = devinput".
The next LIRC config file is:
root@mypvr:/etc/lirc# cat lircd.conf
# Populated config files can be found at <a class="moz-txt-link-freetext" href="http://sf.net/p/lirc-remotes">http://sf.net/p/lirc-remotes</a>.
The
# irdb-get(1) and lirc-setup(1) tools can be used to search and
download
# config files.
#
# From 0.9.2 config files could just be dropped as-is in the
lircd.conf.d
# directory and be included by this file.
include "lircd.conf.d/*.conf"
The lircd.conf file is unchanged - it now just loads all the changed
config from the lircd.conf.d directory:
root@mypvr:/etc/lirc# ll lircd.conf.d
total 48
drwxr-xr-x 2 root root 4096 Oct 6 2018 ./
drwxr-xr-x 3 root root 4096 Oct 6 2018 ../
-rw-r--r-- 1 root root 35015 Oct 6 2018 devinput.lircd.conf
-rw-r--r-- 1 root root 615 Aug 13 2017 README.conf.d
And here is the start of my devinput.lircd.conf file:
<a class="moz-txt-link-abbreviated" href="mailto:root@mypvr:/etc/lirc/lircd.conf.d#">root@mypvr:/etc/lirc/lircd.conf.d#</a> head -n 30 devinput.lircd.conf
# Rename to devinput.lircd.dist if not using devinput driver
# Re-generate for current kernel using lirc-make-devinput
#
# Generated by lirc-make-devinput on 4.4.0-91-generic
# Date: Thu Aug 17 11:08:45 UTC 2017
begin remote
name devinput-64
bits 16
eps 30
aeps 100
pre_data_bits 16
pre_data 0x0001
post_data_bits 32
post_data 0x00000001
gap 132799
toggle_bit 0
driver devinput
begin codes
KEY_0 11
KEY_1 2
KEY_102ND 86
KEY_10CHANNELSDOWN 0x1b9
KEY_10CHANNELSUP 0x1b8
KEY_2 3
KEY_3 4
KEY_3D_MODE 0x26f
KEY_4 5
KEY_5 6
The devinput.lircd.conf file may already be present, but if not,
lirc-setup can download and install it. Note that I had to change the
"name" setting in the second half of that file from "devinput-32" to
"devinput". That is the name I am using in my $HOME/.lircrc included
files (see below) in the "remote = devinput" lines. It was much
easier to change it in one line there, rather than change all the
"remote = devinput" lines to "remote = devinput-32". Depending on
your remote, you might need to use the devinput-64 section of the
devinput.lircd.conf file and rename that, rather than the devinput-32
section. Sorry, I can not remember how I worked out that my remote
needed devinput-32.
Programs that support LIRC for IR input normally read the file
$HOME/.lircrc to load their LIRC config. MythTV conforms to this. In
a standard MythTV setup with LIRC, that file is just a set of include
commands for the files containing the actual LIRC configs for the
various programs that are using LIRC:
root@mypvr:/home/stephen# cat .lircrc
#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ~/.lirc
include ~/.lirc/mythtv
include ~/.lirc/mplayer
include ~/.lirc/xine
include ~/.lirc/vlc
include ~/.lirc/xmame
include ~/.lirc/xmess
include ~/.lirc/totem
include ~/.lirc/elisa
include ~/.lirc/irexec
<a class="moz-txt-link-abbreviated" href="mailto:root@mypvr:/home/stephen/.lirc#">root@mypvr:/home/stephen/.lirc#</a> head -n 30 mythtv
# lircrc for devinput with Hauppauge Nova TD-500 and Hauppauge
HVR-900R2 remotes (with lirc 0.9.0),
# and MCE remotes.
# Save it in ~/.lircrc
begin
remote = devinput
prog = mythtv
# Guide key
button = KEY_EPG
# config = S
config = Ctrl+Alt+G
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mythtv
button = KEY_EXIT
config = Escape
repeat = 0
delay = 0
end
begin
remote = devinput
prog = mythtv
button = KEY_OK
config = Return
In the $HOME/.lirc files, the "button = " values must match the
keystroke KEY_ names in the rc6_mce file, and the "config = " values
must match the value expected by the program named in the "prog = "
line. So for MythTV programs ("prog = mythtv"), the "config = "
values must be defined in mythfrontend > Setup > Edit keys (database
tables jumppoints and keybindings).
To check that LIRC is sending the right things to MythTV, you can shut
down all MythTV GUI programs (mythfrontend, mythtv-setup.real, ...)
and then from a command prompt started from the GUI screen, run:
ircat mythtv
That will display what would be sent to MythTV when you do a button
press on the remote.
_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://lists.mythtv.org/mailman/listinfo/mythtv-users">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a>
<a class="moz-txt-link-freetext" href="http://wiki.mythtv.org/Mailing_List_etiquette">http://wiki.mythtv.org/Mailing_List_etiquette</a>
MythTV Forums: <a class="moz-txt-link-freetext" href="https://forum.mythtv.org">https://forum.mythtv.org</a>
</pre>
</blockquote>
<br>
This should be working, but it's not; MythTv responds to none of the
button presses from the remote.<br>
<br>
Using lirc-setup, when picking mceusb hardware, it pretty much
forces the driver to default, so, I ended up using default.
Testing with irw, it works fine, and returns string that match the
strings in /etc/lirc/lircd.conf.d/mceusb.lircd.conf. If I change a
string in mceusb.lircd.conf and retest, I can see the changes in
irw.<br>
<br>
Testing with ircat, it looks like it's working, but I'm not sure
where the strings are config from. Some buttons match the contents
of /etc/lirc/lircd.conf.d/mythtv.lircrc, and some don't. If I
change a string in mythtv.lirc and retest, nothing changes. I
suspect ircat is getting strings from somewhere else.<br>
<br>
Below are the the contents of lircd_options_conf and a couple of
examples; any suggestions on what to look for next?<br>
<br>
<b>Contents of "lircd_options_conf":</b><br>
# Generated by lirc-setup<br>
[lircd]<br>
nodaemon = False<br>
driver = default<br>
device = /dev/lirc0<br>
output = /var/run/lirc/lircd<br>
pidfile = /var/run/lirc/lircd.pid<br>
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins<br>
permission = 666<br>
allow-simulate = No<br>
repeat-max = 600<br>
lircd_conf = mceusb.lircd.conf<br>
<br>
[lircmd]<br>
uinput = False<br>
nodaemon = False<br>
<br>
[modinit]<br>
code = echo lirc > /sys/class/rc/rc0/protocols<br>
<br>
<b>example 1:</b><br>
don@johnny:~$ irw<br>
000000037ff07be0 00 KEY_DOWN mceusb<br>
000000037ff07be0 01 KEY_DOWN mceusb<br>
000000037ff07be1 00 KEY_UP mceusb<br>
000000037ff07be1 01 KEY_UP mceusb<br>
^C<br>
don@johnny:~$<br>
don@johnny:~$ ircat mythtv<br>
Down<br>
Up<br>
<br>
<b>example 2:</b><br>
don@johnny:~$ irw<br>
000000037ff07bdc 00 KEY_BACK mceusb<br>
000000037ff07bdc 01 KEY_BACK mceusb<br>
^C<br>
don@johnny:~$ ircat mythtv<br>
Escape<br>
<br>
<b>example 3:</b><br>
don@johnny:~$ irw<br>
000000037ff07bdd 00 KEY_OK mceusb<br>
000000037ff07bdd 01 KEY_OK mceusb<br>
^C<br>
don@johnny:~$<br>
don@johnny:~$ ircat mythtv<br>
Return<br>
^C<br>
don@johnny:~$<br>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>