1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

HackRF: updated documentation

This commit is contained in:
f4exb 2019-04-02 22:29:17 +02:00
parent 4e24dd954e
commit 624a3e8ef5
7 changed files with 58 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

View File

@ -133,7 +133,6 @@ bool HackRFOutput::start()
applySettings(m_settings, true);
m_hackRFThread->setSamplerate(m_settings.m_devSampleRate);
m_hackRFThread->setLog2Interpolation(m_settings.m_log2Interp);
m_hackRFThread->setFcPos((int) m_settings.m_fcPos);

View File

@ -4,12 +4,6 @@
This output sample sink plugin sends its samples to a [HackRF device](https://greatscottgadgets.com/hackrf/).
<h2>Build</h2>
The plugin will be built only if the [HackRF host library](https://github.com/mossmann/hackrf) is installed in your system. If you build it from source and install it in a custom location say: `/opt/install/libhackrf` you will have to add `-DHACKRF_DIR=/opt/install/libhackrf` to the cmake command line.
The HackRF Host library is also provided by many Linux distributions and is built in the SDRangel binary releases.
<h2>Interface</h2>
![HackRF output plugin GUI](../../../doc/img/HackRFOutput_plugin.png)
@ -42,19 +36,9 @@ This is the center frequency of transmission in kHz.
Use this slider to adjust LO correction in ppm. It can be varied from -10.0 to 10.0 in 0.1 steps and is applied in software.
<h3>5: Interpolation factor</h3>
<h3>5: Rx filter bandwidth</h3>
The baseband stream is interpolated by this value before being sent to the HackRF 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
- **64**: multiply baseband stream sample rate by 64
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.
This is the Rx filter bandwidth in kHz. Possible values are: 1750, 2500, 3500, 5000, 5500, 6000, 7000, 8000, 9000, 10000, 12000, 14000, 15000, 20000, 24000, 28000 kHz.
<h3>6: Bias tee</h3>
@ -77,10 +61,43 @@ This is the HackRF device DAC sample rate in S/s.
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.
<h3>9: Tx filter bandwidth</h3>
<h3>9: Baseband center frequency position relative the the HackRF Tx center frequency</h3>
This is the Tx filter bandwidth in kHz. Possible values are: 1750, 2500, 3500, 5000, 5500, 6000, 7000, 8000, 9000, 10000, 12000, 14000, 15000, 20000, 24000, 28000 kHz.
- **Cen**: the decimation operation takes place around the HackRF Tx center frequency Fs
- **Inf**: the decimation operation takes place around Fs - Fc.
- **Sup**: the decimation operation takes place around Fs + Fc.
<h3>10: Tx variable gain amplifier gain</h3>
With SR as the sample rate after interpolation Fc is calculated depending on the interpolation factor:
- **2**: Fc = SR/4
- **4**: Fc = 3*SR/8
- **8**: Fc = 5*SR/16
- **16**: Fc = 11*SR/32
- **32**: Fc = 21*SR/64
- **64**: Fc = 21*SR/128
<h3>10: Interpolation factor</h3>
The baseband stream is interpolated by this value before being sent to the HackRF 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
- **64**: multiply baseband stream sample rate by 64
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.
<h3>11: Tx variable gain amplifier gain</h3>
The Tx VGA gain can be adjusted from 0 dB to 47 dB in 1 dB steps. See (7) for an indication on maximum output power.
<h2>Frequency synchronization with Rx</h2>
When a device set for the same physical device is present the device center frequencies are synchronized because there is only one LO for the physical device.
When the center frequency position Fc (control 9) is set to center (Cen) in both Tx and Rx the actual frequency of reception and transmission are the same.
In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Tx and Rx.

View File

@ -4,12 +4,6 @@
This input sample source plugin gets its samples from a [HackRF device](https://greatscottgadgets.com/hackrf/).
<h2>Build</h2>
The plugin will be built only if the [HackRF host library](https://github.com/mossmann/hackrf) is installed in your system. If you build it from source and install it in a custom location say: `/opt/install/libhackrf` you will have to add `-DHACKRF_DIR=/opt/install/libhackrf` to the cmake command line.
The HackRF Host library is also provided by many Linux distributions and is built in the SDRangel binary releases.
<h2>Interface</h2>
![HackRF input plugin GUI](../../../doc/img/HackRFInput_plugin.png)
@ -84,10 +78,14 @@ The device stream from the HackRF is decimated to obtain the baseband stream. Po
- **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 depending on the decimaton factor:
- 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.
- **2**: Fc = SR/4
- **4**: Fc = 3*SR/8
- **8**: Fc = 5*SR/16
- **16**: Fc = 11*SR/32
- **32**: Fc = 21*SR/64
- **64**: Fc = 21*SR/128
<h3>9: Rx filter bandwidth</h3>
@ -100,3 +98,11 @@ The LNA gain can be adjusted from 0 dB to 40 dB in 8 dB steps.
<h3>11: Rx variable gain amplifier gain</h3>
The Rx VGA gain can be adjusted from 0 dB to 62 dB in 2 dB steps.
<h2>Frequency synchronization with Tx</h2>
When a device set for the same physical device is present the device center frequencies are synchronized because there is only one LO for the physical device.
When the center frequency position Fc (control 8) is set to center (Cen) in both Rx and Tx the actual frequency of reception and transmission are the same.
In other cases for both frequencies to match you have to set the same sample rate and Fc position (either Inf or Sup) in the Rx and Tx.