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

Michael Hill mikehillny at yahoo.com
Wed May 14 08:21:43 EDT 2003


Thanks so much. I think my main problem before this was not knowing this
modules.conf trick,  I was sharing the same lirc_dev.o:
> alias char-major-61 lirc_sir
> below lirc_sir lirc_dev
> alias char-major-62 lirc_serial1
> below lirc_serial1 lirc_dev1

I did not know the below line mentioned by Sriram.

Thanks again.  I actually have it working now.  Mike

--- Gary Te Young <gazza at tey.co.nz> wrote:
> Hello,
> 
> 
> Basically it was pretty much the same that Sriram posted except:
> 
> I replaced all lirc, LIRC with remote, REMOTE.  
> I replaced char-major 61 in the makefiles, setup files with the
> char-major 72
> I changed the port number from 8765 to 8768
> 
> I pretty much created the directory /remote, checked out the source and
> ran a little script
> 
> # Change directory names
> find . | xargs grep -il lirc > gary.txt
> for i in `cat gary.txt`
> do
> 	if [ -d $i ] ; then
> 		NewFileName=`echo $i | sed  's/lirc/remote/'`
> 		mv $i $NewFileName
> 	fi
> done
> 
> 
> # Change file information
> find . | xargs grep -il lirc > gary.txt
> for i in `cat gary.txt`
> do
> 	if [ -f $i ] ; then
> 		cat $i | sed  's/lirc/remote/' > $i.newfile
> 		mv $i.newfile $i
> 	fi
> done
> 
> (the above steps should be done for all formats of lirc (ie lirc, LIRC,
> Lirc)
> 
> # Find any file containing 61 and manually check that the 61 is
> referring to
> # char-major 61
> find . | xargs grep -l 61 > gary.txt
> for i in `cat gary.txt`
> do
> 	vi $i
> done
> 
> Usually lircd would be created with lirc_dev, lirc_gpio, use char-major
> 61, check if lircd is running with /var/run/lircd.pid, gathering it's
> configuration from /etc/lircd.conf, ~/.lircrc, /dev/lirc, /dev/lircd,
> /dev/lircm and listen on port 8765.
> 
> I simply created a duplicate instance of the program but this time with
> remoted, remote_dev, remote_serial, checking it's information with
> /etc/remoted.conf, ~/.remoterc, /var/run/remoted, /dev/remote,
> /dev/remoted, /dev/remotem, using char-major 72, and listen on port
> 8768.
> 
> I could configure the remoted setup as I would with lircd except they
> are looking for different program names and char-major.  When you
> compile the tools directory you will need to either change the makefile
> to rename irsend etc or simply rename them to remote_irsend after the
> directory has been made.
> 
> I hope this helps, if you get stuck let me know if you need some help.
> 
> 
> 
> 
> Gary Te Young
> 
> 
> 
> 
> The following was from Sriram:
> 
> 
> 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.
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


More information about the mythtv-users mailing list