inicio mail me! sindicaci;ón
Microtelecom Perseus receiver on Linux
Andrea - IW0HDV

Perseus on Linux: checking libperseus-sdr functionalities and implementing simple one-liner radios with csdr

First of all, an explanation is due: the term one-liner in the title does refer to the unix sense, not the common one in english.

A one-liner program is textual input to the command line of an operating system shell that performs some function in just one line of input.

As we will see below, using the csdr package, it becomes feasible to write a fully functional SDR radio with just a single one line command in Linux.

Furthermore, csdr package can be used in order to check more properly that everything is working fine with the new built and installed libperseus-sdr.

csdr is a very nice DSP for SDR package written by András Retzler HA7ILM. known, one among many, for his OpenWebRX software. csdr is really the core of OpenWebRX, but it can even be used as a separated application.
It is based on the typical Unix concept of filter : in short a filter is a program that reads its input from the standard input stream, makes some useful processing and emits results on the standard output.

Usually a filter is chained to other programs (that can be even filters of course) using the pipe shell operator, in order to implement complex functions. In origin filters were probably designed keeping in mind text processing appplications but, of course, the data type exchanged can be anything can be modeled inside the stream concept.

A stream of samples (both in real and complex format) is very well suited to be processed by filters. The first SDR package to exploit this kind of concept has been GNU Radio: however GNU Radio, rather than unix shell pipes, uses an internally developed scheduler that takes care to move data along the piping interconnecting the DSP modules.
In my examples, diagrams are created using octave, a math open source program, freely available on any Linux distribution.

In order to generate the stream of IQ samples, we use the perseustest program, as found in libperseus-sdr package, specifying on the command line the option

-o -
that sends IQ samples, read from USB, as normalized 32 bit floating points numbers, to the standard output.

I/Q graph

The first example just produce a diagram of such raw samples when a signal at 7.250 MHz is sent at Perseus's input:
perseustest -u -30 -f 7250000 -s 192000 -a -p -o -  -t 1000 | \
csdr octave_complex_c 1024 120000 --2d                      | \
octave -i > /dev/null
Figure 1 here perseustest is sending IQ with a 192 kS/s rate for 1000 secs, using a -30 dB attenuation to the csdr octave_complex_c (c stands for complex numbers) that just reads the input streams and convert to the ASCII format (see below) required by octave in order to do a graphical render.
N = 1024;
isig = [0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
0.000000 -0.000000 0.000000 -0.000000 0.000000 ...
0.000002 -0.000002 ];
the graph is showing just two nice sine signals because I connected a signal generator tuned to about 7 MHz directly to the Perseus input.

I/Q spectrum

A more interesting example is a spectrum visualizer. In this case the csdr fft_cc command is used: the cc suffix indicates that csdr is getting a complex number block (1024) producing a complex FFT.
perseustest -f 7250000 -s 192000 -a -u -30 -p -o -  -t 1000 | \
csdr fft_cc 1024 100000 HAMMING --octave                    | \
octave -i > /dev/null
The second parameter(100000) indicates that 100000 samples are discarded before another block is processed.
Below a carrier at 7.250 MHz is shown: Figure 2

40M SSB receiver

A SSB LSB receiver is implemented as follows:
perseustest -f 7156000 -s 192000 -a -u 0 -p -o -  -t 1000 | \
csdr fir_decimate_cc 4 0.05 HAMMING                       | \
csdr bandpass_fir_fft_cc 0 0.01 0.20                      | \
csdr realpart_cf                                          | \
csdr agc_ff                                               | \
csdr limit_ff                                             | \
csdr convert_f_s16                                        | \
mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio -
csdr bandpass_fir_fft_cc <low_cut> <high_cut> <transition_bw> [window]

Perseus on Linux: Gqrx and gr-osmosdr

Gqrx is a Software defined radio receiver powered by GNU Radio and Qt developed by Alexandru Csete OZ9AEC.
I developed a small patch for Gqrx that allows to use Perseus with Gqrx.
Of course I added Perseus support to gr-osmosdr that is the GnuRadio module used by Gqrx for hardware management.
Alas such contribution has not yet been integrated upstream, so, for the time being, one has to compile it by itself.

First off, you have to follow the standard procedure for Gqrx installation . After the installation has completed, open a terminal and run gqrx program from command line.
The main windows will show up, but Perseus support is not yet there. Close the program and go ahead with the steps below.

The second step concerns libperseus-sdr library, that has to be built in the following way:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gcc g++ make manpages-dev autoconf automake libtool git
sudo apt-get install libusb-1.0-0-dev
cd
git clone -b doc https://github.com/Microtelecom/libperseus-sdr.git
cd libperseus-sdr/
sh bootstrap.sh
./configure && make && sudo make install && sudo ldconfig
cd
Connect the receiver and check that it is working running the
perseustest
program (the relays will click several times).

Now, the third and last step is to build the gr-osmosdr specific for Perseus:

sudo make install cmake
wget http://github.com/IW0HDV/gr-osmosdr/archive/perseus.zip
unzip perseus.zip
cd gr-osmosdr-perseus
mkdir build
cd build/
cmake ../ && make && sudo make install && sudo ldconfig
Now, starting again gqrx, and pressing "Configure I/O device", the option for Perseus will appear in the device's list.

The above procedure was tested on a fresh installation of 64 bit Ubuntu 16.04.3 LTS. It should work as is on all amd64 Debian derived distribution.
The procedure could seem cumbersome: really, using the Linux clipboard mouse management, the several commands can be inputed very quickly. Just select and copy the text from the web page using the left mouse button in one shot (without recurring to the context menu).
Next, you can paste it into the terminal with the central button. Copying the end of line you do not even need to press enter for each line.

SUSE packaging

Martin Hauke wrote me that he has packaged libperseus-sdr for openSUSE on OBS.
The package is found here.

He also added libperseus-sdr to release-monitoring.org.
So one can keep informed about new releases via fedmsg (mail, irc,...)

Many thanks to Martin !

How to run a Microtelecom Perseus receiver on Linux

As usual, it depends !

Please take a look to the choices list below.
In case you want discuss on this topic, enroll in the Perseus mailing list and ask there.

  1. If one want be on the air as soon as possible, please use Linrad, by SM5BSZ Leif Åsbrink, one of the best SDR programs written, natively on Linux and ever.
    Here there is an installation manual for Linrad written by Roger, VE7VV.
    Here there is a Linrad Installation & Configuration User Guide by Gaëtan Horlin, ON4KHG.
  2. Use Alexandru Csete OZ9AEC GQRX SDR receiver, see also this post.
  3. If you like play with DSP, use GNU Radio, the unrivalled open source DSP toolbox.
    Perseus is enlisted in CGRAN and so directly supported in PyBOMBS, the new GNU Radio install management system, by the new gr-microtelecom module I wrote.
  4. (not for fainthearted !) use ghpsdr3-alex
    a modification of the excellent Software Defined Radio (SDR) software by John Melton G0ORX that fully supports Perseus even over Internet, in client server mode.
  5. (for coders only) Do you want simply to access hardware, as you just cooked your own SDR code ?
    Take a look to the open source libperseus-sdr control library, written by the Microtelecom' founder and Perseus' chief designer, Nico Palermo IV3NWV and undeservingly maintained by me.
    If you discover a bug or you would like to have a new feature, open an issue on GitHub.
  6. (for coders only) try Gordon JC Pearce' Lysdr .
    My fork, with patches for Perseus, is here.

Andrea IW0HDV

Old page, containing not anymore supported projects can be found here.

Useful links

PERSEUS is a software defined VLF-LF-MF-HF receiver based on an outstanding direct sampling digital architecture.

Modification to Perseus SDR to Use an Eternal Clock by Mark Goldberg W7MLG

Perseus HF SDR Receiver

The Perseus Direct-Sampling SDR Receiver, by Adam Farson, VA7OJ/AB4OJ

Leif Compares various SDRs including the RSP1, Airspy with SpyVerter, Airspy HF+, FDM-S1, IC706, Perseus

Perseus Direct-Sampling HF Receiver, Adam Farson VA7OJ

Valid HTML 4.01 Strict