QtRadio Installation
Contents
- 1 Installation on Linux
- 1.1 Installation from Git
- 1.1.1 Installing compiler and autotool
- 1.1.2 Installing prerequisite packages
- 1.1.3 Cloning the repository
- 1.1.4 Obtaining an up-level libevent library
- 1.1.5 Installing codec2 low bit rate audio encoding and decoding
- 1.1.6 Building the master branch
- 1.1.7 Building the Perseus extensions
- 1.1.8 Building USRP enabled version
- 1.1.9 Refresh to a Newer Version
- 1.1 Installation from Git
- 2 Installation on Windows
- 3 Network settings
- 4 Installing ghpsdr3-alex on Raspberry Pi
- 5 SOFTWARE
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:
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
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.
Installing ghpsdr3-alex on Raspberry Pi
HARDWARE ==
I recommend installing either the raspbian or raspbian pisces (debian) distributions as there is no Ubuntu release to date.
All the pre-req packages mentioned for the Ubuntu installation are also needed for the Raspberry Pi and are available using "apt-get install" as usual.
The RasPi USB subsystem is sensitive to power supply voltage levels - A supply of 5.25V at 2A is recommended.
With +5.17V I was getting on-board Ethernet errors and system hangs when one more device besides keyboard and mouse were plugged in to the on-board USB ports or an outboard powered USB HUB. Increasing the voltage to +5.27V solved the problem.
Do not use power from a USB PC port or from a USB Hub.
Once it's up and running, some details that may help in setting up the hardware for use - I'm currently overclocking at 1GHz:-
Keyboard, mouse, usb sound card and Ethernet fully operational using the 7-port USB hub. root@pisces:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 050d:0307 Belkin Components USB 2.0 - 7 ports Hub [FSU307]
Bus 001 Device 005: ID 04f3:0103 Elan Microelectronics Corp.
Bus 001 Device 006: ID 041e:3040 Creative Technology, Ltd SoundBlaster Live! 24-bit External SB0490
Bus 001 Device 007: ID 0fe6:8101 Kontron (Industrial Computer Source / ICS Advent) DM9601 Fast Ethernet Adapter
Bus 001 Device 008: ID 047d:1022 Kensington Orbit Optical
root@pisces:~# ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:2c:07:c9
inet addr:192.168.10.31 Bcast:192.168.10.255 Mask:255.255.255.0 inet6 addr: fe80::ba27:ebff:fe2c:7c9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:410 errors:0 dropped:0 overruns:0 frame:0 TX packets:377 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:28905 (28.2 KiB) TX bytes:35938 (35.0 KiB)
eth1 Link encap:Ethernet HWaddr 00:10:14:00:9f:fa
inet addr:192.168.2.199 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::210:14ff:fe00:9ffa/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:230 (230.0 B) TX bytes:592 (592.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@pisces:~# cat /proc/asound/cards
0 [External ]: USB-Audio - SB Live! 24-bit External
Creative Technology SB Live! 24-bit External at usb-bcm2708_usb-1.3.3, full spec
1 [ALSA ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA
bcm2835 ALSA
I had originally forgotten to add snd-bcm2835 to /etc/modules which is why the SB Live! 24 is card 0. Rebooting with just the on-board sound card then adding the SB Live! 24 USB changed the on-board to card 0 and the SB Live! 24 USB is now card 1. I have further tests to do, mainly with sound, but now the Rpi is looking much healthier.
It's running at 1GHz with this config.txt file. root@pisces:~# cat /boot/config.txt
over_voltage=6
arm_freq=1000
core_freq=500
sdram_freq=500
- Now running with "arm_freq=855" to see if the dspserver crashes are less frequent.
root@pisces:~# cat /etc/network/interfaces
Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
File: ifcfg-eth0
auto eth0
iface eth0 inet static
address 192.168.10.31
netmask 255.255.255.0
gateway 192.168.10.103
auto eth1
iface eth1 inet static
address 192.168.2.199
netmask 255.255.255.0
root@pisces:~# cat /etc/modules
/etc/modules: kernel modules to load at boot time. This file contains the names of kernel modules that should be loaded at boot time, one per line. Lines beginning with "#" are ignored. Parameters can be specified after the module name.
loop
snd-bcm2835
SOFTWARE
If you build ghpsdr3-alex already it's a case of following the same procedure with the following caveats that apply to the RasPi ARM architecture. What follows is a blow by blow account of how I did it for the iw0hdv branch which supports my HiQSDR+Preselector.
Subject: [n2adr-sdr] Raspberry Pi running ghpsdr3-alex
I did a fresh clone and changed to the iw0hdv branch from the default master branch.
git checkout iw0hdv
NOTE:-******Remove all traces of -msse,-msse2 -msse3 and -ffast-math from Makefile.am and Makefile.in where appropriate in the subdirectories as those are not for ARM architecture.
autoreconf -i
./configure CFLAGS='-O3 -pipe -march=armv6 -mfpu=vfp -mfloat-abi=hard' CXXFLAGS='-O3 -pipe -march=armv6 -mfpu=vfp -mfloat-abi=hard'
make all && make all install
Running hiqsdr-server at 48K/96K and dspserver (built with qt4) as qt5 is not yet available. There are instructions for building qt5 but following them bullet by bullet it failed not far along. The instructions are for building on i386 - I have put out a request for .deb packages or at least built tarballs to the Raspberry Pi forum.
QtRadio running on another box using the connection from the server list. Sound is a touch distorted, quite distorted on start up of QtRadio and spectrum is always a little bit slow.
When a slave connected and tried changing frequency, dspserver crashed - dspserver can be a bit crash happy.
The first thing I tried on the Pi was QtRadio standalone, spectrum and waterfall were OK but no sound.
Just now a client using glSDR (5) is attempting to change frequency, sound went quite distorted then dspserver crashed.
Restarted dspserver and QtRadio sound started very distorted before it settled down to reasonable.