In my previous blog entry I demonstrated my RTL-SDR based spectrum analyzer running on the BeagleBone Black (BBB) with a 7-inch touchscreen LCD.
In this entry I’ve provided instructions on how you can run this software on your own BeagleBone. I’ve released the software – ViewRF – under the GPL license. You can download the source code hosted on GitHub.
The hardware you need (other than the BeagleBone itself) is the RTL2832U based DVB-T (digital TV) USB dongle. See RTL-SDR wiki for a list of supported hardware. I’ve tested the software with dongles based on the Elonics E4000 tuner and also the Rafael Micro R820T tuner. These dongles are available from various online shops.
The software has been designed to run on a 800×480 resolution screen, ie the resolution of the 7 inch LCD cape.
Instructions:
-
Download and unzip (using 7-zip) this microSD image:
Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.06.20.img.xz. Then copy this unzipped image using Win32 Disk Imager to a microSD card. - Insert the microSD card to your BBB and power it on.
-
After you are logged in, open a terminal, then disable X Windows autostart using the command:
systemctl disable gdm
-
Reboot:
/sbin/shutdown -r now
-
At the console, login as root, then calibrate the touchscreen
ts_calibrate
-
Install these Angstrom packages:
opkg update
opkg install qt4-embedded --force-depends
opkg install libqtsvge-dev --force-depends
opkg install libqtguie-dev --force-depends
opkg install qt4-embedded-dev --force-depends -
Set the following environment variables:
export OE_QMAKE_CXX=/usr/bin/gcc
export OE_QMAKE_CXX=/usr/bin/g++
export OE_QMAKE_LINK=/usr/bin/gcc
export OE_QMAKE_INCDIR_QT=/usr/include/qtopia
export OE_QMAKE_MOC=/usr/bin/moc - Download, compile and install QWT:
wget http://jaist.dl.sourceforge.net/project/qwt/qwt/6.1.0/qwt-6.1.0.tar.bz2
tar -xjvf qwt-6.1.0.tar.bz2
cd qwt-6.1.0
Editqwtconfig.pri
, removeQwtOpenGL, QwtDesigner
Edit./src/src.pro
, change TARGET to:
TARGET = $$qwtLibraryTarget(qwt$$QT_LIBINFIX)
Continue with the compilation process:
qmake
make
make install
- Download, compile and install RTL-SDR library:
cd
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
autoreconf -i
./configure --enable-driver-detach
make
make install
make install-udev-rules -
Edit
/etc/profile
, add the line:
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/qwt-6.1.0/lib
-
Edit
/etc/profile.d/qte.sh
, if using touchscreen add the line:
export QWS_MOUSE_PROTO=LinuxInput:/dev/input/touchscreen0
or if using a mouse, add the line:
export QWS_MOUSE_PROTO=MouseMan:/dev/psaux
Logout, then log back in again. -
Download and run ViewRF software
cd
git clone git://github.com/stephenong/ViewRF.git
cd ViewRF
-
To run the pre-built binary (don’t run the git checkout command if you are building from source)
git checkout 9b4d425331
./ViewRF -qws
I hope this software is useful to you. Let me know what you do with it. Feel free to donate :), link on the sidebar.