[mythtv-users] mythdora lirc problems, remote+serial blaster

Jamie Stotz wstotz at toad.net
Sun Oct 3 16:05:53 UTC 2010


Jarod, thanks for your help a few weeks ago with my remote and blaster
problem. To recap, Mythdora 12.23, hauppagur 250, home built serial
blaster. Remote worked until I used the Mythdora config GUI to add the
blaster. Then the remote stopped working and the blaster never worked.

I was able to get them working and your suggestion pointed me in the right
direction. I'd like to describe in detail what I did so it might help
others. Also I seem to have found some bugs in the Mythdora config parts
which I'll describe and maybe you can confirm if they sound like bugs.

You suggested that changing the load order would get the remote working
and indeed it did. Here is what I found.

In Mythdora, the load order for the remote and blaster is controlled by
two files:
/etc/sysconfig/modules/lirc.modules
which loads lirc_i2c

#!/bin/bash
/sbin/modprobe lirc_i2c

and /etc/sysconfig/modules/lirc-blaster.modules
which loads lirc_serial

/sbin/modprobe lirc_serial

The problem is that these files are executed in alphabetical order and
lirc-blaster.modules was being executed before lirc.modules so lirc_serial
was binding to the /dev/lirc0 and lirc_i2c was binding to /dev/lirc1.

The file lirc.modules is created by the file
/usr/share/mythdora/mdconfigroot/scripts/infrared_config.php which I
believe is run by the infrared config GUI. I think that the file
lirc-blaster.modules is created by the infrared config GUI using some
lines in /usr/share/mythdora/mdconfigroot/irconfig/irconfig.conf. It would
seem that the config GUI does not know that it is important which order
these modules load in.

Once I fixed the load order by renaming these files to 1lirc.modules and
2lirc-blaster.modules the remote started working again.

The next problem was getting the blaster configured for the correct set
top box. I have the Pace DC50X box from Comcast. This box is not listed in
the infrared config GUI, but there is a config file for it:
/usr/share/mythdora/STB/lircd-pace_dta100_dc50x.conf

which contains the info that describes its remote codes.

The infrared config GUI seems to run a script:
/usr/share/mythdora/mdconfigroot/scripts/stbchannelchange.sh

This script does two things. First it appends this config file onto the
end of the existing lircd.conf file. The location of the lircd.conf to use
is pulled from some other file and I'm not 100% sure that value was set
correctly.

Next, it creates the actual channel change script
/usr/bin/changechannel.sh

which is called by Myth to fire the blaster with the desired signals. The
actual lirc commands in stbchannelchange.sh that are copied to
changechannel.sh are wrong. They are:
irsend --device=/var/run/lirc/lircd1 SEND_ONCE \$REMOTE \$digit

and they should be:
irsend --device=/dev/lircd1 SEND_ONCE \$REMOTE \$digit

I'm pretty sure that /var/run/lirc/lircd1 is the location of the lirc
program that you use to start it running and /dev/lircd1 is the location
of the socket that you send commands to once it is running. So once I
fixed that, I stopped getting connection errors from lirc.

Lastly, the set top box config file has key names that looked like this:
      begin codes
          KEY_1                       0x1E0001
          KEY_2                       0x1D0002
          KEY_3                       0x1C0003
but the channel change script, specifically the variable $digit, needs
them to be just numbers without the KEY_ in front of them. Once I fixed
the key names in lircd.conf it worked.



More information about the mythtv-users mailing list