Simple tinySA to Workbench converter
Go to file
Dandaedre 95e61dc5c3
Rust CI tiny-wb passed CI.
Gitea/tiny-wb/pipeline/head This commit looks good Details
docs: document Linux serial permissions
2026-10-05 08:44:48 +02:00
.cargo ci: exclude dependency sources and summarize coverage output 2026-10-05 01:02:50 +02:00
assets Adds some Icons, an .ignore file and wrap for paragraphs 2024-09-27 08:30:40 -05:00
config feat: expose portable library connections and mock tinySA devices 2026-10-04 23:00:25 +02:00
docs docs: detail Basic and Ultra completion tasks 2026-10-05 02:06:03 +02:00
examples test: add guided hardware validation 2026-10-05 01:53:10 +02:00
scripts test: add guided hardware validation 2026-10-05 01:53:10 +02:00
src fix: use array chunks for protocol records 2026-10-05 01:40:31 +02:00
tests feat: expose portable library connections and mock tinySA devices 2026-10-04 23:00:25 +02:00
.gitignore test: add guided hardware validation 2026-10-05 01:53:10 +02:00
.ignore Adds some Icons, an .ignore file and wrap for paragraphs 2024-09-27 08:30:40 -05:00
AGENTS.md docs: define code structure documentation and verification standards 2026-10-04 22:10:14 +02:00
Cargo.lock refactor: wire configured acquisition into separated terminal UI 2026-10-04 22:31:05 +02:00
Cargo.toml test: add guided hardware validation 2026-10-05 01:53:10 +02:00
Jenkinsfile ci: verify core library builds and mock server integration 2026-10-04 23:00:58 +02:00
LICENSE Initial commit 2024-09-17 05:07:38 -05:00
README.md docs: document Linux serial permissions 2026-10-05 08:44:48 +02:00
build.rs feat: expose portable library connections and mock tinySA devices 2026-10-04 23:00:25 +02:00
deny.toml ci: document project and harden Rust checks 2026-10-04 17:17:56 +02:00
release.sh feat: add project-local rust_realease wrapper and release policy 2026-10-04 22:40:49 +02:00
rust-release.toml feat: add project-local rust_realease wrapper and release policy 2026-10-04 22:40:49 +02:00
rustfmt.toml Cleaned up the TODOs and cleared up the codebase 2024-09-26 09:00:45 -05:00
task.md docs: detail Basic and Ultra completion tasks 2026-10-05 02:06:03 +02:00

README.md

tiny-wb

Version Tests Coverage

tiny-wb is an interactive terminal application that acquires a frequency sweep from a tinySA over its USB serial console and exports the result as CSV. It is written in Rust and uses Ratatui for the interface.

The current implementation is primarily shaped around the original tinySA Basic command set and its 0–960 MHz low/high input ranges. The tinySA Ultra family uses much of the same console protocol, but model detection and the Ultra frequency ranges are not implemented yet; see the compatibility notes before connecting an Ultra or Ultra+.

Documentation

The documentation was checked against the official tinySA wiki and firmware source on 2026-10-04. Instrument firmware evolves, so help, version, and info on the connected unit remain the final authority for its command set.

The Basic acquisition path was validated on physical hardware on 2026-10-05 with firmware tinySA_v1.4-175-g1419a93. Both the 240–300 MHz low-input scan and the 350–400 MHz high-input scan returned 101 valid samples, exercised the fixed-record binary decoder, produced CSV output, and resumed the live sweep. This is communications and workflow evidence, not frequency or level-accuracy calibration; see the hardware validation checklist for the tested scope and remaining limitations.

Build and run

Install Rust 1.88.0 or newer, connect and power on the instrument, then run:

cargo run --release

On Linux the USB CDC device is commonly /dev/ttyACM0; on Windows it appears as a COM port. The user running tiny-wb must have permission to open it.

Linux serial permissions

If tiny-wb or scripts/test-hardware.sh reports serial connection: Permission denied, inspect the device ownership after connecting the tinySA:

ls -l /dev/ttyACM* /dev/ttyUSB* 2>/dev/null

Add your user to the group shown for the device. This is usually dialout on Debian, Ubuntu, and Fedora, or uucp on Arch Linux. For example:

sudo usermod -aG dialout "$(id -un)"

Log out completely and back in for the new group membership to take effect, then confirm that the port is readable and writable:

id -nG
test -r /dev/ttyACM0 && test -w /dev/ttyACM0 && echo "serial access OK"

Close serial terminals and other tinySA software before retrying. Run the application or hardware validator as your normal user, not with sudo; avoid making the device world-writable with chmod 666, because that permission is overly broad and is normally lost when the device reconnects. See the operations guide for more platform setup information.

The interface uses arrow keys or Vim-style h, j, k, l. Left/right selects a field, up/down changes its value, Enter advances, and q or Escape quits. Scan frequencies shown in the UI are MHz. The selected settings are stored in config.toml (or TINY_WB_CONFIG); scan results default to the current directory with collision-safe timestamped names. Timing, scan defaults, chart bounds, CSV output, and logging are configurable. See the commented defaults and configuration guide.

Current scan flow

At a high level, tiny-wb:

  1. opens the selected serial port;
  2. identifies the instrument with version and info;
  3. configures repeat count, raw-value zero offset, input mode, and sweep;
  4. requests a binary scanraw acquisition;
  5. decodes each level sample into dBm and writes frequency_MHz,level_dBm;
  6. resumes the instrument sweep and plots the acquired points.

For the exact command sequence and compatibility implications, read USB console and scanraw protocol and tiny-wb compatibility and operations.

Safety

Do not connect an unknown RF source directly to a tinySA. Use external attenuation for transmitters and a DC block where a DC component may be present. The Ultra family has an absolute RF input limit of +6 dBm at 0 dB internal attenuation; the Basic limit is +10 dBm. These are damage limits, not recommended measurement levels. See the safe-operation section.

Development

The Jenkins pipeline checks formatting, compilation, tests, documentation, coverage, Clippy, and a release build. Run the equivalent local checks with:

cargo fmt --all -- --check
cargo audit --deny warnings
cargo deny check
cargo +1.88.0 check --locked --all-targets --all-features
cargo check --locked --all-targets --all-features
cargo test --locked --all-targets --all-features
cargo test --locked --doc --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps --all-features
cargo clippy --locked --all-targets --all-features -- -D warnings

The binary builds on a reusable library for configuration, protocol decoding, transport, acquisition, and CSV export. UI control flow, state, and rendering live in src/ui/. See architecture for the source map and AGENTS.md for code, documentation, and commit conventions.

License

See LICENSE.