InternetDVB

Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2006-06-25 14:07:46
Size: 6344
Editor: 202
Comment:
Revision 3 as of 2006-08-30 02:01:17
Size: 6513
Editor: 118
Comment:
Deletions are marked like this. Additions are marked like this.
Line 64: Line 64:
cp /util/dvbnet/dvbnet /usr/local/bin
cp /util/dvbtraffic/dvbtraffic /usr/local/bin
cp /util/scan/scan /usr/local/bin
cp /util/szap/szap /usr/local/bin
cp /util/szap/femon /usr/local/bin
cp /util/dvbdate/dvbdate /usr/local/bin
cp util/dvbnet/dvbnet /usr/local/bin
cp util/dvbtraffic/dvbtraffic /usr/local/bin
cp util/scan/scan /usr/local/bin
cp util/szap/szap /usr/local/bin
cp util/szap/femon /usr/local/bin
cp util/dvbdate/dvbdate /usr/local/bin
Line 194: Line 194:
# #
# note :
Line 200: Line 201:
PID=4004
Line 203: Line 203:
# Change this with your own mac address
MAC_ADDR=00:01:02:03:04:05
IP_ADDR=169.254.255.29
NETMASK=255.255.0.0
BROADCAST=169.254.255.255
Line 209: Line 209:
# put your DVB PID here (from your ISP)
PID=4004

# Leave it blank MAC_ADDRESS if want to use default mac address
# or modify it if you didn't see correct mac address
# MAC_ADDR=00:01:02:03:04:05
MAC_ADDR=
Line 210: Line 218:
Line 239: Line 246:
   sleep 1
Line 251: Line 257:
  ifconfig $DEV_NAME hw ether $MAC_ADDR up  if [ -z "$MAC_ADDR" ]; then
  ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAST up
 else
  ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAST hw ether $MAC_ADDR up
 fi
Line 293: Line 303:
}}}

make it executable
{{{
cd /etc/init.d
chmod 755 init_dvb
ln init_dvb /usr/local/sbin
}}}

testing script init_dvb

{{{
init_dvb stop
init_dvb start
init_dvb start
init_dvb

This information about HOWTO setup DVB PCI Card for internet (tested with b2c2 chipset) using Ubuntu 5.10 Breezy Badger and Ubuntu 6.06 Dapper Drake.

Requirement

  • Processor Clock 800 Mhz
  • HDD
  • Memory 256Mb
  • Ethernet Card
  • DVB PCI Card (i used b2c2 from technisat [http://www.technisat.com])

Fresh New Server

We need fresh server from ubuntu, so we have to install ubuntu in server mode. For detail instructions howto install in server mode see [http://www.howtoforge.com/perfect_setup_ubuntu_5.10]

if you don't like to be root, choose sudo or fakeroot !

i like to be root [https://help.ubuntu.com/community/RootSudo]

$ sudo passwd
$ su

put Ubuntu Install CD back into CDROM drive

as root

apt-get install build-essential

DVB Packages

get the packages from linuxtv.org [http://www.linuxtv.org/downloads/linuxtv-dvb-apps-1.1.1.tar.gz]

tar -zxvf linuxtv-dvb-apps-1.1.1.tar.gz

make it simple

mv linuxtv-dvb-apps-1.1.1 linuxtv

i have made my own patch for better display. [http://software.prima-info.com/linuxtv-dvb-apps-dvbnet.patch]

patch and compile them all.

cd linuxtv
patch -p0 <linuxtv-dvb-apps-dvbnet.patch
make

if no error report copy all off them to /usr/local/bin

cp util/dvbnet/dvbnet /usr/local/bin
cp util/dvbtraffic/dvbtraffic /usr/local/bin
cp util/scan/scan /usr/local/bin
cp util/szap/szap /usr/local/bin
cp util/szap/femon /usr/local/bin
cp util/dvbdate/dvbdate /usr/local/bin

Testing

before we do some testing, we need this informations from satellite internet provider (DVB-S) :

  • Satellite band freq (c-band, ku-band)
  • Polarization
  • Frequency
  • Symbol rate
  • FEC
  • PID

my configurations is

  • Satellite Band freq = C-BAND
  • Frequency = 3680 Mhz
  • Polarization = Horizontal
  • Symbolrate = 26666 ksym/s
  • FEC = 3/4
  • PID = 4004

mkdir /root/.szap
cd /root/.szap

Testing : dvbnet

what we need here is PID (from dvb internet provider). for example our pid is 4004 (decimal)

dvbnet -p 4004

now you can see your new adapter dvb0_0

ifconfig dvb0_0

if you didn't see correct MAC address

ifconfig dvb0_0 hw ether "$YOUR_MAC_ADDRESS" 

Testing : scan

we are ready to scan the transponder now i assume that satellite dish is on the right pointing

cd /root/.szap
echo S 3680000 H 26666000 3/4 > sat.conf
scan -l c-band sat.conf

this will ok if no error message.

Testing : szap

this session will create our channels configuration (this is my configuration).

cd /root/.szap
echo myprovidername:3680:h:0:26666:0:0:7 > channels.conf

we will tune it now !!

szap -l c-band -n 1 

if you see "FE_HAS_LOCK" ... dvb card is tuned fine !

CTRL+C to stop it !

make it run as daemon

start-stop-daemon --start -q -b -x /usr/loca/bin/szap -- -l c-band -n 1  

from now, you can only check it by using femon

femon

Testing : dvbtraffic

testing data capability

dvbtraffic

you can also monitor internet packet at dvb0_0

tcpdump -i dvb0_0

you can also using iptraf

rc.d "init_dvb"

we will make it start automatic every times our pc is re-boot.

we need this script init_dvb or get it from [http://software.prima-info.com/init_dvb]

and put it on /etc/init.d

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# Nama file : init_dvb 
# Path      : /etc/init.d/
# Applikasi : intenet dvb 
# Linux     : Debian
# Homepage  : www.prima-info.com
# Author    : A. Ahdin
# email     : ahdin@telkom.net
#
# note :
# Create & Copy this to  /etc/init.d/ 
# execute  "update-rc.d init_dvb defaults"
# 
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

DEV_NAME=dvb0_0

IP_ADDR=169.254.255.29
NETMASK=255.255.0.0
BROADCAST=169.254.255.255
SZAP=/usr/local/bin/szap
DVBNET=/usr/local/bin/dvbnet

# put your DVB PID here (from your ISP)
PID=4004

# Leave it blank MAC_ADDRESS if want to use default mac address
# or modify it if you didn't see correct mac address  
# MAC_ADDR=00:01:02:03:04:05
MAC_ADDR= 

. /lib/lsb/init-functions
chk=`$DVBNET -l | grep dvb0_0`
hk=`ps ax | grep szap | grep -v grep | awk '{print $1}'`

load_szap () {
   sleep 1
   start-stop-daemon --start -q -b -x $SZAP -- -l c-band -n 1 -c /root/.szap/channels.conf
}

load_pid () {
  $DVBNET -P $PID 
  RET=$?
  sleep 1
  if [ "$RET" -gt 0 ] ; then 
        log_end_msg $RET
        echo   "   Error: Unable to create dvb0_0 ...!"
        exit 1;
  fi
}

unload_dvb () {
        ifconfig dvb0_0 down
        sleep 1
        $DVBNET -D 0 
        sleep 1
}

case "$1" in
start) 
        if [ -n "$chk" ] ; then
                log_begin_msg "Re-starting dvb..."
                unload_dvb
                load_pid
        fi

        if [ -z "$chk" ] ; then 
                log_begin_msg "Starting dvb..."
                load_pid
        fi

        if [ -z "$MAC_ADDR" ]; then
                ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAST up
        else
                ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAST hw ether $MAC_ADDR up
        fi

        if [ -n "$hk" ] ; then

                kill "$hk"
                load_szap
        fi
        if [ -z "$hk" ] ; then
                load_szap
        fi
                log_end_msg $?

;;
stop) log_begin_msg "Stopping dvb..."
   sleep 1
        if [ -n "$chk" ] ; then
                ifconfig dvb0_0 down
                unload_dvb
                sleep 1
        else 
                log_end_msg 1
                echo  "   Error: no such interface dvb0_0 ...!"
                exit 1

        fi

        if [ -n "$hk" ] ; then
                kill "$hk"
        fi

                log_end_msg $?

        ;;

*)  log_success_msg "****************************** *"
    log_success_msg "                               *"
    log_success_msg "  Usage: init_dvb start|stop   *"
    log_success_msg "                               *"
    log_success_msg "****************************** *"
  exit 1
;;
esac

make it stay on rc.d then reboot

update-rc.d init_dvb defaults
reboot

InternetDVB (last edited 2008-08-06 16:59:48 by localhost)