RSP2 Pro and openwebrx...questions

Add useful snippets of code or links to entire SDR projects.
dl1bz
Posts: 5
Joined: Wed Aug 22, 2018 6:08 am

RSP2 Pro and openwebrx...questions

Postby dl1bz » Wed Aug 22, 2018 6:39 am

I have a RSP2Pro and running with a Raspberry PI3 with openwebrx.
All is working in general. I use SoapySDR with the driver-wrapper SoapySDRPlay, the driver-base for SDRPlay is 2.13 from the SDRPlay-Download-website.
openwebrx starts with rx_sdr and parameters.
But there are open questions for me.
1. How can I select in this combination one of the 3 possible ant-inputs ?
2. How exactly I need to setup the rf_gain parameter ? There are 2 in RSP2, RF-Gain and IF-Gain. How tell I the driver these 2 different parameters like in SDRConsole ? (RF_Gain in range 1..8 and IF-Gain in -XXdb). I read with the rx_sdr you need rf_gain in db. I check different values from 0-35 but the results are not really good.
3. How can I switch the IF freq ? Zero-IF generates a lot of broadcast interferences (rx-ant is a 80m/40m double dipole on ant1), I read better is to switch to IF-low (or so on).

Whats the best practise to configure these options with openwebrx ?

Btw, working with SDRConsole and WIN the RSP2 works much better because the possibilities for a better setup - with openwebrx I cannot make it equal.

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

dl1bz
Posts: 5
Joined: Wed Aug 22, 2018 6:08 am

Re: RSP2 Pro and openwebrx...questions

Postby dl1bz » Thu Aug 23, 2018 8:46 am

After play around with my RSP2 and PI3 I got better results now. I want use my RSP2 for receiving shortwave from 7 and 14 Mhz, antenna is a 80m/40m double inverted V dipole connected to ANT1.
Here my quick-and-dirty mods:
a) change in openwebrx/htdocs/openwebrx.js the USB/LSB cutoff frequencies to 200/2600 so I got a 2,4Khz bandwith in ssb - better for me.
b) in the SoapySDRPlay-wrapper-driver I made some changes directly (Settings.cpp):
change the RfGainArg.value = "4" to RfGainArg.value = "6" as default for driver to increase the sensitivity of rx, recompile the driver and install

Here you could also change the ant-input "hardcoded"...

The following relevant settings for RSP2 in config_webrx.py I use at the moment:

Code: Select all

samp_rate = 2000000
rf_gain = 35
ppm = 0
fft_fps=9
fft_size=4096
fft_voverlap_factor=0.3
# compression ON because I connect my PI over a broadband VPN connection and a 9km wlan-link
# with 2 mbit in the lowest data stream
audio_compression="adpcm"
fft_compression="adpcm"
# don't know why, but with CS16 and converting instead of CF32 without convert I have not so much problems with audio but higher cpu usage
# BUT it works better
start_rtl_command="rx_sdr -F CS16 -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_s16_f"
client_audio_buffer_size = 5


with this setup I get now a acceptable receiving on 40m and 20m. The main problem is, that the rx_tools eq. rx_sdr had limitations and don't support all the possible parameters for RSP2. If I will be have enough time - at moment not - I think I will modify and extend the rx_sdr with special features for the RSP2, also I will have a look on openwebrx and extend some features like using in KiwiSDR with openwebrx. Lets see...

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

dl1bz
Posts: 5
Joined: Wed Aug 22, 2018 6:08 am

Re: RSP2 Pro and openwebrx...questions

Postby dl1bz » Mon Aug 27, 2018 11:08 am

After testing the RSP2 a few days, I'm now running fine with the following setup:
a) I changed my environment to client-server. The "SDR-Server" is a PI3B+, there is the RSP2 connected via USB. Here I'm running SoapyRemote as server-part via TCP/IP bind on port 55730

Code: Select all

root@PI3BSDR:/lib/systemd/system# cat /usr/local/lib/systemd/system/SoapySDRServer.service
[Unit]
Description=SoapyRemote network server
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/local/bin/SoapySDRServer --bind="0.0.0.0:55730"
KillMode=process
Restart=on-failure
LimitRTPRIO=99

[Install]
WantedBy=multi-user.target


b) on other site I use a PI3B running openwebrx, but the modified version from DJ1AN from github. This version has a lot of improvments they are not part of main development.

here the remote-start part of config_openwebrx.py:

Code: Select all

start_rtl_command="rx_sdr -F CS16 -d driver=remote,remote=tcp://192.168.251.6:55730 -s {samp_rate} -f {center_freq} -p {ppm} -a \"Antenna A\" -g \"IFGR=20,RFGR=8\" -".format(rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
format_conversion="csdr convert_s16_f"

the ip-address is the PI3B+ with the server-software SoapySDRServer and RSP2 connected via USB.

the addional parameter -a from rx_sdr is a modification of this tool with addition for selecting the antenna port of RSP2, you can find it in github in pull-requests for rx_tools. Otherwise don't use this special parameter. I use the 2 different parameters for RFGR (0..8) and IFGR (20..59) instead of overall gain setup.

This setup runs with CubeSDR (tested with WIN, macos and Linux) as clients too. Thats my idea behind for using the RSP2 as server with different client software. Beware that the IFGR means "Gain Reduction", more sensitivity needs decrease the gain. I use 20 for 3-15 Mhz hamradio, RFGR you need to test to find your best results. I need a lot of time to understand how the gain mechanism really works - look at the API specifications from sdrplay, you find there all you need. It's important to understand how all works with this sdr-receiver.

On Linux (raspberry) I compile all from source, only the driver is from SDRPlay, version 2.13 as binary package. I also compile CubeSDR for PI (Debian stretch) from source, all works fine but it's a little cpu stress for PI :D For WIN and macos I use the compiled versions from the CubeSDR website.

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


Return to “Code Corner”

Who is online

Users browsing this forum: No registered users and 1 guest