Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Discuss KerberosSDR - 4x Coherent RTL-SDR
Post Reply
StandingWave
Posts: 29
Joined: Fri Jul 27, 2018 1:00 am

Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by StandingWave » Fri May 17, 2019 1:23 am

Hi there (again)!

Just wanted to ask if someone has any ideas on what might be going on with the Raspberry Pi 3B+ software for the KerberosSDR? For some reason, I'm unable to get anything sensible out of the KerberosSDR util for Raspbian/Linux.

The problem is that although the kerberossdr util starts up without any major issues, the waveform/spectrum views in the KerberosSDR main program window are NOT updating at all. No matter what I try. I had the same problem with the latest pre-built RPi3B+ image that was provided on the Quick Start Guide page.

When I installed the software to my own RPi3B+ Raspbian environment, the end result was exactly the same. I had no problems installing the packages. Even a dry run with the "rtl_test -d<X>" worked out fine with all four of the KSDR's receivers - not a single error or a lost packet.

I followed all the required steps closely when I installed kerberossdr on to my own RPi 3B+ / Raspbian Stretch build, and for some reason that completely eludes me, nothing seems to work when it comes to redrawing the waveforms in any of the program tabs.

The "Power level" shows a green "OK".
The "Update rate" shows "-ms" (as in: it's not updating.)

Clicking on this, that or the other button doesn't do anything. The same issue was in the pre-built image, straight from the box.

These are the only lines I get in the Linux shell before the program starts:

Code: Select all

3
Starting KerberosSDR
kill: (1449): No such process
I've also tried editing the "run.sh" (startup script) as recommended in the notes to be in a more verbose mode, but that too doesn't come up with anything. The PHP/web server that the script launches is working, both subpages load, but neither of them are updating.

All help would be kindly appreciated, once more. :geek: :ugeek:

Thanks.

rtlsdrblog
Site Admin
Posts: 2136
Joined: Mon Nov 19, 2012 11:54 pm

Re: Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by rtlsdrblog » Fri May 17, 2019 1:35 am

Are you on the very latest 1.3 version? If you commented out the original execution line, and uncommented the verbose one, then it would log all error messages to the log files. Check your directory for log_ files and see what's in them.

From experience I would say it is most likely to be a power problem. Did you manage to try a new USB-C cable with your power supplies after the other one broke? Try plugging in just the powered USB-C, and peeking in to see if a white LED turns on. That would indicate the USB-C is providing power.

Also just confirming, make sure that you have the KSDR plugged in and already powered BEFORE booting the Pi3.

StandingWave
Posts: 29
Joined: Fri Jul 27, 2018 1:00 am

Re: Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by StandingWave » Wed May 22, 2019 9:04 am

rtlsdrblog wrote:
Fri May 17, 2019 1:35 am
Are you on the very latest 1.3 version? If you commented out the original execution line, and uncommented the verbose one, then it would log all error messages to the log files. Check your directory for log_ files and see what's in them.

From experience I would say it is most likely to be a power problem. Did you manage to try a new USB-C cable with your power supplies after the other one broke? Try plugging in just the powered USB-C, and peeking in to see if a white LED turns on. That would indicate the USB-C is providing power.

Also just confirming, make sure that you have the KSDR plugged in and already powered BEFORE booting the Pi3.
Yes, I replaced the USB-C connection, and I'm getting the led light lit up and all. The KSDR seems to be working with the test util with all four tuners running simultaneously without a single sample being dropped.

I think the problem was in compiling the util altogether, I got a weird glitch upon trying to do this installation onto the RPi 3B+, as described in the Quick Start Guide:

Code: Select all

pip3 install scipy
I think that's the culprit, since after trying to reinstall all other packages, libraries and dependencies, the scipy installation is the only one that gives out a multitude of errors and even asks to submit in a bug report. Sheesh ...

Will try with the pre-built images (again, although I had the same issue of the KSDR util's UI's graphics not being updated with the regular version as well). What is the actual difference between the RPi Tinkerboard image version and the regular KSDR util image? That (among a plethora of other things) isn't described in much detail anywhere. Thanks.

StandingWave
Posts: 29
Joined: Fri Jul 27, 2018 1:00 am

Re: Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by StandingWave » Wed May 22, 2019 9:18 am

Just an update on installing scipy on a Raspberry Pi 3B+, seems like it's a real tough one to install because of the memory requirements and RPi's limitations. I found a workaround-how-to for the installation at Stackexchange: https://raspberrypi.stackexchange.com/q ... spberry-pi
TL;DR: skip to the last paragraph to know how to increase swap space and avoid memory clogging. Also, don't use pip for numpy and scipy.

To get the latest version of scipy on the raspberry Pi you need to build from source. The main reason is that scipy relies on compiled C and fortran libraries, that need to be compiled on the same architecture. Usually pip install would fetch prebuilt packages for you, but Raspberry Pi's ARM architecture is not really supported.

If this was all you needed it would be relatively easy (main instructions can be found here and are summarized below), but there is an additional problem with the raspberry pi that I realized only after a week of research and trial and error (skip at the end if you just need the fix), which is due, I believe, to the small amount of memory available.

I'll just try and summarize the whole process (so that people don't have to jump around the internet like I did).
Requirements

There are a few requirements for building scipy. As far as python packages go, you'll need numpy, cython, setuptools, and (if you want to build the documentation) Sphinx. You should try and use the version of these packages that comes with Raspbian (in packages such as python3-numpy), but they might need to be built separately (OT).

As far as system requirements go, you'll need a few packages that can be installed with apt-get, namely:

A BLAS/LAPACK math library with development headers, e.g. libopenblas-base and libopenblas-dev;
python-dev;
C and Fortran compilers, gcc and gfortran;

Finally you need the source code, that you can download from here: https://github.com/scipy/scipy/blob/v1. ... LL.rst.txt

(Scipy 1.0.0 is the latest stable version as I am writing). Then it's just a matter of:

Code: Select all

tar -xzvf scipy-v1.0.0.tar.gz
cd scipy
Compiling the source

At this point, if you start the build process, it will seem to go fine, but it will hang after a few minutes.
Adding bigger swap space

This is due to the compiling script occupying the totality of both RAM and swap memory by spawning multiple processes (and replicating memory by consequence). The problem is that in the Raspberry Pi the swap space is particularly small (only 100MB I think), while the norm would be to have it the same size of your RAM.

As explained here and here, swap space can be increased typing the following:

Code: Select all

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
which will give you 1GB of swap space.

Then one can finally build and install with

Code: Select all

python3 setup.py build
python3 setup.py install --user
(you can drop the --user flag if you want to install it system-wide, but you'll need root privilege).

Finally, one remove the extra swap and restore the default:

Code: Select all

sudo swapoff /var/swap.1
sudo rm /var/swap.1
Will be trying that one next, too.

rtlsdrblog
Site Admin
Posts: 2136
Joined: Mon Nov 19, 2012 11:54 pm

Re: Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by rtlsdrblog » Wed May 22, 2019 10:32 pm

What is the actual difference between the RPi Tinkerboard image version and the regular KSDR util image? That (among a plethora of other things) isn't described in much detail anywhere.
I'm not sure what you mean by the regular KSDR util image? There are only two images. One for the Tinkerboard and one for the Pi 3.

The images simply have the software preinstalled on it, so there's no need to go through and manually install the program and dependencies.

rtlsdrblog
Site Admin
Posts: 2136
Joined: Mon Nov 19, 2012 11:54 pm

Re: Problems with kerberossdr util on Linux/Raspberry Pi 3B+ / waveforms not updating

Post by rtlsdrblog » Wed May 22, 2019 10:34 pm

For scipy if you're having trouble on a Pi3, you could try installing it from the repo's instead.

apt-get install python3-scipy

But if you're on a Pi3, why not use the provided image?

Post Reply