SoapySDR provides a hardware abstraction layer for many software defined radio devices.
This library requires libsoapysdr 0.6.0 or 0.7.0 and libclang 3.5+ (for bindgen) to be installed manually.
(Tested on Ubuntu 18.04)
```console sudo apt install libsoapysdr-dev llvm-6.0-dev libclang-6.0-dev
sudo apt install soapysdr-module-rtlsdr soapysdr-module-hackrf soapysdr-module-uhd soapysdr-module-lms7 ```
nix-shell
(see shell.nix)
Many SoapySDR driver modules have error handling and thread safety bugs. This library provides safe Rust wrappers assuming the drivers meet the (under-documented) intentions of the SoapySDR core API contract, but if SoapySDR loads modules that violate this contract and you do atypical things with them, you may encounter unexpected behavior. For details, see this SoapySDR issue.
This crate comes with two small utilities that serve as example code.
Displays device details like SoapySDRUtil
.
cargo run --release --features=binaries --bin soapy-sdr-info
Records data from a device.
e.g. capture 15 seconds of data from the FM band:
cargo run --release --features=binaries --bin soapy-sdr-stream -- -d driver=rtlsdr -r out.cfile -f 96M -s 1M -n 15M
The resulting file contains 32-bit little-endian complex float samples, and can be opened with inspectrum.
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.