seify-hackrfone 0.2.2

Fully Rust native HackRF one driver, powered by nusb
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::{Context, Result};
use seify_hackrfone::HackRf;

fn main() -> Result<()> {
    env_logger::init();

    let radio = HackRf::open_first().context("Failed to open Hackrf")?;

    println!("Board ID: {}", radio.board_id().context("Read board id")?);
    println!(
        "Firmware version: {}",
        radio.version().context("Read board version")?
    );
    println!("Device version: {}", radio.device_version());

    Ok(())
}