lhpsdr User Manual

  1. Introduction
  2. Compilation
  3. Operation
  4. Spectrum Displays
  5. Bookmarks List
  6. Time Signal Reception
  7. On-the-air Operation
  8. Bugs and annoyances
  9. Version history
  10. Copying

1. Introduction
Currently lhpsdr is mainly a project intended for teaching myself the development of Software Defined Radio functions and Digital Signal Processing. I have built into lhpsdr an FFT-based Spectrum Display for the Receiver with a maximum frequency range equal to the DDC sampling rate (normally 192kHz). Lhpsdr has De-modulators for Frequency Modulated, Amplitude Modulated, Single Side band (USB/LSB) and for CW (Morse code) transmissions. Lhpsdr also has corresponding Modulators for AM, FM, SSB and CW modes. There are Controls in lhpsdr for setting up HPSDR Protocol II compatible SDR Transceivers for Transmission and Reception on the HF amateur bands and 50 MHz. Lhpsdr has functions for displaying a Wide band Receive frequency spectrum from 0 to 61.44 MHz, using the Wide band (raw) sample streaming feature of HPSDR Protocol II Transceivers. Please note though, I only have access to an ANAN-7000DLE MkII transceiver and lhpsdr is tested on this device only.

Receiver Controls include the Center Frequency "Spin Dial" for entering the Center Frequency, a Band Combobox for selecting one of the available Amateur Bands, selectable Automatic Frequency Control (AFC), Signal Strength Indicator (of level bar type), Combo Boxes for selecting ADC Sampling Rate, ADC Buffer Size, FFT/Spectrum Bandwidth, Modulation Mode, Weaver Frequency and Demodulator Bandwidth. The decay rate of the Audio Derived AGC (ADAGC system) can be set by a Slider Control, from very slow to very fast as needed. A selectable Noise Activated Squelch with a Slider Control is available but in FM mode only. Sound Volume can be controlled using another Slider Control. The Bookmarks button opens a tree-view window form which the user can select a Station with its associated Frequency and Modulation Mode. The user can also save a favorite Frequency and Mode combination in the Bookmarks under a Station name.

Transmitter Controls include the Center Frequency "Spin Dial" for entering the Center Frequency, a Band Combobox for selecting one of the available Amateur Bands, Combo Boxes for selecting Modulation Mode, Weaver Frequency and Modulator Bandwidth. For Voice modes (SSB, AM and FM) a Slider allows the control of Microphone Level, and for CW modes a Slider allows the control of Side tone level, and another one the control of Keying speed in Iambic modes.

Lhpsdr includes a Chebyshev Low Pass Filter which is used as a Low Pass "Roofing Filter" of the Sample Stream from the SDR device and also for setting the bandwidth of the FFT-based Spectrum Display. Individual Demodulator functions also use Chebyshev filters to set the Demodulator Bandwidth according to the user's selection of Modulation Mode and for narrowing signal input to the AFC function. Similarly, Chebyshev LPF's are used in Modulator functions to control transmitted bandwidth. Play Back of demodulated signals is either via the computer's Sound Card and by using the ALSA sound system API, or from the HPSDR Transceiver's own Audio Amplifiers.

As of version 0.7-alpha, lhpsdr includes functions for receiving and decoding Time Signal stations on VLF and Long Wave. Currently lhpsdr can receive time and date data from MSF on 60kHz, RBU on 66.667kHz, DCF77 on 77.5kHz and TDF/Allouis on 162kHz. The detection of data bits and synchronization signals is done by pattern matching rather than hard thresholding, so that lhpsdr can successfully copy weak time station signals even well outside the official range. For example, the MSF signal on 60kHz can quite often be received and decoded here in Cyprus, even though it is about 3500km away! Development of time station receiving and decoding functions was done using a Perseus SDR receiver and a 1/4L GP antenna for the 30m amateur band (7.5m high).

As of version 1.1-alpha, lhpsdr has support for what I called "Guest Modes", e.g. Amateur operating modes other than the basic SSB, CW and FM modes. These "guest" modes include (in Transmit/Receive mode) Hellschreiber, Olivia, PSK31, and RTTY. An SSTV Guest mode is under development and as of version 2.1 lhpsdr has a Receive-mode capability that works well and can decode the more commonly used SSTV formats. Transmit capability is under development and once successful will likely conclude development of lhpsdr.

Besides the above two-way communication modes, lhpsdr has Receive-only Guest modes for CW/Morse decoding, VLF/LW Time and Frequency standard transmissions, HF WEFAX transmissions and a Decoder for the WSPR low-power global beacon network. And as of version 2.2-Beta, lhpsdr has full support for the Reed-Solomon Identifier system. Both TxID and RxID functionality is now available.

2. Compilation
Please note that I use Void Linux AMD64 which is a "bleeding edge" type distribution, so there may be compilation and/or run time difficulties, if you are using a relatively old distro. This is mostly true of the basic dependencies like GTK+-3.22, Glade-3 and possibly the ALSA library. These libraries are also needed: libasound, libmath, libgmodule-2.0, libpthread and libcurl.

To compile the package, it may be preferable to first run the included "autogen.sh" script in the package's top directory, to produce a fresh build environment. Then the "configure" script can be run with optional parameters to override the default settings and compiler flags, e.g: ./configure --prefix=/usr CFLAGS="-g -O2" will override the default /usr/local installation prefix and the "-Wall -O2" compiler flags.

Running "make" in the package's top directory should produce the executable binary in src/. Running "sudo make install" will use /usr/local/ as the default prefix or one specified by the user during configuration (normally /usr). The "lhpsdr" binary will install into <prefix>/bin. The .lhpsdr/ working directory will be installed in <prefix>/share/examples/lhpsdr and the doc/ documentation directory in <prefix>/share/doc/lhpsdr. Finally a short manual doc/lhpsdr.1.gz will be installed in <prefix>/share/man/man1/

After installation, when lhpsdr is run for the first time, it will create its working directory in the user's home and copy necessary files from the examples/ directory. The ~/.lhpsdr/lhpsdr/lhpsdr.glade file can be edited using Glade-3, if cosmetic changes are desired to lhpsdr's Graphical User Interface, but only if the user knows what he is doing! ;-).

3. Operation
When lhpsdr is started for the first time, it will look for its configuration file "lhpsdr.config" in its ~/.lhpsdr/ working directory. If the config file is missing or is of an older version, then lhpsdr will ask the user to create a new default config file by opening a Configuration Dialog and using the Tabs below:

In the GEN tab, the user can specify the HPSDR Transceiver Device from the available supported types, the TCXO frequency Error in ppm, the ALSA PCM device for PC Sound output (normally hw:0,0 or hw:1,0), the Local (PC Sound) Enable flag, the "Beep" signal volume and the DDC buffer size (normally 2k Samples).

In the RX tab, the user can specify the default receiver Frequency on start up (in kHz), the Modulation mode, the DDC Sample rate (normally 192 kS/s) and the FFT/Spectrum frame rate in Frames/sec.

In the TX tab, the user can specify the Tx power for Tuning as a percentage of maximum, settings for the Microphone (The Contacts of the Microphone plug to which the PTT and Mic/Bias are connected, PTT Enable and Bias Enable, 20dB Gain Boost and choice of Microphone or Line input. For the CW mode, the settings are for Break In Enable, Reverse Keyer contacts, Hang Delay in mSec, RF Delay in mS, Keyer Speed in WPM and Weight, Side Tone Enable and Frequency and Side Tone Level.

Once this default configuration is applied, it will be updated each time lhpsdr is quit by the user. The following parameters are saved on exit to the lhpsdr.config file: The Config file's version number, the above mentioned Configuration Parameters and the Alex Settings in the Main window.

The geometry of open windows (e.g. window size and position) for the Main window, the Receiver window(s), the Station list, the Spectrum display window(s) and any Guest Mode windows are saved in the gui.config file. The settings of many of the controls in the Main and Receiver window(s) are also saved in gui.config. When lhpsdr is started, it will open and place the Main, Transceiver and Bookmarks windows as they were on quit and will restore the saved settings.

The GTK+-3 user interface
Main Window Widgets:

4. Spectrum Displays
As of version 0.4-alpha, lhpsdr has an FFT-derived Spectrum display using the samples streams from the DDC's or the raw Wide band stream. The Frequency range (bandwidth) of the Spectrum display is selectable from the "B.Width" Combo box and the Frame rate from the "Rate" Combo box. For the Wide band spectrum display, the bandwidth is fixed at 1/2 the sampling rate of the ADC which in the ANAN-7000DLE is 122.88 MHz, so the bandwidth is 0-61.44 MHz. The source sample stream (Receiver DDC or Wide band) is selected by the "Receiver" or "Wide band" Radio buttons and the display can be stopped (frozen) using the "Stop" Radio button.

In this particular Spectrum display, the output bins of the FFT are normalized frame by frame so that the peak of the spectrum "Oscilloscope" trace will always be at the top 0 dB reticle line. The rest of the bins will be below this, depending on their value, which is effectively in relative dB's with a range from 0 to -90 dB. Therefore the Oscilloscope display is always a relative display rather than an absolute display, more common in other SDR Receiver clients.

The Waterfall display is produced from the same normalized FFT bins and uses some simple pseudo-colorization to indicate bin levels. The reticle lines represent elapsed time in seconds, as indicated in the left hand side scale. The Spectrum Display can be used to tune the Receiver to the frequency of any point of interest in it. This is done by clicking with the pointer on either the Oscilloscope or the Waterfall display and the click-tune functions will look a short distance either side of the click X coordinate and the point of highest value will be selected to calculate the desired frequency.

5. Bookmarks List
As of version 0.8, lhpsdr includes a "Bookmarks" window, which can be opened by clicking the "Bookmarks" Button in the lhpsdr main window. The various entries are grouped by Mode or other common characteristics and the display is in Tree mode. This window can be used to select a Station that is already saved in the ~/.lhpsdr/bookmarks file, make and save a new Bookmarks entry, edit an existing entry and delete it if so desired. Clicking on a row in this window will enter the Frequency and Mode of the Station into the Frequency control widgets of the Receiver. Also, clicking the "Up" or "Down" buttons will move the selection accordingly, to the next or previous row, again entering Station data into lhpsdr and the Receiver. The "Delete" button removes the selected row from the List, while the "New" button enters a new blank row into the list, to be edited by the user. This can be done manually, by selecting the blank row and entering the Station Name, the Frequency and the Mode. It is also possible to enter the latter two from the current settings of lhpsdr, by clicking with the middle button on to the blank row. The Name of the Station will still have to be entered manually. Finally, clicking the "Save" button will save all entries in the Bookmarks window to the ~/.lhpsdr/bookmarks file in the user's directory. NOTE: The Bookmarks window will "attach" to a Receiver instance when the Start button is activated or if the Bands combo box setting is changed. The Receiver and ADC index to which the Bookmarks List is attached will show in the title of the Bookmarks window.

6. Time Signal Reception:
As of version 0.7, lhpsdr has functions to receive, decode and display the Date, Time, Summer Time in Effect, Leap Second, DUT1, Parity Bit status and other data as transmitted by Time and Frequency Reference stations on VLF frequencies. Currently lhpsdr can receive such data from the German DCF77 on 77.5kHz, the Russian RBU on 66.667kHz, the British MSF on 60kHz and the French TDF on 162kHz. With a Ground Plane antenna for the 10 MHz band (7.5m high) and in good conditions, these stations can be received and decoded successfully even though they are between 2500km and 3500km away!

The time decoding function is activated by selecting TIME in the Guest Modes popup menu, which opens the Time Stations window for further action. In this window, the Time Station Combo Box allows selection of the Time station, while the Receive toggle button starts the relevant receiving and decoding functions. The Time Stations window has a display for the Date and Time, as well as many indicators for Status decodes and error conditions, depending on the Time Station. Some stations (e.g. RBU and MSF) transmit DUT1 too, while RBU transmits Julian Day and DUT data also. Please note that even in good conditions, it takes a few minutes for lhpsdr to sync with the time station and correctly decode date and time data.

8. On-the-air Operation

8. Bugs and annoyances
I have fixed whatever bugs I came across testing lhpsdr but there may be some hiding, waiting for the right conditions to appear.
Lhpsdr is generally simplistic because my knowledge of modern DSP theory and application is limited. In fact this project is more of an effort to teach myself SDR transceiver techniques so there is no advance "DSP Magic" here as there would be in professionally developed software.

9. Version history
Version 0.1-alpha: This was a simple console program to develop the basic HPSDR device discovery functions over the Ethernet connection.

Version 0.2-alpha: Added functions for sending and receiving data to the HPSDR device for basic set up (e.g. the General Packet and DDC Specific Packet).

Version 0.3-alpha: Added functions for configuring DDC's and receiving ADC sample streams from the device.

Version 0.4-alpha: Imported Digital filters and FFT Spectrum analysis functions from my "sdrx" SDR Receiver application, for processing incoming DDC sample streams.

Version 0.5-alpha: Imported Demodulator functions from my "sdrx" SDR Receiver application and adapted them for the HPSDR device protocols. These functions provide demodulation for FM (wide band or narrow band), SSB (USB or LSB), CW, AM and Synchronous AM.

Version 0.6-alpha: Produced an initial Graphical User Interface based on GTK+-3 and Glade-3.9999 This provided the Discovery Messages window, the lhpsdr Main window, which provides some control over the HPSDR device (Mainly Alex0 and Alex1 settings and ADC attenuators), and a basic Window for a single Receiver instance.

Version 0.7-alpha: Added widgets to the Transceiver Window for the FFT DDC spectrum and Wide band spectrum displays and added a window for the Time Signal decoder functions. These were also imported from the "sdrx" application.

Version 0.8-alpha: Added a Window for the Bookmarks List display, also imported from "sdrx" and adapted for lhpsdr.

Version 0.9-alpha: After much effort and difficulty, I modified the initial code base of lhpsdr to allow multiple instances of DDC Receiver objects and associated Windows. This led to many complications and bugs but eventually, after much effort, lhpsdr now has support for multiple receivers and FFT spectrum displays.

Version 1.0-alpha: Added some Transmit functionality (Modulators) for basic Ham Radio modes (SSB, CW, FM, AM) and some widgets to run and control the Transmitter. Still, overall, lhpsdr is rather simplistic e.g. there is no Microphone compressor or support for Adaptive Pre-Distortion (PureSignal). Hopefully in later version I may find ways to add some DSP Magic to lhpsdr!

Version 1.1-alpha: Added support for what I call "Guest Modes". Basically these are either Receive-only or Transmit/Receive programs that support reception or operation on some specific Amateur Radio mode like PSK31, Hell Schreiber etc. Most of these Guest modes have been adapted and incorporated into Lhpsdr from existing applications I had written for these modes, when using a "traditional" transceiver like my Yaesu FT-847 or Elecraft K3. In this version I added a Morse Code Decoder mode which is receive-only and decodes Morse code from the samples stream of the CW Demodulator. It was imported and adapted from my xdemorse application.

Version 1.2-alpha: Added a Guest mode to decode the time and date from VLF Time/Frequency Standard transmitters. This mode can decode signals from MSF60 on 60kHz, RBU on 66.667kHz, DCF77 on 77.5kHz and TDF on 162kHz.

Version 1.3-alpha: Added a WEFAX decoder Guest mode which can demodulate standard WEFAX transmissions on HF and produce an image of the weather map or (unfortunately not any more) of news broadcasts from the now (apparently) defunct Kyoto News agency HF transmissions.

Version 1.4-alpha: Added a transmit/receive Guest mode for the amateur PSK31 operating mode. The code was imported and adapted from my xpsk31 application.

Version 1.5-alpha: Added a transmit/receive Guest mode for the amateur RTTY operating mode. The code was imported and adapted from my xritty application.

Version 1.6-alpha: Added a transmit/receive Guest mode for the amateur Hell Schreiber operating mode. The code was imported and adapted from my xfhell application.

Version 1.7-alpha: Added a transmit/receive Guest mode for the amateur Olivia operating mode. The code was imported and adapted from Pawel Jalocha's original C++ sample code which I translated to C and adapted for lhpsdr.

Version 1.8-beta: Changed the installation commands in Makefile.am so that all the relevant files (desktop file, application pixmap, configuration file, executable binary etc) are installed under any location specified to the configure script by the --prefix= option. Also modified the program so that on first start up after installation, the application will create its working directory by copying files from the relevant directories under the installation prefix. First hopeful beta release!

Version 1.9-beta: Fixed a few bugs that caused segmentation faults when lhpsdr was quit with some Guest windows open (like PSK31, RTTY etc). Also replaced the IQ frequency discriminator in the WEFAX guest mode with a zero-crossing discriminator because the former was not working well.

Version 2.0-beta: Added a WSPR (Whisper) Guest Decoder for the Weak Signal Propagation Reporter beacons. This Decoder was adapted and imported into lhpsdr from the rtlsdr-wsprd application by Guenael, VA2GKA and WSJT-X application by Joe, K1JT. I had to make a number of changes to the code to remove the FFTW dependency (replaced by the built-in FFT function of lhpsdr) and to modify the CIC decimator and its FIR filter.

Version 2.1-beta: Started an attempt to build a Guest mode for a favorite communication mode - SSTV! So far a fairly successful Receive mode is available and work is in progress to try and build SSTV Transmit ability.

Version 2.2-beta: Added RSID functionality for both RxID and TxID decoding and encoding. The source code for RSID was adapted from the C++ RSID code in fldigi, after manual translation to C.

9. Copying
This software package is released under the GNU Public License. Please see the COPYING file for more details.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details