/kerberossdr

KerberosSDR Demo software for direction finding and passive radar

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Change Log

  • Further Updates: More changes to the files to make them actually PyQt5 compatible (e.g. handle the move of all the Qt5 Wigets to the QtWidgets namespace). PyQt5 should be installed via pip, though we still need to get the Qt5 libs via the system package manager.

  • This fork also outputs DoA data via UDP broadcast messages on ports 55672 (limited to 2Hz updates) and 55682 (all solution data). Information on the bearing format is available here: https://github.com/projecthorus/chasemapper#radio-direction-finding-support

  • The purpose of this branch is to get ksdr working in the latest kubuntu (and Ubuntu) based linux, which use different libraries (PyQt5 and libffi7). This branch is currently in testing status, but I have successfully gotten it working in both Ubuntu 20.04 LTS and kubuntu 20.04 LTS.

  • This branch is meant for, and only works in, Ubuntu + kubunu versions 20.04 LTS. It does not work on older linux versions.

  • Note for smaller display areas: There seems to be an issue on machines that do not support higher display resolutions. The Kerberossdr window will not resize properly if the display doesn't support a resolution with a height above around 960 (e.g 1280x960 was the minimum I could get the whole window visible with). This shouldn't be a problem on most newer desktops and higher end laptops but since a lot of laptops only support 1366x768 this is an issue for those. While this issue is present in the original kerberossdr software on Ubuntu 18.04/PyQt4, the level of screen clipping is, it seems, more pronounced on 20.04/PyQt5 and you cant get to the "Start Processing button" where you could at least get to that on 18.04/PyQt4.

  • The installation instructions below have been updated for installing PyQt5 and libffi7, which are compatable with the new Linux releases instead of PyQt4 and libffi6.

  • A little background in case you run into problems so you will know what I did to get this working (if you want to go to the original rtl-sdr blog github repository and make the changes manually). Basically, the only changes needed in the Python code were to import PyQt5 where ever PyQt4 was imported (using slightly different syntax than PyQt4, you cant just change PyQt4 to PyQt5, see _GUI/hydra_main_window.py for an example). The files that needed the PyQt5 import changes were: _GUI/hydra_main_window.py, _signalProcessing/hydra_signal_processor.py and in _GUI/hydra_main_window_layout.py. Then, find/replaced all the instances of .setMargin(0) to .setContentsMargins(0,0,0,0) in the _GUI/hydra_main_window_layout.py file. Finally, I updated the install instructions to get rid of Pyqt4 and use PyQt5, and then changed libffi6 to libffi7.

  • Selecting “Uniform Gain” will allow you to set the same gain value for all four receivers.

  • The antenna spacing value (s, fraction of wavelength) is automatically calculated based on frequency and a user set antenna spacing (s’, meters). For circular arrays, just use the spacing between each antenna, the program will calculate the radius for you.

  • I’ve added a button to the Web UI to enable the sync display and the noise source in one click. If the noise source or the sync display (or both) is enabled the button will disable both. This should make calibration less cumbersome on mobile devices.

  • I've added CSS to the Web UI. This will allow for easy customization of the layout and adds a mobile friendly flare. Feel free to edit ./static/style.css to your liking.

  • The graphs hurt less to look at.

  • Fixed the backwards compass reading in JavaScript. This is just a bandaid. The reading should be fixed at the origin and the Android App updated to take the correct reading.

Please see the software tutorial at www.rtl-sdr.com/ksdr

KerberosSDR Demo Software

Installing the software

  1. Install Dependencies via apt:

sudo apt update
sudo apt install python3-pip build-essential gfortran libatlas3-base libatlas-base-dev python3-dev python3-setuptools libffi-dev python3-tk pkg-config libfreetype6-dev php-cli wondershaper python3-pyqt5 libffi7 git cmake libusb-1.0-0-dev

  1. Clone or unzip the software

git clone https://github.com/darksidelemm/kerberossdr/

  1. Uninstall any preinstalled numpy packages as we want to install with pip3 to get optimized BLAS.

sudo apt remove python3-numpy

Also remove the python3-pyqt5 package, leaving the qt5 libs (TODO: Check what libs are actually required)

sudo apt remove python3-pyqt5

  1. Install Dependencies via pip3:

sudo pip3 install -r requirements.txt

  1. Install RTL-SDR-Kerberos Drivers

Our Kerberos RTL-SDR driver branch contains code for slightly modified Osmocom RTL-SDR drivers that enable GPIO, disable dithering, and disable zerocopy buffers which seems to cause trouble on some ARM devices.

git clone https://github.com/rtlsdrblog/rtl-sdr-kerberos

cd rtl-sdr-kerberos
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
sudo ldconfig

echo 'blacklist dvb_usb_rtl28xxu' | sudo tee --append /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf

  1. Checkout Qt5 branch of KerberosSDR and setup

cd kerberossdr
git checkout qt5test
sh setup_init.sh

  1. Reboot the Pi.

  2. Test 4x Tuners

At this stage we recommend first testing your four tuners with rtl_test. Open four terminal windows, or tabs, and in each window run "rtl_test -d 0", "rtl_test -d 1", "rtl_test -d 2" and "rtl_test -d 3". Ensure that each unit connects and displays no errors. Install KerberosSDR Demo Software

  1. Now you can run the software by typing

./run.sh

Full software tutorial at www.rtl-sdr.com/ksdr

TROUBLESHOOTING:

Edit the run.sh file and comment out the >&/dev/null parts on the last line to show any errors to the terminal.

This software was 95% developed by Tamas Peto, and makes use of his pyAPRIL and pyARGUS libraries. See his website at www.tamaspeto.com