[mythtv-users] IR Blaster and LIRC RPMs

Nick Morrott knowledgejunkie at gmail.com
Wed Apr 30 06:47:43 UTC 2008


On 30/04/2008, Scott Souter <scott at tbwifi.ca> wrote:
>
>  > The user executing irsend needs both lircd running and also write
>  > permissions to /dev/lircd (or the correct LIRC socket) in order to be
>  > able to send IR signals. What is the output of
>  >
>  > # ls -l /dev/lirc*
>
>
> Mine are
>
>  /dev/lirc/0
>  /dev/lircd
>  /dev/lircm
>
>  > and
>  >
>  > # lsmod | fgrep "serial"
>
>  [root at mythbox lirc]#  lsmod | fgrep "serial"
>  lirc_serial            18216  1
>  lirc_dev               18376  1 lirc_serial
>

OK. It would seem you are not using any other LIRC modules apart from
lirc_serial. This should remove the requirement for starting another
instance of lircd. However, if you are using LIRC with a PVR card and
starting lircd with the dev/input driver to get your remote control
working, you *will* need to run a second instance of LIRC (see below).
Your device permissions (your other reply) are OK for irsend.

>  > For lirc_serial to work correctly, you need to run setserial to
>  > release the kernel's serial driver, and give the IRQ and IO address
>  > information to the lirc_serial driver, which is usally placed in
>  > /etc/modprobe.conf. My /etc/modprobe.conf contains:
>  >
>  > alias char-major-61 lirc_serial
>  > options lirc_serial irq=4 io=0x3f8
>
>
> I've added this manually.  Is that correct?

The 'options' line needs to match the settings for your serial port.
You can use:

# cat /proc/tty/driver/serial

or check your dmesg/BIOS settings to confirm the correct values.

>  > Your reported "could not connect to socket" error would indicate that
>  > /dev/lircd is missing, rather than missing write permissions (you'd
>  > get a connection refused or permission denied error instead).
>  >
>  > If you already have lircd running with another LIRC character device
>  > (perhaps you have lirc_i2c loaded, which created /dev/lirc0) you
>  > should start another instance of lircd connected to the serial device
>  > created when lirc_serial is loaded (it could be /dev/lirc1, which  I
>  > use in the example below, but change as necessary).
>  >
>  > Start another instance of lircd, creating a new socket and using the
>  > correct device:
>  >
>  > # lircd --device=/dev/lirc1 --output=/dev/lircd1
>
>
> I tried this, but I get the feeling that I am wrong in my guess...
>
>  [root at mythbox lirc]#  lircd --device=/dev/lirc/1 --output=/dev/lircd
>  lircd: there seems to already be a lircd process with pid 5559
>  lircd: otherwise delete stale lockfile /var/run/lircd.pid

If you only need 1 lircd process running (which you seem to), use the following:

#  lircd --device=/dev/lirc/0 --output=/dev/lircd --pidfile=/var/run/lircd.pid

(You need to stop the current running lircd daemon (pid 5559) before
running this).

If you need to run another instance of lircd (because you are using
lircd with the dev/input driver for your remote control) you should
instead run:

#  lircd --device=/dev/lirc/0 --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid

This will create another LIRC socket (/dev/lircd1) and use a new pid
file. When running irsend, you will need to specify the /dev/lircd1
socket. Again, you will need to ensure that setserial is run
initially, and that the lirc_serial module is loaded with the correct
serial port information.

Nick

-- 
Nick Morrott

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-users mailing list