1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-29 19:28:47 -05:00
sdrangel/plugins/samplesink/bladerf1output
2022-05-13 22:24:48 +02:00
..
bladerf1output.cpp Fixed some signal/slot connects. Removed unnecessary m_channelMessageQueue in ChannelAPI. Fixes #1185 2022-03-23 22:32:23 +01:00
bladerf1output.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00
bladerf1outputgui.cpp v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02:00
bladerf1outputgui.h v7: API: added workspace handling for device, spectrum, feature and channel. Implements #1242 2022-05-13 22:24:48 +02:00
bladerf1outputgui.ui Massive UI revamping (v7): fixed devices .ui files to correct display wwhen creating device. Part of #1209 2022-04-27 02:06:17 +02:00
bladerf1outputplugin.cpp Updated versions and changelogs 2022-03-30 22:16:08 +02:00
bladerf1outputplugin.h Avoid global QString init in plugins 2020-11-22 04:06:32 +01:00
bladerf1outputsettings.cpp Massive UI revamping (v7): fixed device workspace index save/restore and removed useless geometry blobs. Fixes #1207 2022-04-20 20:08:41 +02:00
bladerf1outputsettings.h Massive UI revamping (v7): fixed device workspace index save/restore and removed useless geometry blobs. Fixes #1207 2022-04-20 20:08:41 +02:00
bladerf1outputthread.cpp SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
bladerf1outputthread.h SampleSourceFifo refactoring and Tx code reorganization 2019-11-15 01:05:32 +01:00
bladerf1outputwebapiadapter.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
bladerf1outputwebapiadapter.h REST API: config: GET (11). Support of the rest of devices 2019-08-04 20:24:44 +02:00
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
readme.md Massive UI revamping (v7): implemented device common settings from top bar and added documentation on device windows top and bottom bars 2022-04-17 01:31:50 +02:00

BladeRF classic (v1) output plugin

Introduction

This output sample sink plugin sends its samples to a BladeRF1 device.

Warning to Windows users: concurrent use of Rx and Tx does not work correctly hence full duplex is not fully operational. For best results use BladeRF as a half duplex device like HackRF i.e. do not run Tx and Rx concurrently. Anyway from version 4.2.0 using LibbladeRF v.2 this is available in Linux distributions only.

SoapySDR devices appear in the list of available devices in the order they are listed by 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] Generic RTL...
SoapySDR[1:0] Generic RTL...

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

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

This works similarly to LimeSDR USB or BladeRF 2.0 micro

Build

The plugin will be built only if the BladeRF host library is installed in your system. If you build it from source and install it in a custom location say: /opt/install/libbladeRF you will have to add -DBLADERF_INCLUDE_DIR=/opt/install/libbladeRF to the cmake command line.

Note that libbladeRF v2 with git tag 2018.10-rc1 should be used (official release) thus:

  • The FX3 firmware version should be v2.3.1
  • The FPGA image version should be v0.9.0

The FPGA .rbf file should be copied to the folder where the sdrangel binary resides. You can download FPGA images from here

The BladeRF Host library is also provided by many Linux distributions (check its version) and is built in the SDRangel binary releases.

Interface

The top and bottom bars of the device window are described here

BladeRF1 output plugin GUI

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

In host to device sample rate input mode (6A) this is the baseband I/Q sample rate in kS/s. This is the host to device sample rate (6) divided by the interpolation factor (7).

In baseband sample rate input mode (6A) this is the host to device sample rate in kS/s. This is the baseband sample rate (6) multiplied by the software interpolation factor (7)

Transmission latency depends essentially in the delay in the sample FIFO. The FIFO size is calculated as follows:

For interpolation by 32 the size is fixed at 150000 samples, Delay is 150000 / B where B is the baseband sample rate. Below is the delay in seconds vs baseband sample rate in kS/s from 48 to 500 kS/s:

BladeRF1 output plugin FIFO delay 32

For lower interpolation rates the size is calculated to give a fixed delay of 250 ms or 75000 samples whichever is bigger. Below is the delay in seconds vs baseband sample rate in kS/s from 48 to 400 kS/s. The 250 ms delay is reached at 300 kS/s:

BladeRF1 output plugin FIFO delay other

3: Frequency

This is the center frequency of transmission in kHz.

4: Tx filter bandwidth

This is the Tx filter bandwidth in kHz in the LMS6002D device. Possible values are: 1500, 1750, 2500, 2750, 3000, 3840, 5000, 5500, 6000, 7000, 8750, 10000, 12000, 14000, 20000, 28000 kHz.

5: XB-200 add-on control

This controls the optional XB-200 add-on when it is fitted to the BladeRF main board. These controls have no effect if the XB-200 board is absent. Options are:

  • None: XB-200 is ignored
  • Bypass: XB-200 is passed through
  • Auto 1dB: The 50, 144 and 220 MHz filters are switched on automatically according to the frequency of reception when it is within the -1 dB passband of the filters
  • Auto 3dB: The 50, 144 and 220 MHz filters are switched on automatically according to the frequency of reception when it is within the -3 dB passband of the filters
  • Custom: The signal is routed through a custom filter
  • 50M: The signal is routed through the 50 MHz filter
  • 144M: The signal is routed through the 144 MHz filter
  • 222M: The signal is routed through the 222 MHz filter

6A: Host to device sample rate / Baseband sample rate input toggle

Use this toggle button to switch the sample rate input next (6) between host to device sample rate and baseband sample rate input. The button shows the current mode:

  • SR: host to device sample rate input mode. The baseband sample rate (2) is the host to device sample rate (6) divided by the interpolation factor (7).
  • BB: baseband sample rate input mode. The host to device sample rate (2) is the baseband sample rate (6) multiplied by the interpolation factor (7).

6: Sample rate

This is the BladeRF device DAC sample rate or baseband sample rate in samples per second (S/s). The control (6A) is used to switch between the two input modes. The device to/from host stream sample rate is the same for the Rx and Tx systems.

The limits are adjusted automatically. In baseband input mode the limits are driven by the interpolation factor (7). You may need to increase this interpolation factor to be able to reach lower values.

Use the wheels to adjust the sample rate. 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.

7: Interpolation factor

The baseband stream is interpolated by this value before being sent to the BladeRF device. Possible values are:

  • 1: no interpolation
  • 2: multiply baseband stream sample rate by 2
  • 4: multiply baseband stream sample rate by 4
  • 8: multiply baseband stream sample rate by 8
  • 16: multiply baseband stream sample rate by 16
  • 32: multiply baseband stream sample rate by 32

The main samples buffer is based on the baseband sample rate and will introduce ~500ms delay for interpolation by 16 or lower and ~1s for interpolation by 32.

8: Variable gain amplifier #1 gain

The VGA1 (relative) gain can be adjusted from -35 dB to -4 dB in 1 dB steps. The VGA1 is inside the LMS6002D chip and is placed between the baseband filter and the RF mixer.

9: Variable gain amplifier #2 gain

The VGA2 gain can be adjusted from 0 dB to 25 dB in 1 dB steps. The VGA2 is inside the LMS6002D chip and is placed after the RF mixer. It can be considered as the PA (Power Amplifier). The maximum output power when both VGA1 and VGA2 are at their maximum is about 4 mW (6 dBm).