Här får ni okunniga och kunniga följa mig i scriptet. Uppdaterat Tisdag!

Jag kommenterar med fet stil varje instruktion:
Tecknet # finns alltid före en kommentar av konstruktören.

#Install dependencies
sudo apt-get install build-essential git libfftw3-dev cmake libusb-1.0-0-dev nmap
Här får jag info att build-essential är den senaste versionen på datorn.
Samt att cmake är också den nyaste versionen.
git är den senaste
libfftw3-dev är den senaste
nmap är den senaste
Va kul… jag har här ovan lärt mig att man installera olika saker genom att särskilja med mellanslag.
Innan jag ger nästa instruktion så kommer en text där Ubunru meddelar mig att inget nytt tillkommit… Allkt var redan installerat. Och det stämmer.. det här är 100-drade gången jag installerar samma sak och först nu begriper lite till..

#nmap itself is not used by OpenWebRX at all, but we need to install it because the ncat tool is packaged with it.
#ncat is a netcat alternative which is used by OpenWebRX for internally distributing I/Q data,
# and also solves the incompatibility problems among netcat versions.

#Fetch and build rtl-sdr, skip if already done (subdirectories will be created under the current directory).
git clone git://git.osmocom.org/rtl-sdr.git
Här säger Ubunru att rtl-sdr finns redan och är ingen tom katalog.
cd rtl-sdr/
Change directory går bra
mkdir build
I rtl-sdr så change directory igen till build, där vi nu är.
Går bra det här!

cd build
Ni börjatr kunna detta nu? Vi går nu till mappen build.
cmake ../ -DINSTALL_UDEV_RULES=ON
Va betyder denna instruktion? cmake
Vi får se…
Jo den gick också bra… en massa text men kontentan var att Build files har blivit skriven till /home/folke/rtl-sdr/build.
Vi är fortfarande kvar i mappen /build

make

Får Built target rtl_shared
Built target convenience static
Built target rtl_sdr
Built target rtlsdr_static
Built target rtl_power
Built target rtl_tcp
Built target rtl-fm
Built target rtl_test
Built target rtl_adsb
Built target rtl_eeprom

sudo make install
Fick ange lösenord för sudo!
Massa filer som kollades och allt var uppdaterat

sudo ldconfig
Allt ok eftersom inga error kom upp… enbart promten
cd ../..
Tillbaka till rotpromten!

#Disable the DVB-T driver, which would prevent the rtl_sdr tool from accessing the stick
#(if you want to use it for DVB-T reception later, you should undo this change):
sudo bash -c ’echo -e ”\n# for RTL-SDR:\nblacklist dvb_usb_rtl28xxu\n” >> /etc/modprobe.d/blacklist.conf’
Funkade bra
sudo rmmod dvb_usb_rtl28xxu # disable that kernel module for the current session
Här fick jag första error.
rmmod: ERROR: Module dvb_usb_rtl28xxu is not currently loaded
Jag skickar nu ett mail till Andras med en förfrågan om detta error.
Här en kopia på min fråga och hans svar:
*****************************************
No problem. Try to run OpenWebRX with the RTL stick plugged in, and if it works, you’re all right. If it doesn’t, let me know.

Jag skrev:
But I got this error… is that normal?

folke@Ubuntu:~$ sudo rmmod dvb_usb_rtl28xxu # disable that kernel module for the current session
rmmod: ERROR: Module dvb_usb_rtl28xxu is not currently loaded

Rgds.

Folke
****************************************
Jaha då fortsätter vi… se nedan. Jag gör vad han säger efter denna installationsbeskrivning slutförts.

#Download OpenWebRX and libcsdr (subdirectories will be created under the current directory).
git clone https://github.com/simonyiszk/openwebrx.git
Openwebrx finns redan och är ingen tom katalog.
git clone https://github.com/simonyiszk/csdr.git
csdr finns redan och är inte tom

#Compile libcsdr (which is a dependency of OpenWebRX)
cd csdr
Ändrar till csdr-katalogen
make

Håll i dig nu!
”make” orsakade nedanstående!
Ojjjjj
rm -f dumpvect*.vect
NOTE: you may have to manually edit Makefile to optimize for your CPU (especially if you compile on ARM, please edit PARAMS_NEON).
Auto-detected optimization parameters: -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4 -mfpmath=sse

gcc -std=gnu99 -O3 -ffast-math -fdump-tree-vect-details -dumpbase dumpvect -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4 -mfpmath=sse fft_fftw.c libcsdr_wrapper.c -g -lm -lrt -lfftw3f -DUSE_FFTW -DLIBCSDR_GPL -DUSE_IMA_ADPCM -Wno-unused-result -fpic -shared -o libcsdr.so
./parsevect dumpvect*.vect

Auto-vectorization built into gcc can increase the execution speed of algorithms with automatic
generation of SIMD instructions if the CPU is capable.
We parse the output of the vectorizer to analyze which loops could be optimized (thus speeded up) this way.
Warning! The result may be different on different CPU architectures…

Colors:
– can’t be vectorized
– successfully vectorized
– not intended to be vectorized (not important)

libcsdr.c:137:2: note: LOOP VECTORIZED firdes_lowpass_f: normalize pass 2
libcsdr.c:133:2: note: LOOP VECTORIZED firdes_lowpass_f: normalize pass 1
libcsdr.c:125:2: note: not vectorized: number of iterations cannot be computed. firdes_lowpass_f: calculate taps
libcsdr.c:155:2: note: not vectorized: multiple nested loops. firdes_bandpass_c
libcsdr.c:161:8: note: not vectorized: number of iterations cannot be computed. firdes_bandpass_c
libcsdr.c:160:8: note: not vectorized: number of iterations cannot be computed. firdes_bandpass_c
libcsdr.c:192:2: note: not vectorized: multiple nested loops. shift_math_cc
libcsdr.c:203:8: note: not vectorized: number of iterations cannot be computed. shift_math_cc: normalize phase
libcsdr.c:202:8: note: not vectorized: number of iterations cannot be computed. shift_math_cc: normalize phase
libcsdr.c:216:2: note: not vectorized: relevant stmt not supported: _16 = __builtin_sinf (_15);
libcsdr.c:236:2: note: not vectorized: multiple nested loops. shift_math_cc
libcsdr.c:261:8: note: not vectorized: number of iterations cannot be computed. shift_math_cc: normalize phase
libcsdr.c:260:8: note: not vectorized: number of iterations cannot be computed. shift_math_cc: normalize phase
libcsdr.c:344:3: note: not vectorized: multiple nested loops. fir_decimate_cc: i loop
libcsdr.c:346:3: note: LOOP VECTORIZED fir_decimate_cc: q loop
libcsdr.c:344:3: note: LOOP VECTORIZED fir_decimate_cc: i loop
libcsdr.c:393:9: note: not vectorized: control flow in loop.
libcsdr.c:399:3: note: LOOP VECTORIZED rational_resampler_ff (inner loop)
libcsdr.c:453:2: note: LOOP VECTORIZED fir_one_pass_ff
libcsdr.c:474:2: note: not vectorized: multiple nested loops. fractional_decimator_ff
libcsdr.c:453:2: note: LOOP VECTORIZED fir_one_pass_ff
libcsdr.c:453:2: note: LOOP VECTORIZED fir_one_pass_ff
libcsdr.c:453:2: note: LOOP VECTORIZED fir_one_pass_ff
libcsdr.c:520:2: note: LOOP VECTORIZED apply_fir_fft_cc: add overlap
libcsdr.c:514:2: note: LOOP VECTORIZED apply_fir_fft_cc: normalize by fft_size
libcsdr.c:502:2: note: LOOP VECTORIZED apply_fir_fft_cc: multiplication
libcsdr.c:546:2: note: LOOP VECTORIZED amdemod: sqrt
libcsdr.c:541:2: note: LOOP VECTORIZED amdemod: i*i+q*q
libcsdr.c:565:2: note: LOOP VECTORIZED amdemod_estimator
libcsdr.c:588:2: note: not vectorized, possible dependence between data-refs *_25 and *_18 dcblock_f
libcsdr.c:612:2: note: LOOP VECTORIZED fastdcblock_ff: remove DC component
libcsdr.c:604:2: note: LOOP VECTORIZED fastdcblock_ff: calculate block average
libcsdr.c:652:2: note: LOOP VECTORIZED fastagc_ff: apply gain
libcsdr.c:636:2: note: LOOP VECTORIZED fastagc_ff: peak search
libcsdr.c:686:2: note: not vectorized: unsupported use in stmt. fmdemod_atan_novect
libcsdr.c:704:2: note: LOOP VECTORIZED fmdemod_quadri_novect_cf
libcsdr.c:742:2: note: LOOP VECTORIZED fmdemod_quadri_cf: output division
libcsdr.c:738:2: note: LOOP VECTORIZED fmdemod_quadri_cf: output denomiator
libcsdr.c:734:2: note: LOOP VECTORIZED fmdemod_quadri_cf: output numerator
libcsdr.c:729:2: note: LOOP VECTORIZED fmdemod_quadri_cf: di
libcsdr.c:723:2: note: LOOP VECTORIZED fmdemod_quadri_cf: dq
libcsdr.c:771:2: note: not vectorized, possible dependence between data-refs *_30 and *_25 deemphasis_wfm_ff
libcsdr.c:801:3: note: LOOP VECTORIZED deemphasis_nfm_ff: inner loop
libcsdr.c:809:2: note: LOOP VECTORIZED limit_ff
libcsdr.c:818:2: note: LOOP VECTORIZED gain_ff
libcsdr.c:824:3: note: not vectorized: number of iterations cannot be computed.
libcsdr.c:834:3: note: not vectorized: number of iterations cannot be computed.
libcsdr.c:854:2: note: not vectorized: vectorization not profitable.
libcsdr.c:854:2: note: not vectorized: vector version will never be profitable.
libcsdr.c:853:2: note: LOOP VECTORIZED
libcsdr.c:860:2: note: not vectorized: multiple nested loops.
libcsdr.c:864:8: note: not vectorized: number of iterations cannot be computed.
libcsdr.c:863:8: note: not vectorized: number of iterations cannot be computed.
libcsdr.c:873:2: note: LOOP VECTORIZED
libcsdr.c:902:8: note: not vectorized: control flow in loop. log2n
libcsdr.c:917:13: note: not vectorized: control flow in loop. next_pow2
libcsdr.c:925:2: note: not vectorized: loop contains function calls or data references that cannot be analyzed apply_window_c
libcsdr.c:938:2: note: not vectorized: loop contains function calls or data references that cannot be analyzed precalculate_window
libcsdr.c:948:2: note: LOOP VECTORIZED apply_precalculated_window_c
libcsdr.c:959:2: note: not vectorized: loop contains function calls or data references that cannot be analyzed apply_window_f
libcsdr.c:972:2: note: LOOP VECTORIZED logpower_cf: pass 3
libcsdr.c:970:2: note: not vectorized: relevant stmt not supported: _34 = __builtin_log10f (_33); logpower_cf: pass 2
libcsdr.c:968:2: note: LOOP VECTORIZED logpower_cf: pass 1
libcsdr.c:977:2: note: LOOP VECTORIZED logpower_cf: pass 1
libcsdr.c:984:2: note: LOOP VECTORIZED logpower_cf: pass 3
libcsdr.c:982:2: note: not vectorized: relevant stmt not supported: _15 = __builtin_log10f (_14); logpower_cf: pass 2
libcsdr.c:1000:2: note: LOOP VECTORIZED convert_u8_f
libcsdr.c:1005:2: note: LOOP VECTORIZED convert_s8_f
libcsdr.c:1010:2: note: LOOP VECTORIZED convert_s16_f
libcsdr.c:1015:2: note: LOOP VECTORIZED convert_f_u8
libcsdr.c:1022:2: note: LOOP VECTORIZED convert_f_s8
libcsdr.c:1032:2: note: LOOP VECTORIZED convert_f_s16
libcsdr.c:1041:16: note: not vectorized: complicated access pattern.
libcsdr.c:1049:7: note: not vectorized: complicated access pattern.
libcsdr.c:1062:16: note: LOOP VECTORIZED
libcsdr.c:1067:7: note: LOOP VECTORIZED
libcsdr.c:1079:2: note: LOOP VECTORIZED trivial_vectorize: should pass
libcsdr_gpl.c:50:7: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: normalize starting_phase
libcsdr_gpl.c:49:7: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: normalize starting_phase
libcsdr_gpl.c:37:2: note: not vectorized: unsupported use in stmt. shift_addition_cc: work
libcsdr_gpl.c:77:2: note: not vectorized: control flow in loop. shift_addition_cc: work
libcsdr_gpl.c:84:8: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: normalize phase
libcsdr_gpl.c:131:7: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: normalize starting_phase
libcsdr_gpl.c:130:7: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: normalize starting_phase
libcsdr_gpl.c:115:2: note: not vectorized: number of iterations cannot be computed. shift_addition_cc: work
libcsdr_gpl.c:171:2: note: not vectorized: control flow in loop. agc_ff
ima_adpcm.c:157:2: note: not vectorized: not suitable for gather load step_64 = _stepSizeTable[state$index_2];
ima_adpcm.c:168:2: note: not vectorized: not suitable for gather load step_59 = _stepSizeTable[state$index_3];
gcc -std=gnu99 -O3 -ffast-math -fdump-tree-vect-details -dumpbase dumpvect -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4 -mfpmath=sse csdr.c -g -lm -lrt -lfftw3f -DUSE_FFTW -DLIBCSDR_GPL -DUSE_IMA_ADPCM -L. -lcsdr -Wno-unused-result -o csdr
In file included from /usr/include/stdio.h:27:0,
from csdr.c:34:
/usr/include/features.h:148:3: warning: #warning ”_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE” [-Wcpp]
# warning ”_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE”
^~~~~~~
folke@Ubuntu-Aspire-X3-710:~/csdr$


sudo make install

folke@Ubuntu-Aspire-X3-710:~/csdr$ sudo make install
[sudo] password for folke:
install -m 0755 libcsdr.so /usr/lib
install -m 0755 csdr /usr/bin
install -m 0755 csdr-fm /usr/bin
ldconfig
folke@Ubuntu-Aspire-X3-710:~/csdr$

#Edit OpenWebRX config or leave defaults
nano ../openwebrx/config_webrx.py

Här under är configfilen.
Jag har i den lagt in fet stil på vad jag configurert den med för info och data.
Därefter sparas den för användning av servern på OpenWebRx på nätet.

-*- coding: utf-8 -*-

”””
config_webrx: configuration options for OpenWebRX

This file is part of OpenWebRX,
^ an open-source SDR receiver software with a web UI.
Copyright (c) 2013-2015 by Andras Retzler

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
^
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

In addition, as a special exception, the copyright holders
state that config_rtl.py and config_webrx.py are not part of the
Corresponding Source defined in GNU AGPL version 3 section 1.

(It means that you do not have to redistribute config_rtl.py and
config_webrx.py if you make any changes to these two configuration files,
and use them for running your web service with OpenWebRX.)
”””

# NOTE: you can find additional information about configuring OpenWebRX in the Wiki:
# https://github.com/simonyiszk/openwebrx/wiki

# ==== Server settings ====
web_port=8073
server_hostname=”localhost” # If this contains an incorrect value, the web UI may freeze on load (it can’t open websocket)
max_clients=20

# ==== Web GUI configuration ====
receiver_name=”[Callsign]”
receiver_location=”Budapest, Hungary”
receiver_qra=”JN97ML”
receiver_asl=200
receiver_ant=”Longwire”
receiver_device=”RTL-SDR”
receiver_admin=”example@example.com”

receiver_gps=(47.000000,19.000000)
photo_height=350
photo_title=”Panorama of Budapest from Schönherz Zoltán Dormitory”
photo_desc=”””
You can add your own background photo and receiver information.
Receiver is operated by: %[RX_ADMIN]
Device: %[RX_DEVICE]
Antenna: %[RX_ANT]
Website: http://localhost
”””

# ==== sdr.hu listing ====
# If you want your ham receiver to be listed publicly on sdr.hu, then take the following steps:
# 1. Register at: http://sdr.hu/register
# 2. You will get an unique key by email. Copy it and paste here:
sdrhu_key = ””
# 3. Set this setting to True to enable listing:
sdrhu_public_listing = False

# ==== DSP/RX settings ====
dsp_plugin=”csdr”
fft_fps=9
fft_size=4096
fft_voverlap_factor=0.3 #If it is above 0, multiple FFTs will be used for creating a line on the diagram.
samp_rate = 250000
rf_gain = 5 #in dB. For an RTL-SDR, rf_gain=0 will set the tuner to auto gain mode, else it will be in manual gain mode.
ppm = 0

audio_compression=”adpcm” #valid values: ”adpcm”, ”none”
fft_compression=”adpcm” #valid values: ”adpcm”, ”none”

start_rtl_thread=True

# ==== I/Q sources ====
# (Uncomment the appropriate by removing # characters at the beginning of the corresponding lines.)

# There are guides for setting may different SDR hardware including AirSpy, AFEDRI-SDR, RTL-SDR in direct sampling mode, etc. in the Wiki:
# https://github.com/simonyiszk/openwebrx/wiki

# You can use other SDR hardware as well, by giving your own command that outputs the I/Q samples… Some examples of configuration are available here (default is RTL-SDR):

# >> RTL-SDR via rtl_sdr

start_rtl_command=”rtl_sdr -s {samp_rate} -f {center_freq} -p {ppm} -g {rf_gain} -”.format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
format_conversion=”csdr convert_u8_f”

#start_rtl_command=”hackrf_transfer -s {samp_rate} -f {center_freq} -g {rf_gain} -l16 -a0 -q -r-”.format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
#format_conversion=”csdr convert_s8_f”
”””
To use a HackRF, compile the HackRF host tools from its ”stdout” branch:
git clone https://github.com/mossmann/hackrf/
cd hackrf
git fetch
git checkout origin/stdout
cd host
mkdir build
cd build
cmake .. -DINSTALL_UDEV_RULES=ON
make
sudo make install
”””

# >> Sound card SDR (needs ALSA)
# I did not have the chance to properly test it.
#samp_rate = 96000
#start_rtl_command=”arecord -f S16_LE -r {samp_rate} -c2 -”.format(samp_rate=samp_rate)
#format_conversion=”csdr convert_s16_f | csdr gain_ff 30″

# >> /dev/urandom test signal source
#samp_rate = 2400000
#start_rtl_command=”cat /dev/urandom | (pv -qL `python -c ’print int({samp_rate} * 2.2)’` 2>&1)”.format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate)
#format_conversion=”csdr convert_u8_f”

# >> Pre-recorded raw I/Q file as signal source

#Run OpenWebRX
cd ../openwebrx
./openwebrx.py

Det här inlägget postades i OpenWebRX. Bokmärk permalänken.

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *