LinHES Forums http://forum.linhes.org/ |
|
IR-Blaster with R5A15 and R5A16 - How-To http://forum.linhes.org/viewtopic.php?f=3&t=4462 |
Page 1 of 4 |
Author: | kebe [ Fri May 06, 2005 11:48 am ] |
Post subject: | IR-Blaster with R5A15 and R5A16 - How-To |
How-to get an IR-Blaster working with KnoppMyth and other Debian-based Mythtv systems using Kernel 2.6. Summary This is for those with a Debian-based Mythtv setup that want to be able to use their non-serial remote and also control a set-top box with a serial IR-Blaster (transmitter). This method uses two instances of lirc and should work for various combinations of remotes and transmitters as long as each device is using a different kernel module. It should also work for two devices using the same kernel module as long as the module isn't lirc_serial, lirc_parallel or lirc_sir. I've only tested it with the grey remote that comes with a PVR-250 and a homemade transmitter, so YMMV. I'm assuming that you already have lircd.conf and lircrc files for your remote, and a lircd configuration file for your set-top box (go to http://lirc.sourceforge.net/remotes/ BTW http://www.google.com/linux is your friend.) You'll need to do almost everything as root. NOTE: Both Debian's and KnoppMyth's standard lirc configuration use a /etc/init.d/lirc file that is structured to start only one instance of lircd. If your /etc/init.d/lirc file is set to run at boot, (or if you've run KnoppMyth's lirc-reconfig.sh script) deactivate it by running: Code: update-rc.d -f lirc remove 1. Install the lirc packages. (with KnoppMyth they are already installed) Code: apt-get install lirc lirc-modules-source lirc-x 2. Install and unpack the kernel source (if you have KnoppMyth then the kernel-source is already installed. If you ran install-nvidia... then it will already be unpacked) Code: apt-get install kernel-source-2.6.xx cd /usr/src tar -xjvf kernel-source-2.6<TAB>.tar.bz2 ln -s kernel-source-2.6<TAB> linux 3. Also unpack the lirc-modules Code: tar -xzvf lirc-modules.tar.gz 4. Compile and install the lirc modules using dpkg-reconfigure. If you are installing more than one module, you need to do it one at a time. There is a known bug in the install script that fails if you try to install lirc_i2c and lirc_serial at the same time, but installing them one after the other works fine. When I installed KnoppMyth, lirc_i2c and lirc_gpio were already installed, so I only need lirc_serial. Code: dpkg-reconfigure lirc-modules-source lirc-reconfig.sh script for lirc_serial, answer the prompts as follows:
Select only the "serial" driver to build Select "other" for serial device Select <Yes> for transmitter Select <Yes> for carrier signal generated by software Enter IO port for serial device (0x2f8 for COM2, 0x3f8 for COM1) Enter IRQ for serial device (3 for COM2, 4 for COM1) Select <Yes> to "Should I try to automatically build the modules?" for lirc_i2c, answer the prompts as follows:
Select only the "i2c" driver to build Select <Yes> to "Should I try to automatically build the modules?" 5. Create "/etc/modutils/lirc-local" ("/etc/modutils/lirc" might be overwritten if you ever update the lirc package) Code: alias char-major-61-0 lirc_i2c alias char-major-61-1 lirc_serial options lirc_serial irq=3 io=0x2f8 # for COM2 #options lirc_serial irq=4 io=0x3f8 # for COM1 6. Update modules.conf Code: update-modules 7. Add the following lines to the end of "/etc/init.d/bootmisc.sh" (or wherever you put stuff that runs on boot) Code: /sbin/modprobe lirc_i2c /usr/sbin/lircd --device=/dev/lirc --output=/dev/lircd /sbin/setserial /dev/ttyS1 uart none # for COM2 or use /dev/ttyS0 for COM1 /sbin/modprobe lirc_serial /usr/sbin/lircd --device=/dev/lirc1 --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid 8. Setup lirc1. If you are using udev or devfs, you may need to do something different, or maybe nothing at all, but if you are using KnoppMyth, you will need to do this: Code: cd /dev mknod /dev/lirc1 c 61 1 9. Make a "/etc/lirc/lircd.conf" file that includes configurations for both devices (remote and set-top box) by concatenating the two configuration files together. For example, if your set-top box file is "stb.conf" and the file for your remote is "remote.conf", then: Code: cat remote.conf stb.conf > /etc/lirc/lircd.conf (save your old lircd.conf first) 10. Test - either run the commands from step 7, or reboot. Then get syslog printing out so you can see what's going on: Code: tail /var/log/syslog -f & To test the remote use "irw". To test the transmitter, use "irsend" Code: irsend --device=/dev/lircd1 SEND_ONCE XXXXX 3 (should send a "3" to the set-top box) Note: replace "XXXXX" with value from the "name" line in the lircd configuration file for your set-top box. 11. Make a channel changing script "change_channel.sh" for use with Mythtv Code: #!/bin/sh
STB_NAME=XXXXX for digit in $(echo $1 | sed -e 's/./& /g'); do irsend --device=/dev/lircd1 SEND_ONCE $STB_NAME $digit sleep 0.4 done irsend --device=/dev/lircd1 SEND_ONCE $STB_NAME SELECT Note: replace "XXXXX" with value from the "name" line in the lircd configuration file for your set-top box. Put it someplace useful, like /usr/local/bin and don't forget to make the script executable by all. 12. Run mythtv-setup to tell it to use "change_channel.sh" There is a lot of good information out there. I suggest that you take a look at: http://www.lirc.org http://losdos.dyndns.org:8080/public/my ... _LIRC.html |
Author: | Red5 [ Wed May 11, 2005 3:56 pm ] |
Post subject: | |
Has anyone else tried these instructions with success? I am going to work on getting my blaster running tonight, and I would like to know how well this has worked for people. I had the blaster running on R5A12 before upgrading, but I used the how-to here (http://losdos.dyndns.org:8080/public/my ... _LIRC.html). |
Author: | Red5 [ Thu May 12, 2005 10:11 am ] |
Post subject: | |
OK, so I chickened out. I did get my IR blaster working again last night, but I used the same process I used with R5A12. There are a couple things I learned the first time, and I did them the same the second time. Here they are, but I'm not sure if they are necessary. 1) I did everything as root. <ducks and runs for cover> 2) After unpacking lirc-0.7.0, I went into that directory and then ran "libtoolize --force" followed by "aclocal". Everything went very smoothly. FYI I am controlling a Dish Network receiver. I would still be interested to know about people's experience who actually use the method suggested by kebe. |
Author: | greywire [ Fri May 13, 2005 10:13 am ] |
Post subject: | works for me |
I used the instructions in the last link, and followed them to success. I use it to control my directtv satelite box. I made the IR control myself with parts from RadioShack and taped the emitter right to my box. Works like a charm with no problems, and I've done it twice now.. once for my v4 box and again with the latest v5r15 knoppmyth. |
Author: | iscraigh [ Thu May 19, 2005 6:44 pm ] |
Post subject: | |
Kebe Hope your still following this thread. I followed your instructions and am having no success. R5A15.1 2xpvr250's Happauge grey remote. Remote works to control Myth fine but when I run irsend i get an error. "Hardware does not support sending" I set it up for com1 when I do a dmesg | grep ttyS I get 2 entry's for com1 none for com 2, I only have one physical com port. Have I done something wrong and it is trying to send through the pvr250? I used the standard lircd.conf and followed you instructions for combining it with the DCT2000.conf verified that both are now in one file. Any suggestions I am new to linux and am finding my way around in the dark. Craig |
Author: | kebe [ Sat May 21, 2005 8:43 am ] |
Post subject: | |
The "Hardware does not support sending" error could happen if you didn't "select <yes> for transmitter" when you compiled lirc_serial. Try running Code: dpkg-reconfigure lirc-modules-source
again as root and verify that you select <yes> for both transmitter and "carrier signal generated by software", Re-boot and see if it works. if not, we'll try something else. |
Author: | iscraigh [ Tue May 24, 2005 6:09 pm ] |
Post subject: | |
Tried it no go. I have re-enabled com2 even though I only physically have one port on the back. I will change everything to use com2, if I have any problem I will post here and we can try to narrow it down. Thanks for the help |
Author: | iscraigh [ Wed May 25, 2005 7:56 pm ] |
Post subject: | |
Tried everything on com 2 Still no go, same error! Any suggestions as to what to look for. 2x pvr250 irblaster knoppmyth 15.1 Thanks Craig |
Author: | bonedaddy [ Sun May 29, 2005 7:35 am ] |
Post subject: | |
Has anyone else had success with the instructions in this post? I'm using the latest release 5A15.1 Thanks, bd |
Author: | iscraigh [ Sun May 29, 2005 6:44 pm ] |
Post subject: | |
I haven't had any success yet |
Author: | iscraigh [ Sun May 29, 2005 9:21 pm ] |
Post subject: | |
Okay I tried some stuff from here http://www.lircsetup.com/lirc/trouble/kernsource.php Basically it said that lirc only allows for 2 devices to be controlled and that if you have 2 pvr250's that your irblaster would be a third item. I suggested how to recompile lirc to allow for more devices. I followed them, although when I ran libtoolize -f I got errors about missing files configure.ac so I push on any way. When I run the ./configure command i get errors about directory's not existing. So I end up no further ahead but feel I may be on the right track. Any suggestions? Help!!!!! Craig |
Author: | kebe [ Mon May 30, 2005 10:31 am ] |
Post subject: | |
Reading through www.lircsetup.com/lirc/trouble/kernsource.php it looks like the restriction on 2 instances of lirc was due to how the fedora package was setup. It's not relevant to KnoppMyth. The documentation at http://www.lirc.org/html/configure.html#multiple states that you can have many instances of lirc. In your /etc/modutils/lirc you'll need something like Code: alias char-major-61-0 lirc_i2c alias char-major-61-1 lirc_i2c alias char-major-61-2 lirc_serial options lirc_serial irq=3 io=0x2f8 # for COM2 Then in /etc/init.d/bootmisc.sh put something like Code: /sbin/modprobe lirc_i2c /usr/sbin/lircd --device=/dev/lirc --output=/dev/lircd /usr/sbin/lircd --device=/dev/lirc1 --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid /sbin/setserial /dev/ttyS1 uart none /sbin/modprobe lirc_serial /usr/sbin/lircd --device=/dev/lirc2 --output=/dev/lircd2 --pidfile=/var/run/lircd2.pid You'll also need to make the extra devices in /dev Code: cd /dev
mknod /dev/lirc1 c 61 1 mknod /dev/lirc2 c 61 2 lircd will be your first x50 card, lircd1 will be the second and lircd2 will be com2 |
Author: | jac1d [ Mon May 30, 2005 4:31 pm ] |
Post subject: | |
I too have 2 PVR-250s and got stuck on these docs. I also returned to the original losdos docs, referenced above, and they worked fine for me, with one small change. My R4V2 system had followed the same instructions and was set up to transmit on COM1 (thankfully I have both). However, despite repeating the process and setting all the config files for COM1, no luck. I moved the physical transmitter to COM2 and everything worked without any further changes. I'm not sure what would happen if I only had one COM port but I'd be curious to hear if anyone has had success with only one COM port as I hope to help some friends with systems like this in the future. Thanks, -jeff |
Author: | iscraigh [ Mon May 30, 2005 10:59 pm ] |
Post subject: | |
Ok maybe we are closer. I followed your directions and more importantly I followed the logic. Now I have a different error when I run irsend to test could not open /dev/lirc2 default_init () : No such device Caught signal So where do I go from here? Thanks for the help |
Author: | tjc [ Mon May 30, 2005 11:10 pm ] |
Post subject: | |
You may need to make the device entry which is relatively easy... Something like: Code: mknod /dev/lirc2 c 61 2
Should do the trick. See the man page (man mknod) for more details. FYI - /dev/lirc is equivalent to /dev/lirc0 (major = 61, minor = 0). |
Page 1 of 4 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |