[mythtv-users] irman & lirc help

Bryce mythtv at menolly.net
Wed Apr 20 02:21:18 UTC 2005


On Tue, April 19, 2005 7:07 pm, Jeff Wormsley said:
> Bryce wrote:
>
>>I've removed all lirc rpms and re-installed just lirc-lib and lirc and
>>rebooted a couple of times.
>>
>>
> I'm using an IRMan with a different remote, but other than the
> lircd.conf and .lircrc files, it should be the same process.
>
> Assuming you've followed Jarod's guide and installed apt, you should
> only need to do an apt-get install lirc to get the base installation.
> Then open up /etc/rc.d/init.d/lircd and change the daemon line to the
> following:
>
> daemon lircd --driver=irman --device=/dev/ttyS0
>
> (Use ttyS1 if you are on COM2).
>
> Make sure /etc/rc.d/init.d/lircd is executable ( chmod +x
> /etc/rc.d/init.d/lircd ) (as root), as I seem to recall it wasn't for me.
>
> Now check your modprobe.conf.  Remove (or comment out) anything that has
> to do with lirc, especially anything about lirc_serial.  That is stuff
> for the homebrew serial port receivers, and has nothing to do with
> IRMan.  Mine looks like this (I commented out the stuff and added some
> more comments to remind myself how it worked):
>
> # Lirc - This really doesn't apply to IRMan.
> #   Modify the /etc/init.d/lircd file to add --driver=irman
> --device=/dev/ttyS0 instead to replace LIRCD_OPTIONS
> # alias char-major-61 lirc_serial
> # options lirc_serial irq=4 io=0x3f8
> # install lirc_serial /bin/setserial /dev/ttyS0 uart none ;
> /sbin/modprobe --ignore-install lirc_serial
>
> Make sure the correct lircd.conf file is in /etc.
>
> Most of this is going from memory, but I think the next two things are
> as follows, as root:
>
> /sbin/chkconfig lircd on
> /sbin/service lircd start
>
> You should see "Starting infrared remote control daemon:   [OK]" after
> this.
>
> Now fire up irw and see if you get output.  One sign that it is working
> at least partially is that irw doesn't return to the command prompt.  If
> it does, you have either used the wrong ttyS* or something else has
> grabbed it (usually lirc_serial if you didn't disable it in modules.conf
> --- if it was there and you just edited out, it may still be tying up
> the port, reboot and repeat from the /sbin/service point.)  If that
> still doesn't work, you may need to find a handy place to run
> "/bin/setserial /dev/ttyS0 uart none" (or ttyS1 for COM2).  I haven't
> had to do that, though.  If it doesn't immediately return to the prompt,
> but you get no keys when using the remote, lircd is working but you have
> the wrong lircd.conf file.  In that case, exit out of irw (press Ctrl-C)
> and load irrecord as follows:
>
>
> irrecord /etc/lircd.conf.new
>
> (The .new is so you don't overwrite the one you have.)
>
> Now open up the "wrong" lircd.conf with more, or less, or your favorite
> text editor in another window/terminal.  Scroll down to where the key
> names are so that you can name the keys you are creating with irrecord
> the same thing.  This will allow your .lircrc file to work, since it
> presumably matches the lircd.conf file.  Otherwise, you'll have to edit
> it as well to match the key names you choose.
>
> Follow the irrecord instructions.  It is a bit clunky, when they tell
> you to press a key over and over as fast as you can, they don't tell you
> when to stop!  Just do it for five or ten seconds, then stop, and it
> will time out and go on.  As it asks for remote keypresses and names,
> use the old names you have open in the other window/terminal to pick
> which key and what name to use.  When finished, rename your old file
> with "mv /etc/lircd.conf /etc/lircd.conf.old" and then put in your new
> one with "mv /etc/lircd.conf.new /etc/lircd.conf".  Restart lircd with
> "/sbin/service lircd restart" and try irw again.
>
> That should do it.
>
> Also, consider using MythWeb to remap some of the keys for Myth.  Some
> portions of the UI use the same keys in different ways, which is
> annoying, but MythWeb is the only easy place to change them.
>
> Hope this helps,
>   Jeff.

Jeff,
You were right on. My problem was the /etc/lircd.conf file. It appears the
format of the file may have changed at some point. The original file I had
starts as such:

  name  Tivo_S2
  bits           32
  flags SPACE_ENC|CONST_LENGTH
  eps            20
  aeps          200

  header       9000  4500
  one           562  1687
  zero          562   562
  ptrail        562
  repeat       9000  2250
  gap          108000
  min_repeat      1
  toggle_bit      0

  frequency    38000

      begin codes
         1_TIVO                     0x00000000A10CE08F


and my new one made with irrecord is:
  name  TIVO Series 2
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   32
  pre_data       0xFFFFA10C
  post_data_bits  16
  post_data      0x0
  gap          207632
  min_repeat      43
  toggle_bit      0


      begin codes
          1_TIVO                     0x000000000000E08F

The new one has the pre_data etc. entries and represents the remote codes
minus those bits. I had mistakenly assumed that the lircd.conf file I has
was accurate as I got it from this list and the poster was using an Tivo
Series 2 remote. It's been a good reminder of "eliminate the easy things
first"!

On a side note, I did have to manually create a symlink from /dev/ttyS0 to
/dev/lirc for irrecord to work but it appears to not be needed for lirc
after one finishes using irrecord.

Thanks again for the detailed response.
-- 
Bryce T. Pier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 
Type: application/octet-stream
Size: 0 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20050419/44cee156/attachment.obj


More information about the mythtv-users mailing list