Greetings everyone,
Now that the PVR 150's are a little more supported in IVTV, i was wondering how i could get the IR Blaster to work. welp, after searching the web, and trying lots of different things out, i found a guy by the name of Mark (who btw needs to be thanked huge for this) He is running debian and has been able to get his blaster working with his card, no problems. You can see his webpage
http://www.blushingpenguin.com/mark/blog/?p=19 and you can see my thought process as i went through trying out different things to get it to work (my name is Scott). I can now say i have it working sucessfully with 1 of my 2 pvr cards, controlling a Starchoice Receiver. Here is what i did.
**UPDATE**
I now have my 2 pvrs working with their own seperate channel change scripts as well,
**UPDATE 2 - NOW SUPERSIZED WITH IVTV-0.3.9
*** UPDATE 3 - TO MUCH FAT IN THE SUPERSIZED MEAL, WENT DOWN TO IVTV 0.3.8 FOR IR RECEIVER ISSUES***
*** Update 4 - I have backed up Marks files on to my domain, no disrepect to him, more of a just in case ***
Get the pre-patched lirc 0.7.2
Quote:
cd /usr/src
tar jxvf kernel-source-2.6.11.9-chw-2.tar.bz2
cd /usr/src
wget
http://www.controlaltdeleted.com/myth/l ... 50.tar.bz2tar xfj lirc-0.7.2pvr150.tar.bz2
cd lirc-0.7.2pvr150
./configure
Choose:
TV card
h - Hauppauge PVR-150 TV card (note: _NOT_ ‘g - Hauppauge TV card’)
Save configuration & run configure
Quote:
make && make install
Install IVTV with a patch (forces the chipset to restart if it freezes)Quote:
cd /usr/src
wget
http://www.controlaltdeleted.com/myth/ivtv-0.3.8.tar.gztar zxvf ivtv-0.3.8.tar.gz
cd ivtv-0.3.8
cd driver
wget
http://www.controlaltdeleted.com/myth/i2c.patchpatch -p0 < i2c.patch
make && make install
now we need to reboot the computer, please just reboot like normal
Quote:
reboot
When your system comes back up, please relog on to it and continue!
IR blaster only: Now you need the ‘firmware’. This is
a set of data blocks that correspond to those generated by the windows software. This goes in /usr/lib/hotplug/firmware
Quote:
Check everything is working so far:Quote:
modprobe lirc_dev debug=1 && modprobe lirc_pvr150 debug=1
and check the syslog output file to see if it loaded ok
Quote:
nano /var/log/syslog
The output should be at the bottom of the syslog, pgdown till you see it, it should look something like this:
Quote:
Aug 28 02:09:11 soapbox kernel: lirc_pvr150: chip found with RX and TX
Aug 28 02:09:11 soapbox kernel: ivtv: i2c attach [client=Hauppauge PVR150 IR RX,
ok]
Aug 28 02:09:11 soapbox kernel: ivtv: i2c attach [client=Hauppauge PVR150 IR TX,
ok]
Aug 28 02:09:11 soapbox kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
Aug 28 02:09:11 soapbox udev[5221]: creating device node ‘/dev/lirc0′
Aug 28 02:09:11 soapbox kernel: lirc_pvr150: firmware of size 20927 loaded
Aug 28 02:09:11 soapbox kernel: lirc_pvr150: 575 codesets loaded
Aug 28 02:09:11 soapbox kernel: lirc_pvr150: Hauppauge PVR-150 IR blaster: firmware version 1.3.0
you need to configure lircd, and find out which codeset you are going to be using. The easiest way is to start with this configuration file which contains key definitions for everything in the database. We will backup your previous one as wel (just in case)
Quote:
start lircd, but lets check a couple of things first
Quote:
ls -l /dev/lirc*
you should see something like this
Quote:
rw-r--r-- 1 root root 61, 0 Jul 30 2004 /dev/lirc
srw-rw-rw- 1 root root 0 Sep 26 22:22 /dev/lircd
prw-r--r-- 1 root root 0 Jul 30 2004 /dev/lircm
to start licd simple type it in and hit enter
Quote:
lircd
i didnt have a lirc0 or lirc1 in mine (i have 2 pvr-150s im trying to get both working now, but my limited skills in linux are prohibiting me
)
so lets create one,
Quote:
mknod /dev/lirc0 c 61 0
and we will load the modules up as well
Quote:
modprobe lirc_dev && modprobe lirc_pvr150 debug=1
lircd --device=/dev/lirc0
if you get an error stating that the device is in use -
Quote:
lircd 0.7.1pre2: there seems to already be a lircd process with pid 2202
lircd 0.7.1pre2: otherwise delete stale lockfile /var/run/lircd.pid
do a quick killall lircd to unload it, and try again.
Quote:
killall lircd
You can now check if the remote is working using irw. Run this, and press buttons on the remote. You should see some output like
Quote:
0000000000001795 00 Down Hauppauge_350
Next, for the ir blaster you need to work out which codeset to use, this is the tricky bit. For this we have send_power_new, a script that just sends the power command in every single codeset (575 at present).
Quote:
this script is designed to send the power button for 575 devices, i lucked out, mine was number 54
run the script to make sure the ir blaster is sending (little red led will light up when its sending something)
Quote:
./send_power_new
red led light up? Yes move on, no something wrong happend try the previous steps again.
k, now the led is lighting up, position it on your ir controlled device ((sat/ digital cable receiver) on the ir pickup, these ir blasters are weak so you may need to position it a couple of times.
now what i did is a little bit of a pain in the arse.
run the script again, with your device powered on, and count how many cycles that the ir goes through before turning the device off (again mine was 54 times) or do it in 50s or something, when you finally have figured out how many cycles it is, edit the send_power_new script
Quote:
nano send_power_new
and rem out the lines that you have tried, for example
Quote:
#irsend SEND_ONCE blaster 0_0_KEY_POWER
#irsend SEND_ONCE blaster 1_0_KEY_POWER
#irsend SEND_ONCE blaster 0_1_KEY_POWER
#irsend SEND_ONCE blaster 1_1_KEY_POWER
#irsend SEND_ONCE blaster 0_2_KEY_POWER
#irsend SEND_ONCE blaster 1_2_KEY_POWER
#irsend SEND_ONCE blaster 0_3_KEY_POWER
#irsend SEND_ONCE blaster 0_4_KEY_POWER
#irsend SEND_ONCE blaster 1_4_KEY_POWER
#irsend SEND_ONCE blaster 0_5_KEY_POWER
#irsend SEND_ONCE blaster 1_5_KEY_POWER
#irsend SEND_ONCE blaster 0_6_KEY_POWER
we have not isolated your devices remote codes. again im going to use mine in this example, so here is what mine looked like (snipped top and bottem)
Quote:
#irsend SEND_ONCE blaster 1_24_KEY_POWER
#irsend SEND_ONCE blaster 0_25_KEY_POWER
#irsend SEND_ONCE blaster 1_25_KEY_POWER
#irsend SEND_ONCE blaster 0_26_KEY_POWER
#irsend SEND_ONCE blaster 1_26_KEY_POWER
#irsend SEND_ONCE blaster 0_27_KEY_POWER
irsend SEND_ONCE blaster 1_27_KEY_POWER
#irsend SEND_ONCE blaster 0_28_KEY_POWER
#irsend SEND_ONCE blaster 1_28_KEY_POWER
#irsend SEND_ONCE blaster 0_29_KEY_POWER
#irsend SEND_ONCE blaster 1_29_KEY_POWER
#irsend SEND_ONCE blaster 0_30_KEY_POWER
#irsend SEND_ONCE blaster 1_30_KEY_POWER
#irsend SEND_ONCE blaster 0_31_KEY_POWER
to test this out, run that line in a shell command
Quote:
irsend SEND_ONCE blaster 1_27_KEY_POWER
my device turns off, if i run it again, it will turn on - With me so far?
so now we have your device, we need to edit the /etc/lirc/lircd.conf file to incorporate it, you may notice if you nano that file,
Quote:
nano /etc/lirc/lircd.conf
its fricken huge (good old SNL, comes in 3 sizes, Wee - Not so Wee, and FRICKEN HUGE)
so we need to find in that file out devices control codes, and rename them - edit the file and look for your device in it
Quote:
nano /etc/lirc/lircd.conf
here is mine for the starchoice box for example
Quote:
name 0_27_KEY_1
1769473
name 0_27_KEY_2
1769474
name 0_27_KEY_3
1769475
name 0_27_KEY_4
1769476
name 0_27_KEY_5
1769477
name 0_27_KEY_6
1769478
name 0_27_KEY_7
1769479
name 0_27_KEY_8
1769480
name 0_27_KEY_9
1769481
name 0_27_KEY_POWER
1769482
name 0_27_KEY_CH_UP
1769487
name 0_27_KEY_CH_DOWN
1769488
name 0_27_KEY_FAVCH
1769500
name 0_27_KEY_FTUNEPLUS
1769505
name 0_27_KEY_FTUNEMINUS
1769506
name 0_27_KEY_Norm
1769533
name 0_27_KEY_AB
1769534
name 1_27_KEY_0
2149253120
name 1_27_KEY_1
2149253121
name 1_27_KEY_2
2149253122
name 1_27_KEY_3
2149253123
name 1_27_KEY_4
2149253124
name 1_27_KEY_5
2149253125
name 1_27_KEY_6
2149253126
name 1_27_KEY_7
2149253127
name 1_27_KEY_8
2149253128
name 1_27_KEY_9
2149253129
name 1_27_KEY_POWER
2149253130
name 1_27_KEY_CH_UP
2149253135
name 1_27_KEY_CH_DOWN
2149253136
name 1_27_CH_PREVIOUS
2149253139
name 1_27_KEY_GUIDE
2149253147
name 1_27_KEY_AV
2149253161
name 1_27_KEY_ENTER
2149253163
now we need to edit out the crap (unwanted device codes) and put this in there, here is what my final lircd.conf looked like, feel free to copy and paste this, but be sure to edit out my device, and add yours
Quote:
#
# this config file was automatically generated
# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
#
# contributed by Jens Leuschner <leuschner@gmx.net>
#
# brand: Hauppauge
# model:
# supported devices: WinTV primo; WinTV pci; WinTV radio
#
# This config file will work with both homebrew receivers and
# original Hauppauge TV cards !!!
#
begin remote
name blaster
bits 32
flags RAW_CODES
eps 0
aeps 0
plead 0
gap 333333
repeat_bit 0
begin raw_codes
name 1_27_KEY_0
2149253120
name 1_27_KEY_1
2149253121
name 1_27_KEY_2
2149253122
name 1_27_KEY_3
2149253123
name 1_27_KEY_4
2149253124
name 1_27_KEY_5
2149253125
name 1_27_KEY_6
2149253126
name 1_27_KEY_7
2149253127
name 1_27_KEY_8
2149253128
name 1_27_KEY_9
2149253129
name 1_27_KEY_POWER
2149253130
name 1_27_KEY_CH_UP
2149253135
name 1_27_KEY_CH_DOWN
2149253136
name 1_27_CH_PREVIOUS
2149253139
name 1_27_KEY_GUIDE
2149253147
name 1_27_KEY_AV
2149253161
name 1_27_KEY_ENTER
2149253163
end raw_codes
end remote
begin remote
name Hauppauge
bits 13
flags SHIFT_ENC
eps 30
aeps 100
one 950 830
zero 950 830
plead 960
gap 89584
repeat_bit 2
begin codes
TV 0x000000000000100F
RADIO 0x000000000000100C
FULL_SCREEN 0x000000000000102E
CH+ 0x0000000000001020
CH- 0x0000000000001021
VOL- 0x0000000000001011
VOL+ 0x0000000000001010
MUTE 0x000000000000100D
SOURCE 0x0000000000001022
1 0x0000000000001001
2 0x0000000000001002
3 0x0000000000001003
4 0x0000000000001004
5 0x0000000000001005
6 0x0000000000001006
7 0x0000000000001007
8 0x0000000000001008
9 0x0000000000001009
0 0x0000000000001000
RESERVED 0x000000000000101E
MINIMIZE 0x0000000000001026
end codes
end remote
#
# this config file was automatically generated
# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
#
# contributed by
#
# brand: Hauppauge
# model no. of remote control:
# devices being controlled by this remote: PVR 2/350
#
begin remote
name hauppauge_pvr
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 969 811
zero 969 811
plead 1097
gap 114605
toggle_bit 2
begin codes
Power 0x00000000000017FD
Go 0x00000000000017FB
1 0x00000000000017C1
2 0x00000000000017C2
3 0x00000000000017C3
4 0x00000000000017C4
5 0x00000000000017C5
6 0x00000000000017C6
7 0x00000000000017C7
8 0x00000000000017C8
9 0x00000000000017C9
Back/Exit 0x00000000000017DF
0 0x00000000000017C0
Menu 0x00000000000017CD
Red 0x00000000000017CB
Green 0x00000000000017EE
Yellow 0x00000000000017F8
Blue 0x00000000000017E9
Ch+ 0x00000000000017E0
Ch- 0x00000000000017E1
Vol- 0x00000000000017D1
Vol+ 0x00000000000017D0
Ok 0x00000000000017E5
Mute 0x00000000000017CF
Blank 0x00000000000017CC
Full 0x00000000000017FC
Rewind 0x00000000000017F2
Play 0x00000000000017F5
Rewind 0x00000000000017F2
Play 0x00000000000017F5
Forward 0x00000000000017F4
Record 0x00000000000017F7
Stop 0x00000000000017F6
Pause 0x00000000000017F0
Replay 0x00000000000017E4
Skip 0x00000000000017DE
end codes
end remote
#
# this config file was automatically generated
# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
#
# contributed by
#
# brand: Hauppauge 350
# Created: G.J. Werler (The Netherlands)
# Project: Mythtv Fedora Pundit-R
www.mythtvportal.com# Date: 2004/11/28
# model no. of remote control: Hauppauge A415-HPG
# devices being controlled by this remote: PVR-350
#
begin remote
name Hauppauge_350
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 969 811
zero 969 811
plead 1097
gap 114605
toggle_bit 2
begin codes
Go 0x00000000000017BB
Power 0x00000000000017BD
TV 0x000000000000179C
Videos 0x0000000000001798
Music 0x0000000000001799
Pictures 0x000000000000179A
Guide 0x000000000000179B
Radio 0x000000000000178C
Up 0x0000000000001794
Left 0x0000000000001796
Right 0x0000000000001797
Down 0x0000000000001795
OK 0x00000000000017A5
Back/Exit 0x000000000000179F
Menu/i 0x000000000000178D
Vol+ 0x0000000000001790
Vol- 0x0000000000001791
Prev.Ch 0x0000000000001792
Mute 0x000000000000178F
Ch+ 0x00000000000017A0
Ch- 0x00000000000017A1
Record 0x00000000000017B7
Stop 0x00000000000017B6
Rewind 0x00000000000017B2
Play 0x00000000000017B5
Forward 0x00000000000017B4
Replay/SkipBackward 0x00000000000017A4
Pause 0x00000000000017B0
SkipForward 0x000000000000179E
1 0x0000000000001781
2 0x0000000000001782
3 0x0000000000001783
4 0x0000000000001784
5 0x0000000000001785
6 0x0000000000001786
7 0x0000000000001787
8 0x0000000000001788
9 0x0000000000001789
Asterix 0x000000000000178A
0 0x0000000000001780
# 0x000000000000178E
Red 0x000000000000178B
Green 0x00000000000017AE
Yellow 0x00000000000017B8
Blue 0x00000000000017A9
end codes
end remote
You notice that this lircd has support for multiple hauppauge cards so it should work with a 250 remote as well
k we are not done yet, now we need to name the remote keys to proper keys, ie: 1,2,3,4, instead of the
name 1_27_KEY_0
name 1_27_KEY_1
name 1_27_KEY_2 etc...
after editing them, my final lircd.conf looks like this:
Quote:
#
# this config file was automatically generated
# using lirc-0.5.5pre8 on Sun Apr 18 11:43:45 1999
#
# contributed by Jens Leuschner <leuschner@gmx.net>
#
# brand: Hauppauge
# model:
# supported devices: WinTV primo; WinTV pci; WinTV radio
#
# This config file will work with both homebrew receivers and
# original Hauppauge TV cards !!!
#
begin remote
name blaster
bits 32
flags RAW_CODES
eps 0
aeps 0
plead 0
gap 333333
repeat_bit 0
begin raw_codes
name 0
2149253120
name 1
2149253121
name 2
2149253122
name 3
2149253123
name 4
2149253124
name 5
2149253125
name 6
2149253126
name 7
2149253127
name 8
2149253128
name 9
2149253129
name POWER
2149253130
name CH_UP
2149253135
name CH_DOWN
2149253136
name CH_PREVIOUS
2149253139
name GUIDE
2149253147
name AV
2149253161
name ENTER
2149253163
end raw_codes
end remote
begin remote
name Hauppauge
bits 13
flags SHIFT_ENC
eps 30
aeps 100
one 950 830
zero 950 830
plead 960
gap 89584
repeat_bit 2
begin codes
TV 0x000000000000100F
RADIO 0x000000000000100C
FULL_SCREEN 0x000000000000102E
CH+ 0x0000000000001020
CH- 0x0000000000001021
VOL- 0x0000000000001011
VOL+ 0x0000000000001010
MUTE 0x000000000000100D
SOURCE 0x0000000000001022
1 0x0000000000001001
2 0x0000000000001002
3 0x0000000000001003
4 0x0000000000001004
5 0x0000000000001005
6 0x0000000000001006
7 0x0000000000001007
8 0x0000000000001008
9 0x0000000000001009
0 0x0000000000001000
RESERVED 0x000000000000101E
MINIMIZE 0x0000000000001026
end codes
end remote
#
# this config file was automatically generated
# using lirc-0.6.6(animax) on Tue Apr 15 19:50:27 2003
#
# contributed by
#
# brand: Hauppauge
# model no. of remote control:
# devices being controlled by this remote: PVR 2/350
#
begin remote
name hauppauge_pvr
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 969 811
zero 969 811
plead 1097
gap 114605
toggle_bit 2
begin codes
Power 0x00000000000017FD
Go 0x00000000000017FB
1 0x00000000000017C1
2 0x00000000000017C2
3 0x00000000000017C3
4 0x00000000000017C4
5 0x00000000000017C5
6 0x00000000000017C6
7 0x00000000000017C7
8 0x00000000000017C8
9 0x00000000000017C9
Back/Exit 0x00000000000017DF
0 0x00000000000017C0
Menu 0x00000000000017CD
Red 0x00000000000017CB
Green 0x00000000000017EE
Yellow 0x00000000000017F8
Blue 0x00000000000017E9
Ch+ 0x00000000000017E0
Ch- 0x00000000000017E1
Vol- 0x00000000000017D1
Vol+ 0x00000000000017D0
Ok 0x00000000000017E5
Mute 0x00000000000017CF
Blank 0x00000000000017CC
Full 0x00000000000017FC
Rewind 0x00000000000017F2
Play 0x00000000000017F5
Rewind 0x00000000000017F2
Play 0x00000000000017F5
Forward 0x00000000000017F4
Record 0x00000000000017F7
Stop 0x00000000000017F6
Pause 0x00000000000017F0
Replay 0x00000000000017E4
Skip 0x00000000000017DE
end codes
end remote
#
# this config file was automatically generated
# using lirc-0.7.0(any) on Sun Nov 28 20:25:09 2004
#
# contributed by
#
# brand: Hauppauge 350
# Created: G.J. Werler (The Netherlands)
# Project: Mythtv Fedora Pundit-R
www.mythtvportal.com# Date: 2004/11/28
# model no. of remote control: Hauppauge A415-HPG
# devices being controlled by this remote: PVR-350
#
begin remote
name Hauppauge_350
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 969 811
zero 969 811
plead 1097
gap 114605
toggle_bit 2
begin codes
Go 0x00000000000017BB
Power 0x00000000000017BD
TV 0x000000000000179C
Videos 0x0000000000001798
Music 0x0000000000001799
Pictures 0x000000000000179A
Guide 0x000000000000179B
Radio 0x000000000000178C
Up 0x0000000000001794
Left 0x0000000000001796
Right 0x0000000000001797
Down 0x0000000000001795
OK 0x00000000000017A5
Back/Exit 0x000000000000179F
Menu/i 0x000000000000178D
Vol+ 0x0000000000001790
Vol- 0x0000000000001791
Prev.Ch 0x0000000000001792
Mute 0x000000000000178F
Ch+ 0x00000000000017A0
Ch- 0x00000000000017A1
Record 0x00000000000017B7
Stop 0x00000000000017B6
Rewind 0x00000000000017B2
Play 0x00000000000017B5
Forward 0x00000000000017B4
Replay/SkipBackward 0x00000000000017A4
Pause 0x00000000000017B0
SkipForward 0x000000000000179E
1 0x0000000000001781
2 0x0000000000001782
3 0x0000000000001783
4 0x0000000000001784
5 0x0000000000001785
6 0x0000000000001786
7 0x0000000000001787
8 0x0000000000001788
9 0x0000000000001789
Asterix 0x000000000000178A
0 0x0000000000001780
# 0x000000000000178E
Red 0x000000000000178B
Green 0x00000000000017AE
Yellow 0x00000000000017B8
Blue 0x00000000000017A9
end codes
end remote
now here are the edits that i found we have to make to Marks script work with Knoppmyth.
Quote:
nano /etc/lirc/hardware.conf
find the line that says
Quote:
MODULES=”lirc_dev lirc_i2c”
and replace it with
Quote:
MODULES=”lirc_dev lirc_pvr150″
then edit /etc/init.d/bootmisc.sh
Quote:
nano /etc/init.d/bootmisc.sh
and add at the bottom add
Quote:
modprobe lirc_pvr150
lircd
so it should look like
Quote:
# enable DMA
/sbin/hdparm -qd1 /dev/hda
#
modprobe lirc_pvr150
lircd
now who needs a chan. changing script?? (i know you all raised your hands, good class!)
Quote:
nano /usr/local/bin/chan_change.sh
paste this bad boy in there
Quote:
#!/bin/sh
REMOTE_NAME=blaster
for digit in $(echo $1 | sed -e 's/./& /g'); do
/usr/local/bin/irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.4 # note, you may have to tweak the interdigit delay up a bit, depending on your DISH receiver model
done
and hit control X to save and exit
we now need to give that script some permisions to run
Quote:
chmod 755 /usr/local/bin/chan_change.sh
and lets try it out.
Quote:
cd /usr/local/bin/
./chan_change.sh 300
you should see 300 show up on your receiver or tv.
now all you have to do is edit your mythtv-setup (where you configured the cards and inputs and such, its in #4 (inputs, and add the line in external channel changer (or something like that, im going from memory right now) of
Quote:
"/usr/local/bin/chan_change.sh"
there, its done, a working remote, ir blaser and IVTV for a pvr150 in knoppmyth, i apoligize if this doesnt work for you, i dont know why, im just a guy that followed Marks instructions, so i dont know why this wont work on your machine, speaking from experience, i had to run through it like 6 times before comming up with this walkthrough. I hope it works for you as it has Mark and myself. once again, nerd props go out to him (he does have a paypal donate button on his site)