rfe is a cross-platform SDK for communicating with RF Explorer spectrum analyzers and signal generators over a USB virtual serial port.
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 API and generated rfe.h header for C and other languages that can load C libraries.
C examples are available in ffi/examples.
#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);
}.NET wrapper library and example programs for C# consumers.
using Rfe.Net;
using var analyzer = SpectrumAnalyzer.Connect();
if (analyzer is not null)
{
Console.WriteLine(analyzer.PortName);
Console.WriteLine(analyzer.FirmwareVersion);
}GUI for visualizing spectrum analyzer data.
To communicate with RF Explorer devices over USB, you need a driver for its CP210x USB-to-UART bridge.
Download and install the Silicon Labs CP210x driver.
macOS 10.15+ includes a built-in driver for CP210x devices. If it doesn't work, install the Silicon Labs CP210x driver.
The kernel includes the CP210x driver, but additional setup is required:
rfe uses pkg-config and udev header files to provide serial port enumeration and 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.
