Skip to content

RPPS

RF Parameter Processor Suite: a generic signal processor/generator library.

Install

python3 -m pip install rpps          # rpps[viz] adds matplotlib for rp.viz
Definitions (codes, scramblers, modulations, whole signals) ship with the package. The per-sample loops and decoders run in C++ with a Python fallback; from a checkout, python tools/builder.py -c builds them (pybind11 and a C++17 compiler).

Usage

Everything is driven by operators: * encodes / modulates / scrambles, / undoes it, + runs a DSP stage. The data carries its sample rate and the state of every stage from block to block.

import rpps as rp

mod = rp.symbol.load("psk/qpsk")    # or rp.symbol.generate("16QAM"), rp.symbol.PSK(8), rp.symbol.APSK(32)
ecc = rp.code.Hamming(7, 4)         # or rp.code.load("block/hamming/7_4")
scr = rp.code.scram.load("v35")

msg = rp.Data(b"Hello World!")
syms = msg * scr * ecc * mod        # scramble, encode, modulate
out = syms / mod / ecc / scr        # demodulate, decode, descramble
assert out.as_bytes().hex == msg.as_bytes().hex

Receiving: stages added together make a pipeline, and blocks flow through it with their state carried along.

# docs: skip
src = rp.source.File("ci16t", "capture.cs16", Fs=100e6, cf=1.0e9)       # or rp.source.Device("hackrf", cf=..., Fs=...)
rx = (rp.signal.filters.ShiftFreq(22.3e6) + rp.signal.filters.low_pass(401, 3e6, 100e6) + rp.signal.sample.down.Decimate(8)
      + rp.sync.Acquire() + rp.sync.time.Mat() + rp.sync.phase.FFCarrier())
for out in src(16384) + rx:
    print(out.Fs, out.sps, out.det)

A known signal is a profile: one JSON file describing it in both directions.

# docs: skip
p = rp.profile.load("ble/adv", channel=38)               # python -m rpps ls profile: the shipped ones
for pdu in rp.source.File("cf32", "ch38.cf32", Fs=4e6, cf=2426e6)(65536) + p.rx():
    print(pdu.as_bytes().hex)
tx = p.tx()                                                       # the same file transmits: a call a burst,
gap = tx(rp.Data(bytes(31), Fs=1e6, sps=1), fields={"type": 2})   # giving the samples up to its start,
wave = tx.flush()                                                 # and flush the rest

From the shell: python -m rpps ls (definitions), python -m rpps steps (what a profile can name), python -m rpps rx ble/adv capture.cf32 --fs 4e6 --param channel=38.

Learn more

Guides the data model, receiving, profiles, definitions, unknown signals, real time, building on RPPS
Examples one runnable, self-checking script per recommended way of doing a thing (examples/)
API every package; the design (model, categories, contracts, streaming rules) is rpps.base
projects/ worked receivers on real signals: FM, BLE, ADS-B, Wi-Fi, ATSC, LTE
Contributing setup, tests, native kernels, CI, conventions
Roadmap what is built and what is not yet

License

Copyright (C) 2024-2026 Anonoei

RPPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE (GPL-3.0-or-later).