View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 3 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Sep 04, 2011 11:03 am 
Offline
Joined: Mon Oct 09, 2006 12:18 pm
Posts: 29
*** 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 *** :P

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 :mrgreen:


Last edited by tatuirovka on Thu Sep 08, 2011 9:28 pm, edited 4 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2011 9:51 am 
Offline
Joined: Wed Jan 04, 2006 10:20 am
Posts: 387
Location: South New Jersey, USA
I really feel your pain. I spent many evenings trying to get two instances of blaster working although I had an output from my PVR150 as well as from a serial output. Not sure how much it will help but you can see my posts here:

http://knoppmyth.net/phpBB2/viewtopic.php?t=14096&highlight=blaster

I did get it working although I have since (happily) moved on to a firewire changer.

_________________
LINHES 8.6.1 BE/FE - MSI K9N6SGM-V with AMD A64 X2 4600+, 4GB Ram. 1.5TB WD. HDHR Prime. Nvidia GT210. MCE remote.
FrontEnd - Dell Vostro 400 3.0GHz Core2Duo NVidia GeForce210. MCE Remote


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 08, 2011 9:09 pm 
Offline
Joined: Mon Oct 09, 2006 12:18 pm
Posts: 29
Big boy stan wrote:
I really feel your pain. I spent many evenings trying to get two instances of blaster working although I had an output from my PVR150 as well as from a serial output. Not sure how much it will help but you can see my posts here:

http://knoppmyth.net/phpBB2/viewtopic.php?t=14096&highlight=blaster

I did get it working although I have since (happily) moved on to a firewire changer.


Thanks for the support. The pain you went through didn't really help but I finally got everything working... turns out the whole problem was that I'm a complete idiot and I just had a typo somewhere even though I looked through everything 3 times.

So for anyone trying to run 2 serial blasters on separate ports, the method I described in my OP works just great (if you don't make any typos) and is simple as hell. This is for R5.5 and probably earlier, not sure about 6+ with the switch from debian to arch. Using knoppmyth to setup 1 blaster and then copying the setup for a second one should still apply, but you might need to get the lirc source and compile it to make a second driver. I ended up doing that (it led to me finding my typo) and it will work also. I followed this guide to modify and compile the source: http://ubuntuforums.org/showthread.php?p=9538582, but instead of doing a make install I just copied the lirc_serial2.ko file to the same location as lirc_serial.ko and continued from there.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu