*** Turns out I just made a type somewhere, this method works fine in case anyone is banging their head as much as I was trying to accomplish this... should be able to do this to make as many blasters as you have serial ports for ***
I'm trying to control 2 identical cable boxes with separate simple homebrew IR blasters. I'm certainly not an expert, but all my Googling makes it look like this should be possible. So far, I've run the R5.5 irblaster.sh script to setup one blaster and got 1 box working without too much trouble, tested on both COM ports so all hardware is good to go. Working blaster is running on COM2 right now.
Next, I tried to make a second lirc_serial driver by following these instructions:
http://www.mythtv.org/wiki/Multiple_LIRC_Drivers and doing the following
Code:
# cd /lib/modules/2.6.23-chw-4/misc
# cat lirc_serial.ko | sed -e 's/lirc_serial/lirc_ser_01/g' > lirc_ser_01.ko
# depmod -a
# setserial /dev/ttyS0 uart none
# modprobe lirc_ser_01
Which seemed to work, dmesg showed:
lirc_ser_01: auto-detected active high receiver
lirc_dev: lirc_register_plugin: sample_rate:
Then I coped /etc/irblaster to /etc/irblaster2 and edited hardware.conf to use COM1. Then I copied /etc/init.d/irblaster to /etc/init.d/irblaster2 and edited it replacing all instances of irblaster with irblaster2 and lirc_serial with lirc_ser_01 and started up irblaster2d with /etc/init.d/irblaster2 start and set it to run at boot with update-rc.d irblaster2 defaults 21. Which all seemed to work fine:
Code:
# ls -l /dev/lirc*
crw-rw---- 1 root video 61, 0 Sep 3 13:37 /dev/lirc0
crw-rw---- 1 root video 61, 1 Sep 3 13:37 /dev/lirc1
crw-rw---- 1 root video 61, 2 Sep 4 10:38 /dev/lirc2
srw-rw-rw- 1 root root 0 Sep 3 13:37 /dev/lircd
# ls -l /dev/irb*
crw-r--r-- 1 root root 61, 1 Sep 3 13:37 /dev/irblaster
crw-r--r-- 1 root root 61, 2 Sep 4 10:38 /dev/irblaster2
srw-rw-rw- 1 root root 0 Sep 3 13:37 /dev/irblaster2d
srw-rw-rw- 1 root root 0 Sep 4 10:38 /dev/irblasterd
# ps -ef | grep irblaster
root 3638 1 0 Sep03 ? 00:00:26 /usr/sbin/irblasterd --driver=default --device=/dev/irblaster --pidfile=/var/run/irblasterd.pid --output=/dev/irblasterd /etc/irblaster/irblasterd.conf
root 7429 1 0 10:38 ? 00:00:00 /usr/sbin/irblaster2d --driver=default --device=/dev/irblaster2 --pidfile=/var/run/irblaster2d.pid --output=/dev/irblaster2d /etc/irblaster2/irblasterd.conf
Now the first blaster is still working fine, but trying to use the second one results in this:
Code:
# /usr/bin/irsend --device=/dev/irblaster2d SEND_ONCE DCT2224 power
irsend: could not connect to socket
irsend: No such file or directory
I suspect my problem lies in a part of the instructions I followed making my second driver that didn't seem to apply:
Code:
The newly created driver can be easily setup separately from your lirc_serial in your /etc/modprobe.d/lirc-serial.conf:
#COM1 equivalent, /dev/ttyS0
options lirc_serial irq=4 io=0x3f8
#COM2 equivalent, /dev/ttyS1
#options lirc_serial irq=3 io=0x2f8
# This is for my PCI-E card with two additional serial ports
options lirc_ser_01 irq=17 io=0xb800 share_irq=1
install lirc_serial setserial /dev/ttyS0 uart none; /sbin/modprobe --ignore-install lirc_serial
install lirc_ser_01 setserial /dev/ttyS1 uart none; /sbin/modprobe --ignore-install lirc_ser_01
I didn't have any lirc or irblaster conf files in /etc/modprobe.d so I just skipped this part. I assume that install lirc_ser_01 line I need to add needs to be done in some other file hiding somewhere?
Hopefully one of the experts here will know
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)