InternetDVB
来源:互联网 发布:绿茶软件园php源码 编辑:程序博客网 时间:2024/04/30 12:28
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 seehttp://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 linuxtvpatch -p0 <linuxtv-dvb-apps-dvbnet.patchmake
if no error report copy all off them to /usr/local/bin
cp util/dvbnet/dvbnet /usr/local/bincp util/dvbtraffic/dvbtraffic /usr/local/bincp util/scan/scan /usr/local/bincp util/szap/szap /usr/local/bincp util/szap/femon /usr/local/bincp 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/.szapcd /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/.szapecho S 3680000 H 26666000 3/4 > sat.confscan -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/.szapecho 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_0IP_ADDR=169.254.255.29NETMASK=255.255.0.0BROADCAST=169.254.255.255SZAP=/usr/local/bin/szapDVBNET=/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:05MAC_ADDR= . /lib/lsb/init-functionschk=`$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" instart) 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 defaultsreboot
Links
linux dvb application http://linuxtv.org
patch & script http://software.prima-info.com
my dvb pci card http://www.technisat.com
Installation tutorial http://www.howtoforge.com/perfect_setup_ubuntu_5.10
- InternetDVB
- Android 项目(详解一)之—— 基础类BaseActivity/BaseFragment/总的Application
- 在SQL中,有各种各样的日期时间格式,保存一份 Convert Date
- 软件功能测试
- java 向量
- [Leetcode]Move Zeroes
- InternetDVB
- AndroidValidator使用
- extern "c" __declspec(dllimport) __declspec(dllexport)
- IOS中NSPredicate的用法
- python实现ftp上下传,支持断点续传。
- 10.10笔记,android通知栏兼容性,matches the given name 'android:Widget.Material.Button.Colored'.
- JQuery控制只输入数字,关闭输入法
- QQ飞车
- A9处理器代工厂商不同所带来的性能差异,苹果的官方回应