Device user arguments: updated documentation

This commit is contained in:
f4exb 2019-06-14 14:10:25 +02:00
parent 2d6268ea4a
commit 63132f0165
5 changed files with 88 additions and 26 deletions

View File

@ -2,7 +2,7 @@
<h2>Introduction</h2>
This output sample sink plugin sends its samples to a device interfaced with [SoapySDR](https://github.com/pothosware/SoapySDR/wiki).
This output sample sink plugin sends its samples to a device interfaced with [SoapySDR](https://github.com/pothosware/SoapySDR/wiki).
SoapySDR is a [C/C++ API](https://github.com/pothosware/SoapySDR/blob/master/include/SoapySDR/Device.hpp) 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 developped 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.
@ -22,6 +22,12 @@ This works similarly to LimeSDR USB or BladeRF 2.0 micro
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.
<h2>User arguments</h2>
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](../../../sdrgui/deviceuserargs.md)
<h2>SoapySDR API implementation</h2>
Not all parts are implemented. Currently the following have been left out:
@ -35,7 +41,7 @@ Not all parts are implemented. Currently the following have been left out:
- I2C API
- SPI API
- UART API
<h2>Particular considerations concerning hardware</h2>
In general as previously stated you should choose the native plugins if they are available. These are:
@ -44,9 +50,9 @@ In general as previously stated you should choose the native plugins if they are
- HackRF
- LimeSDR
- PlutoSDR
The following paragraphs list the known issues or oddities.
<h3>BladeRF</h3>
It is very important NOT to use SoapySDR. The default parameters are set to flash the FPGA but as this does not suceeds 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.
@ -63,16 +69,16 @@ The top part described by number tags is common for all devices. The bottom part
<h3>1: Start/Stop</h3>
Device start / stop button.
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.
<h3>2: Stream sample rate</h3>
Baseband I/Q sample rate in kS/s. This is the device sample rate (the "SR" SoapySDR control) divided by the interpolation factor (4).
<h3>3: Frequency</h3>
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).
@ -95,7 +101,7 @@ Note that if you mouse over the button a tooltip appears that displays the trans
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.
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.
@ -111,7 +117,7 @@ Use this toggle button to activate or deactivate the frequency translation
<h4>5.3: Confirmation buttons</h4>
Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.
Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.
<h3>6: Software LO ppm correction</h3>
@ -129,7 +135,7 @@ The form of widgets is closely related to the type of setting defined in the [So
- type: boolean, integer, floating point, string
- nature: continuous or discrete
- String list
<h3>A.1: Continuous range</h3>
If the range is all in the positive domain the unsigned variation is used:

View File

@ -2,7 +2,7 @@
<h2>Introduction</h2>
This input sample source plugin gets its samples from a device interfaced with [SoapySDR](https://github.com/pothosware/SoapySDR/wiki).
This input sample source plugin gets its samples from a device interfaced with [SoapySDR](https://github.com/pothosware/SoapySDR/wiki).
SoapySDR is a [C/C++ API](https://github.com/pothosware/SoapySDR/blob/master/include/SoapySDR/Device.hpp) 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 developped 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.
@ -22,6 +22,12 @@ This works similarly to LimeSDR USB or BladeRF 2.0 micro
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.
<h2>User arguments</h2>
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](../../../sdrgui/deviceuserargs.md)
<h2>SoapySDR API implementation</h2>
Not all parts are implemented. Currently the following have been left out:
@ -35,7 +41,7 @@ Not all parts are implemented. Currently the following have been left out:
- I2C API
- SPI API
- UART API
<h2>Particular considerations concerning hardware</h2>
In general as previously stated you should choose the native plugins if they are available. These are:
@ -48,9 +54,9 @@ In general as previously stated you should choose the native plugins if they are
- PlutoSDR
- RTLSDR
- SDRplay RSP1
The following paragraphs list the known issues or oddities.
<h3>BladeRF</h3>
It is very important NOT to use SoapySDR. The default parameters are set to flash the FPGA but as this does not suceeds 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.
@ -81,12 +87,12 @@ Use the wheels to adjust the value. Left click on a digit sets the cursor positi
<h4>1.2: Start/Stop</h4>
Device start / stop button.
Device start / stop button.
- Blue triangle icon: device is ready and can be started
- Green 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. Check the console log for possible errors.
<h4>1.3: Record</h4>
Record baseband I/Q stream toggle button
@ -100,17 +106,17 @@ Baseband I/Q sample rate in kS/s. This is the device sample rate (the "SR" Soapy
These buttons control the SDRangel internal DSP auto correction options:
- **DC**: auto remove DC component
- **IQ**: auto make I/Q balance. The DC correction must be enabled for this to be effective.
- **IQ**: auto make I/Q balance. The DC correction must be enabled for this to be effective.
<h3>3: Baseband center frequency position relative the LO center frequency</h3>
Possible values are:
- **Cen**: the decimation operation takes place around the LO frequency Fs
- **Inf**: the decimation operation takes place around Fs - Fc.
- **Inf**: the decimation operation takes place around Fs - Fc.
- **Sup**: the decimation operation takes place around Fs + Fc.
With SR as the sample rate before decimation Fc is calculated as:
With SR as the sample rate before decimation Fc is calculated as:
- if decimation n is 4 or lower: Fc = SR/2^(log2(n)-1). The device center frequency is on the side of the baseband. You need a RF filter bandwidth at least twice the baseband.
- if decimation n is 8 or higher: Fc = SR/n. The device center frequency is half the baseband away from the side of the baseband. You need a RF filter bandwidth at least 3 times the baseband.
@ -131,7 +137,7 @@ Note that if you mouse over the button a tooltip appears that displays the trans
You can set the translating frequency in Hz with this dial. The manipulation of the dial is described in (1.1: 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.
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.
@ -147,7 +153,7 @@ Use this toggle button to activate or deactivate the frequency translation
<h4>5.3: Confirmation buttons</h4>
Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.
Use these buttons to confirm ("OK") or dismiss ("Cancel") your changes.
<h3>6: Software LO ppm correction</h3>
@ -165,7 +171,7 @@ The form of widgets is closely related to the type of setting defined in the [So
- type: boolean, integer, floating point, string
- nature: continuous or discrete
- String list
<h3>A.1: Continuous range</h3>
If the range is all in the positive domain the unsigned variation is used:

View File

@ -24,7 +24,7 @@
#include "export.h"
struct DEVICES_API DeviceUserArgs
struct SDRBASE_API DeviceUserArgs
{
public:
struct Args {

45
sdrgui/deviceuserargs.md Normal file
View File

@ -0,0 +1,45 @@
<h1>Devices user arguments management</h1>
The user can give arguments in the form of a string related to a specific device that appears in the list of enumerated device. At the moment these arguments are related to a specific hardware and its sequence in enumeration. For example `LimeSDR,0` for the first Lime SDR, `LimeSDR,1` for the second Lime SDR ...
THe corresponding plugin can make use of this user string in any way it finds useful. At present this is used only by the SoapySDR input/output plugins to override the `kwargs` (keyword arguments) at device open time (the `driver` argument is preserved as defined in the enumeration)
The following dialog is used to specify these arguments:
![Device user arguments dialog](../doc/img/MainWindow_user_args.png)
<h2>1 Available devices list</h2>
This is the list of available devices reported by the initial enumeration. There are 3 columns:
- **HwID**: This is the "hardware ID". It represents a type of device like `HackRF` or `TestSource`
- **Seq**: The device sequence in enumeration starting at 0. You may have more that one device of the same type in the system
- **Description**: A descriptive string stored by the enumeration process to help identify which device is which
<h2>2 Import device button</h2>
Use this button to import the selected device in the panel above (1) to the panel below (3) that lists the user arguments by device and sequence. You can only import a device which hardware ID and sequence is not already in the panel below.
<h2>3 User arguments</h2>
This is the list of arguments given by the user and attached to a specific device given its hardware ID and sequence. There are 3 columns:
- **HwID**: This is the "hardware ID". It represents a type of device like `HackRF` or `TestSource`
- **Seq**: The device sequence in enumeration starting at 0. You may have more that one device of the same type in the system
- **Arg string**: The user argument string. It can be of any form and not necessarily in the `key1=value1, key2=value2` form. It is up to the corresponding plugin to interpret the string and to make use of its information.
<h2>4 Delete button</h2>
Use this button to delete the arguments currently selected in the above panel (3)
<h2>5 Edit arguments</h2>
Use this line editor to change the arguments currently selected in the above panel (3). The text will be commited when the focus is lost.
<h2>6 Cancel button</h2>
The changes made to the argument list are temporary. You can use this button to dismiss the changes and close the dialog.
<h2>7 OK (confirmation) button</h2>
The changes made to the argument list are only temporary. You can use this button to commit the changes and close the dialog.

View File

@ -50,6 +50,8 @@ The following items are presented hierarchically from left to right:
- _Logging_: opens a dialog to choose logging options (see 1.2 below for details)
- _DV Serial_: if you have one or more AMBE3000 serial devices for AMBE digital voice check to connect them. If unchecked DV decoding will resort to mbelib if available else no audio will be produced for AMBE digital voice
- _My Position_: opens a dialog to enter your station ("My Position") coordinates in decimal degrees with north latitudes positive and east longitudes positive. This is used whenever positional data is to be displayed (APRS, DPRS, ...). For it now only works with D-Star $$CRC frames. See [DSD demod plugin](../plugins/channelrx/demoddsd/readme.md) for details on how to decode Digital Voice modes.
- _Devices_: section to deal with devices settings
- _User arguments_: opens a dialog to let the user give arguments specific to a device and its instance (sequence) in the system
- Help:
- _Loaded Plugins_: shows details about the loaded plugins (see 1.3 below for details)
- _About_: current version and blah blah.
@ -58,7 +60,7 @@ The following items are presented hierarchically from left to right:
See the audio management documentation [here](audio.md).
<h4>1.2. Logging preferences</h4>
<h4>1.2. Preferences - Logging</h4>
![Main Window logging preferences](../doc/img/MainWindow_logging.png)
@ -112,8 +114,11 @@ Use the "OK" button to validate all changes
Use the "Cancel" button to dismiss all changes
<h4>1.3 Preferences - Devices - User arguments</h4>
<h4>1.3. Loaded plugins display</h4>
See the devuces user arguments management documentation [here](deviceuserargs.md).
<h4>1.4. Help - Loaded plugins display</h4>
When clicking on Help -> Loaded Plugins from the main menu bar a dialog box appears that shows information about the plugins loaded in SDRangel: