Discussion

BananaPI goes SDR

5 6495
nanoops  
Hi all,

today i got my banapi running software defined radio. I just want to share all the information with you - maybe someone else is trying and stuck in the middle


Based on Igor Pecovnik (www.igorpecovnik.com) Debian Jessy BananaPi Image with Kernel 3.19.0. He has done an awesome work. Please visit http://www.igorpecovnik.com/2014/09/07/banana-pi-debian-sd-image/ for all details about.
Software Defined Radio on BananaPi (rtl2832U / gnuradio)


[ https://github.com/NanoOps/BananaSDR ]
This repo is a simple way of getting into the rtl-sdr topic with hopefully useful tipps to get it up and running quickly ...

Please check if it is legal in your country doing some or all of the things here. I am under no circumstances be responsible for what you doing. I only show you this for educational purpose.

Some useful links:

    http://www.rtl-sdr.com/
    https://www.youtube.com/results?search_query=hak5+rtl+sdr

Hardware required:

    rtl2832U 820t usb stick
    BananaPi

Example Amazon:

    Salcar® TV Stick DVB-T Empfänger FM-Radio & Digitalradio Empfänger, Chip RTL2832U & R820T, SDR (~15 Euro)
    Allnet Banana Pi Bundle 4GB SDHC Karte + Gehäuse +Netzteil 2A weiß Bananapi Mini PC-System/Mediaplayer (~ 59 Euro)

Base System Installation

First you need to copy the image onto a sd-card. A writer for windows is included inside the zip.

After the first boot new ssh keys and resize of the sd-card is done automaticly - so the first boot will be a little bit longer then the usual one (included a reboot after resize sd card). The password for the root account (ssh) is 1234 and you will be asked for a new one on first login.

Driver Installation rtl2832


  1. aptitude update
  2. aptitude install libusb-1.0-0-dev
  3. cd /usr/local/src/repositories
  4. git clone https://github.com/steve-m/librtlsdr.git
  5. cd librtlsdr
  6. mkdir build
  7. cd build
  8. cmake ../
  9. make install
  10. ldconfig
Copy the Code



You could test the driver after re-plugged in the rtl usb stick with rtl_test from the command line.

  1. rtl_test
  2. # Found 1 device(s):
  3. # 0:  Generic, RTL2832U, SN: xxxxxxxxxxxxxxxxx
  4. # Using device 0: Generic RTL2832U
  5. # Found Rafael Micro R820T tuner
  6. # ....
Copy the Code



ADS-B: Airplane tracking

  1. mkdir -p /usr/local/src/repositories
  2. cd /usr/local/src/repositories
  3. git clone https://github.com/antirez/dump1090.git
  4. cd dump1090
  5. make
  6. cp ./dump1090 /usr/local/bin/
Copy the Code



You could test the installation quick from command line. More options like visual representation (builtin webserver) are available - just check --help

  1. dump1090 --aggressive --interactive --enable-agc
Copy the Code



RDS: RDS from FM stations

Documentation: http://www.windytan.com/2015/02/receiving-rds-with-rtl-sdr.html

  1. cd /usr/local/src/repositories
  2. git clone https://github.com/windytan/redsea.git
  3. cd redsea
  4. make
Copy the Code



The perl script isnt already ready to be installed somewhere, so leave it inside the repo or fix the paths to your needs. A simple test from the command line:

  1. cd /usr/local/src/repositories/redsea
  2. ./redsea.pl 102.39M -l  # 102.39M change frequency to your local FM Station
  3. # D391  0A TP:0 PTY:10 TA:1 MS:M AF:105.5MHz AF:107.7MHz PS:' 1LIVE  '
Copy the Code



GNURadio Installation

Documentation for GNURadio can be found: http://gnuradio.org/redmine/projects/gnuradio/wiki

  1. aptitude install gnuradio gnuradio-doc gnuradio-dev libgl1-mesa-dri libgtk2.0-bin python-matplotlib python-networkx python-qt4 python-qwt5-qt4 python-scipy python-tk python-zmq python-gtk2 hicolor-icon-theme xorg lightdm xfce4 xfce4-goodies tango-icon-theme gnome-icon-theme gnome-themes-standard libuhd-dev uhd-host python-swiginac swig3.0 swig libcppunit-dev libboost1.55-all-dev liblog4cpp5-dev

  2. cd /usr/local/src/repositories/
  3. git clone https://github.com/pothosware/SoapySDR.git
  4. cd SoapySDR
  5. git submodule init      # enable OsmoSupport/gr-osmosdr (Osmocom RTLSDR)
  6. git submodule update
  7. mkdir build
  8. cd build
  9. cmake ../
  10. make
  11. make install
  12. ldconfig
  13. SoapySDRUtil --info

  14. cd /usr/local/src/repositories/
  15. git clone https://github.com/pothosware/gr-sdr.git
  16. cd gr-sdr
  17. mkdir build
  18. cd build
  19. cmake ../
  20. make
  21. make install
  22. ldconfig

  23. cd /usr/local/src/repositories/
  24. git clone git://git.osmocom.org/gr-osmosdr
  25. cd gr-osmosdr/
  26. mkdir build
  27. cd build
  28. cmake ../
  29. make
  30. make install
  31. ldconfig
Copy the Code



Last but not least you need to adjust your environment variables ~/.bashrc

  1. cat >> /root/.bashrc << "EOF"
  2. export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/PYTHONPATH
  3. export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/PKG_CONFIG_PATH
  4. export GRC_BLOCKS_PATH=/usr/local/share/gnuradio/grc/blocks/GRC_BLOCKS_PATH
  5. "EOF"
Copy the Code



If you like you could install tightvncserver for remote X-Desktop (xrdc for linux client) but you could also X11 forward by using ssh with the -X option.

gnuradio-companion is the tool you really want. Since you have installed python bindings for ZeroMQ you could pipe all the data you fetch on your bananapi to any remote system. Its all implemented in gnuradio

If you work only local on your bananapi then gqrx-sdr from default jessie repository is a look worth. ( http://gqrx.dk/ )
tomek  
Thanks for great tutorial!

I prefer rather client - server configuration.
The client is my laptop with Windows 8 and the server is Banana Pi with Bananian (debian).

On banana I built rtl-sdr software according to this great: wiki

  1. git clone git://git.osmocom.org/rtl-sdr.git
  2. cd rtl-sdr/
  3. mkdir build
  4. cd build
  5. cmake ../
  6. make
  7. sudo make install
  8. sudo ldconfig
Copy the Code
then, similar to you, simply test:
  1. rtl_test -t
Copy the Code
and finally create "streaming" server:

  1. rtl_tcp -a 10.0.0.2 [-p listen port (default: 1234)]
  2. Found 1 device(s).
  3. Found Elonics E4000 tuner
  4. Using Generic RTL2832U (e.g. hama nano)
  5. Tuned to 100000000 Hz.
  6. listening...
  7. Use the device argument 'rtl_tcp=10.0.0.2:1234' in OsmoSDR (gr-osmosdr) source
  8. to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
Copy the Code
On client side I installed SDR Sharp
and chose TCP source.

sdrsharp-min.png

Hi, I am fairly new and this is the reason I bought the Banana Pi, for SDR.  My question: is the Banana Pi powerful enough to run the SDR with a GUI (GQRX) on it's own?  I've seen videos on Youtube where it's been done with a Beaglebone Black and possibly a Raspberry PI.  Greetings to all.

nanoops  
Hello zooky443,

gqrx runs on banapi but it's slow. For a better experience i recommend the method from tomek.

Thanks nanoops for your response.  Even if I turn off the waterfall because I'm only interested in the Spectrum display.  Is it still too much demand on the CPU.  I haven't had any success in booting the image from the SD card.  I have very little time to play with the hardware and also I have no background at all in Linux.

if I 'cd /usr/local/src/repositories' it says no such file or directory


then I want to create one 'mkdir -p /usr/local/src/repositories' it says cannot create ...


what is the problem here (besides my stupidity) ?

You have to log in before you can reply Login | Sign Up

Points Rules