openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Add useful snippets of code or links to entire SDR projects.
vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Mon Jul 31, 2017 10:54 am

openwebrx provides web browser access to a range of SDRs for multiple simultaneous remote users.

I followed the procedure set out here:

http://ha5kfu.sch.bme.hu/openwebrx-quick-setup

Branching off to accomodate the Raspberry Pi here:

https://github.com/simonyiszk/openwebrx ... berry-Pi-2


Unfortunately when attempting to run openwebrx it failed to start , returing a Soapy make error every time. It took a lot of head scratching and source code reading to find this solution:


The operating instructions for openwebrx require the editing of it's config/preferences file config_webrx.py, eg:

#>> The rx_sdr command works with a variety of SDR harware: RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc.
# It will auto-detect your SDR hardware if the following tools are installed:
# * the vendor provided driver and library,
# * the vendor-specific SoapySDR wrapper library,
# * and SoapySDR itself.
# Check out this article on the OpenWebRX Wiki: https://github.com/simonyiszk/openwebrx ... OpenWebRX/
# start_rtl_command="rx_sdr -F CF32 -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)

I found that not to be the case, it was the auto-detection that failed for me and I had to specify the sdrplay driver in the <b> rx_sdr</> parameters like so:

start_rtl_command="rx_sdr -f {center_freq} -d driver=sdrplay -g 5 -F CF32 -s {samp_rate} -p 0 -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)


The resulting good bits:

1. openwebrx is very stable and works very well in the browsers I tested (macOSSierra Safari and Chrome) with more than adequate waterfall resolution and only a few milliseconds audio delay.
2. even with the optional adpcm audio and FFT waterfall compression turned off, with a sampling rate samp_rate = 500000 the Pi used only 25% of it's processing power.
3. eight simultaneous remote web users raised that to 85% and produced more than occasional audio buffer underruns. Of course you can up the buffer size in the config file at the expense of increased delay.
4. it also works surprisingly well on an iPad

The limitations:

1. the openwebrx software does not provide any mechanism for changing your sdr oscillator frequency so you are limited to "frequency bands" of a width set by your sample rate. That limit on my Pi2B was 2048000 before the Pi ran out of grunt for a single user.
2. openwebrx provides a limited set of user control in the browser (html/javascript socket messaging) for waterfall colours, audio level, etc with mouse driven frequency and waterfall manipulation.
3. changing the oscillator frequency requires a quick edit of the config file and a restart of the python script which is fine if you have local access but cannot be done remotely.
4. SDRPlay SP1 functionality only is currently supported via the config file, despite the rx_tools code internally recognising my RSP2 (using the --probe test option) and providing RSP2 support for antenna switching etc.

Conclusion:

It's really exciting to watch your SDRPlay waterfall and listen to it's audio with only a few milliseconds delay for a radio ham like me listening to any given band on my 160m loop antenna when remote from my home radio shack. I know all that is possible and more using commercial systems like Flex but to roll your own on a Pi using open source software is a great step in the right direction.

PS. I'd like to thank the SDRPlay team and it's outstanding individuals for providing such an accessibly priced and excellent piece of hardware and commend their continued success, it really really does perform well even against my best ham radio hardware.
Last edited by vk7jj on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Tue Aug 01, 2017 12:37 am

To avoid confusion I forgot to point out:

My Pi (os Jessie) is being used without it's graphic user interface so no processor power is wasted; openwebrx does not require the GUI for installation or operation anyway so it's pointless. The Pi is running via WiFi for convenience so latency could be improved a bit by ethernet I guess.

For those who have not operated a Pi without the GUI there is a lot of info on the web on how to turn the GUI off and how to access the Pi without it.

"headerless" Pi access is genuinely a pleasure once you figure it out - and much easier and quicker than fighting your way through yet another supposedly helpful abstraction layer that get's between you and what you want to do - using just two tools.

1. Any SSH terminal program, ie Terminal on a Mac or the free PuTTY on Windows
- with this you do all the installation of openwebrx and all it's dependencies, start and strop scripts running, do basic chores like enabling WiFi, and small text editing tasks using a built in Pi editor like nano.
- SSH is turned on in the Pi by default so it's as easy as logging on with: ssh pi@<the Pi IP address> and entering the password when challenged, and then doing the complete openwebrx installation.

2. Any SFTP application for Windows/Mac/Linux with a nice GUI file handling and text/code editor built in, eg. the unregistered version of BBEdit for MacOS is excellent for larger scale editing of code/text files, like config_webrx.py. SFTP uses SSH so again it's simply a matter of logging in.
- the SFTP application allows you to edit text in your familiar Windows/Mac/linux environment but that too can (more painfully) be done using on-board Pi editors via the terminal app.

hth.
Last edited by vk7jj on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

mrtrevisan
Posts: 1
Joined: Fri Sep 01, 2017 11:08 am

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by mrtrevisan » Fri Sep 01, 2017 11:17 am

Hi vk7jj,

as for your reported limitation #3:
3. changing the oscillator frequency requires a quick edit of the config file and a restart of the python script which is fine if you have local access but cannot be done remotely.
you can alwas circumvent it by installing a VPN server, i.e. OpenVPN and forward the appropriate port (i.e. 1194 UDP) on your router, or more simply forward port 22 TCP (and adding some LIMIT rules in your raspi's iptables to get rid of SSH attackers).

My 2 cents :)

Kind regards,
Marco
Last edited by mrtrevisan on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Wed Sep 06, 2017 8:32 am

Thanks for your interest Marco, yes you are right.

My bad, the wording is really the problem as I should have said "the openwebrx software doesn't provide any options for band change" or something like that.

As it happens I do have a VPN on a spare older Mac using OSX Server software to get back into my video security etc so I appreciate exactly where you are coming from, it is an excellent suggestion and solves a heap of access problems.

PS. Also, on the same Pi as openwebrx I've set up a web server in node.js to control an FT-991 with a web front end and stream audio remotely and I did contemplate running a js node script to re-write or swap files and restart the openwebrx; trouble is I get all enthusiastic and involved with something else too quickly, life is so short!

Hope you're enjoying your RSP, I'm addicted to mine, cheers.

Reason: No reason

robbedoeske
Posts: 14
Joined: Sun Feb 25, 2018 8:56 am

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by robbedoeske » Sun Feb 25, 2018 9:54 pm

vk7jj wrote:openwebrx provides web browser access to a range of SDRs for multiple simultaneous remote users.

I followed the procedure set out here:

http://ha5kfu.sch.bme.hu/openwebrx-quick-setup

Branching off to accomodate the Raspberry Pi here:

https://github.com/simonyiszk/openwebrx ... berry-Pi-2


Unfortunately when attempting to run openwebrx it failed to start , returing a Soapy make error every time. It took a lot of head scratching and source code reading to find this solution:


The operating instructions for openwebrx require the editing of it's config/preferences file config_webrx.py, eg:

#>> The rx_sdr command works with a variety of SDR harware: RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc.
# It will auto-detect your SDR hardware if the following tools are installed:
# * the vendor provided driver and library,
# * the vendor-specific SoapySDR wrapper library,
# * and SoapySDR itself.
# Check out this article on the OpenWebRX Wiki: https://github.com/simonyiszk/openwebrx ... OpenWebRX/
# start_rtl_command="rx_sdr -F CF32 -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)

I found that not to be the case, it was the auto-detection that failed for me and I had to specify the sdrplay driver in the <b> rx_sdr</> parameters like so:

start_rtl_command="rx_sdr -f {center_freq} -d driver=sdrplay -g 5 -F CF32 -s {samp_rate} -p 0 -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)


The resulting good bits:

1. openwebrx is very stable and works very well in the browsers I tested (macOSSierra Safari and Chrome) with more than adequate waterfall resolution and only a few milliseconds audio delay.
2. even with the optional adpcm audio and FFT waterfall compression turned off, with a sampling rate samp_rate = 500000 the Pi used only 25% of it's processing power.
3. eight simultaneous remote web users raised that to 85% and produced more than occasional audio buffer underruns. Of course you can up the buffer size in the config file at the expense of increased delay.
4. it also works surprisingly well on an iPad

The limitations:

1. the openwebrx software does not provide any mechanism for changing your sdr oscillator frequency so you are limited to "frequency bands" of a width set by your sample rate. That limit on my Pi2B was 2048000 before the Pi ran out of grunt for a single user.
2. openwebrx provides a limited set of user control in the browser (html/javascript socket messaging) for waterfall colours, audio level, etc with mouse driven frequency and waterfall manipulation.
3. changing the oscillator frequency requires a quick edit of the config file and a restart of the python script which is fine if you have local access but cannot be done remotely.
4. SDRPlay SP1 functionality only is currently supported via the config file, despite the rx_tools code internally recognising my RSP2 (using the --probe test option) and providing RSP2 support for antenna switching etc.

Conclusion:

It's really exciting to watch your SDRPlay waterfall and listen to it's audio with only a few milliseconds delay for a radio ham like me listening to any given band on my 160m loop antenna when remote from my home radio shack. I know all that is possible and more using commercial systems like Flex but to roll your own on a Pi using open source software is a great step in the right direction.

PS. I'd like to thank the SDRPlay team and it's outstanding individuals for providing such an accessibly priced and excellent piece of hardware and commend their continued success, it really really does perform well even against my best ham radio hardware.
Oke I got it working but audio is very bad.
Is it problem with config_webrx.py ?
I have raspberry pi3 and SdrPlay rsp2
Need good config.
Last edited by robbedoeske on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Tue Feb 27, 2018 11:33 pm

Oke I got it working but audio is very bad.
Is it problem with config_webrx.py ?
I have raspberry pi3 and SdrPlay rsp2
Need good config.
Hi rob;

Here are the params as copied from my config_webrx.py file

Code: Select all

# sdrplay params
# Found 13 sample rates: 250000 500000 1000000 2000000 2048000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000
# Found 8 bandwidths: 200000 300000 600000 1536000 5000000 6000000 7000000 8000000
center_freq = 7150000  # 144474000  20m=14138000  40m=7090000  80m=3590000  160m=1835000  6m=50057000  11m=27355000  MW=1000000 10mssb=28267000  70cmusb=432474000  1296474000
samp_rate =  500000 # 2048000,  best overall seems 500000
rf_gain = 30 #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
start_mod = "lsb" #nfm, am, lsb, usb, cw
Sorry about the delay in replying I've been busy building an alternative WSPRnet map that scrapes the HTML from the WSPR database web page, unfortunately because they have no API it's slower than it would otherwise be, it has to send search params, receive the results and then follow a redirect to get the data and then draw the map.

For anyone here who is into WSPR it's a bit of fun but will break if they change their web page much. If it suddenly disappears you'll know what happened.

http://wspr.vk7jj.com/

Cheers,

Phil VK7JJ

Reason: No reason

vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Tue Feb 27, 2018 11:40 pm

Just remembered another thing, in the upper part of that same config file you can set or unset compression on audio and FFT, make sure you select compression on both:

Code: Select all

audio_compression="adpcm"  #valid values: "adpcm", "none"
fft_compression="adpcm"  #valid values: "adpcm", "none"
Phil

Reason: No reason

robbedoeske
Posts: 14
Joined: Sun Feb 25, 2018 8:56 am

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by robbedoeske » Wed Feb 28, 2018 10:46 pm

Oké thanks for reply, it seems I have very bad reception at all. When I use my rsp2 local with sdruno or cubic everything is oke.
But in openwerk I have no reception.When I start openwerk everything seems oke:

OpenWebRX - Open Source SDR Web App for Everyone! | for license see LICENSE file in the package
_________________________________________________________________________________________________

Author contact info: Andras Retzler, HA7ILM <randras@sdr.hu>

[openwebrx-main] Configuration script not specified. I will use: "config_webrx.py"
[openwebrx-main] nmux_bufsize = 602112, nmux_bufcnt = 84
[openwebrx-main] Started rtl_thread: rx_sdr -f 1250000 -d driver=sdrplay -g 5 -F CF32 -s 2400000 -p 0 -| nmux --bufsize 602112 --bufcnt 84 --port 4951 --address 127.0.0.1
[openwebrx-main] Waiting for I/Q server to start...
nmux: listening on 127.0.0.1:4951
[openwebrx-main] I/Q server started.
nmux: pthread_create() done, clients now: 1
client 0xe20fe0: started!
[openwebrx-main] Starting watchdog threads.
[openwebrx-main] Starting spectrum thread.
[openwebrx-spectrum] Spectrum thread initialized successfully.
[openwebrx-main] Starting HTTP server.
[openwebrx-dsp-plugin:csdr] Command = nc -v 127.0.0.1 4951 | csdr convert_u8_f | csdr fft_cc 4096 2867 | csdr logaveragepower_cf -70 4096 93 | csdr fft_exchange_sides_ff 4096 | csdr compress_fft_adpcm_f_u8 4096
[openwebrx-spectrum] Spectrum thread started.
nmux: pthread_create() done, clients now: 2
Connection to 127.0.0.1 4951 port [tcp/*] succeeded!
client 0xe211a0: started!
Using device 1702004900: mir_sdr_api_version=2.110000 mir_sdr_hw_version=2
Found 3 antenna(s): Antenna A Antenna B Hi-Z
Found 2 gain(s): IFGR RFGR
Found 2 frequencies: RF CORR
Found 13 sample rates: 250000 500000 1000000 2000000 2048000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000
Found 8 bandwidths: 200000 300000 600000 1536000 5000000 6000000 7000000 8000000
[INFO] Using format CS16.
Using output format: CF32 (input format CS16)
Sampling at 2400000 S/s.
Tuned to 1250000 Hz.
Tuner gain set to 5.00 dB.
Reading samples in sync mode...
client 0xe20fe0: CS_THREAD_FINISHED, client_goto_source = 2, errno = 32.

I see nothing wrong.
Here is my config file:

Code: Select all

# -*- 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 <randras@sdr.hu>

    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 <http://www.gnu.org/licenses/>.

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

    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="10.0.0.156" # 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.<br />
Receiver is operated by: <a href="mailto:%[RX_ADMIN]">%[RX_ADMIN]</a><br/>
Device: %[RX_DEVICE]<br />
Antenna: %[RX_ANT]<br />
Website: <a href="http://localhost" target="_blank">http://localhost</a>
"""

# ==== 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 ====
fft_fps=9
fft_size=4096 #Should be power of 2
fft_voverlap_factor=0.3 #If fft_voverlap_factor is above 0, multiple FFTs will be used for creating a line on the diagram.

# samp_rate = 250000
samp_rate = 2400000
center_freq = 1250000
rf_gain = 0 #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"

digimodes_enable=True #Decoding digimodes come with higher CPU usage. 
digimodes_fft_size=1024

start_rtl_thread=True

"""
Note: if you experience audio underruns while CPU usage is 100%, you can: 
- decrease `samp_rate`,
- set `fft_voverlap_factor` to 0,
- decrease `fft_fps` and `fft_size`,
- limit the number of users by decreasing `max_clients`.
"""

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

#################################################################################################
# Is my SDR hardware supported?                                                                 #
# Check here: https://github.com/simonyiszk/openwebrx/wiki#guides-for-receiver-hardware-support #
#################################################################################################

# 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="rx_sdr -f {center_freq} -d driver=sdrplay -g 5 -F CF32 -s {samp_rate} -p 0 -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
lna_gain=8
rf_amp=1
format_conversion="csdr convert_u8_f"

# >> 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
# You will have to correctly specify: samp_rate, center_freq, format_conversion in order to correctly play an I/Q file.
#start_rtl_command="(while true; do cat my_iq_file.raw; done) | csdr flowcontrol {sr} 20 ".format(sr=samp_rate*2*1.05)
#format_conversion="csdr convert_u8_f"

#>> The rx_sdr command works with a variety of SDR harware: RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc. 
# It will auto-detect your SDR hardware if the following tools are installed:
# * the vendor provided driver and library, 
# * the vendor-specific SoapySDR wrapper library, 
# * and SoapySDR itself.
# Check out this article on the OpenWebRX Wiki: https://github.com/simonyiszk/openwebrx/wiki/Using-rx_tools-with-OpenWebRX/
#start_rtl_command="rx_sdr -F CF32 -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=""

# >> gr-osmosdr signal source using GNU Radio (follow this guide: https://github.com/simonyiszk/openwebrx/wiki/Using-GrOsmoSDR-as-signal-source)
#start_rtl_command="cat /tmp/osmocom_fifo"
#format_conversion=""

# ==== Misc settings ====

shown_center_freq = center_freq #you can change this if you use an upconverter

client_audio_buffer_size = 5
#increasing client_audio_buffer_size will:
# - also increase the latency
# - decrease the chance of audio underruns

start_freq = center_freq
start_mod = "am" #nfm, am, lsb, usb, cw

iq_server_port = 4951 #TCP port for ncat to listen on. It will send I/Q data over its connections, for internal use in OpenWebRX. It is only accessible from the localhost by default.

#access_log = "~/openwebrx_access.log"

# ==== Color themes ====

#A guide is available to help you set these values: https://github.com/simonyiszk/openwebrx/wiki/Calibrating-waterfall-display-levels

### default theme by teejez:
waterfall_colors = "[0x000000ff,0x0000ffff,0x00ffffff,0x00ff00ff,0xffff00ff,0xff0000ff,0xff00ffff,0xffffffff]"
waterfall_min_level = -88 #in dB
waterfall_max_level = -20
waterfall_auto_level_margin = (5, 40)
### old theme by HA7ILM:
#waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff,  0xfff775ff, 0xff8a8aff, 0xb20000ff]"
#waterfall_min_level = -115 #in dB
#waterfall_max_level = 0
#waterfall_auto_level_margin = (20, 30)
##For the old colors, you might also want to set [fft_voverlap_factor] to 0.

#Note: When the auto waterfall level button is clicked, the following happens:
#   [waterfall_min_level] = [current_min_power_level] - [waterfall_auto_level_margin[0]]
#   [waterfall_max_level] = [current_max_power_level] + [waterfall_auto_level_margin[1]]
#
#   ___|____________________________________|____________________________________|____________________________________|___> signal power
#        \_waterfall_auto_level_margin[0]_/ |__ current_min_power_level          | \_waterfall_auto_level_margin[1]_/
#                                                      current_max_power_level __|

# 3D view settings
mathbox_waterfall_frequency_resolution = 128 #bins
mathbox_waterfall_history_length = 10 #seconds
mathbox_waterfall_colors = "[0x000000ff,0x2e6893ff, 0x69a5d0ff, 0x214b69ff, 0x9dc4e0ff,  0xfff775ff, 0xff8a8aff, 0xb20000ff]"

# === Experimental settings ===
#Warning! The settings below are very experimental.
csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.
csdr_print_bufsizes = False  # This prints the buffer sizes used for csdr processes.
csdr_through = False # Setting this True will print out how much data is going into the DSP chains.

nmux_memory = 50 #in megabytes. This sets the approximate size of the circular buffer used by nmux.

#Look up external IP address automatically from icanhazip.com, and use it as [server_hostname]
"""
print "[openwebrx-config] Detecting external IP address..."
import urllib2
server_hostname=urllib2.urlopen("http://icanhazip.com").read()[:-1]
print "[openwebrx-config] External IP address detected:", server_hostname
"""
/code]
Last edited by robbedoeske on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

vk7jj
Posts: 206
Joined: Thu Mar 02, 2017 9:56 am
Location: Tasmania

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by vk7jj » Thu Mar 01, 2018 1:34 am

Hi again rob and I hope that is your name :)

Your config file shows these are the settings you have chosen:
samp_rate = 2400000
center_freq = 1250000
rf_gain = 0 #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
Also, further down the page you have specified AM, I take it you are looking for a particular radio station on 12.5MHz AM?
start_mod = "am" #nfm, am, lsb, usb, cw
If you scroll back up and look at the settings that I use and suggested, you'll see they are quite different, in particular the gain and sample rate.

You said in your earlier post that you got it working but that your audio was very bad.

That would most likely be the result of selecting the high sample rate that you have as that's where the Pi struggles to find the power, but could it also be because you are listening in the wrong mode?

Try again with my settings, see if that makes any improvement.

73, Phil VK7JJ

Reason: No reason

robbedoeske
Posts: 14
Joined: Sun Feb 25, 2018 8:56 am

Re: openwebrx working with SDRPlay RSP2 on Raspberry Pi2B

Post by robbedoeske » Thu Mar 01, 2018 9:41 am

Oké thanks, i want to listen to mediumwave music stations so centerfrequence is 1250 khz. I changed settings with yours except center and modulation.

Code: Select all

OpenWebRX - Open Source SDR Web App for Everyone!  | for license see LICENSE file in the package
_________________________________________________________________________________________________

Author contact info:    Andras Retzler, HA7ILM <randras@sdr.hu>

[openwebrx-main] Configuration script not specified. I will use: "config_webrx.py"
[openwebrx-main] nmux_bufsize = 126976, nmux_bufcnt = 394
[openwebrx-main] Started rtl_thread: rx_sdr -f 1250000 -d driver=sdrplay -g 5 -F CF32 -s 500000 -p 0 -| nmux --bufsize 126976 --bufcnt 394 --port 4951 --address 127.0.0.1
[openwebrx-main] Waiting for I/Q server to start...
nmux: listening on 127.0.0.1:4951
[openwebrx-main] I/Q server started.
[openwebrx-main] Starting watchdog threads.
nmux: pthread_create() done, clients now: 1
client 0x20821a0: started!
[openwebrx-main] Starting spectrum thread.
[openwebrx-spectrum] Spectrum thread initialized successfully.
[openwebrx-dsp-plugin:csdr] Command = nc -v 127.0.0.1 4951 | csdr convert_u8_f | csdr fft_cc 4096 2923 | csdr logaveragepower_cf -70 4096 19 | csdr fft_exchange_sides_ff 4096 | csdr compress_fft_adpcm_f_u8 4096
[openwebrx-main] Starting HTTP server.
[openwebrx-spectrum] Spectrum thread started.
nmux: pthread_create() done, clients now: 2
Connection to 127.0.0.1 4951 port [tcp/*] succeeded!
client 0x236a3c8: started!
Using device 1702004900: mir_sdr_api_version=2.110000 mir_sdr_hw_version=2
Found 3 antenna(s): Antenna A Antenna B Hi-Z
Found 2 gain(s): IFGR RFGR
Found 2 frequencies: RF CORR
Found 13 sample rates: 250000 500000 1000000 2000000 2048000 3000000 4000000 5000000 6000000 7000000 8000000 9000000 10000000
Found 8 bandwidths: 200000 300000 600000 1536000 5000000 6000000 7000000 8000000
[INFO] Using format CS16.
Using output format: CF32 (input format CS16)
Sampling at 500000 S/s.
Tuned to 1250000 Hz.
Tuner gain set to 5.00 dB.
Reading samples in sync mode...
client 0x20821a0: CS_THREAD_FINISHED, client_goto_source = 2, errno = 32
I see Tuner gain set to 5.00 db. But in config rfgain set to 30?
Schermafbeelding 2018-03-01 om 10.22.24.png
Schermafbeelding 2018-03-01 om 10.22.24.png (218.15 KiB) Viewed 43443 times
As you can see no reception at all?
Last edited by robbedoeske on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Post Reply