[mythtv-users] How can one get infared send and recieve at the sametime

Sriram Balakrishnan basriram at hotmail.com
Tue May 13 18:06:22 EDT 2003


I had a similar problem as yours and managed to run multiple instances of 
lircd. My configuration is as follows:

transmit - Actisys200 attached to /dev/ttyS0 with lirc_sir driver loaded on 
/dev/lirc and lircd running on the default port 8765. I use this to send 
remote commands to my JVC dish receiver (you mentioned something about 38khz 
being hardcoded in lirc_sir but my jvc receiver uses 56khz and i have set it 
in the lircd.conf file (frequency 56000) and it works fine).

receive - home brew receiver attached to /dev/ttyS1 with lirc_serial1 driver 
loaded on /dev/lirc1 and lircd1 running on port 8766. I use this to receive 
remote commands from my sony remote and trigger mythtv actions using 
irxevent1. (note '1' appended to all the commands).

The way I have managed to get this working is rather crude, but it worked 
for me. If someone has a better way of acheiving the same result plz let me 
know:

1. Got the latest version from CVS (0.6.6 i believe) and made a copy of the 
entire directory and named it lirc1
2. For the transmit device, it is straight forward as per lirc 
documentation.
2. For the receive, in the lirc1 directory did the autogen stuff and 
./setup.sh and selected home brew and ttyS1.
3. manually edited the config.h generated and replaced every occurance of 
lirc* with lirc*1 (example: DEV_LIRC became lirc1 and DEV_LIRCD became 
lircd1, PID_LIRCD became lircd1.pid and so on.
Also, I changed the port to 8766 and LIRC_MAJOR to 62.
4. Edit the Makefile in all the directories and replace the lirc_major = 61 
with lirc_major = 62.
5. make
6. As the irxevent is dynamically linked to the liblirc_client by default, I 
had to create my own static linked version to use the /dev/lircd1 device. I 
created a simple script in the tools directory to achieve this. Just put the 
following command in a mylink.sh or something in the tools directory:
gcc -O2 -g -Wall -o .libs/irxevent1 irxevent.o -L/usr/local/lib 
-L/usr/X11R6/lib -Wl,-Bdynamic -lSM -lICE -lX11 -Wl,-Bstatic 
.libs/liblirc_client.a
7. After I execute the script, I will have an executable irxevent1 in 
tools/.libs directory and lircd in daemons directory. I copied the lircd to 
/usr/local/sbin as lircd1 and the irxevent1 to /usr/local/bin directories.
8. Also, I will have the lirc_serial.o and lirc_dev.o in the drivers 
directory (in lirc_serial and lirc_dev directories within drivers). I copied 
those two .o files to /lib/modules/`uname -r`/misc directory as 
lirc_serial1.o and lirc_dev1.o respectively. (Please note the 1 at the end 
of the file names).
9. Modified the /etc/modules.conf to load the lirc_sir with the lirc_dev and 
lirc_serial1 with lirc_dev1 by adding these commands:

alias char-major-61 lirc_sir
below lirc_sir lirc_dev
alias char-major-62 lirc_serial1
below lirc_serial1 lirc_dev1
options lirc_sir irq=4 io=0x3f8
options lirc_serial1 irq=3 io=0x2f8

10. Created the lircd1 device using the command: /bin/mknod /dev/lirc1 c 62 
0


If everything goes well, you should be able to modprobe lirc_sir and 
lirc_serial1 (in that order and make sure when u do a lsmod it shows 
lirc_sir using lirc_dev and lirc_serial1 using lirc_dev1). Now you can run 
lircd and lircd1 (as long as you have copied ur .lircrc to .lircrc1 and 
/etc/lircd.conf to /etc/lircd1.conf).

Also make sure you use irxevent1 instead of irxevent in the .lircrc1 
configuration.


Thanks.
----Original Message Follows----
From: Michael Hill <mikehillny at yahoo.com>
Reply-To: Discussion about mythtv <mythtv-users at snowman.net>
To: mythtv-users at snowman.net
Subject: [mythtv-users] How can one get infared send and recieve at the 
sametime
Date: Tue, 13 May 2003 09:43:14 -0700 (PDT)

I have been trying so many things to get my myth box to both send and 
recieve
infared at the same time, with no avail.

At first I tried the Actisys200L, which would only recieve for me as the 
lirc
driver is hard-coded to 38khz for sending it wont send to my SA3100 cable 
box
[runs at 57.6khz].
After this, I built the homebrew serial transmitter on the lirc page
http://www.lirc.org/improved_transmitter.html and got this working for 
sending
channel changes to my cable box.  Whew, great, but ...

I have not yet been able to figure out how to now recieve signals with 
either
the actisys [lirc_sir] -or- the built-in reciever on my LeadTek card
[lirc_gpio] -at the same time- as having lirc loaded for my transmitter
[lirc_serial].  My latest attempt was to build the homebrew reciever and try 
to
run them both on the same serial port.

If anyone has a good answer, can you please reply with detailed specifics on
how to get this working.  I have read other posts where people say, in 
general,
it is possible to run lirc twice, but I have not been able to get this to 
work.

Thank for any help you guys might be able to give, Mike

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
_______________________________________________
mythtv-users mailing list
mythtv-users at snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus



More information about the mythtv-users mailing list