Skip to content
This repository

Modifications of John Melton's ghpsdr3

This branch is 0 commits ahead and 1198 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
This is a modification of the excellent Software Defined Radio software by John Melton.  The original sources are in an svn repo revision 1999. See:

http://openhpsdr.org/wiki/index.php?title=Ghpsdr3

The changes are in trunk/src/: 

softrock     - added an IF offset of 9khz (ala PSDR-IQ).  Rx and Tx.  Pulse and Jack audio.  Works with all softrocks.
dspserver    - added IF offset of 9khz.  More robust audio and spectrum transfers.  Rx and Tx.  Hamlib net backend.  rxtx-event
               branch has non-blocking networking.  In future multiple client can access the same dspserver.
widget-server- hpsdr protocol with full control of sdr-widget/Mobo/SR.  Only for sdr-widget.
receiver     - Makefile modified to compile in x86_64, changed local-audio to direct alsa output, changed portaudio to use callback.
               To run under Ubuntu with pulseaudio:  $ ./ghpsdr --local-audio 1 --audio-device pulse

QtRadio      - Many improvements to a full functional rxtx with graphical vfo and multiple audio codecs.
             - Added a Quick Server Connect Dialog.  Displays a list of all currently online dspservers that were started with the --share option.
The QtRadio audio quality is vastly improved with the audio codes running in a separate, high priority thread from the main GUI thread.  SSB Tx has now been implemented for the rxtx and rxtx-event branches.

Ubuntu Linux Users
==================

There is a ppa for the binaries produced from the master branch, maintained by Andrea.

Now the code base is taken from the master branch and in the "about" 
panel there is some additional information in order to show where the 
source is coming from.

In order to add this repository to your apt system (U11.10, U11.04, U10.04) 
please submit the following commands: 

sudo add-apt-repository ppa:andrew-montefusco/ghpsdr3 
sudo apt-get update 
sudo apt-get install ghpsdr3

You will then find the QtRadio app in the Applications > Internet menu

Subsequently you can use the Ubuntu software update process to update to the latest ppa version.

Windows Users
=============

At this time the only application working in Windows is the QtRadio client which can connect to
any dspserver.  A ready to run windows executable is avilable at:

	http://www.napan.com/ve9gj

You can download the zip file which contains all the needed dlls and qtradio.exe.  Extract the qtradio folder
to somewhere on your windows drive and double click qtradio.exe to run.

The source for building with QtCreator 2.3.0 based on QT 4.7.4 is available via the win32 branch at:
	https://github.com/alexlee188/ghpsdr3-alex

Note that tx and codec2 is not working in the win32 version.

Building the software in Linux
==============================
You will need Qt4.  Qt4 is available as a package from Ubuntu.

Note that in addition to Qt, you will need some dev packages to be installed for using Qt
(used by QtRadio), including (Ubuntu/Debian naming convention):

libqt4-opengl-dev
glutg3-dev
libusb-0.1-4
libfftw3-dev
portaudio19-dev
libpulse-dev
libsamplerate0-dev
libusb-1.0-0-dev
libconfig8-dev

libevent
========
For the rxtx-event branch of the software, you will also need a version of libevent that is newer than what
is available from the Ubuntu distribution.  Go to synaptic and completely remove the stock libevent (v1.4) from Ubuntu.

Building the software
=====================

http://libevent.org/

libevent-2.0.15-stable.tar.gz

Uncompress and follow the instructions to build and install:

$ ./configure
$ make
$ sudo make install
$ sudo ldconfig

Building the ghpsdr3-alex software
==================================
To build:

$ cd ghpsdr3-alex
$ autoreconf -i
$ ./configure
$ make all
$ sudo make install

Then the 3 programs will be installed in /usr/local/bin.


Running the software
====================

With softrock hardware:
=======================
To run the softrock server (defaults to using pulse for IQ input.  So 
use pulse chooser to set the default pulse source to the IQ sound 
card).  You also need to run pulse in network mode.  Use Pulseaudio Device Chooser
to set up network access by checking the various option boxes.  In order to use
96000 or 192000, you will need to configure pulse audio by editing the /etc/pulse/daemon.conf,
or better still, copy the file to ~/.pulse/daemon.conf and then edit the file there.

You can also use jack instead of pulse.  For detailed instructions on setting up soundcards with pulse or jack,
Google and do research.

$ softrock --si570 --iq --samplerate 48000|96000|192000

(If you find your I/Q is reversed, use --qi instead of -iq

To run the dspserver: 

$ dspserver 
dspserver may be started with the option "-- lookupcountry" which will try 
to determine the Country of incoming connections by IP. Off by default. No longer blocks.

dspserver now has the ability to "register" it's status in a web database.
This data will be used by QtRadio in the future to assist selecting dspservers.
Another advantage is dspserver will no longer need any form of dyndns service as the current
IP for the dspserver is registered at the same time.  You can view the current registered dspservers:
http://qtradio.napan.ca/qtradio/qtradio.pl
To use this feature start dspserver with the "--share" option.  This will look for ~/dspserver.conf for settings.
If no conf file is found one will be created on startup and is ready for editing.  Editing notes are included in the conf file.
You may also use option "--shareconfig path_filename" instead to use an alternate conf file. 
Note that wget is needed for --share to work.

Then you can run QtRadio to connect to the dspserver that is running. 

With sdr-widget connected to softrock/Mobo for both soundcard and rig control through i2c
=========================================================================================
As an alternative to softrock server, you can use widget-server,
which has been customized to connect to the sdr-widget using 
a modified hpsdr protocol.  You need to setup sdr-widget for the hpsdr 
protocol (with the WidgetControl.py tool), and then run server: 

First build the software:

cd ~/ghpsdr3-alex/trunk/src/widget-server
make clean
make

Then run the server:

cd ~/ghpsdr3-alex/trunk/bin 
./widget-server --si570 --receivers 1 --samplerate 48000|96000|192000

After that, you start dspserver (to connect to this server) and 
QtRadio etc. 

With hpsdr hardware (Ozy/Metis)
===============================
Run the original "server" server.

With Perseus hardware
=====================
Use the perseus-server branch.

With Ettus usrp hardware
========================
Use the usrp-server branch.


QtRadio with 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

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

Compiling with clang instead of default gcc
===========================================

$ ./configure CC=clang CXX=clang

If the configure complains about some header file missing, please install the
gcc-multilib package (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/778047):

sudo apt-get install gcc-multilib


For other branches I have modified the Makefile of server, softrock and dspserver to use clang if you do:

$ make CC=clang

Otherwise it will use the default gcc

The one big advantage of clang over gcc is the more meaningful error/warning messages and other
options to help with debugging.


Autotools building system
=========================
An attempt to create a 'standard' building system.
This branch is experimental and could not generate the right binaries.
Signal bugs and issues to andrew att montefusco dott com.

Please note that in order to use the building system, you need to install GNU autoconf, automake 
and libtool packages.

sudo apt-get install autoconf automake autotools-dev libtool

Next extract the aconf branch from repository and run autoreconf.

cd
git clone git@github.com:alexlee188/ghpsdr3-alex.git ghpsdr3-aconf
cd aconf
git checkout aconf
autoreconf -i

Now you are ready to run, as usual, 

./configure 
make
sudo make install

In order to release a package as tarball:

make distcheck
make dist

Please note that, if you don't want pollute your git sandbox, you can build standing on a 
different unrelated directory the whole thing.

In order to clean up the sandbox, there exists a convenience script that quickly
clean the sandbox:

cd ~/aconf
make clean
sh cleanup.sh

Using Jack Audio Connection Kit
===============================

To use JACK, run softrock with the --jack option. 

It is best to start JACK with the options you want (right sound card, sample rate, etc.) 
and I use qjackctl.  Receiver 0 is connected with the first two inputs, receiver 1 with the 
next two and so on up to receiver 3 (four receivers total).  Of course you can reconnect them
however you like in qjackctrl.  To use more than one receiver, you need a dspserver instance
for each.  Use the --receiver=[0,1,2,3] option for each dspserver instance.

Using QtRadio with Hamlib applications ie fldigi
======================================

QtRadio will listen on port 19090 all interfaces for rigctl connections.

Examples:
rigctl  -m2 -r 127.0.0.1:19090  (from pkg libhamlib-utils, ? for help)

grig -m2 -r 127.0.0.1:19090

For fldigi set Transceiver Control to hamlib, Rig to 'Hamlib NET rigctl  (Beta)' and Device to "127.0.0.1:19090"
Set Soundcard to PulseAudio and then in PulseAudio Volume Control (pavucontrol) Recording tab set fldigi to "Monitor of xxxx"
Something went wrong with that request. Please try again.