HackRF: updated documentation

pull/326/head
f4exb 2019-04-02 22:29:17 +02:00
rodzic 4e24dd954e
commit 624a3e8ef5
7 zmienionych plików z 58 dodań i 36 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 26 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 26 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 21 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 21 KiB

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -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);

Wyświetl plik

@ -4,19 +4,13 @@
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)
<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
@ -25,15 +19,15 @@ Device start / stop button.
If you have the Rx open in another tab and it is running then it will be stopped automatically before the Tx starts. In a similar manner the Tx will be stopped before the Rx is started from the Rx tab.
The settings on Tx or Rx tab are reapplied on start so these settings can be considered independent.
<h3>2: Baseband sample rate</h3>
This is the baseband sample rate in kS/s before interpolation (5) to produce the final stream that is sent to the HackRF device. Thus this is the device sample rate (8) divided by the interpolation factor (5).
Transmission latency depends essentially in the delay in the sample FIFO. The size of sample FIFO is calculated to give a fixed delay of 250 ms or 150000 samples whichever is bigger. Below is the delay in seconds vs baseband sample rate in kS/s from 48 to 800 kS/s. The 250 ms delay is reached at 600 kS/s:
![BladeRF output plugin FIFO delay other](../../../doc/img/HackRFOutput_plugin_fifodly.png)
![BladeRF output plugin FIFO delay other](../../../doc/img/HackRFOutput_plugin_fifodly.png)
<h3>3: Frequency</h3>
This is the center frequency of transmission in kHz.
@ -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>
@ -62,7 +46,7 @@ Use this checkbox to toggle the +5V power supply on the antenna connector.
<h3>7:RF amp</h3>
Use this checkbox to toggle the output amplifier (PA). This PA gives an additional gain of 14 dB.
Use this checkbox to toggle the output amplifier (PA). This PA gives an additional gain of 14 dB.
According to HackRF documentation the output power when the PA is engaged and the Tx VGA (10) is at full power (47dB) is the following:
@ -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.

Wyświetl plik

@ -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.