[mythtv-users] How to get multiple IR transmitters running
Tony Brummett
brummett at gmail.com
Tue Jun 22 21:29:32 UTC 2010
On Tue, Jun 22, 2010 at 3:44 PM, Ben Eisemann <ben at locojeeper.com> wrote:
> However, my searching has not revealed a
> straight answer as to how to get the second one cooking.
>
> Do I need to compile a seperate instance of lirc_serial?
The short answer is yes. You need two instances of lirc_serial with
different module names and two instances of lircd. Getting the lirc
sources to compile a second copy of the serial driver isn't exactly
straightforward.
The kludge I used was to first make a copy of lirc_serial.ko to a file
called, say, lirc_seria2.ko. Then use sed or vi to edit the new file
and replace all occurrences of "lirc_serial" with "lirc_seria2". The
two strings are the same length, so there shouldn't be any byte offset
problems with editing the binary file.
Then I changed the lircd init script to start up exactly what's
needed. Something like this in the 'start' section:
# /dev/ttyS0
/bin/setserial /dev/ttyS0 uart none
/sbin/modprobe --ignore-install lirc_serial io=0x03f8 irq=4
# /dev/ttyS1
/bin/setserial /dev/ttyS1 uart none
/sbin/modprobe --ignore-install lirc_seria2 io=0x02f8 irq=3
/usr//sbin/lircd --device=/dev/lirc0 --output=/dev/lircd0
/usr/sbin/lircd --device=/dev/lirc1 --output=/dev/lircd1
--pidfile=/var/run/lircd1.pid
Then, my channel changing script needs to know which lircd instance to
talk to, and use the -d option to irsend. It expects the transmitter
number as the first argument and the channel to change to as the
second. The first transmitter will use a command line like
irsend -d /dev/lircd0 SEND_ONCE remote_name button_name
to send codes, and the second:
irsend -d /dev/lircd1 SEND_ONCE remote_name button_name
Finally, I went into mythtv-setup and configure the channel changer
script command line for the first tuner to run the script with a "0"
as the first arg. And for the second tuner to give the script a "1"
as the first arg.
-- Tony
More information about the mythtv-users
mailing list