SDR Banner

CQ DC

ghpsdr3-alex


Installing QtRadio, dspserver, and an SDR driver

BUY AMERICAN!


What is ghpsdr3-alex?

 

The ghpsdr project, which in its most recent incarnation is known as ghpsdr3-alex, is an SDR project with its roots from the HPSDR working group. ghpsdr3 is a software defined radio server/client or server/dspserver/client format program written specifically for HPSDR by John Melton, G0ORX/N6LYT. The software was being developed on the Ubuntu version of Linux (specifically version 9.10).

 

This version of ghpsdr3 allows for the server and client to be on the same machine or separate machines. The servers are written in C and run on linux machines. John and others are working on a full set of clients to run on multiple machines connecting to the servers through TCP/IP protocals. The architecture of the server/client configuration looks like this:

 

File:Ghpsdr3.png

To follow the development of this code look at John's Blog http://g0orx.blogspot.com/

 

Like HPSDR, ghpsdr3-alex uses a remote-server topology, so that the receiver and user can be separated in space, and connected only by the internet.

 

The ghpsdr3-alex project software comprises 3 different components:

 

A) server - there is a CLI based server for each type of hardware. For example, there are hpsdr-server, usrp-server, softrock (server), sdriq-server, HiQSDR etc. Some servers are based on soundcard/USB connections to the hardware. Some are connected via ethernet (eg HPSDR Metis).

 

B) dspserver - this is the software in the middle that processes the IQ data from the server (connected over LAN via UDP) using DttSP. The same dspserver can connect to any of the servers in A.

 

C) clients - this is the GUI user interface. There are clients built with Qt and runs on Windows, Linux, and Mac OSX. There is a working Android client that works on Android phones and Android tablets. The clients connect to dspserver via LAN or remotely via Internet. In future we will have java based web clients as well (either specifically written clients, or running Qt inside a web browser) Also, multiple clients can concurrently access the same dspserver. There is also RxTx capability (currently for voice modes). the QtRadio client has a Hamlib interface and can connect to gPredict, xLog, and fldigi (for digital mode)

 

I use the ghpsdr3-alex software to serve my Softrock Ensemble II SDR. Installation of the ghpsdr3-alex software has a bit of a learning curve, but once you do it the first time, it really is not that bad. As the software is updated from time to time, the installation is much easier.

 

Since I was a newbie with Linux as well, I would like to offer a few hints aimed at newbies who are just getting started with this.  They are a supplement to and NOT a replacement for the excellent instructions on the main ghpsdr3 page. Also, you should have a reasonable understanding of how the Ubuntu (Linux) operating system works. If you don't, this process might be a bit confusing for you. Best to grab a good book on Ubuntu or Linux.

 

Since I have a Softrock, my hints here are for a Softrock installation. Best to read through the ghpsdr3-alex pages to install for other SDR's that the software supports.

 

So let's get started!

 

One prerequisite to using the Softrock with ghpsdr3-alex is to make sure the USB driver is set up for the Softrock. I discuss this in great detail in my Softrock on Linux page. Please read through this and complete the installation. It is not necessary to install Quisk.

 

For this project you will want to use the following ghpsdr3-alex project components (all of which are contained in the ghpsdr3-alex git distribution). I'll explain these details after we have the software installed.

 

1. softrock-server: this communicates with and controls the Softrock. This is the first process you will start, by typing in a terminal windows:

    softrock --si570 --qi --samplerate 96000


Note that both here and below where you see -- there are TWO hyphens, not one.

 

2. dspserver: this processes the data from ghpsdr-server and communicates with the receiver client. This is started second, by typing in a second terminal window: 

    dspserver --lo 9000 --share

The --lo 9000 sets the local oscillator offset value. In my case, I set to 9000Hz so I am 9kHz up from the Softrock's local oscillator frequency.

 

3. QtRadio: this is the radio client / Graphical User Interface. This is started last, by typing in a third terminal window: 
QtRadio

 

Installing the software:

 

The most recent set of instructions is at: http://napan.ca/ghpsdr3/index.php/Developers_Documentation. I highly recommend that you read this and follow the instructions on that page, with possible clarifications or modifications as will be noted below. Make sure that you install all of the prerequisites as listed on the URL noted above.  Cutting and pasting from that page to your terminal window may prevent your missing one or two of them. This includes:

 

1. jackd1 and portaudio19-dev

2. codec2 low bit rate audio encoding and decoding software

 

Before you do this, I highly recommend that you check the version of cmake that you previously installed on your Ubuntu installation. You can do this at a Terminal prompt and typing: cmake --version

 

I had version 2.8.7. This version does not include a specific cmake file called CMakePackageConfigHeaders.cmake. It too me quite a while to find out that this file is needed to complete the build of codec2. I kept getting errors that this was missing, resulting in an incomplete build. I found out that version 2.8.8 or higher has this file. I STRONGLY RECOMMEND that you download the latest version of cmake and install it. You can find the latest version of cmake at http://www.cmake.org/. Here are some basic instructions that I used to install the lastest version:

 

1. Check the version of your Cmake using cmake --version
2. If 2.8.7, Download the latest CMake version from the CMake web site
3. Uncompress it in a new folder
4. Create a _build directory in the folder: mkdir _build
5. From the _build directory, run the following commands to build and install CMake from sources:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
sudo ldconfig

 

Once the install is complete, again, you can check the version by typing into a Terminal windows: cmake --version.

You can now start the codec2 installation.

 

1. Make sure you follow the following commands per the instructions on the QtRadio Installation page.

 

svn co https://svn.code.sf.net/p/freetel/code/codec2 codec2
cd codec2
mkdir build
cd build
cmake ../
sudo make
sudo make install
sudo ldconfig

 

I also recommend that you perform these additional steps. According to the QtRadio Installation instructions, on some variations, codec2 files will not be detected as installed correctly. There is mentione that there might be build errors citing codec2 are encountered during the later ./configure steps. My friend, W8NFT, Doug, recommended that you do this since he had to do this on his pcDuino3 setup.

 

cd /usr/local/include/codec2
sudo cp * ..

 

3. Qt5

When installing Qt5, I used the "Qt libraries 5.3.2 for Linux 32 bit (411 MB)", since I am running the 32-bit Ubuntu. My downloaded Qt5 file is therefore "qt-linux-opensource-5.3.2-x86-offline.run". To install Qt5 after doing the chmod as indicated on the instruction page:

    $ chmod +x qt-linux-opensource-5.3.2-x86-offline.run

I type:

    sudo ./qt-linux-opensource-5.0.0-x86-offline.run

After the installation, you should have something installed in the /opt/Qt5.0.0 folder.

 

Because I installed the 32 bit version of Qt5, I changed the line described under "Setting the path to qt5" to:

   $ export PATH=/opt/Qt5.3.2/5.3/gcc/bin:/opt/Qt5.3.2/Tools/QtCreator/bin:$PATH

Why do you have to do this? This is due because the several packages from Qt sources and binary repositories web sites are not really installed in the system but simply copied on it. Therefore the autotools build system should search virtually over the whole filesystem. In any case please remember that

 

• the export above is effective only into the current terminal windows, if you open another window and/or reboot the system, you have to resubmit again the command

• if you want to make permanent it, you have to add the export into the right configuration shell, suitable for the shell that you are currently using.

 

For the bash it is typically ~/.bashrc

 

In any case, after you issue the export, please test it. If Qt5 has installed with no problems, then when you type 'qmake -v' you should see something like:

 

     qmake -v
      QMake version 3.0
      Using Qt version 5.0.0 in /opt/Qt5.0.0/5.0.0/gcc/lib

Up to this point in the documentation, you can go on to build QtRadio. Feel free to do so and follow the instructions precisely.

For me, I chose to stop here in the documentation because I also wanted to build up the softrock server, dspserver, and QtRadio together. So let me walk you through the next steps.

 

I followed the instructions for QtRadio Installation and began at section 1.1.3. In order to clone the ghpsdr3-alex repository, we have to install an up-level libevent library. The easiest way to do this is to type:

 

$ 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). Once you removed the stock libevent, in your terminal window, type:

 

$ 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  

Once this is completed, you can skip the codec2 installation since you already completed that. Now we can move on to building the master branch. This branch is the latest code that contains both RX and TX capability. My softrock does not have TX capability, so I am not going to worry about that.

 

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 minutes 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. In my case, it was this path:

 

    $ export PATH=/opt/Qt5.0.0/5.0.0/gcc/bin:$PATH  

Then, you can start to make all of the components we need, softrock server, dspserver, and QtRadio:

 

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

And that should be it for the main software components. If you are building any of the other server types, continue to read the QtRadio instructions at the QtRadio Installation page.

 

Pulseaudio Setup

There is one more critical piece of software that you need to install. And that is the Pulseaudio. PulseAudio is a sound server, a background process accepting sound input from one or more sources (processes or capture devices) and redirecting it to one or more sinks (sound cards, remote network PulseAudio servers, or other processes)Without this Pulseaudio setup, the Softrock will not get the audio out to the Internet. Believe, I found this out the hard way!!

 

To configure the softrock server with your soundcard for IQ processing use:

    pavucontrol

In order to install it, submit the following command:

 

    sudo apt-get install pavucontrol

Choose your Soundcard for IQ processing. For the Softrock Ensemble, your settings should at least look like the following pictures.

 

 

For my Foxconn nanoPC that I use,

 

 

I have to use the microphone input since there are no standard Line In jacks. For those of you who do have a TX Softrock version, make sure not to set the RX Audio level in the Recording Tab of pavucontrol to 100%. Otherwise you could have audio feedthrough from RX to TX and a distorted TX Audio. A level from 22% - 80% would be ok, but may vary on each system.

 

Lastly, we need to enable the network mode. To do that, we need to run pulse in network mode. Use:

    paprefs

In order to install it, submit the following command (since I use Ubuntu):

    sudo apt-get install paprefs

From a terminal window, type 'paprefs' to launch the application. When the application opens, make sure the check boxes are checked as shown in the two pictures for Network Access and Network Server:

 

 

If everything has intsalled to this point without any errors, congratulations. Trust me, this was a learning process for me and I had errors. So I hope this helps in getting you to this point.

 

Before I get to the launching of the Softrock server and the dspserver, QtRadio was also installed. There are two ways to start QtRadio for Ubuntu.

 

1. Open a Terminal Window (Ctrl-Alt-T) and type 'QtRadio'. It is case sensitive so make sure you type a capital Q and R.

2. If you are using the Gnome Classic desktop, QtRadio can also be launched from: Applications ==> Internet . QtRadio is one of the options for me to run.

 

If all goes well, QtRadio should run. You can select a receiver by clicking on the Receiver menu and selecting Quick Server List:

 

A windows as shown below will pop up

 

 

Go ahead and select one of the servers and hit Connect. You will then be connected to that SDR. Enjoy!

 

 

Now that you have a taste of how QtRadio works, let's fire up the Softrock and get it to serve to the world.

 

Starting Softrock server and dspserver:

 

If the entire installation process worked for you, then we need to launch the Softrock server first. The Softrock server accepts a number of command line arguements:

  --samplerate   48000 | 96000 | 19200
  --input        Input device (see below)
  --output       Output device (see below)
  --iq           Samples in I/Q order
  --qi           Samples in Q/I order
  --si570        Use si570 to set frequency (default off)
  --verbose      Enable  verbose output for si570 (default 0ff)
  --startupfreq  si570 startupFrequency (default 56.32)
  --multiplier   si570 frequency multiplier (default 4)
  --correctedfreq si570 corrected xtal frequency (default 114.285)

In my case, I launch my Softrock with this command line in a Terminal window:

    softrock --si570 --qi --samplerate 96000

Make sure that you use two -- hypen characters, or you will get errors. If you typed this correctly, you should see the following:

 

 

If this is what you got, so far so good. One other important point that I shoulds stress is that in order to use 96000 or 192000 sample rtes, you will need to configure pulse audio by editing the /etc/pulse/daemon.conf file. Open the file and search for a line in the code that looks like the following:

 

 

Your code may show the line:

    default-sample-rate = 48000

Make sure you change this to the sample rate that your sound card supports. Mine was 96000. Save the file when you complete the edit. You may need to restart the computer for the change to take affect.

The next step is to launch the dspserver. dspserver also has a number of command line arguments:

 

    dspserver --lo 0|9000|12000|... --share 


The LO offset can be set by the --lo argument. For fixed crystal Softrocks and DDC rigs, use --lo 0. For si570 controlled Softrocks, like the Ensemble II, the usual offset should be set with --lo 9000. Of course, you can set other offset values depending on your rig.

 

You need to launch the dspserver for the first time so that dspserver.conf file is created. 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. I still use my dyndns service because I have other applications that require it. You can view the current registered dspservers: http://qtradio.napan.ca/qtradio/qtradio.pl or in map format at:  http://www.montefusco.com/ghpsdr3

 

To use this feature, start dspserver with the "--share" option. This will look for dspserver.conf for settings. If no dsdpserver.conf file is found one will be created on startup and is ready for editing. Editing notes are included in the conf file. My dspserver.conf looks like the following:

 

 

You will need to restart the dspserver for changes in the dspserver.conf file to take affect.

 

When I open a Terminal window and type:

    dspserver --lo 9000 --share

I see the following:

 

 

If you have followed these steps to this point, and have launched the Softrock server and dspserver, then your Softrock should now be on the air. You can verify that it is operational by opening QtRadio. You will need to select Receiver ==> Configure. In the following window, enter the local IP address of your Softrock server in the "Host:" window.

 

 

Hit close when you are done. Then go to Receiver ==> Connect to connect to your server locally. If you begin hearing your Softrock and can control it with QtRadio, congratulations! You have successfully installed the necessary elements. If not, go back through the steps and make sure that you did not miss anything.

 

If you still have problems, please let me know. Drop me an email at: ars_n8mdp@windstream.net

Good Luck!

 

Back to top of page

© 2017, Jonathan Tucker N8MDP. All Rights Reserved. Powered by cPanel.