The community websdr-plus-github can be found here: https://github.com/ny4qphil/PhantomSDR-Plus ..it is compatible with the normal version, but enhanced.

Run PhantomSDR+ 2.0.0 with RSP1A (Sdrplay API 3.15.2)

Started by 9a7aof, Jul 21, 2025, 07:32 AM

Previous topic - Next topic

9a7aof

Hi,

here is my configuration files for "phantom" with RSP1A and latest Sdrplay API.

I reduced fft_size=524288, accelerator="none" , audio_sps=12000, waterfall_size=1024. It works properly and the outgoing traffic is much lower, three users use only 675 kbit/s in total. The audio quality has not noticeably decreased, ft8 decodes properly.

IT WORKS! :)

my config-rsp1a.toml# PhantomSDR-Plus v2.0.0 Configuration Example - SDRPlay RSP1A
# This configuration is optimized for SDRPlay RSP1A
# Usage: rx_sdr -d driver=sdrplay -f 4000000 -s 8000000 - | ./spectrumserver --config config.toml

[server]
port=8906 # Server port for web interface (80 for HTTP, 443 for HTTPS)
html_root="frontend/dist/" # Path to web interface files
otherusers=1 # Show other users' listening frequencies (1=enabled, 0=disabled)
threads=2 # Number of processing threads (RSP1A benefits from multiple threads)

[websdr]
register_online=true #false # Register WebSDR on https://sdr-list.xyz (true=public, false=private)
name="PhSDR+ 2.0.0 with RSP1A (test) " # Station name displayed on sdr-list.xyz and web interface
#name="9A7AOF PhantomSDRplus-2.0.0 with RSP1A " # Station name displayed on sdr-list.xyz and web interface
antenna="Fan Dipole" # Antenna description shown to users
grid_locator="JN86da" # 4 or 6 character grid locator for distance calculations
#hostname="" # Domain name for public access (leave empty for local use)
hostname="9a7aof.ddns.net" # Domain name for public access (leave empty for local use)
operator="9a7aof" # Operator name/callsign displayed in station info
email="9a7aof_at_gmail.com" # Contact email for station information
callsign_lookup_url="https://www.qrz.com/db/" # URL for callsign lookups in server info panel
chat_enabled=true # Enable/disable chat functionality (new in v2.0.0)

[limits]
# Connection limits to prevent server overload
audio=100 # Maximum audio connections
waterfall=100 # Maximum waterfall connections
events=100 # Maximum event connections

[input]
# SDRPlay RSP1A optimized settings - HF/VHF coverage
sps=8000000 # Input sample rate (RSP1A: up to 10MHz, 8MHz = 8MHz bandwidth)
fft_size=524288 #FFT bins
#fft_size=1048576 # FFT bins for spectral analysis (large for good resolution)
fft_threads=2 # Number of FFT processing threads
brightness_offset=-8 #-6 # Waterfall brightness adjustment (RSP1A typically darker)
frequency=4000000 # Center frequency in Hz (4MHz for HF coverage)
signal="iq" # Signal type: "iq" for complex samples (RSP1A provides IQ)
accelerator="none" #"opencl" # GPU acceleration recommended for high sample rates
#audio_sps=44100 # Audio sample rate for demodulated output (CD quality)
audio_sps=12000 #44100 # Audio sample rate for demodulated output (CD quality)
audio_compression="flac" # Audio compression: "flac" (lossless only)
waterfall_size=1024 #2048 # Waterfall display width in pixels
waterfall_compression="zstd" # Waterfall compression: "zstd" only
smeter_offset=-10 # S-meter calibration offset in dB (RSP1A specific)

[input.driver]
name="stdin" # Input driver: "stdin" for piped data from rx_sdr
format="s16" # Sample format for RSP1A: s16 (16-bit signed integers)

[input.defaults]
# Default settings when users first connect
frequency=3675000 # Default frequency to display (3.645MHz - 80m amateur band)
modulation="LSB" # Default modulation mode: LSB for HF amateur bands


I downolad latest Sdrplay API from https://www.sdrplay.com/api/ and install it as root.

Rx tools  and  SoapySDR I download from GitHub, compile and install it as root.

I run everything via systemd (thanks Bas).  ;) 
start-receiver.sh #!/bin/bash
cd /home/websdr/PhantomSDR-Plus/

## Files to load
FIFO=fifo.fifo

[ ! -e "$FIFO" ] && mkfifo $FIFO

#Without PGA
#rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 --pga -d -r -g 80 -a 0 -m low -o - > $FIFO

#RSP1A
rx_sdr -f 4000000 -s 8000000 -d driver=sdrplay -g RFGR=1 -t rfnotch_ctrl=false -F CS16 - > $FIFO

#exit

start-websdr.sh

#!/bin/bash
cd /home/websdr/PhantomSDR-Plus/

### STOP CRASH Injections!!!!
##If no other rules apply, flushing is easier

iptables -D INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -D INPUT -m string --algo kmp --string "device.rsp" -j DROP

iptables -A INPUT -m string --algo kmp --string "%3C%" -j DROP
iptables -A INPUT -m string --algo kmp --string "device.rsp" -j DROP

## Files to load
FIFO=fifo.fifo
#TOML=config-rx888mk2.toml
TOML=config-rsp1a.toml

[ ! -e "$FIFO" ] && mkfifo $FIFO

service receiver restart

sleep 2

./build/spectrumserver --config $TOML < $FIFO

#exit

( start-receiver.sh and start-websdr.sh are in my /home/websdr/PhantomSDR-Plus/ )

Don't forget  chmod +x start-receiver.sh
chmod +x start-websdr.sh

If you want, you can now manually start (I didn't try it manually, my goal was automation :) )
cd  /home/websdr/PhantomSDR-Plus/
./start-receiver.sh
./start-websdr.sh

To automatically start when the computer starts, you need to add these two scripts and register them with the system:
receiver.service
[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target
Before=websdr.service

[Service]
PIDFile=/run/receiver.pid
ExecStart=/home/websdr/PhantomSDR-Plus/start-receiver.sh
Type=exec
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=receiver.service

websdr.service
[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target
After=receiver.service

[Service]
PIDFile=/run/websdr.pid
ExecStart=/home/websdr/PhantomSDR-Plus/start-websdr.sh
Type=exec
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
Alias=websdr.service

( receiver.service and websdr.service are in /etc/systemd/system/ )

After you copy (as root) receiver.service and websdr.service in your /etc/systemd/system/ run
systemctl enable receiver
systemctl enable websdr
systemctl start receiver
systemctl start websdr

If your "phantom" start and work, then reboot PC.
After reboot al works fine.

Quoteroot@swo:/home/websdr/rx_tools# service receiver status
● receiver.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/receiver.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2025-07-20 06:37:21 CEST; 1 day 4h ago
   Main PID: 833 (start-receiver.)
      Tasks: 5 (limit: 4167)
     Memory: 3.9M
        CPU: 2h 3min 47.685s
     CGroup: /system.slice/receiver.service
             ├─833 /bin/bash /home/websdr/PhantomSDR-Plus/start-receiver.sh
             └─834 rx_sdr -f 4000000 -s 8000000 -d driver=sdrplay -g RFGR=1 -t rfnotch_ctrl=false -F CS16 -
Quoteroot@swo:/home/websdr/rx_tools# service websdr status
● websdr.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/websdr.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2025-07-20 06:37:19 CEST; 1 day 4h ago
   Main PID: 757 (start-websdr.sh)
      Tasks: 12 (limit: 4167)
     Memory: 60.1M
        CPU: 1d 17h 12min 40.651s
     CGroup: /system.slice/websdr.service
             ├─757 /bin/bash /home/websdr/PhantomSDR-Plus/start-websdr.sh
             └─878 ./build/spectrumserver --config config-rsp1a.toml

If receiver or websdr service crash, systemd restart it automatically.

Best regards,
Darko, 9a7aof



9a7aof

QuoteIf receiver or websdr service crash, systemd restart it automatically.
This statement is only partly true, yesterday after hard work the "phantom" got tired,
restarted itself and the receiver and it did a good job. :)

The receiver has an unpleasant habit (I assume it's a bug in the driver for RSP1A or rx_sdr )
that after several hours of operation, horizontal yellow and white lines appear on the "phantom"
 and the sound is distorted (receiver process work). :(

That's why I added a line to the crontab that solves that problem by ingeniously restarting
only the receiver's process, the "phantom" sees that restart as one short-lived line
on the screen and continues to work normally. ;)

As root run
crontab -eand then with your favorite editor add line:
#---------------------------------------------------------
59 * * * * /bin/bash -lc 'cd /usr/sbin/ && ./service receiver restart'
## -------------------------------------------------------
and save it.

This unconditionally restarts the receiver process every full hour , good or bad, it doesn't matter
(quick fix until the developers figure out how to fix the RSP1A driver or rx_sdr).

QuoteInnovators are people who work hard so that other people don't have to do anything! :) :)

Best Regards,
Darko, 9a7aof



Bas ON5HB

You have to restart both, the receiver AND websdr, else it happens that it doesn't understand the stream correctly.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

9a7aof

Quote from: Bas ON5HB on Jul 22, 2025, 03:02 PMYou have to restart both, the receiver AND websdr, else it happens that it doesn't understand the stream correctly.

Quotewebsdr@swo:~$ sudo su
[sudo] password for websdr:
root@swo:/home/websdr# service websdr status
● websdr.service - PhantomSDRPlus WebSDR
    Loaded: loaded (/etc/systemd/system/websdr.service; enabled; vendor preset: enabled)
    Active: active (running) since Mon 2025-07-21 21:30:36 CEST; 3 days ago
  Main PID: 758 (start-websdr.sh)
      Tasks: 12 (limit: 4167)
    Memory: 84.3M
        CPU: 5d 12h 7min 48.583s
    CGroup: /system.slice/websdr.service
            ├─758 /bin/bash /home/websdr/PhantomSDR-Plus/start-websdr.sh
            └─875 ./build/spectrumserver --config config-rsp1a.toml

Quoteroot@swo:/home/websdr# service receiver status
● receiver.service - PhantomSDRPlus WebSDR
    Loaded: loaded (/etc/systemd/system/receiver.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2025-07-25 04:59:02 CEST; 58min ago
  Main PID: 349526 (start-receiver.)
      Tasks: 5 (limit: 4167)
    Memory: 3.1M
        CPU: 4min 54.348s
    CGroup: /system.slice/receiver.service
            ├─349526 /bin/bash /home/websdr/PhantomSDR-Plus/start-receiver.sh
            └─349527 rx_sdr -f 4000000 -s 8000000 -d driver=sdrplay -g RFGR=1 -t rfnotch_ctrl=false -F CS16 -


You need only two minutes of your precious time to personally check what is copied here from the live system.
Come two minutes  before the full hour at http://9a7aof.ddns.net:8906 and see what happens.
Only two minutes (see waterfall)...

QuoteIn theory, there is no difference between theory and practice. In practice, there is.

Best regards,
Darko, 9a7aof

Bas ON5HB

Looks to me your gain is by far too high on the RSP1A, you really need to lower it a lot.
As you are injecting noise mostly.
Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

9a7aof

Quote from: Bas ON5HB on Jul 25, 2025, 04:49 PMLooks to me your gain is by far too high on the RSP1A, you really need to lower it a lot.
As you are injecting noise mostly.


Thanks,

my environment has a high level of interference (VDSL) :( , the parameters for RSP1A are those that came with the examples on GitHub.

What parameters for RSP1A do you suggest, how to reduce the gain?
I'm not really familiar with it.

Best Regars
Darko, 9a7aof

Bas ON5HB

#6
VDSL does not inject noise into HAM-radio bands.
I have VDSL too ;D

But I have put a lot of ferrite (some Material 31) on the DSL-line just to make sure it can't transmit or pickup DSL-signals.

Also, beware of the modem you use, as many modems are crap and produce the noise, where good modems have notches.

Another thing, do you have common-mode-chockes on your coax to the RSP1A? Because if you didn't your coax is part of the antenna en transmits noise from the house into the antenna and then feed it into the RSP1A.

You cannot view this attachment.

See my common-mode-filter...to make sure no coax-outside-currents can flow into the antenna.

BTW, this works for TX and RX to keep signals out of the shack while transmitting. The example is my G5RV as my longwire was broken when I took the picure :'(

As for gain, you have to test it. Set it that low that without antenna makes no difference in noise level. Then check if signals pass with antenna. Set gain high is NOT a good idea for SDR-receivers as they have far too much SNR anyway to cope. But at full-scale (too high gain) they start clipping and signals will be bad or even gone. My advice, keep the biggest signal at 50~70% (lower is better!) scale, more then enough. Then change the websdr-parameters to match it. You have to work this out yourself. Else try the receiver in Windows and find out what 50~70% scale is, find the same under Linux.

Best regards,

Bas ON5HB

Ps. the Community Edition can be found here: https://github.com/ny4qphil/PhantomSDR-Plus

Powered by EzPortal