An UNOFFICIAL Python API for the tinySA series of devices
Project description
tsapython
An Unofficial Python API for the tinySA Device Series
A non-GUI Python API for the tinySA series of spectrum analyzer devices. This library provides programmatic control over tinySA devices for automated measurements, data collection, and analysis.
This repository uses official resources and documentation but is NOT endorsed by the official tinySA product, owner, or company. Refer to official resources and support for product information. This library was built for the official tinySA device line(s); knock-off or custom devices may not be compatible and have not been tested.
Features
- Device Discovery — automatic detection and serial connection to tinySA devices
- Frequency Sweeps — collect data across specified frequency ranges
- Multiple Modes — support for both input and output modes (device dependent)
- Data Export — easy integration with
matplotlibandnumpy - Error Handling — input checking and verbose output options
- Device Control — full programmatic control of tinySA settings and measurements
Installation
pip install tsapython
The library itself depends only on numpy and pyserial. The plotting examples need an optional extra:
pip install "tsapython[plotting]"
Quick Start
from tsapython import tinySA
tsa = tinySA()
found, connected = tsa.autoconnect()
if connected:
print(tsa.device_id())
tsa.disconnect()
Examples
The main GitHub repository provides runnable examples, grouped by what they demonstrate.
Getting started / device control
using_autoconnect.py— detect and connect to a tinySA, read the device IDidentifying_serial_ports.py— manually identify serial ports (useful if autoconnect has trouble)using_command_func.py— send raw device commands for functionality not yet wrapped by the libraryhardware_walkthrough.py— a guided walkthrough of connecting and reading device info/datacomplete_workflow.py— end-to-end: connect, read info, collect a sweep, and plot it
Plotting scan data
plotting_scan.py— plot a singlescanplotting_scanraw.py— comparescanvs. the binaryscanraw(with decoding to dBm)plotting_waterfall_static.py— collect several sweeps and render a static waterfall plotplotting_waterfall_realtime.py— a live, continuously updating waterfall plot
Continuous acquisition
continuous_scanraw_live.py— loopscan_rawand live-plot each framecontinuous_scanraw_collect.py— loopscan_raw, decode to dBm, and save sweeps to CSV
Analysis
find_peaks.py— find the strongest signal(s) two ways: the device's marker peak, and a Python multi-peak finder over scan datafiltering_scan_artifacts.py— show the:firmware artifact and compare a median filter against a moving average on one figure
Exporting data
save_scan_csv.py— run a scan and write frequency/power pairs to a CSV file
Most plotting examples require the optional plotting dependencies:
pip install "tsapython[plotting]"
Documentation
For comprehensive documentation, advanced examples, and troubleshooting:
- Library GitHub repository: https://github.com/LC-Linkous/tinySA_python/
- Official tinySA documentation: https://tinysa.org/wiki/ (not associated with this library)
Contributing
This is an unofficial community project. Contributions welcome!
- Report bugs and request features on GitHub
- For device information and OFFICIAL resources, see the official tinySA community at https://groups.io/g/tinysa
- Please do NOT request features or report bugs on the official community! This is an unofficial project and they do not maintain it.
Citing
If you use this library in your work, citation details are in the repository's CITATION.cff, or use the Zenodo DOI: 10.5281/zenodo.20546764.
License
GPL-2.0 — this is unofficial software with no warranty, offered AS-IS. Use at your own risk.
The licensing of this software does NOT take priority over the official releases and the decisions of the official tinySA team. This licensing does NOT take priority for any of their products, including the devices that can be used with this software.
Acknowledgments
- The tinySA device creators and community, who have created an awesome device
- Official tinySA documentation and resources, especially www.tinysa.org/wiki/
- All contributors to this library, including those who have contributed code and reached out with questions
Disclaimer: This software is unofficial and not supported by the tinySA team. For official software and support, visit tinysa.org. The tinySA team does not offer tech support for this software, does not maintain it, and has no responsibility for any of the contents.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsapython-3.0.0.tar.gz.
File metadata
- Download URL: tsapython-3.0.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a44370e5ce5f7041b0093756290c8fdb8ab4bf044deac8aad69b74ef8b75336
|
|
| MD5 |
e1775cf8997e5ec628f750cc0daf428f
|
|
| BLAKE2b-256 |
f6870e8beb5fac315bd57f80c5be5ebb3a857d616c99a764260abeb7cf3e5caa
|
Provenance
The following attestation bundles were made for tsapython-3.0.0.tar.gz:
Publisher:
release.yml on LC-Linkous/tinySA_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsapython-3.0.0.tar.gz -
Subject digest:
8a44370e5ce5f7041b0093756290c8fdb8ab4bf044deac8aad69b74ef8b75336 - Sigstore transparency entry: 1729764098
- Sigstore integration time:
-
Permalink:
LC-Linkous/tinySA_python@1f605e6d63d46fae75724fbabfbbeeca72182bec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LC-Linkous
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1f605e6d63d46fae75724fbabfbbeeca72182bec -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file tsapython-3.0.0-py3-none-any.whl.
File metadata
- Download URL: tsapython-3.0.0-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfa3ed276649767dc3f1f8bf7b1628e2a4b3ceb4772e8b30999e3907e02fc167
|
|
| MD5 |
e5f5ebc109b737d41d707fd38d210438
|
|
| BLAKE2b-256 |
b9c554eded04ed5b32a95c8ee9b74788dfcd176cb76d28654b6a4c423b917ff7
|
Provenance
The following attestation bundles were made for tsapython-3.0.0-py3-none-any.whl:
Publisher:
release.yml on LC-Linkous/tinySA_python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsapython-3.0.0-py3-none-any.whl -
Subject digest:
cfa3ed276649767dc3f1f8bf7b1628e2a4b3ceb4772e8b30999e3907e02fc167 - Sigstore transparency entry: 1729764219
- Sigstore integration time:
-
Permalink:
LC-Linkous/tinySA_python@1f605e6d63d46fae75724fbabfbbeeca72182bec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LC-Linkous
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1f605e6d63d46fae75724fbabfbbeeca72182bec -
Trigger Event:
workflow_dispatch
-
Statement type: