Hi all,
Since a bit we have the option to give every receiver a fifo input, this works the same as stdin, but you can run all of them this way. I do not want to use Soapy as fifo is much easier.
Here we go make a start-websdr.sh script:
#!/bin/bash
cd /opt/novasdr/
# kill nova and all receivers
killall -s 9 novasdr-server
killall -s 9 rx888
## Files to load
FIFO0=rx0.fifo
#FIFO1=rx1.fifo
#FIFO2=rx2.fifo
#FIFO3=rx3.fifo
#FIFO4=rx4.fifo
## Make all fifo's
[ ! -e "$FIFO0" ] && mkfifo $FIFO0
#[ ! -e "$FIFO1" ] && mkfifo $FIFO1
#[ ! -e "$FIFO2" ] && mkfifo $FIFO2
#[ ! -e "$FIFO3" ] && mkfifo $FIFO3
#[ ! -e "$FIFO4" ] && mkfifo $FIFO4
# Push all receivers into fifox
./rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -g 50 -m low -o - > $FIFO0 &
sleep 3
#next receiver
#sleep 3
# Start nova itself
./novasdr-server --no-file-log
Make stop-websdr.sh:
#!/bin/bash
cd /opt/novasdr/
killall -s 9 novasdr-server
exit
You can also kill all reaceivers in the stop-script if you want, no need to remove the fifo's.
Make a systemd script like this: nano /usr/lib/systemd/system/websdr.service
[Unit]
Description=NovaSDR WebSDR
After=network-online.target
[Service]
Type=exec
ExecStart=/opt/novasdr/start-websdr.sh
ExecStop=/opt/novasdr/stop-websdr.sh
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
'systemctl enable websdr' to make it startable.
Next run 'nova-sdr-server configure' and make it set this:
{
"id": "rx0",
"input": {
"accelerator": "clfft",
"audio_compression": "adpcm",
"audio_sps": 12000,
"brightness_offset": 0,
"defaults": {
"frequency": 3630000,
"modulation": "LSB",
"ssb_highcut_hz": 2800,
"ssb_lowcut_hz": 100
},
"driver": {
"format": "s16",
"kind": "fifo",
"path": "rx0.fifo"
},
"fft_size": 524288,
"fft_threads": 2,
"frequency": 0,
"signal": "real",
"smeter_offset": -30,
"sps": 60000000,
"ssb_highcut_hz": 2800,
"ssb_lowcut_hz": 100,
"waterfall_compression": "zstd",
"waterfall_size": 2048
},
"name": "RX888MK2 (0-30MHz)"
},
After you are done: 'systemctl start websdr' (or reboot)
Now your websdr should run via fifo's, it's the same as stdin but piped to fifo, so you can run more then 1 receiver this way.
To add an RSP1....patched player version 2.13 API : https://github.com/ON5HB/SDR_Play/tree/main
Line
play_sdr -f 1024000 -s 2048000 -R 40 -l 1 -n 0 -x 16 - > $FIFO1 &
Receivers.config
{
"id": "rx3",
"input": {
"accelerator": "clfft",
"audio_compression": "adpcm",
"audio_sps": 12000,
"brightness_offset": -6,
"defaults": {
"frequency": 648000,
"modulation": "AM",
"squelch_enabled": false
},
"driver": {
"format": "s16",
"kind": "fifo",
"path": "rx1.fifo"
},
"fft_size": 131072,
"frequency": 1024000,
"signal": "iq",
"smeter_offset": -50,
"sps": 2048000,
"waterfall_compression": "zstd",
"waterfall_size": 2048
},
"name": "SDRplay RSP2"
}
That's it.
Airspy Discovery....also very simple...I use serial-number (if you have more):
airspyhf_rx -s "0xDD52EB5DAC3839F7" -f 0.456 -a 912000 -r stdout > $FIFO2 &
Receivers.json
{
"id": "rx3",
"input": {
"accelerator": "clfft",
"audio_compression": "adpcm",
"audio_sps": 12000,
"brightness_offset": 0,
"defaults": {
"frequency": 648000,
"modulation": "AM",
"squelch_enabled": false
},
"driver": {
"format": "cf32",
"kind": "fifo",
"path": "rx2.fifo"
},
"fft_size": 131072,
"frequency": 456000,
"signal": "iq",
"smeter_offset": -40,
"sps": 912000,
"waterfall_compression": "zstd",
"waterfall_size": 2048
},
"name": "Airspy Disco"
}
Airspy can be installed with 'apt install airspy*' installs both Airspy (R2+Mini) and AirspyHF (Disco+HF)
Not that hard to make working.