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
Highlights of some of the many changes:
softrock - Rx and Tx. Pulse and Jack audio. Connects up to 4 radios using Jack. Works with all softrocks.
dspserver - The LO offset (usually set to 9000 Hz in Si570 controlled softrocks, a la PSDR-IQ) can be set via command line argument --lo
Can be changed to 0 for fixed Xtal Softrocks and DDC radios.
More robust audio and spectrum transfers. Rx and Tx. Hamlib net backend allowing interfacing with loggers, gPredict
and fldigi etc. Multiple client can access the same dspserver: one is the master with control of the vfo etc., and
others are slaves who can monitor and listen. Audio transfers can be via TCP or RTP. With TCP, automatic
resampling keeps client and server in sync. With RTP, there is automatic time stamp and jitter compensation.
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 public dspservers that were started with
the --share option. Many code optimizations to reduce cpu utilization, including fast Waterfall display algorithm,
multithreaded Qthreads and OpenMP codes for running in multi-core machines.
The QtRadio audio quality is vastly improved with "pull" mode audio and other optimizations.
There is a Wiki for more detailed information, especially for new comers:
http://napan.ca/ghpsdr3/index.php/Main_Page
Active development branch
=========================
The default master branch has the latest stable code base. There are experimental branches that various developers are working on. For example, there is an active development branch, opengl-qt5, that implements codes that make use of the GPU for OpenGL graphical display.
Windows Users
=============
At this time the only application working in Windows is the QtRadio client which can connect to
any dspserver (running in Linux). Ready to run windows executable is available, maintained by Glenn:
http://napan.ca/ghpsdr3/index.php/QtRadio_on_Windows
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 is available via the win32 branch at:
https://github.com/alexlee188/ghpsdr3-alex
Building the software in Linux
==============================
See:
http://napan.ca/ghpsdr3/index.php/QtRadio_Installation
You will need Qt5. Currently Qt5 is available as a BETA from a ppa. See:
http://napan.ca/ghpsdr3/index.php/Developers_Documentation
Note that in addition to Qt, you will need some dev packages to be installed. For details see:
http://napan.ca/ghpsdr3/index.php/QtRadio_Installation#Installing_compiler_and_autotool
Building the ghpsdr3-alex software
==================================
To build:
Make sure you have set the path to the version of Qt you are using. E.g. for qt5 from the ppa:
$ export PATH=/opt/qt5/bin:$PATH
Then:
$ cd ghpsdr3-alex
$ autoreconf -i
$ ./configure
$ make
$ sudo make install
Then the executables will be installed in /usr/local/bin.
This will build the default configuration, which is useful for debugging and testing. However it is not optimized and
will not run well with slow cpu's etc.
See the sample confuration shell scripts (which replace the ./configure step above):
alex-openmp-conf.sh for building with i3,i5 and i7 cpu's and OpenMP support
alex-openmp-sse3-conf.sh for building with SSE3 capable cpu's and OpenMP support
OpenMP code will run on multi-core machines by making use of all the cores. It will also run on single core machines with a little overhead only.
Running the software
====================
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.
Also see http://napan.ca/ghpsdr3/index.php/Main_Page
$ softrock --si570 --iq --samplerate 48000|96000|192000
or
$ softrock --si570 --iq --samplerate 48000|9600|192000 --jack
(If you find your I/Q is reversed, use --qi instead of -iq
To run the dspserver:
$ dspserver --lo 0|9000|12000|...
The LO offset can be set by the --lo argument. For fixed crystal Softrocks and DDC rigs, use --lo 0. For si570 controlled Softrocks, the usual offset should be set with --lo 9000. Of course, you can set other offset values depending on your rig.
You need to edit a file which will be created when you run dspserver for the first time:
~/dspserver.conf
See:
http://napan.ca/ghpsdr3/index.php/Dspserver.conf
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.
For sdr-widget user only
========================
As an alternative to softrock server, you can use the widget-server,
which has been customized to connect to the sdr-widget using
the hpsdr protocol. You need to setup sdr-widget for the hpsdr
protocol (with the WidgetControl.py tool), and then run 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.
Note that this is Rx only.
With hpsdr hardware (Ozy/Metis)
===============================
Run the hpsdr-server.
With Perseus hardware
=====================
In order to use Perseus receiver, you have to build the perseus-server process.
First off, download, compile and install the library libperseus-sdr:
cd
svn checkout http://libperseus-sdr.googlecode.com/svn/tags/REL-0.5 libperseus-sdr
cd libperseus-sdr
./bootstrap.sh
./configure && make -j4
sudo make install
Next, install the other prerequisite library:
sudo apt-get install liboost-dev
last, run configure, enabling perseus option, and build:
cd ~/ghpsdr3-alex
autoreconf -i && ./configure --enable-perseus && make -j4
sudo make install
Run, three different xterm windows:
xterm -e './perseus_server -d3 -s96000' &
cd ../dspserver
xterm -e './dspserver --lo 0' &
cd ../QtRadio
$(export QT_RADIO_NO_LOCAL_AUDIO=1 ; ./QtRadio ) &
With Ettus usrp hardware
========================
Use the usrp-server branch.
With SDRiq hardware
===================
Run the sdriq-server.
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
=========================
See http://napan.ca/ghpsdr3/index.php/QtRadio_Installation#Installing_compiler_and_autotool
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"
Controlling more than one DG8SAQ devices (eg 2 softrocks)
=========================================================
The DG8SAQ devices can be set to different USB serial ID's. Each usb-i2c interface, eg Tony's original, the UBW, the Mobo or the sdr-widget, have different USB serial ID's defined in the firmware. If you are using 2 identical devices, then you will need to flash a new firmware with a different USB serial number to one of them so that they can be distinguished.
When you start the softrock server, you can use the --serialid argument to match the USB serial ID of the particular device.
Using QtRadio with the Griffin Powermate Vfo Knob
=================================================
$ sudo nano -w /etc/udev/rules.d/45-powermate.rules
and add the following:
SUBSYSTEMS=="usb",ATTRS{idVendor}=="077d",ATTRS{idProduct}=="0410",SYMLINK+="powermate",MODE="666"
reboot and do: (Or for Ubuntu /Debian sudo service udev restart and uplug and plug the powermate)
$ ls -l /dev/powermate
this should give you:
lrwxrwxrwx 1 root root 13 2011-11-20 10:13 /dev/powermate -> input/event14
next do:
sudo groupadd input
sudo gpasswd -a your_user_name input
cd /etc/udev/rules.d/
Create a file called 99-input.rules and put in it:
KERNEL=="event*", NAME="input/%k", MODE="660", GROUP="input"
KERNEL=="js*", NAME="input/%k", MODE="664", GROUP="input"
and reboot. (Or for Ubuntu /Debian sudo service udev restart and uplug and plug the powermate)