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.
readStreamfills 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
| Channel | Input | ADC | UDP port |
|---|---|---|---|
| 0 | RX A | 1 | 10700 |
| 1 | RX B | 1 | 10700 |
| 2 | RX C | 2 | 10701 |
| 3 | RX D | 2 | 10701 |
| Property | Value |
|---|---|
| Sample rate | 125 MS/s, fixed |
| Formats | CS16 (native), CF32 (1.0 = full scale) |
| Direction | receive only |
Control calls
| SoapySDR call | Board command |
|---|---|
setFrequency, channel 0 or 1 | adc 1 nco <Hz> |
setFrequency, channel 2 or 3 | adc 2 nco <Hz> |
setGain, 0 or 20 dB | rf gain low, rf gain high |
activateStream, deactivateStream | debug 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
Busyanswer for about 2 s. - An
Error:answer of the board throws an exception with that line.
Device arguments
| Argument | Default | Meaning |
|---|---|---|
host | 192.168.67.2 | board address for control |
ctrl_port | 5025 | TCP control port; 0 = stream-only, the driver only receives |
port0 | 10700 | UDP port of channels 0 and 1 |
port1 | 10701 | UDP port of channels 2 and 3 |
bind | 0.0.0.0 | local address for the UDP streams |
iq_swap | 0 | 1 exchanges I and Q |
init | auto | auto: runs init when the board reports none; yes: always; no: never |
Hardware time
readStreamreturns 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
initand cannot be set from the host.
Tested
| Test | Result |
|---|---|
10 minutes, 4 channels, CS16 | 75 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 s | no overflow |
12.5 and 25 million samples per readStream call, CS16 and CF32 | no overflow, real time |
GNU Radio, Soapy source with 4 channels into null sinks, CF32, 10 minutes | no overflow |
| 100 starts with a calibration tone | phase 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.