SDR: QtRadio Ubuntu 12.04

From OnnoWiki
Jump to navigation Jump to search

Installation on Linux

The instructions below are for Debian based distributions like Ubuntu but you should be able to compile on any Linux distribution with the correct libraries installed.

Installation from Git

Installing from git involves building or compiling from source. This is required if you want to use one of the various branches to work the "bleeding edge" branches like Alex's rxtx-event branch where the current (Nov 12 2011) TX work is being done. The PPA install is never more than a few days behind master so there is not much to gain from building from git unless you want to work with the source code your self. Installing compiler and autotool

First off, install the compiler; depending on which distribution are you using, some or all of this stuff could be already installed: Ubuntu/Debian

sudo apt-get install make gcc g++
sudo apt-get install autoconf automake autotools-dev libtool git subversion

Fedora

sudo yum install gcc gcc-c++ man-pages autoconf automake subversion libtool git

Installing prerequisite packages Ubuntu 12.04 and newer

See:

http://napan.ca/ghpsdr3/index.php/Developers_Documentation

You will need qt5 to be installed as per the above. Ubuntu 11.04 and older

First of all, you have to check that the universe repository is enabled. Please see the procedure in the previous section #graphical installation .

Next, you will need the following packages installed:

sudo apt-get update
sudo apt-get install \
libqt4-opengl-dev \
qtmobility-dev \
libusb-0.1-4 \
libusb-dev \
libfftw3-dev \
portaudio19-dev \
libpulse-dev \
libsamplerate0-dev \
libusb-1.0-0-dev \
libconfig8-dev \
libortp-dev

Ubuntu 11.10

First of all, you have to check that the universe repository is enabled. Click on the gear shaped icon (bottom into left side bar): the System Settings menu will shown, click on Software Sources and finally check the Community-maintaned Open Source Software (universe) tick. Next, submit the following commands into a terminal window:

sudo apt-get update
sudo apt-get install \
libqt4-opengl-dev \
qtmobility-dev \
libusb-0.1-4 \
libusb-dev \
libfftw3-dev \
portaudio19-dev \
libpulse-dev \
libsamplerate0-dev \
libusb-1.0-0-dev \
libconfig8-dev \
xdg-utils \
libortp-dev



Cloning the repository

How to build the latest master branch on Ubuntu 11.04

First a new libevent will need to be downloaded and installed, then the actual QtRadio source can be downloaded and built. Obtaining an up-level libevent library

$ sudo apt-get install libevent-dev

If the version is older than 2.0.5, go to synaptic and completely remove the stock libevent from Ubuntu. (Completely remove is an uninstall option in Synaptic. Additional dependent libraries may also be removed)

Then download the new version from:

http://libevent.org/

libevent-2.0.16-stable.tar.gz

wget https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz

Move the tarball from the Downloads directory to a working directory. A suggestion is to create a src directory within your home directory and move it there. Uncompress and follow the instructions to build and install:

cd
tar -zxvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
./configure
make
sudo make install
sudo ldconfig

On Fedora, in order to use the library above, export the LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/usr/local/lib

Installing codec2 low bit rate audio encoding and decoding

We are adding a low bit rate audio codec called codec 2 to QtRadio/dspserver. You need to download and build the codec2 library. See:

http://www.rowetel.com/blog/?page_id=452

Now go get codec2 using subversion

cd
svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev codec2-dev
cd codec2-dev
autoreconf -i
./configure
make
sudo make install
sudo ldconfig

On Fedora, in order to use the library above, export the LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=/usr/local/lib

Building the master branch

This branch is the latest code that contains both RX and TX capability.

Create a new directory or cd to the ~/src directory created for libevent and cd into it.

git clone git://github.com/alexlee188/ghpsdr3-alex

Depending on your Internet connection thorughput, it will take several minute to download. cd into the new directory ghpsdr3-alex:

cd ghpsdr3-alex
git checkout master

You are now working with Alex's latest and greatest!

First set the path to the version of qt you are using. E.g. for qt5:

$ export PATH=/opt/qt5/bin:$PATH

Then:

autoreconf -i
./configure
make -j4 all
sudo make install

The default configure above builds with debug and default Qt4 version in your PC. For optimized executable, you need to specify options specific to your system. See the sample shell scripts that replaces the above ./configure step:

./alex-avx-conf.sh		for building with i3,i5 and i7 cpu's supporting Advanced Vector Extensions (AVX)
./alex-openmp-conf.sh		for building with i3,i5 and i7 cpu's and OpenMP support
./alex-sse3-conf.sh		for building with SSE3 capable cpu's
./alex-openmp-sse3-conf.sh	for building with SSE3 cpaable cpu's and OpenMP support

(If you do not want to actually install the executable binaries, skip the sudo make install and just cd into the following directories and run them from there)

Terminal 1

$ cd ghpsdr3-alex/trunk/src/softrock
$ ./softrock ...options ...

Terminal 2

$ cd ghpsdr3-alex/trunk/src/dspserver
$ ./dspserver  ..options...

Terminal 3

$ cd ghpsdr3-alex/trunk/src/QtRadio
$ ./QtRadio

Building the Perseus extensions

In order to build the Microtelecom Perseus server you need to switch to the master or iw0hdv branch.

First off, install the prerequisite library and wget package:

sudo apt-get install libboost-all-dev wget

Next download, compile and install the library libperseus-sdr:

cd
wget http://libperseus-sdr.googlecode.com/files/libperseus_sdr-0.6.tar.gz
tar -zxvf libperseus_sdr-0.6.tar.gz
cd libperseus_sdr-0.6/
./configure && make
sudo make install
sudo ldconfig


If you already build in your sandbox some other branch, is strongly advisable, before you start the build, to do a full cleanup:

cd ~/ghpsdr3-alex
make distcheck && sh cleanup.sh

Otherwise, if you are starting from scratch, you have to clone the repository:

git clone git://github.com/alexlee188/ghpsdr3-alex

Finally, you can switch to the master branch and rebuild everything; you don't need anymore to explicitly enable the perseus server feature, the configure script automatically selects it when the libperseus_sdr is found.

cd ~/ghpsdr3-alex
git checkout master 
autoreconf -i && ./configure && make -j4
sudo make install

In order to run it you have two choices, the first one being the plain command line:

xterm -e 'perseus_server -d3 -s96000 ' &
sleep 3
xterm -e 'dspserver --lo 0 --nocorrectiq' &
sleep 5
$( QtRadio 127.0.0.1 ) 

In QtRadio, Receiver menu, select Configure item, Server tab: here add the local host using the 127.0.0.1 IP address. Pressing the key C, you start the receiver.

The second choiche is to use the ghpsdr3-mgr.py script (available in menu Applications, Hamradio as ghpsdr3launcher): clicking on the Perseus icon the three processes should start and the QtServer automatically connects to Perseus Server.


Referensi

Pranala Menarik