• No results found

Rtl Sdr4linux Quickstartv10 16

N/A
N/A
Protected

Academic year: 2021

Share "Rtl Sdr4linux Quickstartv10 16"

Copied!
19
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

RTL-SDR for Linux Quick Start Guide

v10.16 by Kenn Ranous

Page 3 Introduction

Page 4 Installing Drivers

Page 6 Gqrx - General Purpose Radio & Spectrum Softare

Page ! "u#ic SDR $ General Purpose Radio & Spectrum Softare Page % DS-' ircraft (rac)ing it* Dump+,%,

Page + dvanced ircraft (rac)ing it* .irtual Radar Server Page +6 Spectrum nal/sis it* 0spectrum nal/1er

Page +2 onitoring (run)ed Radio S/stems it* SDR (run) Page +% t*er interesting R(5-SDR applications

Page +% dditional Resources Page +% In "losing 

(3)

ntroduction!

7o to get an R(5-SDR dongle or)ing on a 5inux P" made 8relativel/9 quic) and eas/: (*ese instructions ere created for 5inux int and s*ould or) in an/

De#ian or ;#untu #ased distri#ution: I<ll cover t*e softare t*at I<ve found to #e complete and or)ing: =ote t*at most t*ings R(5-SDR are a or) in progress> including t*is guide: "ali#rate /our expectations to t*at of #eta softare: ;pdates sometimes #rea) t*ings and documentation isn<t ala/s accurate: I<ll #e updating t*is guide using t*e convention vont*:?ear in an attempt to )eep up it* *at or)s:

Preferred dongles *ave t*e !,( tuner> a (@" and are in a s*ielded enclosure it* *eat-sin): ;se a good qualit/ ;S' extension ca#le it* ferrite cores on #ot* ends: (r/ to position t*e dongle aa/ from t*e computer and ot*er sources of electrical noise to minimi1e interference:

P" s/stem requirements are modest: Decoding and G;I displa/s need some processing poer so opt for a dual-core or #etter "P;: =one of t*e applications *ere are *ig*l/ demanding of .ideo or 7DD: t least G' of R is #est:

Regardless of cost> an/ radio is onl/ as good as it<s antenna: Aor no I<ll Bust touc* on antennas as t*ere<s an a#undance of information on-line and in RR5

pu#lications:

•  set of (. ra##it ears is a good a/ to get started:

• Discone antennas are #road#and and or) ell for general purpose use: • utdoor (. antennas or) quite ell for scanning:

•  (urnstiles and Aolded Dipoles excel at A #roadcast reception:

• Aor DS-' a + element "oaxial "ollinear is nota#l/ superior to a discone: • Dipoles and long ires or) ell for t*e 7A #ands:

• Ground planes> C-poles> dipoles> /agis> quads and log periodic antennas can

oer superior performance *en designed for a speciEc #and:

In summar/> .7AF;7A frequencies tend to #e line-of-sig*t and can #e #loc)ed #/ some #uilding materials> especiall/ metal: 7ig*er is #etter and outdoors is #est:

(4)

nsta&&in( t#e drivers!

+: pen a terminal and conErm /ou<re in /our *ome director/: (*is is t*e

preferred convention and ill #e assumed t*roug*out t*is text: (ext *ig*lig*ted in gra/ is exactl/ *at /ou ant to t/pe at t*e command line: ?es it<s case sensitive:

: ;pdate /our distri#ution:

sudo apt-get update

3: Install t*e tools needed to retrieve 8git9> compile 8cma)e9 and #uild 8#uild-essential9:

sudo apt-get install git sudo apt-get install cmake

sudo apt-get install build-essential

4: Install li#us#-+:,-,-dev *ic* is a " li#rar/ t*at provides generic access to ;S' devices:

sudo apt-get install libusb-1.0-0-dev

: Retrieve> #uild and compile t*e R(5!3; smocom drivers from t*e source:

git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr/

mkdir build cd build

cmake ../ -DINSTA!"D#$!%"#S&'N make

sudo make install sudo ldcon(ig

(5)

6: 'lac)list t*e default driver t*at is automaticall/ loaded for using t*e dongle as a (. device as it doesn<t or) for SDR purposes and clas*es it* t*e ne

smocom drivers e Bust installed:

: pen /our FetcFmodpro#e:d folder as an administrator: ': "reate a ne Ele <#lac)list-rtl:conf< and add t*is one lineH

blacklist dvb!usb!rtl)*++u

": Save t*e Ele> close t*e editor and restart t*e mac*ine:

2: (est t*at t*e dongle is or)ing #/ opening a terminal and t/pingH

rtl!test -t

Don<t orr/ a#out messages li)e P55 not loc)ed or 4,,, tuner not found or t*at it sa/s R!,( and not R!,(: If /ou<re seeing t*e a#ove t*en /our drivers and dongle are or)ing: ?ou<re no read/ to install some applications:

(6)

G)rx Genera& *ur$ose Radio+S$ectru, na&yer!

 (*is can #e found in t*e S/naptic Pac)age anager: (o get t*e latest version> visit *ttpHFFgqrx:d) for instructions on *o to add t*eir PP<s 8Personal Pac)age

rc*ive9 to /our s/stem and install: (*e/<ve made it prett/ eas/:

n Erst startup /ou<ll see t*e "onEgure IF devices #ox: Default values are usuall/ correct> Bust ma)e sure /our R(5 dongle is selected t*en *it J:

"lic) t*e Poer 'utton in t*e upper left corner to start receiving: Input t*e desired frequenc/ and under ode select t*e appropriate demodulator: 8ie =arro A for = Keat*er Radio9:

7over over eac* item to see *at it does: (oggle *ardare G" and adBust 5= gain to maximi1e t*e signal #ut not so *ig* t*at static or distortion ta)es over: =ote t*at /ou<ll need to alter gain settings as /ou tune around t*e spectrum: I End setting gain and G" so t*e noise Loor is around -6,d# to -2,d# or)s ell:

 ?ou can also #oo)mar) favorite frequencies and organi1e t*em #/ categor/: If t*e audio sounds c*opp/> tr/ reducing t*e sample rate: lso c*ec) under t*e AA( Settings ta# and reduce t*e AA( si1e and Rate fps: ?ou ma/ also need to adBust /our PP as descri#ed next:

/re)uency orrection %it# GQR!

 (*e R(5-SDR dongles are mass-produced devices designed for (. *ere precise frequenc/ accurac/ is not important: Aor use it* narro-#and signals e need a greater degree of accurac/: 5ater model dongles *ave a more accurate (@" #ut older ones ma/ #e o #/ enoug* to compromise reception:

Aortunatel/> t*ere<s an eas/ Ex: ost applications *ave provisions to adBust t*e PP: nce /ou<ve determined /our PP error correction factor /ou can use t*at value in most softare: s long as t*e dongle doesn<t over*eat> t*is value s*ould remain reasona#l/ constant: (o determine /our dongles PP> launc* G0R@ and tune /our SDR to one of t*e =ational Keat*er Service Radio frequencies as listed:

162.400 162.425 162.450 162.475 162.500 162.525 162.550

Moom in on t*e signal and adBust /our PP until t*e tuning line is centered on t*e signal: See t*e next to images for details:

(7)

Uncorrected PPM error.

(8)

ubicSDR Genera& *ur$ose Radio+S$ectru, na&yer!

 #it more visuall/ oriented t*an Gqrx> I End t*at "u#icSDR delivers smoot*er audio: (*e latest v,::, is availa#le for donload from *ttpHFFcu#icsdr:com *ere t*ere<s instructions on *o to #uild it> get it via Latpa) or /ou can Bust donload t*e :ppImage Ele: 5ocate it in /our Donloads folder and Rig*t-clic) N Properties N Permissions and tic) <llo executing Ele as a program< t*en dou#le-clic) to run: 8/es> it<s t*at simple> Bust one +3 meg Ele9 n startup> select <Generic R(5!3;< and clic) <Start<:

7over over eac* section for info> it<s prett/ self explanator/: nter a frequenc/ directl/ or clic) on one of t*e streams in t*e loer aterfall panel to start

listening: If t*e audio sounds c*opp/> clic) <Input 'andidt*< on t* top menu and select a loer num#er: (*e :ppImage Ele can #e placed an/*ere /ou li)e and sessions can #e saved as :xml Eles:

(9)

DS-2 ircraft Trackin( %it# Du,$1030

Dump+,%, is a good DS-' decoder: riginall/ created #/ antire1> several

developers 8malcolro##> muta#ilit/ and tedsluis9 *ave modiEed t*e original code to ma)e improvements: ac* one is called for): Install as man/ as /ou li)e> Bust ma)e sure eac* is in it<s on unique folder:

I<ll focus on t*e (ed Sluis for) as it seems to detect more aircraft and provides more information: It also *as interesting features suc* as range & altitude color codes and ten map & c*art st/les:

*ttpHFFgit*u#:comFtedsluis pen a terminal and t/peH

git clone git://git,ub.com/tedsluis/dump100.git dump100 cd dump100

make

./dump100 --interactive --net --enable-agc

Kit*in a fe moments /ou s*ould see a list of aircraft in t*e terminal indo: pen a e# #roser and in t*e address #ar enter local,ost:*0*0 and /ou s*ould see a map it* aircraft: ?ou mig*t need to *it t*e #roser refres* #utton once or tice to get it going:

 (o launc* dump+,%, it*out needing to remem#er pat*s and optimal Lags> create a text Ele named d100 in /our F*omeFusernameF#in folder: 8=ote t*ere<s no extension9 nter t*ese lines> su#stituting /our on lat> lon and PP values:

/bin/bas,

A bas, script to start Ted Sluis dump100 it, optimal (lags cd /,ome/2ourname/dump100

./dump100 --interactive --net --enable-agc --gain -10 --ppm 1) --p,ase-en,ance --lat 33.0 --lon -111.0 --oversample --dc(ilter

=oteH ma)e sure t*ose last to lines are all on one line in t*e editor: Save as d+,%, t*en Rig*t-clic) t*e script Ele> clic) <Permission< and tic) <llo executing Ele as a program<: t t*e terminal Bust d100 to start. #as2

(10)
(11)
(12)

dvanced ircraft Trackin( %it# 4irtua& Radar Server

K*ile Dump+,%, is a good DS-' decoder> t*ere<s anot*er c*oice *en it comes to e# serving & mapping functions: In t*is section> I<ll document *o to use Dump+,%, as t*e receiverFdecoder and .RS 8 4irtual Radar Server9 to s*o t*eir location:

+: Install /our c*oice of Dump+,%, as explained previousl/:

: .RS is a :net application: (o run it in 5inux e need to install mono: pen a terminal and t/peH

sudo apt-get install mono-complete

3: .isit *ttpHFF:virtualradarserver:co:u) and donload t*e mono tar#all:

4: xtractFdecompress t*e tar#all: I put t*e .irtualRadar folder in m/ *ome folder and ill assume t*at convention in t*is guide:

: Ke need to c*ange t*e port num#er t*at .RS serves on to somet*ing #esides !,!, so it doesn<t conLict it* t*e dump+,%, e# server: (*is must #e done manuall/: pen a terminal and t/peH

cd $irtualServer

mono $irtual%adar.e+e

"lic) <7elp< N <#out< and at t*e #ottom s*ould #e a lin) to t*e conEguration folder: "lic) it and it ill open t*at folder: 8Bust in case it doesn<t> e<re loo)ing for t*e F*omeFusernameF:localFs*areF.irtualRadar folder: =ote t*e period in front of :local means it<s a *idden folder:9

In t*is folder> create a text Ele called Installer"onEguration:xml t*en open it and paste t*is into itH

Oxml versionQ+:, encodingQutf-! N

OInstallerSettings xmlnsHxsiQ*ttpHFF:3:orgF,,+F@5Sc*ema-instance xmlnsHxsdQ*ttpHFF:3:orgF,,+F@5Sc*emaN

OKe#ServerPortN!!!!OFKe#ServerPortN OFInstallerSettingsN

I c*ose !!!! #ecause it<s eas/ to remem#er and as far as I )no not*ing else uses it: ;se an/ port /ou li)e so long as it isn<t #eing used #/ somet*ing else on /our s/stem: Save t*is Ele and close /our text editor: S*ut don .RS:

(13)

6: 5aunc* dump+,%, at t*e command lineH

cd /dump100

:Fdump100 -4net -4interactive

8r via t*e script I s*oed earlier if /ou created one:9

2: 5aunc* .RS at t*e command lineH

cd /$irtual%adar

mono $irtual%adar.e+e

If /ou li)e> /ou can create a script Ele in /our *omeFusernameF#in folder called vrs it* t*ese linesH

TF#inF#as*

  script to start .irtual Radar Server cd F*omeFusernameF.irtualRadar

mono .irtualRadar:exe

Rig*t clic) on vrs and clic) N permissions N <llo executing Ele as a program<:

!: "lic) <(ools< N <ptions< N <Receivers< t*e green U sign to add a receiver: Run t*e i1ard and tell it /ou *ave < softare deEned radio< N <Dump+,%,< N and tic) <?es< to <Is t*e SDR decoder running on t*is computer<: ll ot*er settings s*ould #e left at default values: 7it J:

%: 'ac) at t*e main .RS screen under <Aeed status< /ou s*ould #e seeing Receiver $ "onnected $ a num#er of (otal essages rising $ and some ircraft (rac)ed:

 Rig*t a#ove t*at s*ould #e a #lue */perlin) to *ttpHFF+2:,:,:+H!!!!F.irtualRadar : "lic) and a #roser s*ould open it* aircraft on t*e map:

+,: (*e map mig*t start centered over 5ondon: If so move to /our location: =o /ou ould t*in) t*at #/ loo)ing under <(ools< N <Receiver< N <Receiver 5ocations< and entering /our lat & lon it ould start t*e map centered around /our location> #ut for me it *asn<t: If I End a Ex I<ll post it on t*e next update:

(14)

;nder (ools N ptions N Receivers:

(15)

"lic) on a plane to see its pat* and info:

xplore t*e options under <enu<: (*ere<s also an optional Ke# dmin Plugin

availa#le from *ttpHFFvirtualradarserver:co:u) t*at adds a e#-#ased user interface to monitor and conEgure t*e server: .RS can also #e made pu#lic so ot*ers can vie /our radar s/stem remotel/:

If /ou reall/ ant to get t*e most out of /our DS-' s/stem> loo) into purc*asing an DS-' pre-selector Elter> an 5= 85o =oise mpliEer9 a)a a pre-ampliEer and eit*er purc*asing or #uilding a coaxial collinear antenna:

(16)

S$ectru, na&ysis %it# Qs$ectru, na&yer

 limitation of R(5-SDR dongles is a maximum #andidt* indo of a#out :4 71 and general purpose radio applications store a limited *istor/: If e ant to> for example> monitor t*e entire  meter *am #and from +44 to +4! 71 for a full da/ and log t*e results e<ll need anot*er tool: (*e command line utilit/ rtlVpoer included it* t*e smocomm drivers e installed earlier can do t*is #ut t*ere<s a #etter a/: ;sing an en*anced tool called rtlVpoerVt e can rapidl/ scan :4 71 c*un)s in rapid succession and visuall/ displa/ it it* 0spectrum anal/1er:

+: Install rtl-poer-t and required li#rariesH

sudo apt-get install lib((t3-dev libtclap-dev

: Retrieve> #uild and compileH

git clone git://git,ub.com/AD-$ega/rtl-poer-((t cd rtl-poer-((t

mkdir build cd build cmake ..

sudo make install cd -

rtl!poer!((t --version

If all *as gone ell /ou s*ould seeH

rtl!poer!((t version: 1.0-beta)

3: Install 0spectrumanal/1er and dependencies t*en launc*H

sudo apt-get install p2t,on3-pip p2t,on3-p25t6 p2t,on3-nump2 sudo pip3 install 5spectrumanal27er

(17)

 (*e G;I s*ould no #e running: "lic) <Aile< t*en <Settings< and c*ange t*e

#ac)end to <rtlVpoerVt<: nter t*e desired Start and Stop Arequencies and clic) Start: 7over t*e mouse over an/ pea)s in t*e upper indo to End out *at it<s frequenc/ is: =ote t*is is a poer over time monitor and not a radio application:  ?ou on<t *ear an/t*ing> *at /ou<ll see is *ere transmissions are occurring

across t*e given frequenc/ range:

In t*e a#ove image> I<m scanning t*e entire  meter amateur radio #and from +44-+4!71: ac* spi)e represents a signal: (*e aterfall #elo represents time> so t*e dots are s*ort transmissions> li)el/ repeater identiEcations:

Aor more information> visit t*e developer<s git*u# pages atH

*ttpsHFFgit*u#:comFD-.egaFrtl-poer-t

(18)

5onitorin( Trunked Radio Syste,s %it# SDR Trunk!

 (run)ing radio s/stems are more complex t*an traditional radio s/stems as are t*e applications used to trac) t*em: In #rief> a t/pical standard analog radio s/stem ill *ave one or more mountaintop transmitters as needed to cover an area: (*ere mig*t #e a fe c*annels or a do1en or more: o#ile units transmit up to t*e toer at one frequenc/ and t*e toer retransmits out on anot*er

frequenc/: ll t*e scanner ent*usiast needs to )no is t*e output frequencies: =o imagine a cit/ *as , dierent departments eac* it* t*eir on set of

mountaintop transmitters and c*annels: (*at<s a 5( of *ardare to maintain: It<s also *undreds of dedicated frequencies and spectrum is getting croded: ost departments pro#a#l/ aren<t using most of t*eir c*annels most of t*e time an/a/:

So imagine all , departments s*are one radio netor) and a pool of c*annels:  computer pic)s a clear frequenc/ and t*e rig*t call goes to t*e rig*t department:  (*at> in a nuts*ell is trun)ed radio: Some are analog> ot*ers are digital:  fe are

encr/pted:

SDR Trunk  is t*e onl/ trun)ing softare I<ve found so far t*at or)s in 5inux: Installation and usage is a #it more complex t*an a standard radio application: *ttpsHFFgit*u#:comFDS*eirerFsdrtrun)

 (*e install instructions are generall/ complete> a fe t*ings to noteH

an/ municipalities are using t*e P" digital standard: (o listen in /ou<ll need to donload and compile t*e C' li#raries> created #/ t*e same aut*or: (*e

installation guide can #e found in t*e i)i on t*e side#ar under P": t t*is time> onl/ p*ase I 8a)a t/pe I9 is supported:

K*en creating a ne s/stem in SDR (run)> /ou<re prompted to enter a frequenc/: ;suall/ t*at ill #e t*e control c*annel frequenc/: (*is can #e found for t*e

s/stem /ou ant to monitor on t*e radioreference:com data#ase: ?ou don<t need to enter all t*e frequencies for a site> Bust t*e control c*annel and SDR (run) ill tune in to and follo across t*e ot*er c*annels:

t t*is point> t*e #est a/ to accuratel/ follo apco t/pe II trun)ed s/stem is it* a digital scanner or via an online feed suc* as *ttpHFF:#roadcastif/:com

(19)

t#er interestin( RTL-SDR a$$s!

rt&7899 receives and decodes sensor data from remote temperature> rain gauges> t*ermostats> etc: in t*e IS #ands: It<s not limited to 43371:  good antenna can pic) up several from /our immediate neig*#or*ood:

Resources!

*ttpHFF sdr:osmocom:orgFtracFi)iFrtl-sdr $ "ource of the %T&#"% drivers.

*ttpHFF rtl-sdr:com $ reat (lace to buy and learn about %T&#"%

*ttpHFFd istroatc*:org $ A one#sto( inde) of the to( * &inu) distributions

*ttpHFF linuxmint:com $ ,urrently the most (o(ular &inu) distribution

*ttpHFF# alarad:net $ The best documentation I've found on I! A"#$ antennas

qsl:netFna4itFd#gp:*tml  $ A chea(- easy  good dual#band ground#(lane antenna

i)ipedia:orgFi)iFlectromagneticVspectrum  $ A (rimer on radio /aves

radioreference:comF - 0)cellent database of fre1uencies

qsl:netF)#c)Fantenna:*tml  $ A good source of antenna design calculations

*ttpsHFFlinuxconEg:orgF#as*-scripting-tutorial  $ $ash "cri(ting

*ttpHFF:*otogee):comF6246%Ft*e-#eginners-guide-to-s*ell-scripting-t*e-#asicsF - Introduction to "hell "cri(ting

*ttpHFF:programmingsimpliEed:comFc-program-examples  $ , tutorial

*ttpHFF:cplusplus:comFdocFtutorialF  - ,++ tutorial

*ttpHFF:git*u#:com $ Mass 1uantities of source code2

n &osin(!

I<ll #e updating t*is guide over time as I discover ne softare> *ardare> tric)s and mods: I elcome constructive feed#ac): ?ou can contact me t*roug* m/ #log at *ttpHFFranous:ordpress:com  *ere /ou<ll End additional R(5-SDR articles: If /ou send me a co*erent message I<ll most li)el/ respond:

References

Related documents