EasyManua.ls Logo

Great Scott Gadgets HackRF - HackRF Miscellaneous API Functions; HackRF API Data Structures

Great Scott Gadgets HackRF
104 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER
TWENTY
LIBHACKRF API
This document describes the functions, data structures and constants that libHackRF provides. It should be used as a
reference for using libHackRF and the HackRF hardware.
If you are writing a generic SDR application, i.e. not tied to the HackRF hardware, we strongly recommend that you use
either gr-osmosdr or SoapySDR to provide support for the broadest possible range of software defined radio hardware.
For example usage of many of these functions, see the hackrf_transfer tool.
20.1 Setup, Initialization and Shutdown
20.1.1 HackRF Init
Initialize libHackRF, including global libUSB context to support multiple HackRF hardware devices.
Syntax: int hackrf_init()
Returns: A value from the hackrf_error constants listed below.
20.1.2 HackRF Open
Syntax: int hackrf_open(hackrf_device** device)
Returns: A value from the hackrf_error constants listed below.
20.1.3 HackRF Device List
Retrieve a list of HackRF devices attached to the system. This function finds all devices, regardless of permissions or
availability of the hardware.
Syntax: hackrf_device_list_t* hackrf_device_list()
Returns: A pointer to a hackrf_device_list_t struct, a list of HackRF devices attached to the system. The contents of
the hackrf_device_list_t struct are decribed in the data structures section below.
65

Table of Contents