Skip to content

Changelog

What changed in each release, newest first. Each release is tagged vX.Y.Z on GitHub, and the same version is on PyPI.

0.6.2 (2026-11-30)

Added

  • pysdrlib update (also python -m pysdrlib update) installs the latest release with pip, keeping the remote extra, or says that this is the latest. A copy installed from source is left alone.

Fixed

  • Where USB hotplug events don't reach a program (an unprivileged container), a long-running one such as a server now follows radios that reconnect: a HackRF that was replugged or reset is listed with its serial and opens again (while another HackRF is open, not until it is closed), and the first open of an RX-888 after power-on, which loads its firmware, no longer fails. pysdrlib build extio rebuilds the RX-888 library.

0.6.1 (2026-11-30)

Fixed

  • A remote client's read(latest=True) looked for the newest samples only among those it had already taken in, so it could return old ones, and wait_available(0) didn't count what had just arrived. A viewer whose controller started receiving after it attached got the oldest samples queued on its first such read.
  • Drivers written in Python alone: samples that had arrived but weren't read yet at a retune (or another change of a setting) were taken to be from after it. get_samples now also returns what a read had taken in and not returned.
  • A read after get_samples no longer reports the samples get_samples returned as lost.
  • HackRF, RTL-SDR, bladeRF and USRP: a radio just opened is put on the receive rate and frequency it reports, as the RX-888 already was. Streaming without tuning first got the radio's own power-on settings (a B210 ran at 1 MS/s while reporting 10, so its sample times were wrong).
  • B210: receiving two channels after one channel failed with a multi-channel alignment error, every first time (UHD does this by itself). After any receive error, stop_rx() and start_rx() now recover, where the next start could fail too.

0.6.0 (2026-11-28)

Breaking

  • A server also vets the values a client sends. A serial, serial_number or addr that isn't text, or contains ,, = or control characters, and an index that isn't a whole number are refused: a comma let a client add any UHD device argument (fpga=, fw=) past 0.5.2's limits.
  • A remote client that has lost control now says so: is_controller turns False, write raises NotController, claim() takes control again or raises Busy, and close() / detach() no longer raise. open() arguments are no longer silently ignored when the server chooses the radio: they are applied or refused.
  • bladeRF: receive and transmit share one sample rate (caps.shared["rate"] is "device"); setting either sets both.
  • B210: while receiving, a transmit rate or channel count that would move the master clock raises err.Busy instead of silently pausing reception.
  • Drivers: set_rx_buffer returns the old stream total, a multi-channel driver delivers its first channel first in each round, and out-of-tree extensions must be rebuilt.
  • File.set_path starts the new file at sample 0 with its own format (unless fmt was given; an unknown extension raises err.UnknownFormat). open("file", path=X, tx_path=X) raises ValueError instead of erasing the recording. A second ShmStream of a name already open in this process raises FileExistsError. A recording that can't be read during playback raises err.Lost.
  • Writing a float sample of +1.0 to a 32-bit integer format with scale=True raises without clip=True, as for 16-bit.

Changed

  • write's timeout bounds the whole call. A transmit queue that takes nothing for stall_timeout raises err.StreamStalled (err.Lost when the device is gone).
  • close() stops receiving and transmitting first.
  • PYSDRLIB_CACHE takes precedence for building and finding vendor libraries, and a current cached library is preferred over a stale one.
  • A driver's gain-stage hook may return the dB it actually set, which is then reported.
  • Sim changing its rate while receiving resizes its queue, as a radio does. A forked child no longer removes its parent's shared-memory stream.
  • SigMF reading honours core:offset, and Meta.datetime is the first sample's time.
  • Reopening a FileSink (not appending) starts its counts, captures and annotations over.

Added

  • pysdrlib.open("sim", ...) takes channels, block_samples and sample_format, as documented.

Fixes

Building vendor libraries:

  • pysdrlib build could exhaust a machine's memory, starting every compiler at once on Linux and macOS. It now runs one per processor, and no more than the available memory (or a container's or systemd unit's cgroup limit) has room for at 1 GiB each. CMAKE_BUILD_PARALLEL_LEVEL sets the number.
  • The bundled UHD did not compile without UHD's headers already installed, and with them could compile against another version's. Nor did it link with Boost 1.83.
  • Rebuilding a library no longer crashes programs that have it loaded, and an interrupted build isn't taken as current.
  • pysdrlib build and pysdrlib play no longer fail without pyzmq installed (every pysdrlib command did).

Samples, streams and files:

  • Multi-channel streams stay aligned: through an aligned read with lost samples, a rate change while receiving, and a write that times out.
  • Events are no longer lost or misplaced in blocks with lost samples; per-stage receive gain setters record them too.
  • write no longer hangs or spins when the transmit stream dies or is stopped or closed by another thread.
  • flush discards everything queued, past gaps too. Infinite or very large timeouts wait. hw_time stays right after a rate change.
  • A device closed while streaming starts cleanly when reopened. A refused sample rate leaves the old one reported.
  • sweep starts the channel it reads and shifts the right way behind an inverting chain; stream takes a numpy integer channel; transmit gain calls on a receiver raise err.NotSupported; the total-gain split is cached again; continuous stages with fractional limits stay within them; an unhashable on_drop raises ValueError.
  • Full scale no longer wraps to the opposite extreme in 32-bit integer files.
  • Sim: a block being made as a setting changed could pass for one made after it, so find_gain on a loaded machine could settle on the wrong gain.
  • Replay: seek while stopped updates the reported frequency. File.set_path switches an open file properly. FileSink writes one SigMF capture per frequency change.
  • Shared memory and air: closing a stream while another thread reads it no longer crashes; receivers place samples after a pause at the right time, keep up when the publisher raises its rate, lose nothing at a retune or close, and don't start with old backlog. On Windows a crashed publisher is detected and files in use are retried.

Radios (those marked † not yet confirmed on one):

  • HackRF†: each direction keeps its own RF amp setting (transmit could run with the amp on while reporting 0 dB), the chosen filter bandwidth survives a rate change, and unplugging during transmit wakes the writer.
  • USRP†: no false overflows with Unix or GPS device time; closing during a control call no longer crashes; partial sends are completed; a B210 rate change reports what the other direction's rate became.
  • bladeRF†: no repeated transmit samples after a USB stall.
  • bladeRF† and USRP†: a failed receive stream raises err.StreamStalled at once with the library's reason.
  • RX-888†: reported gains are those set. RTL-SDR†: gain mode follows set_agc and gain changes, and the frequency correction survives a reopen. Both: per-stage gain setters take channel=.

Remote:

  • A relay passes on a far radio's or server's failure instead of leaving reads waiting, and find_gain works through one.
  • A slow open no longer expires other clients' leases; a failed open no longer holds the radio, and a closed RemoteDevice opens again.
  • Restarted streams: multi-channel ones keep shared memory and lose nothing, viewers get their first events, frequency and rate, settings changed while idle don't discard their start, and start_rx on a running stream changes nothing.
  • Closing or detaching while another thread reads or writes ends that call cleanly.

0.5.2 (2026-11-28)

Breaking

  • A server no longer lets a client choose what a driver connects to or opens. A client may pass a driver a serial, an index, a UHD radio's addr and a simulated radio's signal; anything else (tcpiq's host/listen, file's path and tx_path, shm's directory, UHD's args, positional arguments) is refused with err.InvalidValue. Open those with pysdrlib server --open TYPE:KEY=VALUE, or allow keys with --allow-arg TYPE:KEY,KEY (Server(client_args=...)). It was a way to make a server read or write any file, or connect to any host, for anyone who could reach it.
  • A server hosts at most 32 devices (--max-devices), refuses requests over 1 MiB, and Sim takes at most 8 channels and 4 Mi samples per block. pump, sweep and find are no longer remote methods, and find_gain through a server is bounded (each read at most 4 Mi samples and 30 s).

Changed

  • A socket_subscribers / shm_subscribers count says someone is subscribed, not how many: a server counts a subscribe but hears of an unsubscribe only from the last subscriber of a topic.
  • Shared-memory stream manifests: the directory is created 0700, and one owned by another user (or writable by others, as a shared /tmp would have it) is not believed.

Added

  • File and Formats can be pickled (a Formats member pickles by name). An unpickled File keeps its position and starts closed, opening at its first read.

Fixes

  • A message of the wrong shape stopped a server. One with more than a request's frames killed the C2 thread (so the server exited), a device's control thread, or its transmit thread. A forged unsubscribe on a device's RX socket cut off real subscribers, and a flood of long subscriptions used gigabytes (a subscription is now at most 128 bytes, and only a device's own topics count). A transmit write blocked on a radio that stopped taking samples kept the server from stopping.
  • A reader of a shared-memory ring refuses a header the segment cannot hold (a capacity of 0 divided by zero, one near 2^61 wrapped the size check) and gives up on a writer that keeps spoiling its reads.
  • claim and program text can no longer forge log lines or send escape sequences to a terminal; mDNS announcements with bytes that are not UTF-8 no longer stop discover; a client maps only shared-memory segments named like a server's.
  • copy.copy(file) gives a File with its own handle and position: it used to share the original's handle.

0.5.1 (2026-11-26)

Added

  • An air that devices transmit into and receive from (pysdrlib.air): Sim(transmit=True, air="lab") (or pysdrlib.open("sim", air="lab", transmit=True), and a server's --open sim:air=lab,transmit=true) transmits into it, and every Sim(air="lab") hears it, in this process or another on the machine (each transmit channel a shared-memory stream): shifted to the receiver's frequency, resampled to its rate, attenuated by the air's loss_db, then the receiver's gain, noise and ADC. Realtime sims are on the wall clock (transmitting is paced, a pause is silence); others count their own samples, so one process is exact and repeatable. Anything can attach channels without a sim (air.tx_channel(), air.rx_channel()). With an air, transmitted is not kept (get_tx_stats() counts what was written).
  • A transmitting sim has a transmit gain stage, "PA" (0-47 dB, full scale at 47): set_tx_gain, set_tx_gain_db and set_tx_pa_gain scale what it transmits.
  • pysdrlib.find(virtual=True) lists a simulated radio in each air with a transmitter in it (a transmitting sim from its first write, not from open). An air's transmit channels are shm streams that find() lists only with virtual=True.
  • pysdrlib.shm.streams(prefix=) lists only the streams whose name starts with it.
  • Recordings say how the radio received. Device.get_rx_context() gives a channel's RxContext: the frequency over the air and the rate, the caps.Chain in front of the radio (its LO, and inverted when the LO is above the signal and the spectrum arrives mirrored), the reference correction (set_freq_correction) and clock source, gains, antenna port and radio. FileSink(..., context=) keeps it in a SigMF recording as pysdrlib:rx (an optional core:extensions namespace), sigmf.read(...).context and File(...).meta.context give it back, a replayed recording reports it (open("file", ...).get_rx_context()), pysdrlib client ... rx/watch -o x.sigmf writes it (a viewer can ask too), and pysdrlib play --info prints it. A remote radio on a server older than 0.5.1 raises NotSupported saying so (client ... -o x.sigmf too; a raw recording doesn't ask). Any call to a method the server's pysdrlib doesn't have raises NotSupported naming the method and the server's version, before it is sent.
  • How well the receiver is known travels with it. set_freq_correction(ppm, accuracy=) (a standard error, ppm; get_freq_correction_accuracy) and caps.Chain(lo_accuracy=) (Hz; lo_accuracy in a frontends file: a measured LO's) are in RxContext (ppm_accuracy, chain.lo_accuracy), so a reader can say what a frequency read off the samples is worth, and play --info shows them.
  • Levels in dBm. Device.set_level_calibration(offset_db, accuracy=, span=): dBm at the antenna port = dBFS (full scale |x| = 1 in the complex64 samples) + offset_db, made at the gains and frequency current then. RxContext.level_offset / level_accuracy (dB) carry it while the gains (and gain mode) are unchanged and the frequency is within span (default: the sample rate when it was set); otherwise both are None. get_level_calibration() says what was set and whether it still holds. It crosses the wire, and play --info shows it.
  • A chain names its feed and channel. caps.Chain(polarization="H" | "V" | "RHCP" | "LHCP") says what the feed takes in, and caps.Chain(channel=) puts a chain on one channel of a radio whose channels' ports share a name (a B210's RX2 on channels 0 and 1, a dual-feed LNB's two outputs). Both are keys of a frontends file too, and get_rx_context(channel=k) gives each channel's chain. Recordings written by 0.5.1 mark pysdrlib:rx as version 1.2.0; whatever a recording doesn't have reads as None.
  • Device.set_chains([caps.Chain(lo=5.15e9, invert=True)]) puts an LNB or converter in front of a radio on this machine: frequencies are over the air from then on (the radio stays where it is tuned, and get_rx_freq says what that is through the new chain). A remote radio's chains are its server's frontends file: set_chains on one raises NotSupported.
  • pysdrlib.open("sim", realtime=False) works: realtime is taken by open as well as the constructor, as air and transmit are (and a server's --open sim:realtime=false).

Fixes

  • set_rx_gain(fraction) / set_tx_gain(fraction) no longer warn "... gain must be a multiple of N": a fraction nearly always falls between a stage's steps, so rounding it to one is expected (and with strict = True it no longer raises). set_rx_gain_db still warns when the decibels asked for can't be set exactly.
  • A replayed recording's get_rx_freq() is the recording's frequency from the start (it was the default, 100 MHz, until playback began).
  • file transmitting in real time paces with time.perf_counter(). On Windows before Python 3.13, time.monotonic() ticks every ~15.6 ms, so write could leave more queued than TX_BUFFER_SECONDS allows.

0.5.0 (2026-11-22)

Breaking

  • pysdrlib is now licensed GPL-3.0-or-later (it was MIT). Releases up to 0.4.6 stay MIT.
  • File format names count the bits of one value (I or Q), as SigMF does, not of the whole sample. cf32 is now two float32 (numpy complex64, a GNU Radio .cfile; it was cf64). cf64 was cf128, cf16 was cf32, and ci16t was ci32t (likewise for ci4t, ci8t and ci32t). Two's complement is the default (ci8 is ci8t). Code that names cf32 or cf64 will misread files without an error, so check every caller.
  • TcpIq(sample_format=...) in the constructor is gone. Pass it to open() instead: pysdrlib.open("tcpiq", host=..., sample_format="ci16").
  • Remote: protocol version 4 only. A server refuses a client of another version and says which side to update. Run the same pysdrlib version on both ends.
  • Overflow and Underflow moved to pysdrlib.err (pysdrlib.file.err keeps the names).
  • The native extensions lost their Python receive-callback path (set_rx_callback, read_rx_indexed, rx_available). This only affects drivers written outside pysdrlib.

Radios

  • bladeRF 2.0 micro (bladerf): 2 RX and 2 TX channels. Receive is tested on a 2.0 micro xA4 and is lossless from 0.52 to 40 MS/s. Transmit is so far checked for plumbing only.
  • tcpiq:
  • Listening mode (listen=True) waits for a client to reconnect (reconnect_timeout, default 10 s). A client that reconnects takes over the stream, and keepalive drops a dead client in about 5 s.
  • Skips rtl_tcp's 12-byte header (sdr.rtl_tcp reports the tuner).
  • Measures the arrival rate (sdr.measured_rate, and sdr.rate_mismatch against RATE_TOLERANCE) and warns (warn.RateMismatch) when it disagrees with the declared Fs.
  • Accepts 4-bit packed (ci4) and half-float (cf16) streams. pysdrlib.tcpiq.FORMATS lists every stream format. The format can also be a Formats member (Formats.ci16t), as File and FileSink take.
  • Connected mode: when the server closes the stream, or stops answering (keepalive notices in about 5 s), a read raises err.Lost once what arrived has been read. Before, it waited until its timeout.
  • sim runs on the same native streaming path as the hardware drivers. Its signal is built from tones, noise and QPSK bursts, set in open() or configure(). It can scale with gain and clip like an ADC, and can delay a retune, drop samples, stall or disconnect on demand. Each channel has its own gain and strength (channel_db).

Receiving

  • A change at a block's first sample (or in a gap just before it) is an Event at offset 0 in that block's RxMeta.events; before, only RxMeta.freq/rate showed it. After a flush there is still none.
  • err.Lost raised by read carries what that read had received: .samples and .meta.
  • read(latest=True) skips what is queued except the newest block, and anything from before the last setting change: what a display wants.
  • err.Lost is raised when the radio is gone: unplugged, or a remote server that no longer hosts it.
  • on_drop can be set for a single read, stream or sweep. on_drop="raise" raises err.Dropped carrying the block, and sweep(on_drop="retry") captures that step again.
  • RxMeta.hw_time is the radio's own clock at a block's first sample. It is carried to remote clients and relays, and into SigMF recordings.
  • A retune, rate, gain or bandwidth change is marked at the stream position from before the driver's call, so samples that arrive during a slow retune report the new setting.
  • Device.sweep(start, stop, step, count) takes a list of frequencies, offset= (tune off centre, which moves the DC spike out of the way) and skip=.
  • Every device has is_controller (always true locally), id and granted (None locally), so code that handles local and remote devices alike doesn't need getattr.
  • RxMeta.index_at(k) (the stream index of a block's sample k), RxMeta.next_index (the stream index just after a block), RxMeta.follows(prev) (it starts where prev ended, nothing lost or discarded between) and RxMeta.wall_time (the radio's clock when it holds a date, else the receive time on the wall clock). index is documented as the absolute position across gaps.
  • rx_antenna_info() / tx_antenna_info(): each antenna port with its chain, the antenna fitted, whether the spectrum comes mirrored there, and whether it is selected.
  • find_gain() finds and sets the highest receive gain that doesn't clip, for one channel or several, local or remote.
  • Gain splitting is cached: a repeated HackRF set_rx_gain takes 5 µs instead of 723 µs.
  • The native ring copies samples out with its lock released, so a slow reader no longer holds up the driver's thread.

Shared-memory streams

  • shm driver and pysdrlib.shm.ShmStream: a process publishes samples under a name (ShmStream("rpps.ch3", Fs=, cf=), then publish(x, first)), and any other on the machine receives them like a radio (pysdrlib.open("shm@rpps.ch3"), listed by find()). RxMeta carries the publisher's gaps, its wall-clock time (hw_time), and a freq or rate event when it retunes; a closed stream raises err.Lost.
  • The ring under it (ShmWriter, ShmReader, fit_capacity) moved from pysdrlib.remote.shm to pysdrlib.shm, and needs no pyzmq.

Files

  • SigMF: FileSink writes .sigmf-data and .sigmf-meta files, with a capture per retune and an annotation where samples were lost. File reads the format, rate and frequency back.
  • pysdrlib.open("file", path=...) plays a recording as a radio (loop=, realtime=, seek). tx_path= records what is transmitted. A server can host either.
  • Big-endian formats (ci16_be, cf32_be...), 4-bit packed and half-float formats, and FileSink(scale=True).
  • File.is_open. A file whose format nothing names raises err.UnknownFormat (a ValueError), as do an unsupported SigMF datatype and an unknown stream format name.
  • The format is taken from the file extension (.cf32, .cu8, .cfile...) when none is given.

Finding and opening radios

  • pysdrlib.discover() lists radios attached here and on servers (PYSDRLIB_SERVERS, or zeroconf). Each comes with the target string open() takes: [server/]driver[@serial]. A malformed target raises ValueError up front. Radio.receiving says whether a hosted radio is streaming.
  • err.NoDevice.reason says why a server had no radio for a request: "none_attached", "none_free", "unmet" or "no_type" (it travels from the server to the client).

Command line and remote

  • pysdrlib play REC describes a recording and shows its power as it plays (--serve hosts it like a radio).
  • pysdrlib client ... rx|watch -o FILE records in any format, or SigMF.
  • server --open TYPE:KEY=VALUE and client --arg KEY=VALUE pass arguments to a device's open().
  • format_antenna moved from pysdrlib.remote.cli to pysdrlib.base.antennas, which needs no remote extra.
  • Server metrics: Client.metrics(), pysdrlib client ADDRESS stats, and a periodic log line per streaming device.
  • A viewer whose state is older than the server's (it attached before the controller started receiving) has read ask the server once instead of raising err.NotStreaming.
  • RemoteDevice forwards every public Device method. This fixes split_rx_gain_db running on the client.

Fixes

  • Building from a source checkout works again (pip install -e ., sdist to wheel, cibuildwheel). It was broken since hardware timestamps landed.
  • A recording played with realtime=False could lose whole blocks while a read was copying out of the queue: the ring now reports what is being copied (rx_stats()["reading"]), and playback waits for that as well.
  • with pysdrlib.open(...) as sdr no longer warns that the device is already open.
  • pysdrlib's warnings point at the caller's line, not at pysdrlib's own code.

Docs and tooling

  • Docs moved to Zensical + mkdocstrings: the reference is the docstrings, and the how-to guides embed the tested examples. AGENTS.md, llms.txt and llms-full.txt are for coding agents.
  • tools/builder.py matches RPPS's and pyspecan's. CI runs on Linux and Windows with Python 3.12, 3.13 and 3.14. Releases publish from a GitHub release tagged vX.Y.Z.

0.4.6 and earlier

See the tags on GitHub.