There are 5 different amplifiers in the HackRF One. Most of them have variable gain, but some of them can be either enabled / disabled. Please note that most of the gain settings are not precise, and they depend on the used frequency as well.
baseband gain in the MAX2837 ("BB" or "VGA") - 0-62dB in 2dB steps, configurable via the hackrf_set_vga_gain function
RX IF gain in the MAX2837 ("IF") - 0-40dB with 8dB steps, configurable via the hackrf_set_lna_gain function
RX RF amplifier near the antenna port ("RF") - 0 or ~11dB, either enabled or disabled via the hackrf_set_amp_enable (same function is used for enabling/disabling the TX RF amp in TX mode)
TX path
TX IF gain in the MAX2837 ("IF" or "VGA") - 0-47dB in 1dB steps, configurable via hackrf_set_txvga_gain
TX RF amplifier near the antenna port ("RF") - 0 or ~11dB, either enabled or disabled via the hackrf_set_amp_enable (same function is used for enabling/disabling the RX RF amp in RX mode)
Tuning
The HackRF One can tune to nearly any frequency between 1-6000MHz (and the theoretical limit is even a bit higher). This is achieved via up/downconverting the RF section of the MAX2837 transceiver IC with the RFFC5072 mixer/synthesizer's local oscillator. The mixer produces the sum and difference frequencies of the IF and LO frequencies, and a LPF or HPF filter can be used to select one of the resulting frequencies. There is also the possibility to bypass the filter and use the IF as-is. The IF and LO frequencies can be programmed independently, and the behaviour is selectable. See the function hackrf_set_freq_explicit for more details on it.
There is also the convenience function hackrf_set_freq that automatically select suitable LO and IF frequencies and RF path for a desired frequency. It should be used in most cases.
NOTE in order to avoid aliasing, the bandwidth should not exceed the sample rate. As a sensible default, the firmware auto-sets the baseband filter bandwidth to a value whenever the sample rate is changed, thus setting a custom value should be done after setting the samplerate.
The HackRF one has external clock input and clock output connectors for 10MHz 3.3V clock signals. It automatically switches to the external clock if it's detected, and its status is readable with hackrf_get_clkin_status. The external clock can be enabled by the hackrf_set_clkout_enable function.
Bias-tee
The HackRF one has a built in bias-tee (also called (antenna) port power in some of the documentation) capable of delivering 50mA@3V3 for powering small powered antennas or amplifiers. It can be enabled via the hackrf_set_antenna_enable function. Please note that when the device is returning to IDLE mode, the firmware automatically disables this feature. This means it can't be enabled permanently like with the RTL-SDR, and all software using the HackRF must enable this separately.
Used only when performing explicit tuning using hackrf_set_freq_explicit, or can be converted into a human readable string using hackrf_filter_path_name. This can select the image rejection filter (U3, U8 or none) to use - using switches U5, U6, U9 and U11. When no filter is selected, the mixer itself is bypassed.
Enable or disable the 3.3V (max 50mA) bias-tee (antenna port power). Defaults to disabled.
NOTE: the firmware auto-disables this after returning to IDLE mode, so a perma-set is not possible, which means all software supporting HackRF devices must support enabling bias-tee, as setting it externally is not possible like it is with RTL-SDR for example.
Setting the sample rate causes the filter bandwidth to be (re)set to its default value, so setting sample rate should be done before setting filter bandwidth.
Simple (auto) tuning via specifying a center frequency in Hz
This setting is not exact and depends on the PLL settings. Exact resolution is not determined, but the actual tuned frequency will be queryable in the future.
Parameters
device
device to tune
freq_hz
center frequency in Hz. Defaults to 900MHz. Should be in range 1-6000MHz, but 0-7250MHz is possible. The resolution is ~50Hz, I could not find the exact number.
Center frequency is set to where , depending on the value of path. See the documentation of rf_path_filter for details
Parameters
device
device to tune
if_freq_hz
tuning frequency of the MAX2837 transceiver IC in Hz. Must be in the range of 2150-2750MHz
lo_freq_hz
tuning frequency of the RFFC5072 mixer/synthesizer IC in Hz. Must be in the range 84.375-5400MHz, defaults to 1000MHz. No effect if path is set to RF_PATH_FILTER_BYPASS
path
filter path for mixer. See the documentation for rf_path_filter for details
Sample rate should be in the range 2-20MHz, with the default being 10MHz. Lower & higher values are technically possible, but the performance is not guaranteed. This function also sets the baseband filter bandwidth to a value , so any calls to hackrf_set_baseband_filter_bandwidth should only be made after this.
Parameters
device
device to configure
freq_hz
sample rate frequency in Hz. Should be in the range 2-20MHz
Sample rate should be in the range 2-20MHz, with the default being 10MHz. Lower & higher values are technically possible, but the performance is not guaranteed.
This function sets the sample rate by specifying a clock frequency in Hz and a divider, so the resulting sample rate will be freq_hz / divider. This function also sets the baseband filter bandwidth to a value , so any calls to hackrf_set_baseband_filter_bandwidth should only be made after this.