If you notice spammers in the forum, please notify Bas ON5HB, so they can be removed and banned. Give a link in the chatbox or send a PM to me. Thanks.

Recent posts

#31
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by 9a7aof - Jul 05, 2025, 05:39 PM
Hi Bas,

I testing new new version script for start phantom websdr  :)

Quoteroot@Siemens:/home/websdr# service websdr status
● websdr.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/websdr.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-07-05 17:07:08 CEST; 11min ago
   Main PID: 694 (start-websdr.sh)
      Tasks: 11 (limit: 9253)
     Memory: 231.0M
        CPU: 25min 28.976s
     CGroup: /system.slice/websdr.service
             ├─694 /bin/bash /home/websdr/PhantomSDR-Plus/start-websdr.sh
             └─697 build/spectrumserver --config config-rx888mk2.toml

Quoteroot@Siemens:/home/websdr# service receiver status
● receiver.service - PhantomSDRPlus WebSDR
     Loaded: loaded (/etc/systemd/system/receiver.service; enabled; preset: enabled)
     Active: active (running) since Sat 2025-07-05 17:07:08 CEST; 31min ago
   Main PID: 630 (start-receiver.)
      Tasks: 4 (limit: 9253)
     Memory: 7.8M
        CPU: 3min 51.355s
     CGroup: /system.slice/receiver.service
             ├─630 /bin/bash /home/websdr/PhantomSDR-Plus/start-receiver.sh
             └─698 ./rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 44000000 -g 30 -m high -a 13 -d --pga -o -

srp 05 17:07:06 Siemens systemd[1]: Starting receiver.service - PhantomSDRPlus WebSDR...
srp 05 17:07:08 Siemens systemd[1]: Started receiver.service - PhantomSDRPlus WebSDR.
srp 05 17:07:13 Siemens start-receiver.sh[698]: Attenuation: 13
srp 05 17:07:13 Siemens start-receiver.sh[698]: Gain: 158

I run iptables from cron.

Best regards,
Darko,9a7aof
#32
PhantomSDR Bugs / Re: SDR-list bug...
Last post by 9a7aof - Jul 05, 2025, 05:31 PM
Hello everyone,

and especially to the author of sdr-list.

I'm not a programmer, just a happy Linux user since 1996.

I am interested in whether it is somehow possible to ban several sections of one ip number running the server on one port in the list.

So, add a filter so that a server can only be seen once if it has only one active PhantomSDR+ port.

These phantom phantoms seem "a little" frivolous.

Best regards,
Darko, 9a7aof
#33
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 05, 2025, 01:53 PM
Nope, not working either and again bad alloc stuff....

So I took receiver and spectrum apart as service....hopefully this works.

websdr.service

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

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

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

receiver.service

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

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

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

start-websdr.sh

#!/bin/bash
cd /opt/PhantomSDR-Plus/

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

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

build/spectrumserver --config $TOML < $FIFO

#exit

start-receiver.sh

#!/bin/bash
cd /opt/PhantomSDR-Plus/

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

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

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

#exit

And we are testing again....pfffff....
#34
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 05, 2025, 09:03 AM
Doesn't matter still crashes with longjumps.
So I changed it again..... :o

systemd websdr.service :

[Unit]
Description=PhantomSDRPlus WebSDR
Requires=network-online.target

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

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

start-websdr.sh

#!/bin/bash
cd /opt/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

./rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -g 30 -m low -o - | ./build/spectrumserver --config config-rx888mk2.toml

exit

Let's hope this works, maybe it's systemd causing to restart spectrum on the same port, causing it....

Fingers crossed.



#35
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by 9a7aof - Jul 04, 2025, 07:11 PM
Hi Bas,

please fix the line:
Quoterx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > >

It has to be like this and then it works (for me):
rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > $FIFO &
Best regards,
Darko, 9a7aof


#36
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 04, 2025, 05:29 PM
Ok, that all didn't work.

So I took out some compiler options and let it run with -O0, no optimize....that costed a lot of CPU 68% normal to 97% ;D
However it didn't longjump anymore.

So I removed in install.sh the --optimisze=3, just took it out.

And changed meson.build:

project(
    'spectrumdistributor',
    'cpp',
    default_options : [
        'optimization=0',
        #'b_sanitize=address'
    ]
)

add_project_arguments('-march=native', language: 'cpp')
add_project_arguments('-ggdb3', language: 'cpp')
add_project_arguments(['-std=c++23','-Ofast','-Wall','-Wextra','-Wpedantic'], language: 'cpp')

I removed Mason optimize....many say it does nothing, or something....whatever.
And I changed the optimize to be done by the compiler directly.

At the same time checking the memory-usage over time via: 'watch service websdr status' and run 'top' to see if RES number keeps going up for spectrumserver. RX888 doesn't seem to change once started.

I found that longjumps are memory leaks or memory-allocation that is in trouble because of some string or so going out of bounds.
Whatever it means  ;D

Fingers crossed, I know '-O0' seems to be fine.....but code is SLOW...real slow :o

I found several articles that Meson has memory leaks, and I did notice while running memory-consumption keeps going up.

Current memory consumption is between 625~640MB.....it changes with number of users.
#37
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 04, 2025, 02:32 PM
More progress, it seems the program is running out of memory....so I changed the systemd start-script:

[Unit]
Description=PhantomSDRPlus WebSDR
Wants=network-online.target
After=network-online.target

[Service]
PIDFile=/run/websdr.pid
ExecStart=/bin/bash /opt/PhantomSDR-Plus/start-websdr.sh
ExecStop=/bin/bash /opt/PhantomSDR-Plus/stop-websdr.sh
Restart=always
RestartSec=5
Type=Exec
RemainAfterExit=yes

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


start-websdr.sh (stop is about the same, just killing stream and spectrum)

#!/bin/bash
cd /opt/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

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

#Without PGA
rx888_stream/target/release/rx888_stream -f ./rx888_stream/SDDC_FX3.img -s 60000000 -a 0 -m low -g 40 -o - > >

sleep 2

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

#exit


Maybe it keeps running now ;)
#38
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 03, 2025, 05:49 PM
Had another again, this time the RX888STREAM, with longjumps and I couldn't start it again.

So I ran install.sh again, after it would start again.

Maybe I messed with the RX888 driver too much 8)
#39
PhantomSDR Bugs / Re: Coredumps and crash.
Last post by Bas ON5HB - Jul 01, 2025, 04:24 PM
And another one....this time plocate was running.
I do not need this tool.

So I removed it: apt purge plocate

It makes an index of all the files in the filesystem, and it was running when the errors started.

Maybe it has problems with the fifo-files?

So much useless junk in Ubuntu :'(
#40
PhantomSDR Software / Run Phantom with SDRplay devic...
Last post by Bas ON5HB - Jun 26, 2025, 05:09 PM
Hi all,

Clone the code.

git clone https://github.com/ON5HB/play_sdr.git
Install the API 2.13 that is cloned also.

Compile with just the 'make' command and copy the sdr_play in /usr/local/bin

That is the most part done.

The start-script, 9MHz spectrum and 8MHz bandfilter-width...

#!/bin/bash

killall -s 9 spectrumserver
killall -s 9 sdr_play

sleep 2

play_sdr -f 4500000 -s 9000000 -b 8000 -d 1 -R 34 -A 1 - | ./build/spectrumserver --config config-rsp1a.toml > /dev/null 2>&1 &

exit


Now the TOML I used to test....you may want to adjust it to your needs.

[server]
port=81 # Server port
html_root="frontend/dist/" # HTML files to be hosted
otherusers=1 # Send where other users are listening, 0 to disable
threads=2

[websdr]
register_online=true # If the SDR should be registered on https://sdr-list.xyz then put it to true
name="Heppen Test Websdr" # Name that is shown on https://sdr-list.xyz
antenna="G5RV fullsize" # Antenna that is shown on https://sdr-list.xyz
grid_locator="JO21oc" # 4 or 6 length Grid Locatlr shown on https://sdr-list.xyz and for the Distance of FT8 Signals
hostname="http://websdr.heppen.be" # If you use ddns or something to host with a domain enter it here for https://sdr-list.xyz

[input]
sps=9000000 # Input Sample Rate
#fft_size=1048576 # FFT bins 24% GPU
#fft_size=8388608 15% Stutter!!
#fft_size=524288 # 15% GPU
#fft_threads=2
brightness_offset=-3 # Waterfall brightness offset. Reduce to negative if you see black regions in the waterfall
frequency=4500000 # Baseband frequency
signal="iq" # real or iq
accelerator="opencl" # Accelerator: none, cuda, opencl
audio_sps=12000 # Audio Sample Rate
smeter_offset=-10
#waterfall_size=1024
#waterfall_compression="zstd" # zstd or av1

[input.driver]
name="stdin" # Driver name
format="s16" # Sample format: u8, s8, u16, s16, u32, s32, f32, f64

[input.defaults]
frequency=648000 # Default frequency to show user
modulation="AM" # Default modulation

That's all folk's!!!! ;) ;D
Powered by EzPortal