1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-30 03:38:55 -05:00
sdrangel/plugins/samplesink/soapysdroutput
2022-02-06 12:56:58 +00:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
readme.md SoapySDR: prepend the driver name to the device label so it can be differentiated if handled by SoapySDR remote 2020-08-08 17:29:57 +02:00
soapysdroutput.cpp Fixed range-loop-construct warnings in GCC 11 2021-12-27 19:04:23 +01:00
soapysdroutput.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00
soapysdroutputgui.cpp Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
soapysdroutputgui.h Morph PluginInstanceGUI in DeviceGUI and single line inheritance from QWidget 2020-10-05 19:48:05 +02:00
soapysdroutputgui.ui SoapySDR: fixed some GUI issues 2019-02-07 23:45:16 +01:00
soapysdroutputplugin.cpp Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
soapysdroutputplugin.h Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
soapysdroutputsettings.cpp Fixed incomplete copyright headers (1) 2019-04-11 06:39:30 +02:00
soapysdroutputsettings.h Fixed incomplete copyright headers (1) 2019-04-11 06:39:30 +02:00
soapysdroutputthread.cpp SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
soapysdroutputthread.h SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
soapysdroutputwebapiadapter.cpp Fixed wrong structure being used in some sample source and sink plugins web API adapters. Fixes #842 2021-04-15 15:30:29 +02:00
soapysdroutputwebapiadapter.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00

SoapySDR output plugin

Introduction

This output sample sink plugin sends its samples to a device interfaced with SoapySDR.

SoapySDR is a C/C++ API that interfaces SDR hardware on one side and application software on the other. Due to its very generic nature it was fairly difficult to implement and specific UI widgets were developed to handle specific types of parameters. The level of control depends on how the device API was implemented by the vendors. On application side some parts of the API have not been implemented and can be left as possible enhancements (see next). In any case it is recommended to use the native plugins if they are available.

SoapySDR devices appear in the list of available devices in the order they are listed in the API call to SoapySDR. If more than one device controlled by SoapySDR is listed then its sequence number is incremented like:

  • SoapySDR[0:0] hackrf: HackRF One...
  • SoapySDR[1:0] hackrf: HackRF One...

The SoapySDR driver name appears right before the column

If the same device exposes several channels they appear as distinct devices with the channel number incremented like:

  • SoapySDR[1:0] lime: LimeSDR...
  • SoapySDR[1:1] lime: LimeSDR...

This works similarly to LimeSDR USB or BladeRF 2.0 micro

Binary distributions

The binary distributions provide only the SoapySDR base library. It is your responsibility to install SoapySDR in your system with the SoapySDR plugins suitable for your hardware.

User arguments

Occasionally some devices may require to have the user specifying keyword parameters in order to open the device correctly. Most noticeably the Red Pitaya (driver redpitaya) needs the IP address of the board specified as a addr=x.x.x.x key value pair as it does not get scanned automatically.

In such a case you will use the device user arguments (Preferences -> Devices -> User arguments) with the dialog as described here

SoapySDR API implementation

Not all parts are implemented. Currently the following have been left out:

  • Frequency API tuning arguments. The tuning elements are of course supported.
  • Clocking API
  • Time API
  • Sensor API
  • Register API
  • GPIO API
  • I2C API
  • SPI API
  • UART API

Particular considerations concerning hardware

In general as previously stated you should choose the native plugins if they are available. These are:

  • BladeRF
  • HackRF
  • LimeSDR
  • PlutoSDR

The following paragraphs list the known issues or oddities.

BladeRF

It is very important NOT to use SoapySDR. The default parameters are set to flash the FPGA but as this does not succeeds it results in a FPGA image wipe out and the device returns in "Cypress" mode. It is not too difficult to recover but there is no point risking the hassle.

Red Pitaya

When installed the Red Pitaya SoapySDR plugin lists a Red Pitaya device even if there is no Red Pitaya attached. Trying to select and start it when there is no Red Pitaya will result in program crash.

Interface

SoapySDR input plugin GUI

The top part described by number tags is common for all devices. The bottom part under the "A" tag depends on the SoapySDR device implementation. The corresponding widgets are stacked vertically inside a scrollable area as there may be many controls depending on how the device interface is implemented in SoapySDR. Move the slider on the right to see all parameters available.

1: Start/Stop

Device start / stop button.

  • Blue triangle icon: device is ready and can be started
  • Red square icon: device is running and can be stopped
  • Magenta (or pink) square icon: an error occurred. In the case the device was accidentally disconnected you may click on the icon, plug back in and start again.

2: Stream sample rate

Baseband I/Q sample rate in kS/s. This is the device sample rate (the "SR" SoapySDR control) divided by the interpolation factor (4).

3: Frequency

This is the center frequency of transmission in kHz. The center frequency is usually the same for all Tx channels. The GUI of the sibling channel if present is adjusted automatically if necessary. This control corresponds to the first SoapySDR tuning element usually labeled as "RF" and would generally control the main local oscillator (LO).

Use the wheels to adjust the value. Left click on a digit sets the cursor position at this digit. Right click on a digit sets all digits on the right to zero. This effectively floors value at the digit position. Wheels are moved with the mousewheel while pointing at the wheel or by selecting the wheel with the left mouse click and using the keyboard arrows. Pressing shift simultaneously moves digit by 5 and pressing control moves it by 2.

4: Interpolation factor

The I/Q stream from the application is upsampled by a power of two before being sent to the the SoapySDR controlled device. Possible values are increasing powers of two: 1 (no interpolation), 2, 4, 8, 16, 32, 64.

5: Transverter mode open dialog

This button opens a dialog to set the transverter mode frequency translation options:

Input stream transverter dialog

Note that if you mouse over the button a tooltip appears that displays the translating frequency and if translation is enabled or disabled. When the frequency translation is enabled the button is lit.

5.1: Translating frequency

You can set the translating frequency in Hz with this dial. The manipulation of the dial is described in (3: Frequency).

The frequency set in the device is the frequency on the main dial (1) minus this frequency. Thus it is positive for down converters and negative for up converters.

For example a mixer at 120 MHz for HF operation you would set the value to -120,000,000 Hz so that if the main dial frequency is set at 7,130 kHz the PlutoSDR will be set to 127.130 MHz.

If you use a down converter to receive the 6 cm band narrowband center frequency of 5670 MHz at 432 MHz you would set the translating frequency to 5760 - 432 = 5328 MHz thus dial +5,328,000,000 Hz.

For bands even higher in the frequency spectrum the GHz digits are not really significant so you can have them set at 1 GHz. Thus to receive the 10368 MHz frequency at 432 MHz you would set the translating frequency to 1368 - 432 = 936 MHz. Note that in this case the frequency of the LO used in the mixer of the transverter is set at 9936 MHz.

The Hz precision allows a fine tuning of the transverter LO offset

5.2: Translating frequency enable/disable

Use this toggle button to activate or deactivate the frequency translation

5.3: Confirmation buttons

Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.

6: Software LO ppm correction

Use this slider to adjust SDRangel internal LO correction in ppm. It can be varied from -100.0 to 100.0 in 0.1 steps and is applied in software when calculating the frequency at which the LO should be set.

A: SoapySDR variable interface

The form of widgets is closely related to the type of setting defined in the SoapySDR interface. These are:

  • Ranges
    • Continuous range when maximum and minimum are different
    • Discrete value when maximum and minimum are equal. Usually this appears in a range list to define a set of values
  • List of ranges: more than one range applies to the same setting
  • Arguments defined by
    • type: boolean, integer, floating point, string
    • nature: continuous or discrete
  • String list

A.1: Continuous range

If the range is all in the positive domain the unsigned variation is used:

SoapySDR input plugin GUI

Note that the same widget is used for single ranges and ranges list. In this case the range selection combo on the right is disabled. The manipulation of the dial is described in (3: Frequency)

If the range is in both the positive and negative domains the signed variation is used:

SoapySDR input plugin GUI

If the range applies to a gain a slider is used:

SoapySDR input plugin GUI

A.2: Discrete range

Appears with a combo box to select a discrete value:

SoapySDR input plugin GUI

A.3: List of ranges

In this case the range selection combo on the right is enabled:

SoapySDR input plugin GUI

A.4: Boolean argument

A checkbox is used to control boolean values:

SoapySDR input plugin GUI

For AGC, Auto DC and Auto IQ corrections the checkbox has its text label on the right:

SoapySDR input plugin GUI

When set (true) a checkbox is lit in orange:

SoapySDR input plugin GUI

A.5: Int, Float and String arguments

For all these types of values a line editor is used. Numerical values are parsed from string:

SoapySDR input plugin GUI

A.6 String lists

Some parameters like the antenna ports are expressed as a list of possible string values. These are presented in a combo box:

SoapySDR input plugin GUI