[mythtv-users] UDEV rules for tuner numbering consistency

Brian Jameson tech at jameson.co.uk
Sun Jan 20 13:14:29 UTC 2008


Andrew Gallatin wrote:-

>
> Do the Nova T DVB cards have unique MAC addresses when
> configured with dvbnet?
>
> I have a script I use to create unique links based on the unique MAC
> addresses of my different DVB cards.  I run it from the mythbackend.sh
> startup script, and use /dev/dvb/adapter[456] in myth, rather than the
> real adaptors.  No udev mucking required.
>
> I've appended an edited version in case it helps.
>
> Drew
>
> #!/bin/bash
>
> #
> # This script will make links in /dev/dvb/adaptorN such that
> # /dev/dvb/adaptor4 == dvico fusion hdtv5 gold
> # /dev/dvb/adaptor5 == air2pc hd5000
> # /dev/dvb/adaptor6 == air2pc airstar 2
>
> HD5000_MAC="00:D0:D7:0X:XX:XX"
> FUSION_MAC="00:00:00:00:00:00"
> AIRSTAR_MAC="00:D0:D7:0Y:YY:YY"
>
> # remove old links
> i=0
> while [ $i -lt 9 ]; do
>     dev="/dev/dvb/adapter"$i
>     if [ -L $dev ] ; then
> 	rm -f $dev
>     fi
>     let i=i+1
> done
>
>
> # sort out cards
>
> i=0
> while [ $i -lt 4 ]; do
>     dev="/dev/dvb/adapter"$i
>     if [ -d $dev ] ; then
> 	dvbnet -a $i -p 1 > /dev/null 2>&1
> 	if `ifconfig -a | grep dvb | grep -q $FUSION_MAC` ; then
> 	    ln -s $dev /dev/dvb/adapter4
> 	fi
> 	if `ifconfig -a | grep dvb | grep -q $HD5000_MAC` ; then
> 	    ln -s $dev /dev/dvb/adapter5
> 	fi
> 	if `ifconfig -a | grep dvb | grep -q $AIRSTAR_MAC` ; then
> 	    ln -s $dev /dev/dvb/adapter6
> 	fi
> 	dvbnet -a $i -d 0 > /dev/null 2>&1
>     fi
>     let i=i+1
> done
>
>
Andrew, Thanks for the script and thank you for the input from other people.
I have used
a modified version of your script to resolve the issue, as dvbnet does not
identify the
cards. I shall come back to this later when I have more time and see if I
can crack the
UDEV issue meanwhile I am grateful for the help getting my MythTV going
again and not so
vulnerable to changes.
Brian



More information about the mythtv-users mailing list