[hpsdr] Proposal for a new Software project.
John Melton
John.Melton at Sun.COM
Tue Dec 1 02:26:46 PST 2009
The following is based on some work I have been doing with Kirk Weednam
to help debug the Ozy/Mercury multiple receiver FPGA code.
When I started looking at changing ghpsdr to support multiple receivers
in Mercury and multiple Mercury cards it became very obvious that a
client/server architecture was needed.
Trying to run up to 8 spectrum/waterfall displays on a single display
becomes a challenge despite the processing power needed ;-)
I agree that we need a defined interface specification, but I also think
we need to prototype some of this to get some good ideas on what we
exactly want.
I have put the latest version of my 'prototype' code in the svn store.
This is all written in C for Linux. I have run it on both Ubuntu 9.04,
9.10 and Fedora Core 10 and 12. Please don't ask me if this runs on
Windows XP/Vista/7 - I do not have any Windows development environment.
Be aware that this is currently using some non released Ozy and Mercury
code.
svn://206.216.146.154/svn/repos_sdr_hpsdr/trunk/N6LYT/ghpsdr3
The server is fairly simple. It has command line arguments to set the
number of receivers to support on Mercury, the sample rate and the
ability to set random/dither and preamp. It will extract the samples
for each of the receivers into separate buffers and will currently allow
one client for each receiver.
The client server interface is fairly simple. It uses a TCP connection
for commands but uses UDP for the I/Q samples and any returned audio.
The command protocol is
plain text:
attach RX
OK SAMPLE_RATE
ERROR ERROR_STRING
detach RX
OK
ERROR ERROR_STRING
frequency F
OK
ERROR ERROR_STRING
start iq PORT
OK
ERROR ERROR_STRING
start bandscope PORT
OK
ERROR ERROR_STRING
stop iq
OK
ERROR ERROR_STRING
stop bandscope
OK
ERROR_STRING
Where:
RX=0..7
F=frequency in Hz
PORT=UDP Port to send samples to.
ERROR_STRING=some meaningful error string.
The server listens for connections from a client and starts a thread to
process commands. Currently only one connection is allowed per
receiver.
On the client side I have modified ghpsdr to communicate with the
server. The GUI interface is GTK+.
I have also written a simple monitor client that displays a waterfall in
a small window. The idea being that one main receiver is run with all
the bells and whistles but at the same time I can run multiple simple
monitors to monitor activity on different bands. When it is started it
brings up a dialog to select the receiver and the frequency to monitor.
The frequency and display parameters can be changed by right clicking on
the display. Of course there is nothing to stop you running multiple
copies if ghpsdr attached to different receivers.
I have put a couple of images on my blog at http://g0orx.blogspot.com/.
Note that I have not worked on transmit yet with this version.
The receiver audio can either be played out locally using the sound card
or sent back to the server for playing out through Mercury. Some work is
needed to mix multiple receiver audio streams.
I am quite prepared to change the code to support any protocols that we
come up with. I will also try to write a couple of simple clients using
different languages and/or GUI interfaces.
Regards,
John g0orx/n6lyt
More information about the Hpsdr
mailing list