From: Mark J. S. <ms...@ea...> - 2005-12-07 15:39:40
|
On December 7, 2005 10:53 am, Jeff Artz wrote: > >> I've got two identical satellite receivers (JVC DishPlayer 7200s) that > >> I want to control via LIRC with MythTV. These receivers cannot be set > >> to different remote addresses, so they must be controlled from seperate > >> IR blasters using the SAME IR signals. I already built the basters and > >> they both work when used individually. (I'm currently successfully > >> controlling one DP7200 and a Dish3900 with the same blaster on COM2) > >> I'd like to be able to control a second DP7200 via the blaster on COM1. > >> > >> I've googled and searched the lists, and I have found some pages that > >> describe how to load multiple instances of LIRC using different drivers > >> (ie: lirc_ivtv and lirc_serial) by specifying a minor device number in > >> the modules.conf file, but I don't see anything that allows multiple > >> *serial* blasters to be used. > >> > >> So can I accomplish this without having to create a copy of lirc with > >> everything renamed (like the myth_ledxmit project), or is that the only > >> option that I have? > >> > >> As a side note -- wouldn't it make sense to have a few serial drivers > >> in lirc? Perhaps even something like lirc_serial_com1 thru > >> lirc_serial_com9 ??? That would make things much easier... Then my > >> modules.conf would just have a few lines like this: > >> > >> alias char-major-61-0 lirc_serial_com1 > >> alias char-major-61-1 lirc_serial_com2 > >> install lirc_serial_com1 setserial /dev/ttyS0 uart none; /sbin/modprobe > >> --ignore-install lirc_serial_com1 > >> install lirc_serial_com2 setserial /dev/ttyS1 uart none; /sbin/modprobe > >> --ignore-install lirc_serial_com2 > >> > >> Thanks in advance for any tips/help! > >> > >> Jeff > > > > Don't know if you've received responses yet (since I get the digest), > > but... > > > > you only need one copy of the module loaded in the kernel. Then you > > start TWO copies of the *daemon*: > > > > /usr/sbin/lircd --device=/dev/lirc0 --output=/dev/lircd > > /usr/sbin/lircd --device=/dev/lirc1 --output=/dev/lircd1 > > --pidfile=/var/run/lircd1.pid > > > > etc. (you also need the second /dev/lircd) and your script to access > > them (using irsend, etc) must include the socket: > > > > irsend --device=/dev/lircd1 SEND_ONCE $REMOTE_NAME $digit > > > > (or whatever) > > > > HTH, > > > > B. > > Bruce, > > First off, thanks for the reply. Correct me if I'm wrong, but that > won't work for me since I need to specify different comm ports for the > two daemons -- I though I could only do that with the 'options' like int > the modules.conf file. > > Here's what my lirc section of my /etc/modprobe.conf looks like now for > a single IR blaster/generic receiver on COM2: > # lirc > alias char-major-61 lirc_serial > options lirc_serial irq=3 io=0x2f8 > install lirc_serial setserial /dev/ttyS1 uart none; /sbin/modprobe > --ignore-install lirc_serial > > Could I just do this to load a second module instance on COM1? Or is > the second install going to blow the first one out of the water? > # lirc - COM2 > alias char-major-61-0 lirc_serial > options lirc_serial irq=3 io=0x2f8 > install lirc_serial setserial /dev/ttyS1 uart none; /sbin/modprobe > --ignore-install lirc_serial > # lirc - COM1 > alias char-major-61-1 lirc_serial > options lirc_serial irq=4 io=0x3f8 > install lirc_serial setserial /dev/ttyS0 uart none; /sbin/modprobe > --ignore-install lirc_serial > > I suspect that won't work, as I expect the second install to 'bounce' > the first one, and both would be trying to access COM1 at that point. > (One would win, the other would fail) > > If there's a way to pass the comm port settings to the daemon, then I > just need the syntax to do that... > > Thanks! ;-) My MythTV WAF is pretty high now -- if I can work out > these last few things, it'll be much higher! ;-) > > Jeff > I don't know if two instances of the same module will work or not, I never tried. I do know that making a second lirc_serial module and renaming only takes 5-15 minutes. Its what I did, and it is working flawlessly for me. grep -r is your friend. Mark |