Difference between revisions of "Opensuse 11.x Hauppauge PVR-150"
(New page: Setting up Hauppage PVR-150 with IR blaster on OpenSUSE 11.1 This is first draft of how to set up the PVR-150 on OpenSUSE 11.1, I hope somebody could help clean up this article as the suc...) |
Bigwavedave (talk | contribs) m (Fixed typos) |
||
Line 1: | Line 1: | ||
− | Setting up | + | Setting up Hauppauge PVR-150 with IR blaster on OpenSUSE 11.1 |
This is first draft of how to set up the PVR-150 on OpenSUSE 11.1, I hope somebody could help clean up this article as the sucess stories appears. Belive me, I got it working. | This is first draft of how to set up the PVR-150 on OpenSUSE 11.1, I hope somebody could help clean up this article as the sucess stories appears. Belive me, I got it working. | ||
Line 135: | Line 135: | ||
Run irw again and see that you get a connection | Run irw again and see that you get a connection | ||
− | Now to the a bit timeconsuming part. Apparently the | + | Now to the a bit timeconsuming part. Apparently the Hauppauge card is not able to send whatever you want, they have a database of codes for different stuff to control. |
I had a Pineer satelite reciever in Europe so by looking at http://www.blushingpenguin.com/mark/lmilk/IRcodesets.html I was lucky enough to find that the relevant codesets where 337, 481, and 688. | I had a Pineer satelite reciever in Europe so by looking at http://www.blushingpenguin.com/mark/lmilk/IRcodesets.html I was lucky enough to find that the relevant codesets where 337, 481, and 688. | ||
Line 164: | Line 164: | ||
As you can see from above the codeset for the Pioneer BCT-1540 is 481 as that is the one I finaly did not comment. | As you can see from above the codeset for the Pioneer BCT-1540 is 481 as that is the one I finaly did not comment. | ||
− | Now I only needed to merge the 481 codeset from the current (all send codes) lircd.conf to my ( | + | Now I only needed to merge the 481 codeset from the current (all send codes) lircd.conf to my (Hauppauge remonte) lircd.conf by adding the first to the latter. |
− | cat /etc/lircd.conf >> | + | cat /etc/lircd.conf >>hauppaugeonlylircd.conf |
As we dont need all the raw codes anymore we can copy the merged file back. | As we dont need all the raw codes anymore we can copy the merged file back. | ||
− | cp | + | cp hauppaugeonlylircd.conf /etc/lircd.conf |
and restart lircd | and restart lircd |
Latest revision as of 07:12, 28 October 2017
Setting up Hauppauge PVR-150 with IR blaster on OpenSUSE 11.1
This is first draft of how to set up the PVR-150 on OpenSUSE 11.1, I hope somebody could help clean up this article as the sucess stories appears. Belive me, I got it working.
The PVR-150 (PCI edition) is supported out of the box with OpenSUSE 11.1, it only needed the ivtv-firmware to start working as a capture card.
I first got the IR reciever part working as the firmware supports it. By some strange reason I had the PAE kernel instead of the default kernel, but I changed to the default kernel in Yast as I installed the lirc-kmp-default module supporting the IR reciever (only! I belive).
I set up the /etc/lircd.conf from the one found at http://lirc.sourceforge.net/remotes/hauppauge/lircd.conf.hauppauge. A lot of time was spent searching for the error when i first used the distribution file /usr/share/lirc/remotes/hauppauge/lircd.conf.hauppauge. The latter file contains mappings to names that are litteral 'OK' instead of OK, an error not easily spotted for one having his first entry into lirc.
The applications also needs a corresponding file normaly called .lircrc stored under ~ or for MythTV stored under ~/.mythtv/. A good idea can be to set up a symbolic link between these files.
The file I used I got from looking at http://www.mythtv.org/wiki/PVR150_Remote. There I got the pointer to http://web.mit.edu/vbrunini/Public/lircrc
The lirc.conf file maps a keycode to a key name. The name could be Exit or 1. The .lircrc maps the name to an action in an application. To watch what is entering the system the command irw could be used. It listens to the socket.
Rememer to restart the lirc deamon after making changes to /etc/lircd.conf.
rclircd restart
I assume now that you have got the PVR-150 up and running with MythTV from other guides and the information above. We are now about to rip down a working system. At this point you should be familiar with the command line and know how to start and stop services in OpenSUSE and manage files.
First we need the build enviroment. I installed in yast The package group: Base development The packages: kernel-sources and kernel-syms I removed and tabooed: lirc-kmp-default, pulseaudio-module-lirc, and lirc. The latter I dont think was nessesary as I had to reinstall it again. It is apparently the userspace tools.
Now I headed over to http://www.blushingpenguin.com/mark/blog/?p=24 and downloaded the patched module and the firmware. I also kept a good eye to the helpfull Jason Antman's blog. He had got the blaster working under 11.0. http://jantman.dyndns.org:10011/wp/2008/09/lirc-and-hauppauge-pvr-150-on-opensuse-110/
I don't have mutch of a good build enviroment but this is what I did
cd /usr/src/linux uname -r
And I found out I was running the 2.6.27.7-9-default kernel The build apparently needs some symvers:
cp /usr/src/linux-obj/i386/default/Module.symvers /usr/src/linux/
I had to prepare for the build
make oldconfig && make prepare make prepare scripts
Now I packed out the module, bunzip2, tar -xvf and changed directory to enter the module directory
bunzip2 lirc-0.8.5-CVS-pvr150.tar.bz2 tar -xvf lirc-0.8.5-CVS-pvr150.tar cd lirc-0.8.5-CVS-pvr150/
Setup the module, now watch out. You should only save the changes made here!
./setup.sh Enter the menu system:
1 Driver configuration 5 TV Card i Hauppauge PVR-150 TV card (new I2C layer required) 4 Save configuration & exit
Only Save the configuration as there are some changes nessesary.
The output from the menu should be:
Configuration: .setup.config, executable shell script: configure.sh
Now use the favorite editor of your choice on configure.sh
nano configure.sh
Below I made the changes nessesary for me to complete the build and install. I inserted a --with-kerneldir to the configuration.
#! /bin/sh ./configure \ --with-kerneldir=/usr/src/kernel \ --with-moduledir=/lib/modules/2.6.27.7-9-default/misc \ --with-x \ --with-driver=hauppauge_pvr150 \ --with-major=61 \ --with-port=none \ --with-irq=none \ "$@"
Now save and exit,
Run through the configuration ./configure.sh
Hopefully all goes well. Then make and install make make install
We should move or copy the firmware for the IR blaster into the right spot.
cp haup-ir-blaster.bin /lib/firmware/ reboot
Now I had to install lirc again (usespace tools) as I propably removed to mutch
Load the modules
modprobe lirc_dev debug=1 && modprobe lirc_pvr150 debug=1
And dmesg is happy:
lirc_dev: IR Remote Control driver registered, major 61 lirc_pvr150: probe 0x70 @ ivtv i2c driver #0: yes lirc_pvr150: probe 0x71 @ ivtv i2c driver #0: yes lirc_pvr150: chip found with RX and TX lirc_dev: lirc_register_plugin: sample_rate: 0 lirc_dev: plugin lirc_pvr150 registered at minor number = 0 firmware: requesting haup-ir-blaster.bin lirc_pvr150: poll thread started lirc_pvr150: firmware of size 302355 loaded lirc_pvr150: 743 codesets loaded
Its time to test the lirc deamon
lircd -n
The -n switch makes it not demonize so that I can watch the connections
By starting another shell with irw I can see the client connecting, and disconnecting as I terminate the command:
lircd-0.8.4[4369]: lircd(default) ready lircd-0.8.4[4369]: accepted new client on /var/run/lirc/lircd lircd-0.8.4[4369]: caught signal
Now I am not sure I know what I did here but this made the rclircd stop complaing:
nano /etc/sysconfig/lirc
change LIRC_MODULE=lirc_i2c to LIRC_MODULE=i2c_core
Start lircd
rclircd start
Run irw again and see that you get a connection
Now to the a bit timeconsuming part. Apparently the Hauppauge card is not able to send whatever you want, they have a database of codes for different stuff to control.
I had a Pineer satelite reciever in Europe so by looking at http://www.blushingpenguin.com/mark/lmilk/IRcodesets.html I was lucky enough to find that the relevant codesets where 337, 481, and 688.
Now I took a backup of my lircd.conf and downloaded the http://www.blushingpenguin.com/mark/lmilk/lircd.conf that contains every known command the unit can send. I then downloaded the http://www.blushingpenguin.com/mark/lmilk/send_power_new that sends a power signal in every codeset known to the device. We are now down by a magnitude or more of commands to search trough. Now be aware that the IR blaster has a very short range in the order of mm to cm, and you should be able to see it visibly blink when it sends commands.
Now to get the new lircd.conf working
rclircd restart
Now remember I had that Pioneer. I did not need to send the power command in every known codeset. I therefore cut all exept the commands containing the codesets 337, 481, and 688.
Now I found out one of them worked and by remarking lines and running the script over again I found what codeset I needed:
#echo 1_337_KEY_POWER #irsend SEND_ONCE blaster 1_337_KEY_POWER #sleep 1
echo 1_481_KEY_POWER irsend SEND_ONCE blaster 1_481_KEY_POWER sleep 1
#echo 1_688_KEY_POWER #irsend SEND_ONCE blaster 1_688_KEY_POWER #sleep 1
As you can see from above the codeset for the Pioneer BCT-1540 is 481 as that is the one I finaly did not comment.
Now I only needed to merge the 481 codeset from the current (all send codes) lircd.conf to my (Hauppauge remonte) lircd.conf by adding the first to the latter.
cat /etc/lircd.conf >>hauppaugeonlylircd.conf
As we dont need all the raw codes anymore we can copy the merged file back.
cp hauppaugeonlylircd.conf /etc/lircd.conf
and restart lircd
rclircd restart
Now the names in the new lircd.conf is not particulary good for later use. The numbers should at least be renamed
nano /etc/lircd.conf
from ex:
name 1_481_KEY_7 2179006471
to
name 7 2179006471
I also renamed the other stuff:
name 1_481_TWO_DIGITS
to
name TWO_DIGITS
Again:
rclird restart
Now for mythtv we should be able to change channel. Therefore from our same good source that realy might deserve some support we download the channel changer script
wget http://www.blushingpenguin.com/mark/lmilk/change_channel
And put it somewhere sane like in the ~/bin directory of the mythtv user or in /usr/local/bin Remember to make it executable
chmod +x change_channel
In MythTV the channel frequency settings is where we should put this external (tuner) channel number.
Now the kernel module lirc_pvr150 did not load with reboot on my comuter, neighter did lircd.
Enter Yast sysconfig and insert lirc_pvr150 into system/kernel/MODULES_LOADED_ON_BOOT In Yast system services (runlevel) I activated lirc.
Hopefully something useful was found on this page. This was my first setup of MythTV, of Haupagge PVR-150, of Lirc.
Please contribute to improving this page.