[mythtv-users] Dual HDPVR and Motorola STB question.
David Engel
david at istwok.net
Thu Feb 16 18:01:35 UTC 2012
On Wed, Feb 15, 2012 at 09:23:55PM -0700, Michael wrote:
> On 02/15/2012 05:52 PM, Gerald Brandt wrote:
> > Hi,
> >
> > A few years back, I purchased two Hauppaage HDPVR units, even though I had only one Motorola Cable unit.
> >
> > It's been running perfectly with Mythbuntu 10.10, changing channels over firewire.
> >
> > I now have a second Motorola STB, and want to get everything working. Is there issues I should watch out for (dev/video0 and dev/video1 switching HDPVR's, etc).
> >
> > Would I be better off using a slave to run the second HDPVR?
> >
> > Gerald
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://www.mythtv.org/mailman/listinfo/mythtv-users
>
> Running two hdpvrs works fine.
>
> I have a udev rule like this that keeps them straight
>
> #HDPVR - hdpvr1
> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTRS{serial}=="00A4FCD7",
> SYMLINK+="v
> 4l/hdpvr1"
> #KERNEL=="lirc?",SUBSYSTEM=="lirc",ATTRS{serial}=="00A4FCD7",
> SYMLINK+="v4l/hdpv
> rb1"
>
> #HDPVR - hdpvr3
> KERNEL=="video?",SUBSYSTEM=="video4linux",ATTRS{serial}=="00A4FC32",
> SYMLINK+="v
> 4l/hdpvr3"
> #KERNEL=="lirc?",SUBSYSTEM=="lirc",ATTRS{serial}=="00A4FC32",
> SYMLINK+="v4l/hdpv
> rb3"
>
> Then in mythtv, I point it to /dev/v4l/hdpvrb1 or hdpvrb3.
>
> You would need to adjust to use your serial numbers.
You also need to make sure your firewire channel change scripts access
the correct STB. IME, the firewire port numbers could change so you
need to use the GUID to correctly identify the STB.
Attached is the script I used to use. It was symlinked as stbchan0
and stbchan1 for the two STBs I had. N.B. the script has extra logic
to background itself and periodically issue extra commands over
firewire. That was to defeat the Time Warner STB's desire to
automatically switch away from SDV channels after some period of
perceived inactivity.
David
--
David Engel
david at istwok.net
-------------- next part --------------
#!/bin/bash
case $0 in
*1) GUID=0x0023a3fffe1ca585 ;;
*) GUID=0x0012c9fffe3aac02 ;;
esac
#echo "$0: GUID=$GUID"
NODE=$(plugreport | grep $GUID | cut -d' ' -f2)
#echo "$0: NODE=$NODE"
if [ -z "$NODE" ]; then
echo "$0: can't determine NODE"
exit 1
fi
if [ $(id -u -n) = "mythtv" ]; then
PIDFILE=/tmp/$(basename $0).pid
#echo "$0: PIDFILE=$PIDFILE"
if [ -e $PIDFILE ]; then
OLDPID=$(<$PIDFILE)
#echo "$0: OLDPID=$OLDPID"
pkill -P $OLDPID
fi
SLEEP=8100
#echo "$0: SLEEP=$SLEEP"
(
while sleep $SLEEP; do
stb-command -n$NODE display_info || break
stb-command -n$NODE exit || break
done
) &
NEWPID=$!
#echo "$0: NEWPID=$NEWPID"
echo $NEWPID >$PIDFILE
fi
6200ch -n$NODE 4
sleep 2
6200ch -n$NODE ${1+"$@"}
More information about the mythtv-users
mailing list