Update some outdated technical docs (#1190)
* update outdated libhackrf documentation * update outdated hackrf_sweep documentation
This commit is contained in:
@ -14,9 +14,9 @@ Usage
|
|||||||
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
|
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
|
||||||
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
|
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
|
||||||
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
|
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
|
||||||
[-n num_samples] # Number of samples per frequency, 8192-4294967296
|
[-w bin_width] # FFT bin width (frequency resolution) in Hz, 2445-5000000
|
||||||
[-w bin_width] # FFT bin width (frequency resolution) in Hz
|
|
||||||
[-1] # one shot mode
|
[-1] # one shot mode
|
||||||
|
[-N num_sweeps] # Number of sweeps to perform
|
||||||
[-B] # binary output
|
[-B] # binary output
|
||||||
[-I] # binary inverse FFT output
|
[-I] # binary inverse FFT output
|
||||||
-r filename # output file
|
-r filename # output file
|
||||||
@ -112,7 +112,7 @@ Running ``hackrf_sweep -f 2400:2490`` gives the following example results:
|
|||||||
- -66.02
|
- -66.02
|
||||||
- -62.12
|
- -62.12
|
||||||
|
|
||||||
Two ranges of 5 MHz are analyzed at once from the same set of samples, so a single timestamp applies to the whole range.
|
Each sweep across the entire specified frequency range is given a single time stamp.
|
||||||
|
|
||||||
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
|
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
|
||||||
|
|
||||||
|
@ -197,6 +197,8 @@ Compute nearest freq for bw filter (manual filter)
|
|||||||
Reading and Writing Registers
|
Reading and Writing Registers
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
These low level functions are intended for debugging purposes only.
|
||||||
|
|
||||||
|
|
||||||
HackRF MAX2837 Read
|
HackRF MAX2837 Read
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
@ -282,7 +284,7 @@ Updating Firmware
|
|||||||
HackRF CPLD Write
|
HackRF CPLD Write
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Device will need to be reset after hackrf_cpld_write.
|
A bitstream is written to the CPLD by the firmware during normal operation (since release 2021.03.1). This function writes a bitstream to the CPLD's flash which is not necessary for normal use. The device will need to be reset by physically pressing the reset button after hackrf_cpld_write.
|
||||||
|
|
||||||
**Syntax:** ``int hackrf_cpld_write(hackrf_device* device, unsigned char* const data, const unsigned int total_length)``
|
**Syntax:** ``int hackrf_cpld_write(hackrf_device* device, unsigned char* const data, const unsigned int total_length)``
|
||||||
|
|
||||||
@ -462,35 +464,37 @@ These values identify the board type of the connected hardware. This value can b
|
|||||||
|
|
||||||
* - Board
|
* - Board
|
||||||
- Frequency range
|
- Frequency range
|
||||||
- Bandwidth
|
- Sample Rate
|
||||||
- Antenna port power
|
- Antenna port power
|
||||||
* - HackRF One
|
* - HackRF One
|
||||||
- 1MHz - 6Ghz
|
- 1 MHz–6 GHz
|
||||||
- 20MHz
|
- 20 Msps
|
||||||
- Yes
|
- Yes
|
||||||
* - Jawbreaker
|
* - Jawbreaker
|
||||||
- 10MHz - 6GHz
|
- 10 MHz–6 GHz
|
||||||
- 20MHz
|
- 20 Msps
|
||||||
|
- No
|
||||||
|
* - rad1o
|
||||||
|
- 50 MHz–4 GHz
|
||||||
|
- 20 Msps
|
||||||
- No
|
- No
|
||||||
* - Rad1o
|
|
||||||
- 50MHz - 4GHz
|
|
||||||
- 20MHz
|
|
||||||
- Unknown
|
|
||||||
* - Jellybean
|
* - Jellybean
|
||||||
- N/A
|
- N/A
|
||||||
- 20MHz
|
- 20 Msps
|
||||||
- No
|
- No
|
||||||
|
|
||||||
Most boards will identify as HackRF One, Jawbreaker or Rad1o. Jellybean was a pre-production revision of HackRF. No hardware device should intentionally report itself with an invalid board ID.
|
Most boards will identify as HackRF One, Jawbreaker, or rad1o. Jellybean was a pre-production revision of HackRF that is no longer supported. No hardware device should intentionally report itself with an unrecognized or undetected board ID.
|
||||||
|
|
||||||
.. code-block :: sh
|
.. code-block :: sh
|
||||||
|
|
||||||
enum hackrf_board_id {
|
enum hackrf_board_id {
|
||||||
BOARD_ID_JELLYBEAN = 0,
|
BOARD_ID_JELLYBEAN = 0,
|
||||||
BOARD_ID_JAWBREAKER = 1,
|
BOARD_ID_JAWBREAKER = 1,
|
||||||
BOARD_ID_HACKRF_ONE = 2,
|
BOARD_ID_HACKRF1_OG = 2,
|
||||||
BOARD_ID_RAD1O = 3,
|
BOARD_ID_RAD1O = 3,
|
||||||
BOARD_ID_INVALID = 0xFF,
|
BOARD_ID_HACKRF1_R9 = 4,
|
||||||
|
BOARD_ID_UNRECOGNIZED = 0xFE,
|
||||||
|
BOARD_ID_UNDETECTED = 0xFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -512,18 +516,19 @@ USB Product IDs
|
|||||||
Transceiver Mode
|
Transceiver Mode
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
HackRF can operate in three main transceiver modes, Receive, Transmit and Signal Source. There is also a CPLD update mode which is used to write firmware images to the CPLD.
|
HackRF can operate in four main transceiver modes: Receive, Transmit, Signal Source, and Sweep. There is also a CPLD update mode which is used to write firmware images to the CPLD flash.
|
||||||
|
|
||||||
The transceiver mode can be changed with ``hackrf_set_transceiver_mode`` with the value parameter set to one of the following:
|
The transceiver mode can be changed with ``hackrf_set_transceiver_mode`` with the value parameter set to one of the following:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
enum transceiver_mode_t {
|
enum transceiver_mode_t {
|
||||||
TRANSCEIVER_MODE_OFF = 0,
|
HACKRF_TRANSCEIVER_MODE_OFF = 0,
|
||||||
TRANSCEIVER_MODE_RX = 1,
|
HACKRF_TRANSCEIVER_MODE_RECEIVE = 1,
|
||||||
TRANSCEIVER_MODE_TX = 2,
|
HACKRF_TRANSCEIVER_MODE_TRANSMIT = 2,
|
||||||
TRANSCEIVER_MODE_SS = 3,
|
HACKRF_TRANSCEIVER_MODE_SS = 3,
|
||||||
TRANSCEIVER_MODE_CPLD_UPDATE = 4
|
TRANSCEIVER_MODE_CPLD_UPDATE = 4,
|
||||||
|
TRANSCEIVER_MODE_RX_SWEEP = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
Receive mode (TRANSCEIVER_MODE_RX) is used to stream samples from the radio to the host system. Use ``hackrf_set_freq`` to set the center frequency of receiver and ``hackrf_set_sample_rate`` to set the sample rate (effective bandwidth).
|
Receive mode (TRANSCEIVER_MODE_RX) is used to stream samples from the radio to the host system. Use ``hackrf_set_freq`` to set the center frequency of receiver and ``hackrf_set_sample_rate`` to set the sample rate (effective bandwidth).
|
||||||
@ -551,6 +556,8 @@ Function return values
|
|||||||
HACKRF_ERROR_STREAMING_THREAD_ERR = -1002,
|
HACKRF_ERROR_STREAMING_THREAD_ERR = -1002,
|
||||||
HACKRF_ERROR_STREAMING_STOPPED = -1003,
|
HACKRF_ERROR_STREAMING_STOPPED = -1003,
|
||||||
HACKRF_ERROR_STREAMING_EXIT_CALLED = -1004,
|
HACKRF_ERROR_STREAMING_EXIT_CALLED = -1004,
|
||||||
|
HACKRF_ERROR_USB_API_VERSION = -1005,
|
||||||
|
HACKRF_ERROR_NOT_LAST_DEVICE = -2000,
|
||||||
HACKRF_ERROR_OTHER = -9999,
|
HACKRF_ERROR_OTHER = -9999,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user