Sie sind auf Seite 1von 44

DVB - Slackware 12.

2
################################################################################
########################################
### MPlayer ####################################################################
########################################
################################################################################
########################################
cd /usr/src
wget http://www.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2
tar jxf mplayer-checkout-snapshot.tar.bz2
cd mplayer-checkout-2009-02-11/
./configure --prefix=/usr/local/mplayer --enable-gui
make && make install
cd ..
rm -rf mplayer-checkout-2009-02-11/
cd /usr/src
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar jxf essential-20071007.tar.bz2
mkdir -p /usr/local/mplayer/lib/codecs
mv essential-20071007/* /usr/local/mplayer/lib/codecs/
rm -rf essential-20071007
echo "PATH=\"\$PATH:/usr/local/mplayer/bin/\"" >> /root/.bash_profile
echo "MANPATH=\"\$MANPATH:/usr/local/mplayer/share/man/\"" >> /root/.bash_profil
e
################################################################################
########################################
### LinuxTV DVB APPS ###########################################################
########################################
################################################################################
########################################
cd /usr/src
wget http://linuxtv.org/downloads/linuxtv-dvb-apps-1.1.1.tar.gz
tar zxf linuxtv-dvb-apps-1.1.1.tar.gz
cd linuxtv-dvb-apps-1.1.1
make
mkdir /usr/local/dvb
cp util/dvbnet/dvbnet /usr/local/dvb/
cp util/dvbtraffic/dvbtraffic /usr/local/dvb/
cp util/scan/scan /usr/local/dvb/
cp util/szap/szap /usr/local/dvb/
cp util/szap/femon /usr/local/dvb/
echo "PATH=\"\$PATH:/usr/local/dvb/\"" >> /root/.bash_profile
cd ..
rm -rf linuxtv-dvb-apps-1.1.1
################################################################################
########################################
### scan #######################################################################
########################################
################################################################################
########################################
#Nilesat initial-tuning-data for dvb-s
#Nilesat 101,102,AB4 353.0E (7.0W) info service transponder
#freq pol sr fec
################################################################################
########################################
mkdir /root/.szap/
echo "
S 10795000 V 27500000 3/4
S 10872000 V 27500000 3/4
S 10910000 V 27500000 3/4
S 10930000 H 27500000 3/4
S 10747000 V 27500000 3/4
S 11766000 H 27500000 3/4
S 11785000 V 27500000 3/4
S 11803000 H 27500000 3/4
S 11823000 V 27500000 3/4
S 11843000 H 27500000 3/4
S 11861000 V 27500000 3/4
S 11881000 H 27500000 3/4
S 11900000 V 27500000 3/4
S 11919000 H 27500000 3/4
S 11938000 V 27500000 3/4
S 11957000 H 27500000 3/4
S 11977000 V 27500000 3/4
S 11996000 H 27500000 3/4
S 12015000 V 27500000 3/4
S 12034000 H 27500000 3/4
S 12053000 V 27500000 3/4
S 12073000 H 27500000 3/4
S 12130000 V 27500000 3/4
S 12149000 H 27500000 3/4
S 12207000 V 27500000 3/4
S 12226000 H 27500000 3/4
S 12284000 V 27500000 3/4
S 12301000 H 27500000 3/4
S 12341000 V 27500000 3/4
S 12360000 H 27500000 3/4
S 12400000 H 27500000 3/4
" > /usr/local/dvb/Nilesat
scan /usr/local/dvb/Nilesat | tee /root/.szap/channels.conf
cp /root/.szap/channels.conf /usr/local/dvb/channels.conf.Nilesat
################################################################################
########################################
### szap #######################################################################
########################################
################################################################################
########################################
## Finding MBC in channels.conf
szap -q | grep MBC
--> 249 MBC+ Drama
--> 333 MBC1
--> 334 MBC4
--> 335 MBC2
--> 336 MBC3
--> 341 MBC Action
--> 343 MBC MAX
--> 600 MBC Persia
## Tunning to MBC2 : channel 335
szap -n 335
--> reading channels from file '/root/.szap/channels.conf'
--> zapping to 335 'MBC2':
--> sat 0, frequency = 11938 MHz V, symbolrate 27500000, vpid = 0x0fc9, apid = 0
x0fca
--> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
--> status 00 | signal 0000 | snr 4a67 | ber 0000376d | unc fffffffe |
--> status 1f | signal b838 | snr be2f | ber 0000d41a | unc fffffffe | FE_HAS_LO
CK
--> status 1f | signal b8c2 | snr be59 | ber 000000c7 | unc fffffffe | FE_HAS_LO
CK
## Monitoring (if szap in background)
femon
--> using '/dev/dvb/adapter0/frontend0'
--> FE: ST STV0299 DVB-S (SAT)
--> status 1f | signal b5c9 | snr bf13 | ber 00000000 | unc bff489b8 | FE_HAS_LO
CK
--> status 1f | signal b67b | snr bf40 | ber 00000000 | unc bff489b8 | FE_HAS_LO
CK
################################################################################
########################################
### dvbtools ###################################################################
########################################
################################################################################
########################################
cd /usr/src
wget http://garr.dl.sourceforge.net/sourceforge/dvbtools/dvbtune-0.5.tar.gz
tar zxf dvbtune-0.5.tar.gz
cd dvbtune-0.5
make
cp dvbtune /usr/local/dvb/
cd ..
rm -rf dvbtune-0.5
cd /usr/src
wget http://garr.dl.sourceforge.net/sourceforge/dvbtools/dvbstream-0.5.tar.gz
tar zxf dvbstream-0.5.tar.gz
cd dvbstream-0.5
make
cp dvbstream /usr/local/dvb/
cd ..
rm -rf dvbstream-0.5
################################################################################
########################################
### dvbtune ####################################################################
########################################
################################################################################
########################################
grep Tunes /root/.szap/channels.conf
--> Melody Tunes:10795:v:0:27500:3604:3605:3602
--> Melody Tunes:10872:v:0:27500:0:0:3602
dvbtune -tone 0 -f 1079500 -p v -s 27500 -v 3604 -a 3605 -m
################################################################################
########################################
### dvbstream ##################################################################
########################################
################################################################################
########################################
grep Tunes /root/.szap/channels.conf
--> Melody Tunes:10795:v:0:27500:3604:3605:3602
--> Melody Tunes:10872:v:0:27500:0:0:3602
dvbstream -f 10795 -p v -s 27500 -v 3604 -a 3605 -o | mplayer -framedrop -zoom -
fs -cache 1024 -
################################################################################
########################################
### dvbsnoop ###################################################################
########################################
################################################################################
########################################
# http://dvbsnoop.sourceforge.net/
# http://dvbsnoop.sourceforge.net/dvbsnoop.html
# http://dvbsnoop.sourceforge.net/faq.html
# http://dvbsnoop.sourceforge.net/examples/examplelist.html
# http://dvbsnoop.sourceforge.net/examples/example-eit.html
# http://dvbsnoop.sourceforge.net/links.html
# http://dvbsnoop.sourceforge.net/manpage/dvbsnoop.man.shtml
cd /usr/src
http://dfn.dl.sourceforge.net/sourceforge/dvbsnoop/dvbsnoop-1.4.50.tar.gz
tar zxf dvbsnoop-1.4.50.tar.gz
cd dvbsnoop-1.4.50
./configure && make
cp src/dvbsnoop /usr/local/dvb/
cp src/dvbsnoop.1 /usr/local/man/man1/
cd ..
rm -rf dvbsnoop-1.4.50
szap -r -n 335
dvbtraffic
dvbsnoop -s pidscan
dvbsnoop -s bandwidth 4041
dvbsnoop 4041
cat /dev/dvb/adapter0/dvr0 > test
dvbstream 4041 4042 -o > test
## Using the combination of szap and test_dvr to save an entire transport stream
to disk
# Without szap
dvbstream -f 11938 4041 4042 -o > test
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################

PID=0x511
DEV_NAME=dvb0_0
IP_ADDR=10.1.1.1
./dvbnet -p $PID
/sbin/ifconfig $DEV_NAME $IP_ADDR
MAC_ADDR=00:01:02:03:04:05
/sbin/ifconfig $DEV_NAME hw ether $MAC_ADDR
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet -p 0x0fc9
DVB Network Interface Manager
Version 1.1.0-TVF (Build Mon Feb 09 11:07:57 PM 2009)
Copyright (C) 2003, TV Files S.p.A
Device: /dev/dvb/adapter0/net0
Status: device dvb0_1 for pid 4041 created successfully.
01:01:55 - Tue Feb 10
root@Slack:~/dvb # /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet -l
DVB Network Interface Manager
Version 1.1.0-TVF (Build Mon Feb 09 11:07:57 PM 2009)
Copyright (C) 2003, TV Files S.p.A
Device: /dev/dvb/adapter0/net0
Query DVB network interfaces:
-----------------------------
Found device 0: interface dvb0_0, listening on PID 1297
Found device 1: interface dvb0_1, listening on PID 4041
-----------------------------
Found 2 interface(s).
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic
# tcpdump -i dvb0_0
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/InternetDVB

HOWTO
This information about HOWTO setup DVB PCI Card for internet (tested with b2c2 c
hipset) 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. F
or detail instructions howto install in server mode see http://www.howtoforge.co
m/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 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. 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 pro
vider (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 40
04 (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 scri
pt init_dvb or get it from init_dvb and put it on /etc/init.d

#!/bin/sh
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# 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/cha
nnels.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 $BROADCAS
T up
else
ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAS
T 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

don't forget to make it executable


chmod 755 /etc/init.d/init_dvb
link it to /usr/local/sbin
cd /etc/init.d/init_dvb
ln init_dvb /usr/local/sbin
make it stay on rc.d then reboot
update-rc.d init_dvb defaults
reboot

Links
* linux dvb application http://linuxtv.org
* patch & script http://software.prima-info.com
* my dvb pci card http://www.technisat.com
* Installation tutorial perfect_setup_ubuntu_5.10

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device
Testing your DVB device
From LinuxTVWiki
Jump to: navigation, search
This page provides a few suggestions on how to test that a properly installed DV
B device 1 is functioning properly. The command line steps described are also in
dispensable for quick setup and no frills viewing with DVB hardware under Linux.
Note: 1 In other words, this article assumes that you have already both:
* physically installed the device into, or attached it to, your system (
refer to the manufacturer's instructions for such details) and
* installed the drivers for your hardware and have the proper modules lo
aded (see "How to install DVB device drivers" for such details)
Having completed such tasks, you should at least now have a /dev/dvb/adapter
0/ directory. (If you have additional DVB devices installed in your system, they
will be assigned an increased adapter number accordingly).

Contents
[hide]
* 1 Using dvb-apps
* 2 Using dvbsnoop
* 3 Save a TV program to your hard drive
* 4 Next steps - More feature rich viewing software
Using dvb-apps
1. Obtain the dvb-apps package
See the LinuxTV dvb-apps article for details on how to obtain the package. The d
vb-apps package contains several useful tools.
2. Scan for the channels you can receive
Refer to the (dvb)scan article for details of how to perform this step. Once fam
iliar with the content of that article, you will recognize that this step can be
summarized (in general form) by:
mkdir ~/.{a,c,s,t}zap
(dvb)scan /path_to_the_initial_scan_file > ~/.{a,c,s,t}zap/channels.conf
3. Tune a frequncy and program
Refer to the zap article for details of how to perform this step. Once familiar
with the content of that article, you will recognize that this step can be summa
rized (in general form) by:
$ /usr/bin/{a,c,s,t}zap -r -c ~/.{a,c,s,t}zap/channels.conf "channel name"
where, respective to the type of transmission, azap is used for ATSC, czap for D
VB-C, szap for DVB-S and tzap for DVB-T.
Note: If (dvb)scan was unable to correctly resolve the audio or video PID values
for a channel in the previous step, a manual adjustment to the channels.conf fi
le will be necessary to correct any inaccurately written PID(s) information. Suc
h occurrences tend to be rare, but nonetheless, they do happen -- often, one onl
y becomes aware of a problem with the PID values after unsuccessful attempts to
tune a particular channel. The correct values may be determined using using dvbt
raffic (see step 4.c) below). Another method for finding correct PID values for
a channel is also outlined in the section entitled "A word about dvbscan and aud
io streams".

4. After you've tuned a frequency and program


a) You could now start up your simple TV watching application and decode the str
eam you have tuned.
For example, while keeping {a,c,s,t}zap running in the first console shell, open
up another console and run
mplayer /dev/dvb/adapter0/dvr0 <options>
If you have more than one dvb device installed in your system, then you will hav
e to pass the correct adaptor number. See the mplayer man page (i.e. in a consol
e run "man mplayer") for a lengthy list of options.

b) Or, you could now start up a datastreamer

c) Or, alternatively, you may want to see some statistics of what's coming in fo
r each channel and PID. Example:
$ /usr/bin/dvbtraffic
dvbtraffic which will access the /dev/dvb/adapter0/dvr0 device. An example of ou
tput from dvbtraffic is:
0000 24 p/s 4 kb/s 37 kbit
0010 20 p/s 3 kb/s 31 kbit
0011 20 p/s 3 kb/s 31 kbit
0012 70 p/s 12 kb/s 106 kbit
0015 1 p/s 0 kb/s 2 kbit
0080 26 p/s 4 kb/s 40 kbit
0082 26 p/s 4 kb/s 40 kbit
0087 25 p/s 4 kb/s 38 kbit
0100 25 p/s 4 kb/s 38 kbit
0101 25 p/s 4 kb/s 38 kbit
0102 24 p/s 4 kb/s 37 kbit
0200 8567 p/s 1572 kb/s 12885 kbit
0201 4708 p/s 864 kb/s 7081 kbit
0205 926 p/s 170 kb/s 1392 kbit
0240 49 p/s 8 kb/s 75 kbit
0241 49 p/s 8 kb/s 75 kbit
028b 261 p/s 47 kb/s 393 kbit
0294 174 p/s 31 kb/s 262 kbit
0295 130 p/s 23 kb/s 196 kbit
02bc 75 p/s 13 kb/s 113 kbit
1fff 87 p/s 15 kb/s 131 kbit
2000 15329 p/s 2814 kb/s 23055 kbit
-PID--FREQ-----BANDWIDTH-BANDWIDTH-
This output is for a HDTV channel. In this example PID 200 is video 28b is audio
. These values are in hex and need conversion to decimal(512,651) for use channe
l.conf.
This is the record in channel.conf using the PID values from dvbtraffic:
Nine High Def Gold Coast:746625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_
4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:651:1138
And finally
dvbdate
Using dvbsnoop
If the testing steps in the dvb-apps section above work fine, you can jump over
this section here. On the other hand, dvbsnoop is a small, down-to-earth utility
that is very handy for debugging and also seeing what is occuring with a dvb de
vice (i.e. tuning works? data coming in? signal strong enough?).
1. Obtain the dvbsnoop package
See the dvbsnoop article for details on how to obtain the package.
2. Testing with dvbsnoop
Try things like
dvbsnoop -help
dvbsnoop -s pidscan
This will give out a lot of numbers, but if you understand the system of DVB you
should see if they make sense. Go for one of the PIDs (choose a right one which
is a bit difficult as you don't know what they stand for unless you used the sc
an line above) and try:
dvbsnoop -s bandwidth <PID>
dvbsnoop <PID>
The latter will spit out a lot of hexdumps - at least you receive something ;-)
Save a TV program to your hard drive
The handy thing about digital TV is, it comes in as a digital stream that you ca
n save right away to your harddisk without any changes necessary to it. Therefor
e, hardly any CPU resources are needed -- just a lot of HD space (few GB per hou
r as the stream is MPEG-2 which is not as compressed as, for example, DivX/MPEG-
4; it's even more as mostly one transport stream contains multiple PIDs). There
are several ways to do this. For example:
a) Using the combination of {a,c,s,t}zap and cat'ing the logical dvr device to s
ave a program stream to disk
If you have a channel tuned with {a,c,s,t}zap (and note that you MUST also be us
ing the -r parameter to set up the logical dvr device in order for the following
to work; see Zap for detail), open up another shell console and run (as root us
er):
cat /dev/dvb/adapter0/dvr0 > <filename>
The result is that particular program stream will be written to disk, and you sh
ould be able to play it back at any later time with your favourite media player.
b) Using the combination of {a,c,s,t}zap and test_dvr to save an entire transpor
t stream to disk

c) Saving to disk with dvbstream


dvbstream is a useful program that, amongst other things, can save a DVB stream
to disk. Method 1: First tune into a channel, as described above in the zapping
step, and then next have dvbstream save a particular stream to file. For example
:
tzap 'BBC ONE'
dvbstream 600 601 -o > bbc1.mpeg
The values "600 and 601" are, respectively, the video and audio PIDs for the cha
nnel BBC ONE, as derived from the channels.conf file. So this is why it's import
ant that you have your personal channels.conf file with all the PIDs so you can
look them up.
Method 2: Alternatively, instead of using a combination of *zap and dvbstream, y
ou can use dvbstream alone provided you pass which frequency to tune and list th
e correct PIDs. For example:
dvbstream -f 578000 600 601 -o >bbc1.mpeg
Wait a few seconds and then press Ctrl+C to stop. You should then be able to ope
n/playback the recorded file with any of your favourite media players (like Mpla
yer, (g)xine, noatune, etc. etc ) provided you have the correct decoders install
ed on your system (which, in general regards to DVB transmissions, are usually g
oing to be MPEG-2, but can now also be MPEG-4).
If the file is rather small, e.g. smaller than 1 MB after a minute of recording,
then you can't receive this TV channel - maybe the reception is bad (too weak a
ntenna signal) - or maybe your card's frequency is not tuned for the right sende
r? Watch out, some PIDs come up a few times (but for different frequencies).
This might not be what you wanna do every day (unless you only watch BBC1 or you
can easily memorise all your channels with their two PIDs) - but it's very fast
and easy to do these steps for testing purposes.
Next steps - More feature rich viewing software
It is not the intention of this page to provide a detailed description of the us
e of DVB hardware with more complex Linux viewing software applications. Suffice
it to say that you will have some choice. For example:
* for light TV watching with a DVB device under Linux, MPlayer, Xine, Kaffei
ne, Klear and a few others are often selected.
* alternatively, for "Media Center" type applications, the usual first suspe
cts are Freevo, MythTV, and VDR, but there are others as well
* you could use the streaming facilities of dvbstream and then watch the MPE
G-2 stream (even possible on a different computer) with programs like Xine, MPla
yer etc.
For some further inspiration on what's possible with more advanced software usag
e see:
* the Commented software list and
* Example setups

(note: you'll need to install the VDR Software Decoder Plugin if you want to use
VDR for watching with a software decoding card).
* Digital Video Broadcasting ? A practical guide by Hugo Mills [1]

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/Dvbsnoop
Dvbsnoop
From LinuxTVWiki
Jump to: navigation, search
The correct title of this article is dvbsnoop. The initial letter is shown c
apitalized due to technical restrictions.
dvbsnoop is a commandline DVB / MPEG stream analyzer utility, which is capable o
f debugging, dumping or viewing the information in such streams. It is a very us
efool tool if you are in need to sniff data streams. dvbsnoop is part of the Tux
box Project and is hosted on Sourceforge (see links below)
Obtaining the dvbsnoop package
If the dvbsnoop package is maintained in a repository available for your "distro
", then you can obtain it with your package manager. For example:
* To install it on a debian system:
# apt-get install dvbsnoop
* Using Fedora:
Apparently, dvbsnoop isn't in any of the usual Fedora repositories a
t this time (Feb 2007).
In any regard, dvbsnoop is available for direct download from the Sourceforge pr
oject site using steps similar to the following:.
Note: These steps are written in terms of the dvbsnoop version 1.40 release. You
r download URL (and the extracted directory dvbsnoop-bin-i386-1.4.00-api3) will
change as succeeding versions of dvbsnoop are published on Sourceforge.
$ mkdir ~/dvbsnoop
$ cd dvbsnoop
$ wget http://downloads.sourceforge.net/dvbsnoop/dvbsnoop-bin-i386-1.4.00-api3
.tar.gz?modtime=1124046233&big_mirror=0
$ tar xvzf *.tar.gz
$ ls
$ cd dvbsnoop-bin-i386-1.4.00-api3
$ ls
$ cd bin-i386-api3
Note: You may wish to copy the binary dvbsnoop to a much more convenient locatio
n, rather than leaving it deeply buried within the directory path ~/dvbsnoop/dvb
snoop-bin-i386-1.4.00-api3/bin-i386-api3
Usage
For dvbsnoop's options run
$ dvbsnoop -help
A typical usage might entail something like:
$ dvbsnoop -s pidscan
External Links
* dvbsnoop Homepage
o dvbsnoop feature list
* TuxBox Project Homepage
Retrieved from "http://www.linuxtv.org/wiki/index.php/Dvbsnoop"
Category: Software
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://wiki.alpinelinux.org/w/index.php?title=Setting_up_Satellite_Internet_Conn
ection

Setting up Satellite Internet Connection


From Alpine Linux
Jump to: navigation, search
Contents
[hide]
* 1 Satellite Internet Connection HOW-TO
o 1.1 Introduction
o 1.2 How does it work?
o 1.3 Technical Information
+ 1.3.1 Antenna / Converter
+ 1.3.2 DVB-S Receiver Card
o 1.4 DVB Setup
o 1.5 Authentication with ISP
o 1.6 Sharing Satellite Internet Connection
o 1.7 Conclusion
o 1.8 More information
Satellite Internet Connection HOW-TO
Introduction
This document briefly explains Satellite technology, how it works, what do you n
eed, configuration and how to sharing it between several clients. So the main fo
cus is the Internet connection, satellite TV is not reviewed.
How does it work?
So first we make the request (using land Internet connection) to the Sat-Server
usually via a tunnel, after it will retrieve out info from Internet and it will
send it to Satellite; in the end we would receive data from the it to our home u
sing a parabolic antenna and a Sat Card.
Satellite works very well with protocols, which have a little request data and a
much bigger answer size. Although, a big time of answer is the biggest problem
of satellite connection that may prevent using interactive services such as VoIP
. The delay of answer may be considered basing on that a typical Sat distance is
like 36.000 km, so an average overall delay time is 300-400 ms.
To install the little satellite system we need:
* DVB-S Card
* Parabolic Antenna (Satellite Dish)
* LNB Digital Converter
Technical Information
A satellite link as a classical Wireless link is very different from Wired link.
It may cause some additional problems to solve, such as reachability, privacy p
roblems and so on. Also there could be weather problems, particularly in snow or
rain conditions.
Antenna / Converter
A parabolic antenna gives a very high gain in RX. A frequency that is being rece
ived from the satellite transponder is from 11GHz up to 12.7 GHz. The Digital Co
nverter transforms it to 1-2 GHz and send signal to the DVB-S card receiver thro
ugh the coax cable up to 30-40m. This documents assumes that your parabolic ante
nna is properly mounted and calibrated as well as proper converter (usually Ku-b
and) is used.
DVB-S Receiver Card
DVB-S card receives analog signals via coax cable and converts it to digital sig
nals pretty like Ethernet card, after that the OS transforms it to a TCP/IP pack
ets.
DVB Setup
1. Install DVB-S Card and check if system recognized it
Please note, that in most cases you need PCI version 2.1 or higher (check DVB ca
rd specifications). In practice it is Pentium-III or later systems.
# lspci | grep -i "multimedia controller"
2. Make sure that kernel modules are loaded
You have to use Alpine 1.7.10 release or higher that should load appropriate ker
nel modules for DVB card on startup. You may check if DVB devices are installed.
# ls -la /dev/dvb*
3. Install LinuxTV Applications
# apk_add linuxtv-dvb-apps
4. Create and edit file channels.conf
This file contains settings for each Satellite you are using. For example the sa
tellite Sirius-4 Nordic Beam has the following parameters: Freq - 12322Mhz, Pola
rization - vertical, Symbol Rate - 27.654711Ms/s, FEC -7/8.
Anyway, all parameters you have to receive from ISP or find in the Internet. Ple
ase look at Satellite Parameters and SES SIRIUS.
The following example is for "Sirius-4 Nordic Beam":
# echo "Sirius4-Nord:12322:v:0:27500:0:0:0" >> /etc/channels.conf
5. Tune DVB Receiver
Check configured channels:
# szap -c /etc/channels.conf -q
Tune the channel number 001:
# szap -c /etc/channels.conf -n 1
In some cases you may need to run this command permanently in background because
of a bug in kernel modules for some dvb cards.
Option A:
# szap -c /etc/channels.conf -n 1 > /dev/null 2>&1 &
Option B:
# start-stop-daemon --start --background --exec /usr/bin/szap -- -c /etc/ch
annels.conf -n 1
6. Set up DVB network interface
Your ISP provides you the PID, which is used for select a transmission between m
any signal from same frequency.
# dvbnet -a 0 -p $PID
# ifconfig dvb0_0 hw ether $MAC
# ifconfig dvb0_0 $IP netmask 255.255.255.255 up
Here $IP is any IP address, which does not match with any other adrres in your n
etwork. The $MAC you specify here is usually the MAC address of your DVB card, i
n some cases ISP calculates MAC address for you. In any case ISP sends data only
for registered MAC addresses.
Due to nature of satellite connection, the dvb interface receives packets, which
have been originated from other sources, actually ether from land internet conn
ection interface or, in most cases, from virtual tunnel device. So in order to a
llow receiving such packets the source validation should be disabled on dvb0_0 i
nterface.
# echo "0" > /proc/sys/net/ipv4/conf/dvb0_0/rp_filter
Another way to achieve that is to allow the shorewall to control that using ROUT
E_FILTER and routefilter parameters.
7. Test if satellite interface is receiving data
You should see many packets for other clients of your ISP.
# apk_add tcpdump
# tcpdump -n -i dvb0_0
Authentication with ISP
Before you receive your data via satellite your ISP should authenticate you as t
heir registered client. There are several common techniques could be used:
* Some ISPs use the "Proxy Authentication", when you used their proxy, you a
lso need to give login and password to continue the request. Once done, the ISP
use your IP address to calculate your MAC address, to which send the answer.
* Some other ISPs require you make a VPN connection (using your login and pa
ssword) first, then they will control your registration account (where they retr
ieve your MAC address) and will send data to your card (your MAC address).
* If you have static public IP, perhaps, the most convenient way is when ISP
s suggest making a GRE/IPIP tunnel, which is used to sent authenticated requests
to ISP satellite server. Consequently ISP sends back answers via satellite you
are connected to.
Here is an example of setting up GRE tunnel with a ISP:
1. Make static routes
All queries to DNS servers of your land ISP should go via land line.
# route add $DNS1 gw $DEFAULT_LAND_GATEWAY
# route add $DNS2 gw $DEFAULT_LAND_GATEWAY
GRE packets should always go via land default gateway.
# route add $SAT_ISP_GRE_IP gw $DEFAULT_LAND_GATEWAY
It is assumed that $DEFAULT_LAND_GATEWAY is default gateway given by the land IS
P, $DNSx are your DNS servers provided by the land ISP and $SAT_ISP_GRE_IP is re
mote IP of GRE tunnel of the satellite ISP.
Changes of default route will be made after a tunnel interface is created.
2. Make GRE tunnel and setup tunnel interface
# apk_add iproute2
# modprobe ip_gre
# modprobe tun
# ip tunnel add tun0 mode gre local $MY_STATIC_IP remote $SAT_ISP_GRE_IP ttl 2
50
# ifconfig tun0 $LOCAL_TUN_IP pointopoint $REMOTE_TUN_IP up
Parameters of a tunnel such as $SAT_ISP_GRE_IP, $LOCAL_TUN_IP, $REMOTE_TUN_IP ar
e provided by the satellite ISP.
Now make new default route that goes via tunnel interface. So most requests will
go via GRE tunnel to satellite ISP with source IP as $LOCAL_TUN_IP. Answers exp
ected via dvb interface for destination IP as $LOCAL_TUN_IP.
# route del default
# route add default dev tun0
3. Test satellite internet connectivity
# ping wiki.alpinelinux.org
# tcpdump -n -i tun0
# tcpdump -n -i dvb0_0 host $LOCAL_TUN_IP
Sharing Satellite Internet Connection
It is assumed that we need to share the satellite internet with clients in a loc
al network that already is connected via second Ethernet interface to satellite
internet machine. This requires enabling IP forwarding, set up simple SNAT masqu
erading and traffic filtering rules. The easiest way is to use Shorewall for tha
t purpose.
1. Install shorewall
# apk_add shorewall
2. Set up shorewall.conf
IP_FORWARDING=yes
ROUTE_FILTER=No
CLAMPMSS=Yes # See RFC2923
3. Set up zones
inet ipv4
loc ipv4
tun ipv4
dvb ipv4
4. Set up interfaces
loc eth1 detect routefilter
inet eth0 detect norfc1918,routefilter
tun tun0 - norfc1918,routefilter
dvb dvb0_0 -
5. Set up policy
loc all REJECT info
dvb all REJECT info
all all DROP info
6. Set up SNAT masquerading in masq
tun0 eth1
7. Set up params
#This IP address are provided by the satellite ISP
SAT_ISP_GRE_IP=
LOCAL_TUN_IP=
7. Set up rules
SECTION ESTABLISHED
REJECT dvb fw:!$LOCAL_TUN_IP
SECTION RELATED
REJECT dvb fw:!$LOCAL_TUN_IP
SECTION NEW
DNS/ACCEPT fw inet
Ping/ACCEPT fw inet
#Allow Web/FTP queries via GRE tunnel to ISP
# Answers come as RELATED/ESTABLISHED traffic via DVB
Web/ACCEPT fw tun
Web/ACCEPT loc tun
FTP/ACCEPT fw tun
FTP/ACCEPT loc tun
Ping/ACCEPT fw tun
Ping/ACCEPT pr tun
8. Set up tunnels
gre inet $SAT_ISP_GRE_IP
Conclusion
This document reviewed just basic ideas how to setup and share satellite interne
t connection. Further releases of Alpine Linux will include start up and configu
ration scripts (see Mailing Lists). Note, that more advanced traffic routing is
beyond of scope of this document.
Another advanced topic that is beyond of scope is how to use remote proxy/VPN se
rvices to protect/encrypt your Satellite traffic against grabbers. This configur
ation may protect HTTP/POP3 and other types of data against unauthorized grabbin
g with attempts to sniff personal mail, electronic addresses and other informati
on.
More information
Satellite Dish
Ku-band
LinuxTV Wiki
Satellite HOW-TO
IP Tunnelling HOW-TO
Satellite Parameters
SES SIRIUS
Shorewall
Linux Advanced Routing & Traffic Control HOWTO
################################################################################
########################################
### dvbmon #####################################################################
########################################
################################################################################
########################################
/* femon -- monitor frontend status
* # gcc dvbmon.c -o dvbmon
* # cp dvbmon /usr/local/dvb
* Copyright (C) 2003 convergence GmbH
* Johannes Stezenbach <js@convergence.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/poll.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
#include <linux/dvb/frontend.h>
#ifndef TRUE
#define TRUE (1==1)
#endif
#ifndef FALSE
#define FALSE (1==0)
#endif

#define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d"


static char *usage_str =
"\nusage: femon [options]\n"
" -a number : use given adapter (default 0)\n"
" -f number : use given frontend (default 0)\n\n";

static void usage(void)


{
fprintf(stderr, usage_str);
exit(1);
}

static
int check_frontend (int fe_fd)
{
fe_status_t status;
uint16_t snr, signal;
uint32_t ber, uncorrected_blocks;
do {
ioctl(fe_fd, FE_READ_STATUS, &status);
ioctl(fe_fd, FE_READ_SIGNAL_STRENGTH, &signal);
ioctl(fe_fd, FE_READ_SNR, &snr);
ioctl(fe_fd, FE_READ_BER, &ber);
ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks);
// printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ",
// status, signal, snr, ber, uncorrected_blocks);
if (!(status & FE_HAS_LOCK))
printf("No Signal");
else
{
printf ("signal = %d%% , ",signal*100/65535);
printf ("snr = %d%% ",snr*100/65535);
}
printf("\n");
usleep(1000000);
} while (1);
return 0;
}

static
int do_mon(unsigned int adapter, unsigned int frontend)
{
char fedev[128];
int fefd;
int result;
struct dvb_frontend_info fe_info;
snprintf(fedev, sizeof(fedev), FRONTENDDEVICE, adapter, frontend);
// printf("using '%s'\n", fedev);
if ((fefd = open(fedev, O_RDONLY | O_NONBLOCK)) < 0) {
perror("opening frontend failed");
return FALSE;
}
result = ioctl(fefd, FE_GET_INFO, &fe_info);
if (result < 0) {
perror("ioctl FE_GET_INFO failed");
close(fefd);
return FALSE;
}
// printf("FE: %s (%s)\n", fe_info.name, fe_info.type == FE_QPSK ? "SAT" :
// fe_info.type == FE_QAM ? "CABLE": "TERRESTRIAL");
check_frontend (fefd);
close(fefd);
return result;
}
int main(int argc, char *argv[])
{
unsigned int adapter = 0, frontend = 0;
int opt;
while ((opt = getopt(argc, argv, "hlrn:a:f:d:")) != -1) {
switch (opt)
{
case '?':
case 'h':
default:
usage();
case 'a':
adapter = strtoul(optarg, NULL, 0);
break;
case 'f':
frontend = strtoul(optarg, NULL, 0);
}
}
do_mon(adapter, frontend);
return FALSE;
}

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
#Nilesat initial-tuning-data for dvb-s
#Nilesat 101,102,AB4 353.0E (7.0W) info service transponder
#freq pol sr fec
echo "
S 10795000 V 27500000 3/4
S 10872000 V 27500000 3/4
S 10910000 V 27500000 3/4
S 10930000 H 27500000 3/4
S 10747000 V 27500000 3/4
S 11766000 H 27500000 3/4
S 11785000 V 27500000 3/4
S 11803000 H 27500000 3/4
S 11823000 V 27500000 3/4
S 11843000 H 27500000 3/4
S 11861000 V 27500000 3/4
S 11881000 H 27500000 3/4
S 11900000 V 27500000 3/4
S 11919000 H 27500000 3/4
S 11938000 V 27500000 3/4
S 11957000 H 27500000 3/4
S 11977000 V 27500000 3/4
S 11996000 H 27500000 3/4
S 12015000 V 27500000 3/4
S 12034000 H 27500000 3/4
S 12053000 V 27500000 3/4
S 12073000 H 27500000 3/4
S 12130000 V 27500000 3/4
S 12149000 H 27500000 3/4
S 12207000 V 27500000 3/4
S 12226000 H 27500000 3/4
S 12284000 V 27500000 3/4
S 12301000 H 27500000 3/4
S 12341000 V 27500000 3/4
S 12360000 H 27500000 3/4
S 12400000 H 27500000 3/4
" > /root/dvb/linuxtv-dvb-apps-1.1.1/util/scan/dvb-s/Nilesat
/root/dvb/linuxtv-dvb-apps-1.1.1/util/scan/scan /root/dvb/linuxtv-dvb-apps-1.1.1
/util/scan/dvb-s/Nilesat | tee /root/.szap/channels.conf
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/szap/szap -q | grep MBC
216 MBC+ Drama
283 MBC1
284 MBC4
285 MBC2
286 MBC3
291 MBC Action
293 MBC MAX
495 MBC Persia
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/szap/szap -n 285
reading channels from file '/root/.szap/channels.conf'
zapping to 285 'MBC2':
sat 0, frequency = 11938 MHz V, symbolrate 27500000, vpid = 0x0fc9, apid = 0x0fc
a
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
status 00 | signal be65 | snr 7767 | ber 00000022 | unc 00000000 |
status 1f | signal b7e1 | snr beb3 | ber 00000ab7 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b8f4 | snr be41 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b67e | snr bdf6 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b766 | snr be89 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b727 | snr be26 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b82f | snr beaa | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b908 | snr bd8d | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b8a4 | snr bd96 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b702 | snr bdba | ber 00000000 | unc 00000000 | FE_HAS_LOCK
## Monitor (if szap in background)
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/szap/femon
using '/dev/dvb/adapter0/frontend0'
FE: ST STV0299 DVB-S (SAT)
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 01 | signal 43f0 | snr 0a38 | ber 0000112c | unc 00000000 |
status 1f | signal b5ef | snr be83 | ber 0000023e | unc 00000000 | FE_HAS_LOCK
status 1f | signal b739 | snr bf37 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b88d | snr be8f | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b617 | snr be71 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b771 | snr bee6 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b7d7 | snr bc64 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b78a | snr bdd2 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal ba41 | snr bf8e | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b863 | snr bd5a | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b802 | snr bd90 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b85e | snr bdc6 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b711 | snr bd45 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b7e3 | snr bd8a | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b7b7 | snr bdc9 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b7a2 | snr bd1e | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b6fb | snr be3e | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b664 | snr bdc6 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b764 | snr bdb1 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal b7c7 | snr bd99 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
status 03 | signal 9f5e | snr 0000 | ber 00008080 | unc 00000000 |
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
# grep Tunes channels.conf.Nilesat
Melody Tunes:10795:v:0:27500:3604:3605:3602
# /root/dvb/dvbtune-0.5/dvbtune -tone 0 -f 1079500 -p v -s 27500 -v 3604 -a 3605
-m
Using DVB card "ST STV0299 DVB-S"
tuning DVB-S to L-Band:-1210435496, Pol:V Srate=27500000, 22kHz=off
polling....
Getting frontend event
FE_STATUS:
polling....
Getting frontend event
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC
Bit error rate: 28360
Signal strength: 46578
SNR: 48411
FE_STATUS: FE_HAS_SIGNAL FE_HAS_LOCK FE_HAS_CARRIER FE_HAS_VITERBI FE_HAS_SYNC
A/V/TT Filters set
Signal=46170, Verror=0, SNR=48417dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46535, Verror=0, SNR=48303dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46325, Verror=0, SNR=48321dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46812, Verror=0, SNR=48240dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46091, Verror=0, SNR=48456dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46286, Verror=0, SNR=48393dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46078, Verror=0, SNR=48246dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46755, Verror=0, SNR=48174dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46476, Verror=0, SNR=48150dB, BlockErrors=0, (S|L|C|V|SY|)
Signal=46185, Verror=0, SNR=48249dB, BlockErrors=0, (S|L|C|V|SY|)
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
# grep Tunes channels.conf.Nilesat
Melody Tunes:10795:v:0:27500:3604:3605:3602
# /root/dvb/dvbstream-0.5/dvbstream -f 10795 -p v -s 27500 -v 3604 -a 3605 -o |
mplayer -framedrop -zoom -fs -cache 1024 -
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################

PID=0x511
DEV_NAME=dvb0_0
IP_ADDR=10.1.1.1
./dvbnet -p $PID
/sbin/ifconfig $DEV_NAME $IP_ADDR
MAC_ADDR=00:01:02:03:04:05
/sbin/ifconfig $DEV_NAME hw ether $MAC_ADDR
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet -p 0x0fc9
DVB Network Interface Manager
Version 1.1.0-TVF (Build Mon Feb 09 11:07:57 PM 2009)
Copyright (C) 2003, TV Files S.p.A
Device: /dev/dvb/adapter0/net0
Status: device dvb0_1 for pid 4041 created successfully.
01:01:55 - Tue Feb 10
root@Slack:~/dvb # /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbnet/dvbnet -l
DVB Network Interface Manager
Version 1.1.0-TVF (Build Mon Feb 09 11:07:57 PM 2009)
Copyright (C) 2003, TV Files S.p.A
Device: /dev/dvb/adapter0/net0
Query DVB network interfaces:
-----------------------------
Found device 0: interface dvb0_0, listening on PID 1297
Found device 1: interface dvb0_1, listening on PID 4041
-----------------------------
Found 2 interface(s).
# /root/dvb/linuxtv-dvb-apps-1.1.1/util/dvbtraffic/dvbtraffic
# tcpdump -i dvb0_0
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/InternetDVB

HOWTO
This information about HOWTO setup DVB PCI Card for internet (tested with b2c2 c
hipset) 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. F
or detail instructions howto install in server mode see http://www.howtoforge.co
m/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 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. 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 pro
vider (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 40
04 (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 scri
pt init_dvb or get it from init_dvb and put it on /etc/init.d

#!/bin/sh
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#
# 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/cha
nnels.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 $BROADCAS
T up
else
ifconfig $DEV_NAME $IP_ADDR netmask $NETMASK broadcast $BROADCAS
T 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

don't forget to make it executable


chmod 755 /etc/init.d/init_dvb
link it to /usr/local/sbin
cd /etc/init.d/init_dvb
ln init_dvb /usr/local/sbin
make it stay on rc.d then reboot
update-rc.d init_dvb defaults
reboot

Links
* linux dvb application http://linuxtv.org
* patch & script http://software.prima-info.com
* my dvb pci card http://www.technisat.com
* Installation tutorial perfect_setup_ubuntu_5.10

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/Testing_your_DVB_device
Testing your DVB device
From LinuxTVWiki
Jump to: navigation, search
This page provides a few suggestions on how to test that a properly installed DV
B device 1 is functioning properly. The command line steps described are also in
dispensable for quick setup and no frills viewing with DVB hardware under Linux.
Note: 1 In other words, this article assumes that you have already both:
* physically installed the device into, or attached it to, your system (
refer to the manufacturer's instructions for such details) and
* installed the drivers for your hardware and have the proper modules lo
aded (see "How to install DVB device drivers" for such details)
Having completed such tasks, you should at least now have a /dev/dvb/adapter
0/ directory. (If you have additional DVB devices installed in your system, they
will be assigned an increased adapter number accordingly).
Contents
[hide]
* 1 Using dvb-apps
* 2 Using dvbsnoop
* 3 Save a TV program to your hard drive
* 4 Next steps - More feature rich viewing software
Using dvb-apps
1. Obtain the dvb-apps package
See the LinuxTV dvb-apps article for details on how to obtain the package. The d
vb-apps package contains several useful tools.
2. Scan for the channels you can receive
Refer to the (dvb)scan article for details of how to perform this step. Once fam
iliar with the content of that article, you will recognize that this step can be
summarized (in general form) by:
mkdir ~/.{a,c,s,t}zap
(dvb)scan /path_to_the_initial_scan_file > ~/.{a,c,s,t}zap/channels.conf
3. Tune a frequncy and program
Refer to the zap article for details of how to perform this step. Once familiar
with the content of that article, you will recognize that this step can be summa
rized (in general form) by:
$ /usr/bin/{a,c,s,t}zap -r -c ~/.{a,c,s,t}zap/channels.conf "channel name"
where, respective to the type of transmission, azap is used for ATSC, czap for D
VB-C, szap for DVB-S and tzap for DVB-T.
Note: If (dvb)scan was unable to correctly resolve the audio or video PID values
for a channel in the previous step, a manual adjustment to the channels.conf fi
le will be necessary to correct any inaccurately written PID(s) information. Suc
h occurrences tend to be rare, but nonetheless, they do happen -- often, one onl
y becomes aware of a problem with the PID values after unsuccessful attempts to
tune a particular channel. The correct values may be determined using using dvbt
raffic (see step 4.c) below). Another method for finding correct PID values for
a channel is also outlined in the section entitled "A word about dvbscan and aud
io streams".

4. After you've tuned a frequency and program


a) You could now start up your simple TV watching application and decode the str
eam you have tuned.
For example, while keeping {a,c,s,t}zap running in the first console shell, open
up another console and run
mplayer /dev/dvb/adapter0/dvr0 <options>
If you have more than one dvb device installed in your system, then you will hav
e to pass the correct adaptor number. See the mplayer man page (i.e. in a consol
e run "man mplayer") for a lengthy list of options.

b) Or, you could now start up a datastreamer


c) Or, alternatively, you may want to see some statistics of what's coming in fo
r each channel and PID. Example:
$ /usr/bin/dvbtraffic
dvbtraffic which will access the /dev/dvb/adapter0/dvr0 device. An example of ou
tput from dvbtraffic is:
0000 24 p/s 4 kb/s 37 kbit
0010 20 p/s 3 kb/s 31 kbit
0011 20 p/s 3 kb/s 31 kbit
0012 70 p/s 12 kb/s 106 kbit
0015 1 p/s 0 kb/s 2 kbit
0080 26 p/s 4 kb/s 40 kbit
0082 26 p/s 4 kb/s 40 kbit
0087 25 p/s 4 kb/s 38 kbit
0100 25 p/s 4 kb/s 38 kbit
0101 25 p/s 4 kb/s 38 kbit
0102 24 p/s 4 kb/s 37 kbit
0200 8567 p/s 1572 kb/s 12885 kbit
0201 4708 p/s 864 kb/s 7081 kbit
0205 926 p/s 170 kb/s 1392 kbit
0240 49 p/s 8 kb/s 75 kbit
0241 49 p/s 8 kb/s 75 kbit
028b 261 p/s 47 kb/s 393 kbit
0294 174 p/s 31 kb/s 262 kbit
0295 130 p/s 23 kb/s 196 kbit
02bc 75 p/s 13 kb/s 113 kbit
1fff 87 p/s 15 kb/s 131 kbit
2000 15329 p/s 2814 kb/s 23055 kbit
-PID--FREQ-----BANDWIDTH-BANDWIDTH-
This output is for a HDTV channel. In this example PID 200 is video 28b is audio
. These values are in hex and need conversion to decimal(512,651) for use channe
l.conf.
This is the record in channel.conf using the PID values from dvbtraffic:
Nine High Def Gold Coast:746625000:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_3_4:FEC_3_
4:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_16:HIERARCHY_NONE:512:651:1138
And finally
dvbdate
Using dvbsnoop
If the testing steps in the dvb-apps section above work fine, you can jump over
this section here. On the other hand, dvbsnoop is a small, down-to-earth utility
that is very handy for debugging and also seeing what is occuring with a dvb de
vice (i.e. tuning works? data coming in? signal strong enough?).
1. Obtain the dvbsnoop package
See the dvbsnoop article for details on how to obtain the package.
2. Testing with dvbsnoop
Try things like
dvbsnoop -help
dvbsnoop -s pidscan
This will give out a lot of numbers, but if you understand the system of DVB you
should see if they make sense. Go for one of the PIDs (choose a right one which
is a bit difficult as you don't know what they stand for unless you used the sc
an line above) and try:
dvbsnoop -s bandwidth <PID>
dvbsnoop <PID>
The latter will spit out a lot of hexdumps - at least you receive something ;-)
Save a TV program to your hard drive
The handy thing about digital TV is, it comes in as a digital stream that you ca
n save right away to your harddisk without any changes necessary to it. Therefor
e, hardly any CPU resources are needed -- just a lot of HD space (few GB per hou
r as the stream is MPEG-2 which is not as compressed as, for example, DivX/MPEG-
4; it's even more as mostly one transport stream contains multiple PIDs). There
are several ways to do this. For example:
a) Using the combination of {a,c,s,t}zap and cat'ing the logical dvr device to s
ave a program stream to disk
If you have a channel tuned with {a,c,s,t}zap (and note that you MUST also be us
ing the -r parameter to set up the logical dvr device in order for the following
to work; see Zap for detail), open up another shell console and run (as root us
er):
cat /dev/dvb/adapter0/dvr0 > <filename>
The result is that particular program stream will be written to disk, and you sh
ould be able to play it back at any later time with your favourite media player.
b) Using the combination of {a,c,s,t}zap and test_dvr to save an entire transpor
t stream to disk

c) Saving to disk with dvbstream


dvbstream is a useful program that, amongst other things, can save a DVB stream
to disk. Method 1: First tune into a channel, as described above in the zapping
step, and then next have dvbstream save a particular stream to file. For example
:
tzap 'BBC ONE'
dvbstream 600 601 -o > bbc1.mpeg
The values "600 and 601" are, respectively, the video and audio PIDs for the cha
nnel BBC ONE, as derived from the channels.conf file. So this is why it's import
ant that you have your personal channels.conf file with all the PIDs so you can
look them up.
Method 2: Alternatively, instead of using a combination of *zap and dvbstream, y
ou can use dvbstream alone provided you pass which frequency to tune and list th
e correct PIDs. For example:
dvbstream -f 578000 600 601 -o >bbc1.mpeg
Wait a few seconds and then press Ctrl+C to stop. You should then be able to ope
n/playback the recorded file with any of your favourite media players (like Mpla
yer, (g)xine, noatune, etc. etc ) provided you have the correct decoders install
ed on your system (which, in general regards to DVB transmissions, are usually g
oing to be MPEG-2, but can now also be MPEG-4).
If the file is rather small, e.g. smaller than 1 MB after a minute of recording,
then you can't receive this TV channel - maybe the reception is bad (too weak a
ntenna signal) - or maybe your card's frequency is not tuned for the right sende
r? Watch out, some PIDs come up a few times (but for different frequencies).
This might not be what you wanna do every day (unless you only watch BBC1 or you
can easily memorise all your channels with their two PIDs) - but it's very fast
and easy to do these steps for testing purposes.
Next steps - More feature rich viewing software
It is not the intention of this page to provide a detailed description of the us
e of DVB hardware with more complex Linux viewing software applications. Suffice
it to say that you will have some choice. For example:
* for light TV watching with a DVB device under Linux, MPlayer, Xine, Kaffei
ne, Klear and a few others are often selected.
* alternatively, for "Media Center" type applications, the usual first suspe
cts are Freevo, MythTV, and VDR, but there are others as well
* you could use the streaming facilities of dvbstream and then watch the MPE
G-2 stream (even possible on a different computer) with programs like Xine, MPla
yer etc.
For some further inspiration on what's possible with more advanced software usag
e see:
* the Commented software list and
* Example setups

(note: you'll need to install the VDR Software Decoder Plugin if you want to use
VDR for watching with a software decoding card).
* Digital Video Broadcasting ? A practical guide by Hugo Mills [1]

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://www.linuxtv.org/wiki/index.php/Dvbsnoop
Dvbsnoop
From LinuxTVWiki
Jump to: navigation, search
The correct title of this article is dvbsnoop. The initial letter is shown c
apitalized due to technical restrictions.
dvbsnoop is a commandline DVB / MPEG stream analyzer utility, which is capable o
f debugging, dumping or viewing the information in such streams. It is a very us
efool tool if you are in need to sniff data streams. dvbsnoop is part of the Tux
box Project and is hosted on Sourceforge (see links below)
Obtaining the dvbsnoop package
If the dvbsnoop package is maintained in a repository available for your "distro
", then you can obtain it with your package manager. For example:
* To install it on a debian system:
# apt-get install dvbsnoop
* Using Fedora:
Apparently, dvbsnoop isn't in any of the usual Fedora repositories a
t this time (Feb 2007).
In any regard, dvbsnoop is available for direct download from the Sourceforge pr
oject site using steps similar to the following:.
Note: These steps are written in terms of the dvbsnoop version 1.40 release. You
r download URL (and the extracted directory dvbsnoop-bin-i386-1.4.00-api3) will
change as succeeding versions of dvbsnoop are published on Sourceforge.
$ mkdir ~/dvbsnoop
$ cd dvbsnoop
$ wget http://downloads.sourceforge.net/dvbsnoop/dvbsnoop-bin-i386-1.4.00-api3
.tar.gz?modtime=1124046233&big_mirror=0
$ tar xvzf *.tar.gz
$ ls
$ cd dvbsnoop-bin-i386-1.4.00-api3
$ ls
$ cd bin-i386-api3
Note: You may wish to copy the binary dvbsnoop to a much more convenient locatio
n, rather than leaving it deeply buried within the directory path ~/dvbsnoop/dvb
snoop-bin-i386-1.4.00-api3/bin-i386-api3
Usage
For dvbsnoop's options run
$ dvbsnoop -help
A typical usage might entail something like:
$ dvbsnoop -s pidscan
External Links
* dvbsnoop Homepage
o dvbsnoop feature list
* TuxBox Project Homepage
Retrieved from "http://www.linuxtv.org/wiki/index.php/Dvbsnoop"
Category: Software

################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
http://wiki.alpinelinux.org/w/index.php?title=Setting_up_Satellite_Internet_Conn
ection
Setting up Satellite Internet Connection
From Alpine Linux
Jump to: navigation, search
Contents
[hide]
* 1 Satellite Internet Connection HOW-TO
o 1.1 Introduction
o 1.2 How does it work?
o 1.3 Technical Information
+ 1.3.1 Antenna / Converter
+ 1.3.2 DVB-S Receiver Card
o 1.4 DVB Setup
o 1.5 Authentication with ISP
o 1.6 Sharing Satellite Internet Connection
o 1.7 Conclusion
o 1.8 More information
Satellite Internet Connection HOW-TO
Introduction
This document briefly explains Satellite technology, how it works, what do you n
eed, configuration and how to sharing it between several clients. So the main fo
cus is the Internet connection, satellite TV is not reviewed.
How does it work?
So first we make the request (using land Internet connection) to the Sat-Server
usually via a tunnel, after it will retrieve out info from Internet and it will
send it to Satellite; in the end we would receive data from the it to our home u
sing a parabolic antenna and a Sat Card.
Satellite works very well with protocols, which have a little request data and a
much bigger answer size. Although, a big time of answer is the biggest problem
of satellite connection that may prevent using interactive services such as VoIP
. The delay of answer may be considered basing on that a typical Sat distance is
like 36.000 km, so an average overall delay time is 300-400 ms.
To install the little satellite system we need:
* DVB-S Card
* Parabolic Antenna (Satellite Dish)
* LNB Digital Converter
Technical Information
A satellite link as a classical Wireless link is very different from Wired link.
It may cause some additional problems to solve, such as reachability, privacy p
roblems and so on. Also there could be weather problems, particularly in snow or
rain conditions.
Antenna / Converter
A parabolic antenna gives a very high gain in RX. A frequency that is being rece
ived from the satellite transponder is from 11GHz up to 12.7 GHz. The Digital Co
nverter transforms it to 1-2 GHz and send signal to the DVB-S card receiver thro
ugh the coax cable up to 30-40m. This documents assumes that your parabolic ante
nna is properly mounted and calibrated as well as proper converter (usually Ku-b
and) is used.
DVB-S Receiver Card
DVB-S card receives analog signals via coax cable and converts it to digital sig
nals pretty like Ethernet card, after that the OS transforms it to a TCP/IP pack
ets.
DVB Setup
1. Install DVB-S Card and check if system recognized it
Please note, that in most cases you need PCI version 2.1 or higher (check DVB ca
rd specifications). In practice it is Pentium-III or later systems.
# lspci | grep -i "multimedia controller"
2. Make sure that kernel modules are loaded
You have to use Alpine 1.7.10 release or higher that should load appropriate ker
nel modules for DVB card on startup. You may check if DVB devices are installed.
# ls -la /dev/dvb*
3. Install LinuxTV Applications
# apk_add linuxtv-dvb-apps
4. Create and edit file channels.conf
This file contains settings for each Satellite you are using. For example the sa
tellite Sirius-4 Nordic Beam has the following parameters: Freq - 12322Mhz, Pola
rization - vertical, Symbol Rate - 27.654711Ms/s, FEC -7/8.
Anyway, all parameters you have to receive from ISP or find in the Internet. Ple
ase look at Satellite Parameters and SES SIRIUS.
The following example is for "Sirius-4 Nordic Beam":
# echo "Sirius4-Nord:12322:v:0:27500:0:0:0" >> /etc/channels.conf
5. Tune DVB Receiver
Check configured channels:
# szap -c /etc/channels.conf -q
Tune the channel number 001:
# szap -c /etc/channels.conf -n 1
In some cases you may need to run this command permanently in background because
of a bug in kernel modules for some dvb cards.
Option A:
# szap -c /etc/channels.conf -n 1 > /dev/null 2>&1 &
Option B:
# start-stop-daemon --start --background --exec /usr/bin/szap -- -c /etc/ch
annels.conf -n 1
6. Set up DVB network interface
Your ISP provides you the PID, which is used for select a transmission between m
any signal from same frequency.
# dvbnet -a 0 -p $PID
# ifconfig dvb0_0 hw ether $MAC
# ifconfig dvb0_0 $IP netmask 255.255.255.255 up
Here $IP is any IP address, which does not match with any other adrres in your n
etwork. The $MAC you specify here is usually the MAC address of your DVB card, i
n some cases ISP calculates MAC address for you. In any case ISP sends data only
for registered MAC addresses.
Due to nature of satellite connection, the dvb interface receives packets, which
have been originated from other sources, actually ether from land internet conn
ection interface or, in most cases, from virtual tunnel device. So in order to a
llow receiving such packets the source validation should be disabled on dvb0_0 i
nterface.
# echo "0" > /proc/sys/net/ipv4/conf/dvb0_0/rp_filter
Another way to achieve that is to allow the shorewall to control that using ROUT
E_FILTER and routefilter parameters.
7. Test if satellite interface is receiving data
You should see many packets for other clients of your ISP.
# apk_add tcpdump
# tcpdump -n -i dvb0_0
Authentication with ISP
Before you receive your data via satellite your ISP should authenticate you as t
heir registered client. There are several common techniques could be used:
* Some ISPs use the "Proxy Authentication", when you used their proxy, you a
lso need to give login and password to continue the request. Once done, the ISP
use your IP address to calculate your MAC address, to which send the answer.
* Some other ISPs require you make a VPN connection (using your login and pa
ssword) first, then they will control your registration account (where they retr
ieve your MAC address) and will send data to your card (your MAC address).
* If you have static public IP, perhaps, the most convenient way is when ISP
s suggest making a GRE/IPIP tunnel, which is used to sent authenticated requests
to ISP satellite server. Consequently ISP sends back answers via satellite you
are connected to.
Here is an example of setting up GRE tunnel with a ISP:
1. Make static routes
All queries to DNS servers of your land ISP should go via land line.
# route add $DNS1 gw $DEFAULT_LAND_GATEWAY
# route add $DNS2 gw $DEFAULT_LAND_GATEWAY
GRE packets should always go via land default gateway.
# route add $SAT_ISP_GRE_IP gw $DEFAULT_LAND_GATEWAY
It is assumed that $DEFAULT_LAND_GATEWAY is default gateway given by the land IS
P, $DNSx are your DNS servers provided by the land ISP and $SAT_ISP_GRE_IP is re
mote IP of GRE tunnel of the satellite ISP.
Changes of default route will be made after a tunnel interface is created.
2. Make GRE tunnel and setup tunnel interface
# apk_add iproute2
# modprobe ip_gre
# modprobe tun
# ip tunnel add tun0 mode gre local $MY_STATIC_IP remote $SAT_ISP_GRE_IP ttl 2
50
# ifconfig tun0 $LOCAL_TUN_IP pointopoint $REMOTE_TUN_IP up
Parameters of a tunnel such as $SAT_ISP_GRE_IP, $LOCAL_TUN_IP, $REMOTE_TUN_IP ar
e provided by the satellite ISP.
Now make new default route that goes via tunnel interface. So most requests will
go via GRE tunnel to satellite ISP with source IP as $LOCAL_TUN_IP. Answers exp
ected via dvb interface for destination IP as $LOCAL_TUN_IP.
# route del default
# route add default dev tun0
3. Test satellite internet connectivity
# ping wiki.alpinelinux.org
# tcpdump -n -i tun0
# tcpdump -n -i dvb0_0 host $LOCAL_TUN_IP
Sharing Satellite Internet Connection
It is assumed that we need to share the satellite internet with clients in a loc
al network that already is connected via second Ethernet interface to satellite
internet machine. This requires enabling IP forwarding, set up simple SNAT masqu
erading and traffic filtering rules. The easiest way is to use Shorewall for tha
t purpose.
1. Install shorewall
# apk_add shorewall
2. Set up shorewall.conf
IP_FORWARDING=yes
ROUTE_FILTER=No
CLAMPMSS=Yes # See RFC2923
3. Set up zones
inet ipv4
loc ipv4
tun ipv4
dvb ipv4
4. Set up interfaces
loc eth1 detect routefilter
inet eth0 detect norfc1918,routefilter
tun tun0 - norfc1918,routefilter
dvb dvb0_0 -
5. Set up policy
loc all REJECT info
dvb all REJECT info
all all DROP info
6. Set up SNAT masquerading in masq
tun0 eth1
7. Set up params
#This IP address are provided by the satellite ISP
SAT_ISP_GRE_IP=
LOCAL_TUN_IP=
7. Set up rules
SECTION ESTABLISHED
REJECT dvb fw:!$LOCAL_TUN_IP
SECTION RELATED
REJECT dvb fw:!$LOCAL_TUN_IP
SECTION NEW
DNS/ACCEPT fw inet
Ping/ACCEPT fw inet
#Allow Web/FTP queries via GRE tunnel to ISP
# Answers come as RELATED/ESTABLISHED traffic via DVB
Web/ACCEPT fw tun
Web/ACCEPT loc tun
FTP/ACCEPT fw tun
FTP/ACCEPT loc tun
Ping/ACCEPT fw tun
Ping/ACCEPT pr tun
8. Set up tunnels
gre inet $SAT_ISP_GRE_IP
Conclusion
This document reviewed just basic ideas how to setup and share satellite interne
t connection. Further releases of Alpine Linux will include start up and configu
ration scripts (see Mailing Lists). Note, that more advanced traffic routing is
beyond of scope of this document.
Another advanced topic that is beyond of scope is how to use remote proxy/VPN se
rvices to protect/encrypt your Satellite traffic against grabbers. This configur
ation may protect HTTP/POP3 and other types of data against unauthorized grabbin
g with attempts to sniff personal mail, electronic addresses and other informati
on.
More information
Satellite Dish
Ku-band
LinuxTV Wiki
Satellite HOW-TO
IP Tunnelling HOW-TO
Satellite Parameters
SES SIRIUS
Shorewall
Linux Advanced Routing & Traffic Control HOWTO
################################################################################
########################################
################################################################################
########################################
################################################################################
########################################
Links :
http://dvbn.happysat.org/
http://gboxforum.com/
http://www.cardsharing.net/
http://www.sat-television.com/
http://www.satnet.ch/filedb/index.php?act=category&id=233
http://satellite.co.uk/
http://www.darknet.org.uk/
http://www.dream-multimedia-tv.de/index_eng.php
http://en.wikipedia.org/wiki/Dreambox
# Pejman Moghadam
# Tue May 19 17:12:51 IRDT 2009