Documentation chapters

How-to

SoapySDR driver

SoapyVortarian makes the four receive channels available to GNU Radio, Python and other SoapySDR applications. Requires SoapySDR 0.8 or later, Linux.

Function

  • Receives both UDP streams, pairs the datagrams by sequence number and delivers four sample-aligned channels.
  • When both streams are continuous and the timestamps of a pair differ, the earlier stream is shifted to the board time of the later one.
  • readStream fills the whole buffer across datagrams.
  • A late application is buffered by the socket buffer, about 0.25 s per stream.
  • Lost datagrams and the FIFO full flag are reported as SOAPY_SDR_OVERFLOW.
  • Every buffer carries the board time of its first sample in ns.

Build

sudo apt install libsoapysdr-dev soapysdr-tools cmake g++ python3-soapysdr
git clone https://github.com/vortarian-sdr/SoapyVortarian.git
cd SoapyVortarian && mkdir build && cd build
cmake .. && make
sudo make install && sudo ldconfig

Check:

SoapySDRUtil --info | grep -i vortarian
SoapySDRUtil --find="driver=vortarian"
SoapySDRUtil --probe="driver=vortarian"

When --info lists libvortarianSupport.so in more than one directory, remove the older build.

Channels

ChannelInputADCUDP port
0RX A110700
1RX B110700
2RX C210701
3RX D210701
PropertyValue
Sample rate125 MS/s, fixed
FormatsCS16 (native), CF32 (1.0 = full scale)
Directionreceive only

Control calls

SoapySDR callBoard command
setFrequency, channel 0 or 1adc 1 nco <Hz>
setFrequency, channel 2 or 3adc 2 nco <Hz>
setGain, 0 or 20 dBrf gain low, rf gain high
activateStream, deactivateStreamdebug on, debug off
  • NCO range 250 MHz to 500 MHz; other frequencies are refused.
  • One RF gain setting for all channels.
  • The control port serves one client. The driver retries a Busy answer for about 2 s.
  • An Error: answer of the board throws an exception with that line.

Device arguments

ArgumentDefaultMeaning
host192.168.67.2board address for control
ctrl_port5025TCP control port; 0 = stream-only, the driver only receives
port010700UDP port of channels 0 and 1
port110701UDP port of channels 2 and 3
bind0.0.0.0local address for the UDP streams
iq_swap01 exchanges I and Q
initautoauto: runs init when the board reports none; yes: always; no: never

Hardware time

  • readStream returns the board time of the first sample of every buffer.
  • getHardwareTime() returns the board time at the end of the newest datagram received; it trails the board by the network and socket buffering.
  • The board clock restarts at init and cannot be set from the host.

Tested

TestResult
10 minutes, 4 channels, CS1675 000 000 188 samples per channel, no overflow, board time continuous, no loss counted by the network card
Reader stopped for 100, 200 and 400 ms every 5 sno overflow
12.5 and 25 million samples per readStream call, CS16 and CF32no overflow, real time
GNU Radio, Soapy source with 4 channels into null sinks, CF32, 10 minutesno overflow
100 starts with a calibration tonephase of RX C and RX D against RX A within ±1.3°
Tone 10 MHz above the NCO+10.0002 MHz on all four channels

Throughput test of an installation:

SoapySDRUtil --args="driver=vortarian" --rate=125e6 --channels="0,1,2,3" --direction=RX

SOAPY_SDR_LOG_LEVEL=DEBUG logs every gap reported as an overflow, with stream, sequence numbers and flags.