So far fail....it starts swapping and doesn't complete. ;D
Any logs?
It just started swapping and nothing else was possible to do.
You gave me the idea to try - history below
Raspberry Pi 4 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
Linux 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
---requirements---
$ sudo apt install build-essential cmake pkg-config meson libfftw3-dev libwebsocketpp-dev libflac++-dev zlib1g-dev libzstd-dev libboost-all-dev libopus-dev libliquid-dev git psmisc
pass
------------------
1st attempt: (cmake version nok)
$ meson setup build --optimization 3
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.21 or higher is required. You are running version 3.18.4
-- Configuring incomplete, errors occurred!
$ sudo apt install cmake
cmake is already the newest version (3.18.4-2+rpt1+rpi1+deb11u1).
$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
→ upgrading cmake
$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
$ sudo apt update && apt install cmake -t bullseye-backports
$ cmake --version
cmake version 3.25.1
------------------
2nd attempt: (gcc version nok)
$ meson setup build --optimization 3
pass
$ meson compile -C build
c++: error: unrecognized command-line option '-std=c++23'; did you mean '-std=c++03'?
ninja: build stopped: subcommand failed.
$ gcc --version
gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
$ sudo apt install gcc -t bullseye-backports
gcc is already the newest version (4:10.2.1-1+rpi1).
$ nano meson.build
-add_project_arguments(['-std=c++23','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
+add_project_arguments(['-std=c++11','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
------------------
3rd attempt: (fix attempt failure)
$ rm -rf build/
$ meson setup build --optimization 3
pass
$ meson compile -C build
../subprojects/tomlplusplus-3.4.0/include/toml++/impl/preprocessor.hpp:54:2: error: #error toml++ requires C++17 or higher. For a C++11 TOML library see https:
54 | #error toml++ requires C++17 or higher. For a C++11 TOML library see https://github.com/ToruNiina/toml11
| ^~~~~
ninja: build stopped: subcommand failed.
------------------
4th attempt: (missing nlohmann-json)
$ nano meson.build
-add_project_arguments(['-std=c++11','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
+add_project_arguments(['-std=c++17','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
$ rm -rf build/
$ meson setup build --optimization 3
pass
$ meson compile -C build
../src/audio.h:7:10: fatal error: nlohmann/json.hpp: No such file or directory
ninja: build stopped: subcommand failed.
$ apt-cache search nlohmann
nlohmann-json-dev - JSON for Modern C++
nlohmann-json3-dev - JSON for Modern C++
$ sudo apt install nlohmann-json-dev
------------------
5th attempt: (wrong nlohmann-json installed + c++20 fix)
$ meson compile -C build
[0/18] Compiling C++ object spectrumserver.p/src_signal.cpp.o
../src/utils.h:97:5: error: need 'typename' before 'std::conditional<std::is_floating_point<_Tp>::value, Neumaier<T>, T>::type' because 'std::conditional<std::is_floating_point<_Tp>::value, Neumaier<T>, T>' is a dependent scope
97 | std::conditional<std::is_floating_point<T>::value, Neumaier<T>, T>::type
| ^~~
| typename
ninja: build stopped: subcommand failed.
$ nano meson.build
-add_project_arguments(['-std=c++17','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
+add_project_arguments(['-std=c++20','-Wall','-Wextra','-Wpedantic'], language: 'cpp')
$ rm -rf build/
$ meson setup build --optimization 3
pass
$ meson compile -C build
/usr/include/nlohmann/json.hpp:1634:15: error: 'class std::allocator<std::vector<nlohmann::basic_json<>, std::allocator<nlohmann::basic_json<> > > >' has no member named 'construct'
$ sudo apt install nlohmann-json3-dev
------------------
6th attempt: (last chance, upgrade gcc - moved to armbian testing)
$ meson compile -C build
FAILED: spectrumserver.p/src_client.cpp.o
../subprojects/glaze/include/glaze/reflection/get_name.hpp:48:108: error: no matching function for call to 'mangled_name<glz::detail::get_ptr<0, const glz::detail::GLAZE_REFLECTOR&>(glz::detail::external<glz::detail::GLAZE_REFLECTOR>)>()'
48 | constexpr std::string_view get_name_impl = mangled_name<get_ptr<N>(external<std::remove_volatile_t<T>>)>();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
ninja: build stopped: subcommand failed.
$ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ testing main non-free contrib
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ testing main contrib non-free
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/ testing main non-free contrib
$ sudo apt update && apt install gcc
$ gcc --version
gcc (Raspbian 13.3.0-1+rpi2) 13.3.0
$ rm -rf build/
$ meson setup build --optimization 3
pass
------------------
7th attempt: (yyeahhh)
$ meson compile -C build
[21/21] Linking target spectrumserver
SUCCESS !
I highly recommend to go armbian "testing" directly :-)
# INSTALLATION TEST
$ sudo dmesg
[ 5396.633032] usb 1-1.4: New USB device found, idVendor=0bda, idProduct=2838, bcdDevice= 1.00
[ 5396.633066] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5396.633083] usb 1-1.4: Product: Blog V4
[ 5396.633097] usb 1-1.4: Manufacturer: RTLSDRBlog
[ 5396.633111] usb 1-1.4: SerialNumber: 00000001
$ mv config.example.rtlsdr.toml config-rtl.toml
$ rtl_sdr -g 48 -f 145000000 -s 2048000 - | ./build/spectrumserver --config config-rtl.toml
Found 1 device(s):
Thank you for using PhantomSDR+, you are supporting the Development of an Open-Source WebSDR Project ♥
0: RTLSDRBlog, Blog V4, SN: 00000001
Unable to open marker.json file.
Using device 0: Generic RTL2832U OEM
No FFTW wisdom file found. Planning from scratch. This may take long on the first time but will then be fast.
Found Rafael Micro R828D tuner
RTL-SDR Blog V4 Detected
Sampling at 2048000 S/s.
Tuned to 145000000 Hz.
Tuner gain set to 48.00 dB.
Reading samples in async mode...
Waterfall is sent every 4 FFTs
Unable to open marker.json file.
2024-09-05 21:57:30] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
[2024-09-05 21:57:30] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
[2024-09-05 21:57:30] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
[2024-09-05 21:57:30] [info] Error getting remote endpoint: system:107 (Transport endpoint is not connected)
[2024-09-05 21:57:30] [info] asio async_write error: system:32 (Broken pipe)
[2024-09-05 21:57:30] [fatal] handle_write_frame error: websocketpp.transport:2 (Underlying Transport Error)
Unable to open marker.json file.
# RESULT
:-\ AUDIO CUTS EVERY HALF OF A SECOND → UNUSABLE :-\
$ uptime
21:59:57 up 1:49, 2 users, load average: 0.71, 0.79, 0.87
$ free -m
total used free shared buff/cache available
Mem: 3794 108 2400 1 1285 3608
BTW: "No FFTW wisdom file found. Planning from scratch. This may take long on the first time but will then be fast." << yes about 1 to 2 minutes
# NEXT TEST
Is opencl possible ? probably, more to follow, too late for now
Regards
linkz
I've found a better setting, my bad, no more audio cuts
[input]
sps=2048000 # Input Sample Rate
fft_size=131072 # FFT bins
brightness_offset=0 # Waterfall brightness offset. Reduce to negative if you see black regions in the waterfall
frequency=7100000 # Baseband frequency
signal="iq" # real or iq
accelerator="none" # Accelerator: none, cuda, opencl
audio_sps=12000 # Audio Sample Rate
smeter_offset=0
$ uptime
22:47:57 up 24 min, 2 users, load average: 0.90, 0.87, 0.64
$ free -m
total used free shared buff/cache available
Mem: 3794 98 3562 1 132 3628
$ vcgencmd measure_temp
temp=63.7'C (GPU)
$ awk '{printf("\ntemp=%.1f°C\n\n",$1/1e3)}' /sys/class/thermal/thermal_zone0/temp
temp=63.8°C (CPU)
(https://i.imgur.com/Q0Om8Hg.jpeg)
(https://i.imgur.com/nhKN0lC.jpeg)
Going to try myself layter today....cool ;D
Not got it to work....maybe a good idea to release an RPix 64bit version for download that works?
Well, RTL-SDR.com dongle V4 is working ok but no success in running the RX888 MK2 btw
→ streamserver just fails to open the SDDC_FX3.img bootloader
I've even tried to make the bootloader using aarch64 compiler and result is the same
Regards
linkz
I don't even get that far, it crashes on the firat copiling section and starts swapping until the box reacts no more till I close the ssh-session. After it takes minutes to recover from it ;D
Some news
PhantomSDR+ 1.5.4 on the Raspi 4B (4GB RAM) + RTLSDRBlog V4 dongle is working like a charm, no crash so far.
Not much people connected at same time to see how it can handle the load, tho.
threads=2
sps=2000000 # Input Sample Rate
fft_size=131072 # FFT bins
fft_threads=2
accelerator="none"
waterfall_size=1024
waterfall_compression="zstd"
---
rtl_sdr -g 15 -f 1000000 -s 2000000
(https://i.imgur.com/hTze8hL.jpeg)
Regards
linkz
Can you make a copy of the Sd-card and upload it to github?
Then others can use your card and run 'out-of-the-box'.
Um, no sorry, because there are other private things on this rpi.
But actually it hosted OpenWebRX+ and it is based on an existing image (2023-10-29-OpenWebRX+-1.2.35) which could be downloaded here:
The version I took is no longer available but another one should be suitable.
OpenWebRX+ releases (https://github.com/luarvique/openwebrx/releases)
I was too lazy to start from scratch and wasn't sure if PhantomSDR+ could compile, so I left the OS as is.
It's not ideal to start with a bloated OS version, so why not try to fix your build issues on your current OS instead?
Regards
linkz
I will create a SD Image soon!
I also tried putting 20 users on this sdr and it ran fine so the PI4 runs awesome!
BAS
Can you try this image ?
http://linkz.ddns.net/rpi4b-phantomsdrplus-rtlv4-20240921.img.xz
user / pw
websdr / websdr
root / phantom
Root password wasn't set ;D
But I'm testing it right now.
Ok, I have worked it out.
Had to kill all the zram stuff, make a swapfile of about 10GB....my Pi4 is only 2GB-ram.
Turns out that Ninja uses 6-threads by default, that was overloading everything.
So I told Ninja to use 1 thread only and it would compile.
Maybe the install-script should limit to e.g. 2-thread max for Ninja, it won't be that much slower.
I installed the RX-888 and with no-accel it does easily 5MHz BW.
[input]
sps=10000000 # Input Sample Rate
#fft_size=524288 # FFT bins
fft_size=262144
fft_threads=2
brightness_offset=0 # Waterfall brightness offset. Reduce to negative if you see black regions in the waterfall
frequency=0 # Baseband frequency
signal="real" # real or iq
accelerator="none" # Accelerator: none, cuda, opencl
audio_sps=12000 # Audio Sample Rate
audio_compression="flac" # flac or opus
waterfall_size=1024
waterfall_compression="zstd" # zstd or av1
smeter_offset=0
Stutterfree....but it's just for testing ;D
Tried to install OpenCL but failed so far :-X
Max I can squeze out of a Pi4:
[input]
sps=12000000 # Input Sample Rate
#fft_size=524288 # FFT bins
fft_size=262144
fft_threads=2
brightness_offset=0 # Waterfall brightness offset. Reduce to negative if you see black regions in the waterfall
frequency=0 # Baseband frequency
signal="real" # real or iq
accelerator="none" # Accelerator: none, cuda, opencl
audio_sps=12000 # Audio Sample Rate
audio_compression="flac" # flac or opus
waterfall_size=1024
waterfall_compression="zstd" # zstd or av1
smeter_offset=0
FYI
http://linkz.ddns.net:8089 (raspi4 + rtl v4 dongle) is now:
0600z-1800z 28-30MHz
1800z-0600z 0-2MHz
(simple cron stuff)
Hi
My Raspberry Pi 4B 4GB now hosts a second rtl-sdr v4 dongle and streamserver with 30-32MHz range
Seems ok so far
to be continued..
Found the issue why it stopped compiling on a low-CPU/Memory system.
Go into the install.sh and find this line:
meson compile -C build
Change it to
meson compile -j2 -C build
Meaning it will use 2 CPU-cores now and not the 6 by default.
Because more cores means it needs more memory, reducing the number of cores will help to finish the proces.
On most machines this isn't needed, but my tiny RPi4 with 2GB ram can not compile if more then 2 cores are used, as it runs out of memory and crashes. 8)