Thanks to visit codestin.com
Credit goes to docs.rs

Skip to main content

Crate rs_hackrf

Crate rs_hackrf 

Source
Expand description

Pure-Rust driver for HackRF One Software Defined Radio.

§Overview

rs-hackrf provides a zero-C dependency Rust interface to HackRF SDR devices. It supports device discovery, configuration, and high-throughput RX streaming.

§Sample Format

HackRF outputs interleaved 8-bit signed I/Q samples directly over USB. No DSP conversion is needed (unlike Airspy which outputs real samples). Each sample pair is [I, Q] where both I and Q are i8 values (-128 to 127).

§Example

use rs_hackrf::HackRf;

let device = HackRf::open_first()?;
let version = device.version()?;
println!("Firmware: {}", version);

Re-exports§

pub use error::Error;
pub use error::HackRfErrorCode;
pub use error::Result;
pub use transport::AsyncReadControlHandle;
pub use transport::AsyncReadHandle;
pub use transport::HackRf;
pub use transport::RECOMMENDED_BUFFER_SIZE;
pub use transport::TRANSFER_BUFFER_SIZE;

Modules§

error
Error types for rs-hackrf operations.
transport
USB transport layer for HackRF devices.

Constants§

HACKRF_JAWBREAKER_PID
HackRF Jawbreaker USB Product ID.
HACKRF_ONE_PID
HackRF One USB Product ID.
HACKRF_VID
HackRF USB Vendor ID (OpenMoko Inc, shared VID).
RAD1O_PID
rad1o USB Product ID.