QtRadio Installation

From Ghpsdr3 SDR project
Revision as of 12:22, 26 August 2012 by Iw0hdv (Talk | contribs) (Installation from PPA deleted due to obsolescence.)

Jump to: navigation, 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
Fedora 16
sudo yum install fftw fftw-devel 
sudo yum install libusb-devel libusb1-devel 
sudo yum install portaudio-devel
sudo yum install libconfig-devel
sudo yum install libsamplerate-devel
sudo yum install pulseaudio-libs-devel
sudo yum install jack-audio-connection-kit  jack-audio-connection-kit-devel
sudo yum install qt4-devel


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
cd codec2
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 branch. This branch contains only RX capability and his client/server protocol is not compatible with that of rxtx-event branch.

First off, download, compile and install the library libperseus-sdr:

sudo apt-get install wget
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

Next, install the other prerequisite library:

sudo apt-get install libboost-all-dev

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, first clone the repository:

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

Finally, you can switch to the master branch and rebuild everything, enabling the perseus server feature:

cd ~/ghpsdr3-alex
git checkout master
autoreconf -i && ./configure --enable-perseus=yes && 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' &
xterm -e 'dspserver --lo 0' &
$(export QT_RADIO_NO_LOCAL_AUDIO=1 ; ./QtRadio ) 

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.

Building USRP enabled version

Building the UHD package
Install the prerequisite packages (Ubuntu 11.10):
sudo apt-get install liboost-all-dev
sudo apt-get install python-cheetah
Build & Install UHD -- FOR UHD-3.3.1 AND GREATER --:
cd
git clone git://ettus.sourcerepo.com/ettus/uhd.git
cd uhd/host/
mkdir build
cd build
cmake ../
make
make test
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, first clone the repository:

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

Finally, you can switch to the master branch and rebuild everything, enabling the usrp server feature:

cd ~/ghpsdr3-alex
git checkout usrp-server
autoreconf -i && ./configure --enable-usrp=yes && make -j4
sudo make install

Refresh to a Newer Version

To pull a new version to build

$ git pull
$ make -j4 all
$ sudo make install

If extensive changes have occurred or if you get errors during the make, you may want to do a clean build

$ git pull
$ make distclean
$ sh cleanup.sh
$ autoreconf -i
$ ./configure
$ make -j4 all
$ sudo make install

If you continue to get errors, please report the whole ./configure output and the config.log to the mailing list.

Installation on Windows

See QtRadio on Windows

Network settings

If you are behind a firewall/NAT-router and want to be able to connect to your dspserver over the Internet you have to open up port tcp/8000. If you are using the client in RTP mode you have to open up udp/5004 and udp/5005.