Skip to main content

hamlib-sidecar

Generic, modern Hamlib sidecars: bridge any Hamlib backend's IQ / audio sidechannel to whatever your software wants to consume.

Two sidecars, one shared library, plus a small CLI:

Component Role
hamlib_sidecar_linux.py Linux: virtual PulseAudio audio devices (and virtual stereo IQ devices) for ham/SDR software.
hamlib_sidecar_portable.py Linux / macOS / Windows: GNU Radio ZMQ in/out and SoapySDR direct hardware.
hamlib_sidecar_common.py Shared library: wire protocol, demods, modulators, DSP, SmartSidecar.
hamlib.sh Lifecycle script: start, stop, restart, status for the rigctld + sidecar + audio-routing pipeline.
hamctl Runtime control CLI: tune, mode, AGC, S-meter, audio routing, favorites, band plan.

Both sidecars include a built-in software-defined-radio receiver and transmitter (SSB / AM / FM mono+stereo / CW), so they can demodulate IQ → audio (RX) and modulate audio → IQ (TX) for whichever radio backend you point them at.

Status

  • RX is well exercised. Hundreds of hours on JS8Call via TCI 2.0, plus verified against KiwiSDR (HF AM/SSB/CW + IQ mode) and RTL-SDR (98.5 MHz WFM stereo, 124.3 MHz airband AM, 162.45 MHz NBFM) with live signals.
  • TX is implemented but UNTESTED on real RF. Test into a dummy load + spectrum analyzer before transmitting on an antenna. If you verify TX against a real radio, please report back.

Documentation

Document For whom
USERS.md Ham operators using JS8Call / WSJT-X / fldigi / gqrx — start here.
DEVELOPERS.md Writing a new sidecar in any language, or extending the Python code.
PROTOCOL.md Wire-protocol specification. Language-agnostic.
linux.md Internals of the Linux PulseAudio virtual-device backend.

30-second quick start (Linux)

Bring up the whole pipeline — rigctld, sidecar, virtual audio, and an optional loopback to a real device — with one command:

# RTL-SDR USB dongle, WFM stereo on 98.5 MHz, routed to a USB headset.
# "C-Media" is any unambiguous substring of a PulseAudio sink name.
./hamlib.sh start --radio rtlsdr \
                  --sink C-Media \
                  --freq 98500 --mode WFM 200000

# KiwiSDR over the network, IQ mode (best audio quality)
./hamlib.sh start --radio kiwisdr --host 10.1.0.18 --stream iq \
                  --sink USB --freq 10000 --mode AM 6000

# ExpertSDR3 / SunSDR over TCI 2.0
./hamlib.sh start --radio tci --host 127.0.0.1 --port 50001 --stream audio

Once it's running, drive the radio with hamctl:

./hamctl tune 124300       # tune to 124.3 MHz; auto-applies AM / 6 kHz /
                           # fast AGC because that's in the air band

./hamctl smeter live       # realtime S-meter bargraph (press q to quit)
./hamctl show              # full radio + DSP + audio routing status
./hamctl save morning_nws  # save the current state as a favorite
./hamctl load morning_nws  # re-apply it later
./hamctl bands             # list the band plan

hamctl --help lists every verb. ./hamlib.sh stop tears everything back down.

For non-Linux, for the portable (GNU Radio / SoapySDR) sidecar, and for direct integration with JS8Call / WSJT-X / fldigi / gqrx, see USERS.md.

Install

pip install -r requirements.txt
sudo apt install pulseaudio-utils       # needed for the linux sidecar

Optional, depending on which user-side backends you want to use:

pip install pyzmq                                           # gnuradio backend
sudo apt install python3-soapysdr soapysdr-module-rtlsdr   # soapysdr backend

For development, just run the scripts directly out of the source tree — no install needed.

Files

File What it is
hamlib_sidecar_common.py Shared library: protocol parser, demods, mods, DSP, SmartSidecar.
hamlib_sidecar_linux.py Linux sidecar: PulseAudio + IQ-stereo PulseAudio backends.
hamlib_sidecar_portable.py Portable sidecar: GNU Radio ZMQ + SoapySDR.
hamlib.sh Lifecycle script: start / stop / restart / status for rigctld + sidecar + audio.
hamctl Runtime control CLI (frequency, mode, DSP, S-meter, audio routing, favorites, band plan).
pyproject.toml, requirements.txt, MANIFEST.in Packaging.

hamctl writes its favorites and band plan to $XDG_CONFIG_HOME/hamctl/ (typically ~/.config/hamctl/). The band plan is auto-seeded on first use with sensible defaults for HF amateur, SW broadcast, FM broadcast, airband AM, NOAA weather, marine VHF, 2 m / 70 cm, GMRS, and others; edit bands.json to suit.

License

MIT. See LICENSE.

Metadata

Release files for hamlib-sidecar 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hamlib-sidecar 0.2.0
File Size Uploaded Provenance Actions
hamlib_sidecar-0.2.0.tar.gz 82.7 kB Without provenance Details for hamlib_sidecar-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hamlib-sidecar 0.2.0
File Interpreter ABI Platform Actions
hamlib_sidecar-0.2.0-py3-none-any.whl Python 3 none any Details for hamlib_sidecar-0.2.0-py3-none-any.whl

Total release size: 143.3 kB

Release files / hamlib_sidecar-0.2.0.tar.gz

Download URL hamlib_sidecar-0.2.0.tar.gz
Size 82.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2ad4a459dd9049f44aa5fd17057c08b14db8093bad9e6c54c7a466c7a690f93a
BLAKE2b-256 checksum
How to use checksums
b07d7f6187f6153cd720f2dc7367dc2d2200a91dbbb7a0bd0cd266151f0dde96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / hamlib_sidecar-0.2.0-py3-none-any.whl

Download URL hamlib_sidecar-0.2.0-py3-none-any.whl
Size 60.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4be431bc073f6dc42bd91ade51f25ad61d8f2fe1dc39164fac71a521c6310715
BLAKE2b-256 checksum
How to use checksums
48a5d6dee23e710ee57b4723232a1c8072af34768750ed96ab09398dd4bfe2fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for hamlib-sidecar 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page