SPEEDBIRD

PACTOR-I in SPEEDBIRD (speedbird.pactor1)#

Status: simulation-verified only. Implemented from the public PACTOR-I descriptions (DL6MAA / DF4KV, 1991; the SCS PACTOR-I protocol description). No SCS firmware, no decompiled code, no GPL code. Interop with real SCS PTCs / Winlink PACTOR RMS gateways is UNVERIFIED until an on-air test (plan below). Several constants are marked # VERIFY in src/speedbird/pactor1/constants.py.

Package#

File What
constants.py All protocol constants and thresholds (one place to correct after an on-air capture)
crc.py CRC-16 (X.25/HDLC form of CCITT) + GF(2)-linear vectorised checker for timing search
phy.py CPFSK modulator (100/200 Bd, 200 Hz shift, default 1400/1600 Hz), streaming non-coherent demodulator, stateful resampler
frame.py Packets, status byte, SYNCH / connect info, CS1-CS4, packet search over timing offsets, memory-ARQ soft decode, CS detector
arq.py Pactor1Session (a modem.protocol.LinkSession): ISS/IRS, connect, ack/repeat, memory-ARQ, speed up/down, changeover, QRT, timeouts
fec.py Unproto (FEC broadcast) TX and receiver
protocol.py Pactor1Protocol (LinkProtocol factory) – not registered
sim.py Pactor1Sim: two stations, fake clock, AWGN, delay, burst loss, 8 k / 48 k, PairSim-compatible stepping

Protocol summary (as implemented)#

Timing requirement#

PACTOR-I is a tight half-duplex protocol: 290 ms between packet end and the next packet must hold the IRS's turnaround, the CS and the round trip. feed_rx chunks / tick intervals of <= 50 ms are needed with now() = wall time (tested: 20 ms and 50 ms). In modem.sim.PairSim use step_s <= 0.02: PairSim feeds station A before B in each step, so a burst handed over less than one step ahead (an IRS CS is due 40 ms after the packet) loses its head at the other station; with 0.1 s steps CSs arrive truncated and links fail. Bursts are handed to transmit up to tx_lead_s (150 ms) early with leading silence so they start on the exact slot whether transmit blocks or not. A real radio path must keep audio latency + PTT turnaround well under ~60 ms each way, or cs_slack_s must be raised (the IRS window tracks).

What is verified (sim only)#

tests/pactor1/ (26 tests, ~30 s):

Known gaps vs real SCS PACTOR-I#

Host interface design (not built yet)#

Goal: Pat's pactor:// transport (and Winlink Express) drive SPEEDBIRD as if it were an SCS PTC.

  1. pty: core/pactorhost.py opens a pty pair, symlinks the slave to /var/lib/speedbird/pactor/ptc and sets Pat's pactor.path to it (baud rate ignored).
  2. Command mode: answer the init Pat sends (seen in the Pat 1.0.1 binary: MYcall, MAXE 35, TONES, PTCH, REM 0, CHOB 0, CWID 0, VER, JHOST4): accept all with cmd: prompts, VER -> a PTC-II style version string, MYcall sets the session call, JHOST4 switches to host mode.
  3. WA8DED CRC host mode (JHOST4): frames AA AA | channel | code | len-1 | data | CRC16 with AA stuffing; channel 0 = commands, channel 31 = PACTOR, channel 255 = status polls ("G" poll). Map C CALL -> Pactor1Session.connect, D -> disconnect, channel 31 data -> send, received data -> channel 31 info frames, link state -> "CONNECTED to ..." / "DISCONNECTED" link status messages, %T / buffer polls -> status()["buffer"]. The exact host-mode codes must be checked against Pat's pactor source (MIT) before writing, not guessed.
  4. Audio / PTT: same pattern as core/ardopiq.py: the radio's receive audio from the IQ ring / RadioPort, demodulated at the configured IF (12 kHz IF on R8600/9700 per icom-if-output), fed in <= 20 ms chunks; transmit goes through the TX arbiter (Part 97 checks, power cap, watchdog). PTT turnaround must be measured per radio: P-I needs < ~60 ms.
  5. SBP mode: register Pactor1Protocol as protocol pactor1 with family levels pactor1:100, pactor1:200 in modem/registry.py (owned elsewhere; see the docstring in pactor1/protocol.py).

On-air test plan#

  1. Monitor first (RX only): tune a known PACTOR-I-capable RMS / a P1 beacon; record IQ/audio; run frame.search offline over the recording with both tone polarities and bit orders; confirm header, CRC, status layout and CS timing. Fix constants.py from the capture.
  2. Loopback on air between two SPEEDBIRD radios (own station, dummy load / low power, licensed operator present): connect, transfer, changeover, speed change, QRT.
  3. Against a real PTC (borrowed SCS PTC-II/III in PACTOR-I mode, or PT P1 level forced on the PTC): connect both directions, unproto, Huffman off then on.
  4. Winlink RMS that still accepts PACTOR-I: Pat pactor:// via the host emulation.