rfe is a cross-platform SDK for communicating with RF Explorer spectrum analyzers and signal generators over USB serial.
Rust library for communicating with RF Explorer spectrum analyzers and signal generators.
use rfe::SpectrumAnalyzer;
let rfe = SpectrumAnalyzer::connect()?;
let sweep = rfe.wait_for_next_sweep()?;C-compatible native library and generated rfe.h header for C and other languages.
#include "rfe.h"
#include <stdint.h>
#include <stdlib.h>
SpectrumAnalyzer *rfe = rfe_spectrum_analyzer_connect();
if (rfe) {
uint16_t sweep_len = rfe_spectrum_analyzer_sweep_len(rfe);
float *sweep = malloc(sizeof(float) * sweep_len);
rfe_spectrum_analyzer_wait_for_next_sweep(rfe, sweep, sweep_len, NULL);
// Use sweep
free(sweep);
rfe_spectrum_analyzer_free(rfe);
}C examples are available in ffi/examples.
.NET library for C# applications.
using Rfe.Net;
using var rfe = SpectrumAnalyzer.Connect();
if (rfe is not null)
{
float[] sweep = rfe.WaitForNextSweep();
}.NET examples are available in dotnet/examples.
Desktop GUI for visualizing spectrum analyzer sweeps.
RF Explorer devices use a CP210x USB-to-UART bridge. To communicate with a device over USB, make sure the platform driver is available.
Download and install the Silicon Labs CP210x driver.
macOS 10.15+ includes a built-in CP210x driver. If the device is not detected, install the Silicon Labs CP210x driver.
Linux includes the CP210x kernel driver, but serial port access usually requires additional setup.
rfe uses pkg-config and udev headers to enumerate serial ports and inspect USB device information.
| Distro | Command |
|---|---|
| Debian/Ubuntu/Mint | apt install pkg-config libudev-dev |
| Fedora/CentOS/RHEL | dnf install pkgconf-pkg-config systemd-devel |
| openSUSE | zypper install pkgconf-pkg-config systemd-devel |
| Arch/Manjaro | pacman -Syu pkgconf systemd |
The current user must belong to the dialout or uucp group to access serial ports.
| Distro | Command |
|---|---|
| Debian/Ubuntu/Mint | gpasswd -a <username> dialout |
| Fedora/CentOS/RHEL | gpasswd -a <username> dialout |
| openSUSE | gpasswd -a <username> dialout |
| Arch/Manjaro | gpasswd -a <username> uucp |
Note: Log out and back in (or reboot) for group changes to take effect.
This project is dual-licensed under the MIT License or Apache 2.0 License.
