SPEEDBIRD-EXP source code guide#
This guide explains the source of SPEEDBIRD-EXP, the drop-in VARA.exe for Windows: how the parts fit together, what every file does, how a block of audio travels through the program, and how it is built, installed and checked. The user guide is SPEEDBIRD-EXP.
Everything here is MIT-licensed: SPEEDBIRD (© 2026 Speedbird Foundation) and speedbird-python, SPEEDBIRD's Python VARA HF modem (its copyright holders are listed in speedbird-python/LICENSE). The source archive SPEEDBIRD-EXP-src-<version>.zip on the Downloads page contains all of it.
The big picture#
SPEEDBIRD-EXP is one Windows process named VARA.exe. A host program (Winlink Express, Pat, VarAC) talks to it over TCP exactly as it talks to VARA. Inside the process, one audio loop owns the sound card and feeds two modems.
Winlink Express / Pat / VarAC telnet / Console window
│ TCP 8300/8301 (+KISS 8100) │ TCP 8310/8311 │ TCP 8312
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌─────────────┐
│ VARA HF TNC │ │ SBP TNC │ │ SBP console │
│ (speedbird- │ │ (SPEEDBIRD │ │ console.py │
│ python Tnc) │ │ SbpTnc) │ └──────┬──────┘
└──────┬───────┘ └──────┬───────┘ │
│ process(x, out) │ send / events │ commands
│ ┌──────┴────────┐ ┌──────┴──────┐
│ │ SoundcardSbp │◄──────┤ SbpMesh │ remote admin,
│ │ (sbpsound.py) │ │ (listen-only│ queries
│ └──────┬────────┘ └─────────────┘
│ capture blocks │ feed / pull TX bursts
┌──────┴─────────────────────────┴──────────────────────────────┐
│ Engine._loop (engine.py): 480 samples = 10 ms per pass │
│ read → auto level → VARA → SBP → transmitter owner → PTT → │
│ write; waterfall, meters, activity │
└──────┬──────────────────────────────────────────────┬─────────┘
│ PortAudio (MME), 48 kHz mono int16 │ PTT: host / VOX / RTS / DTR
▼ ▼
sound card ──────────────► radio ◄──────────── COM port
The window (gui.py) runs on the main thread and only reads the engine's status. PSK Reporter and speedbird.io reporting run on their own threads and never touch audio.
Source tree#
The source archive uses the repository layout, so its own build script works unchanged:
packaging/windows/speedbird_exp/
sbexpress/ the program (Python package, run as "python -m sbexpress")
launcher/ VARA.exe: C launcher, resource script, manifest
installer/ NSIS installer script
checks/ unit tests, two-station end-to-end test, Windows checks, sample VARA.ini
build_express.py Linux build: portable folder + zip, installer, source archive
README.md developer summary
packaging/windows/speedbird.ico
src/speedbird/ the SPEEDBIRD modules SPEEDBIRD-EXP uses (SBP, SBP TNC, mesh, reporting, VARA import)
speedbird-python/ the VARA HF modem (Python)
docs/ the user guide and this guide
LICENSE, LICENSES/ MIT licences
Start-up, step by step#
launcher/launcher.c(wWinMain, Windows GUI subsystem, so no console window):- finds its own path with
GetModuleFileNameW. IfVARA.exeis a symbolic link (the "stand in for VARA" install),GetFinalPathNameByHandleWresolves the real file, and the folder it was started from goes intoSBEXPRESS_LINKDIR; - sets
SBEXPRESS_HOMEto its real folder, clearsPYTHONHOME/PYTHONPATH, andSetDllDirectoryW(runtime); - loads
runtime\python312.dlland callsPy_Mainwith-X utf8 -m sbexpress <its own arguments>. Python runs inside the VARA.exe process, so a host program that starts or stops VARA.exe controls the modem directly.runtime\python312._pthlimitssys.pathtopython312.zip,runtime\andruntime\pkgs\.
- finds its own path with
sbexpress/__main__.pycallsapp.main():--headlessmeans no window (tests, Linux). Otherwise, on Windows, stdout and stderr go todevnull, because a GUI process has no console.config.load()readsspeedbird-express.ininext to VARA.exe and writes the template on the first run.--configure,--import-vara,--install-linkor--restore-linkrun the one-shotconfigure.main()and exit (the installer uses this).- Logging goes to
%LOCALAPPDATA%\Speedbird Express\speedbird-express.log, andNUMBA_CACHE_DIRpoints there, so compiled decoders are cached per user. - On the first start in the window,
_offer_vara_import()finds aVARA.ini(in the link folder first) and asks before importing it. setup_problems()checks callsign and locator. If anything is missing, the window opens the first-time setup and the engine does not start. OtherwiseEngine.start()runs, andgui.run()takes over the main thread.
Package sbexpress#
| File | Lines | Role |
|---|---|---|
app.py |
140 | entry point (above) |
config.py |
340 | settings: the ini template, Settings, load, save, setup_problems, opt_in_problems, command line |
engine.py |
710 | the modem: audio loop, both TNCs, TX ownership, status model, waterfall, mesh/console/reporting start-up |
sbpsound.py |
350 | SBP on a sound card: the part of SPEEDBIRD's SbpService that SbpTnc and SbpMesh need |
devices.py, hostapi.py |
150 | sound cards through PortAudio, looked up in one Windows host API |
winptt.py |
60 | PTT without CAT: host, VOX, RTS/DTR via pyserial |
levels.py |
110 | automatic receive level (AGC) and the Tune tone |
ifaudio.py |
50 | radio IF output (Icom "USB AF/IF Output = IF") -> USB audio |
activity.py |
130 | the 24-hour activity chart and the stations heard |
spots.py |
70 | PSK Reporter glue |
console.py |
310 | the SBP console (TCP and in-window) |
vlink.py |
110 | VARA.exe → VARA-backup.exe + symbolic link, and back |
varaimp.py |
110 | VARA.ini / VarAC.ini import |
configure.py |
110 | one-shot setup actions (installer, Settings, command line) |
adminkey.py |
30 | remote admin key derivation (PBKDF2), NumPy-free |
gui.py |
1060 | the Win32 windows: main window, Settings / first-time setup, Console |
config.py: settings#
TEMPLATEis the commentedspeedbird-express.ini. It is the single source of defaults:load()reads the template first, then the user's file over it, so a newly added key always has a value.save()rewrites the template line by line, filling in values, so the comments survive.Settings(dataclass) holds every option:
| Section | Fields |
|---|---|
| station | call |
| audio | hostapi, capture, playback, latency, drive_db, auto_level, target_dbfs, latency_ms |
| VARA | vara_port, kiss_port, bandwidth, registered, vara_link_dir, import_asked |
| SBP | sbp_port, console_port, console_open |
| PTT | ptt, lead_ms, tail_ms, max_s |
| PSK Reporter | psk_enabled, locator, dial_khz, antenna |
| admin | admin_enabled, admin_key, admin_key_call, admin_readonly |
| speedbird.io | sbio_enabled, sbio_token, sbio_name |
| network | addr |
Plus runtime-only fields (state_dir, args from the command line).
- load() validates: bandwidth, latency, port collisions (every TCP port is checked against every other, including data ports = command + 1), and the PTT watchdog range.
- setup_problems(): callsign (not N0CALL, Part 97 shape with optional SSID) and a Maidenhead locator. Nothing starts while either is missing.
- opt_in_problems(): remote admin switched on without a key, or with a key made for another callsign (the key depends on the base call); speedbird.io switched on without a token.
- exe_dir() is SBEXPRESS_HOME (set by the launcher), so the ini always sits next to the real VARA.exe, even when started through the link.
engine.py: the modem#
Engine owns everything that runs. start() starts _run_guarded() on a thread, stop() sets an event and joins, and restart(settings) is stop plus start (used by Settings → Save). An exception in _run becomes status.error, which the window shows.
_run(), in order:
- Route speedbird-python's log to
Engine.say(window log and log file). - Warm up decoders before opening the sound card:
speedbird_python.cli.warm_up()(two in-memory VARA stations exchange a call and data) and_warm_sbp()(encode and decode one SBP frame). numba compiles here on the first run, about 7 s; later starts load from the cache in about 2 s. Doing it first keeps the first real frame from stalling the audio loop. - Open audio:
SoundCard.open_devices()(orNullCard, or a test'sio_factory), then PTT (winptt.open_ptt(); a serial line gets speedbird-python'sPttCtlthread with its tail and watchdog). - Create
AutoLevel,Tune,Activityand, if enabled, the PSK ReporterSpotter. - VARA HF: speedbird-python's
Station(Config.new(bandwidth, call), Options(drive_db, tx_latency)), wrapped inTnc(station, Host.bind(addr, port)), plusKissServer. On Windows,hostserver._pause/_resumeare replaced with no-ops: its host server stops a listener withshutdown(SHUT_RD), which Windows rejects. The attach logic still turns extra clients away. - SBP:
SoundcardSbpplus SPEEDBIRD'sSbpTnc(sbp, "soundcard", port, port+1), then_start_sbp_extras(). _loop()until stopped. Infinally, everything is closed in reverse order and the PTT is released.
_loop() runs once per 480 samples (10 ms at 48 kHz). Every pass:
rx = io.read(480) # blocks until the sound card delivers 10 ms
card = rx / 32768 # float, full scale 1.0
raw = ifconv.process(card) if IF input # radio IF -> USB audio (ifaudio.py); AF input: raw = card
x = level.process(raw, keyed) # automatic receive level (frozen while keyed)
VARA : tnc.process(x, out) # the VARA station reads x, may write TX audio into out
SBP : sbp.feed(x, t0) # queued to the SBP receive thread with its capture time
owner: ""/VARA/SBP/TUNE # who owns the transmitter (below)
SBP: sbp.pull(out) TUNE: tuner.fill(out)
PTT : ptt.set(keyed) # serial line (host/VOX: nothing to drive)
tx.process(out) # PTT lead: TX audio delayed by lead_ms of silence
io.write(quantize(out))
waterfall.feed(raw), activity.add(...), meters every 10 passes
Transmitter ownership. One radio, half duplex. Whoever keys first owns the transmitter until its burst ends. VARA's output wins while it is keyed. SBP bursts wait in a queue and never start while a VARA session is up (station.state() != Listen), so SBP cannot transmit into the gaps of a VARA exchange. Tune runs only when both are quiet.
Timing. VARA's reply windows are measured in received samples and are tight (an answer is expected about 1.3 s after a call). The station is told the real round-trip delay through Options(tx_latency=…) = PTT lead + latency_ms + PortAudio's output latency + input latency, in samples. SBP gets the same figures as LinkTiming(tx_delay=…), and each SBP burst is padded so PTT stays on until its last sample has left the sound card (lead + output latency + tail).
Status model. The window and console read Engine.status (Status / TncStatus dataclasses). It is filled from what the TNCs already say to host programs: _tap_vara() wraps Host.line (lines sent: CONNECTED, SN, BITRATE, BUSY, PTT, …) and the module-level parse_command (lines received: MYCALL, LISTEN, CONNECT); _tap_sbp() wraps SbpTnc._send_line / _command. _host_line() turns these into state, and also drives PSK Reporter spots (a new peer is reported once its S/N is known) and the decode marks on the waterfall.
_start_sbp_extras() starts SBP on the air at start-up with the station call (so the console and remote admin work without a host program). It also starts SbpMesh in listen-only mode (beacon, forward and cross_freq off) with the admin key from the ini and SbpAdmin as the command handler, the Console (event feed always, TCP server when a port is set), and the speedbird.io reporter. Each part is best effort: a failure is logged and the modems keep running.
Waterfall: every 4800 samples, a 4096-point Hann-windowed FFT of 0 to 3 kHz (256 bins, about 12 Hz each), scaled from a slowly tracked noise floor (−6 to +34 dB), and kept as 120 rows (12 s). mark() records a decode (VARA blue, SBP orange, dashed when only detected) with its frequency span, at most once per 1.5 s per label. bitmap() renders BGRA bytes (colour map, red edges for our own TX, brackets for marks), so the window can paint it without NumPy. labels() gives the text positions.
sbpsound.py: SBP on a sound card#
SPEEDBIRD's SbpService serves many radios through IQ rings and a TX arbiter. SbpTnc and SbpMesh only need a small part of it, which SoundcardSbp provides for one sound card:
| Method | Used by | Does |
|---|---|---|
links |
SbpTnc, SbpMesh | {"soundcard": Runtime} |
start_link(rid, mycall, freq, profile) |
SbpTnc (MYCALL/LISTEN), engine |
new SbpLink (profiles hf and fm9600 only; wideband needs an SDR) |
send(rid, to, text=… / name=…, data=…) |
SbpTnc, SbpMesh | an SBP message or file transfer |
connect / disconnect / abort |
SbpTnc | session control |
add_listener / emit |
SbpTnc, SbpMesh, console, engine | events as dicts (heard, connected, received, sent, failed, progress, tx, …) |
file_path(fid) |
SbpTnc | received files (_tnc_data.bin carries the host's byte stream) |
Runtime wraps one SbpLink. Its receive thread batches 10 ms blocks into 100 ms and calls link.feed_rx(audio, 48000, t0), where t0 is the capture time of the first sample (the link's timing needs it). A tick thread calls link.tick() ten times a second. _on_event() turns SbpEvents into the same dicts SPEEDBIRD's service emits, so SbpTnc works unchanged.
Transmit: SbpLink calls transmit(audio, rate) with its lock held, so queue_tx() only resamples to 48 kHz, applies the drive level, pads and queues. The audio loop calls pull(out) to play it block by block, and the first and last blocks emit tx keying / tx done, which SbpTnc turns into PTT ON / PTT OFF for the host program.
devices.py, hostapi.py: sound cards#
Windows lists every sound card once per host API (MME, DirectSound, WASAPI, WDM-KS), and MME truncates names to 31 characters. find() looks in the chosen host API first (MME by default, as VARA does; Windows converts 48 kHz mono to the card's format), then anywhere if the name is unique. Matching accepts the exact name, a unique part of it, a #index, or default. SoundCard reuses speedbird-python's PortAudioIo (48 kHz, mono, int16, 480-sample blocks). hostapi.py is the NumPy-free lookup the Settings window uses to fill its device lists.
winptt.py: PTT without CAT#
open_ptt("host" | "vox") returns None: nothing to drive, and the TNCs still send PTT ON / PTT OFF to the host program, which keys the radio through its own rig control. rts:COMn / dtr:COMn open the port with pyserial (both lines set low before opening, so opening never keys the radio) and return a SerialLine, driven by speedbird-python's PttCtl thread (tail, max_s watchdog, release on stall or exit).
levels.py: automatic level and Tune#
AutoLevel.process() measures each block. Every 0.5 s it takes the 20th percentile of 10 ms RMS values over the last 10 s as the noise floor, and moves the gain at most 1 dB towards target_dbfs (−20 to +30 dB). It freezes while we transmit and for 2 s after, and backs off at once if a strong signal would come out hotter than 0.9. Converter clipping (more than 1 % of blocks at full scale) and silence (floor below −90 dBFS) are reported, at most every 30 and 60 s. Tune is a phase-continuous 1500 Hz sine at 0.9 × drive.
ifaudio.py: radio IF input#
With Radio audio = IF (input = if), the sound card delivers the radio's receiver IF instead of demodulated audio: real samples at 48 kHz around if_center_hz (12 kHz on most Icom radios, 18.019 kHz on the original IC-7300; mirrored on the IC-7610, if_invert). IfToAudio.process() mixes the IF centre (the dial) to 0 Hz, mixing the other way for a mirrored IF so the spectrum flips. A 201-tap complex band-pass then keeps 0–3.3 kHz above the dial (the USB passband; the opposite sideband and the rest of the IF are rejected), and the real part ×2 is the receive audio. This is the same method as the SPEEDBIRD station (radio/rigaudio.py, core/sbpservice.py). The filter delays audio by 100 samples, which the engine adds to the input latency it reports to VARA HF and uses for SBP timestamps. Clipping is judged on the raw IF samples (AutoLevel.process(raw_peak=…)), and the input meter shows the sound card's own level. Transmit is unaffected.
activity.py: the activity chart#
Airtime in seconds per series (vara_tx, vara_rx, sbp_tx, sbp_rx) in 30-minute buckets, kept for 24 h, and the stations heard (call, protocol, S/N, last time, count). Saved to activity.json every minute and on stop. bitmap() draws stacked columns in the SPEEDBIRD Overview colours, with the y scale rounded to 1, 2, 5, 10, 15, 20 or 30 minutes.
spots.py: PSK Reporter#
A thin layer over SPEEDBIRD's core.pskreporter (the IPFIX/UDP dialect, uploads at most every 5 minutes, each call once per 5 minutes per band and mode). It adds the modes VARA and SBP, strips SSIDs, computes the spot frequency as dial + 1500 Hz, and refuses to send without a locator, a dial frequency and a callsign from the host's MYCALL (or the settings).
console.py: the SBP console#
Console serves the TCP console and the in-window console from one command() dispatcher:
| Command | Calls |
|---|---|
status |
engine status, SBP link info, mesh admin status |
heard, nodes |
the console's own heard list, SbpMesh.node.nodes() |
msg |
SoundcardSbp.send |
ping, trace |
SbpLink.ping / trace |
query |
SbpMesh.query |
admin |
SbpMesh.admin_send(…, auth="hmac") |
Live events (received messages, sent, failed, ping / trace replies, connected, disconnected, mesh admin and query results) are broadcast to every client with watch on, and to in-process sinks (the window).
- Connections from other computers start unauthenticated and must
login <password>, checked withadminkey.check()against the stored key. After three failures the connection is closed, with a growing delay. Loopback connections are trusted. - Admin lines are parsed with
shlex(admin_parts()), so passwords may contain spaces when quoted, andmasked()hides the password in every log line.
vlink.py: standing in for VARA.exe#
install(vara_dir, target)renamesVARA.exetoVARA-backup.exeand creates a symbolic linkVARA.exe → target(CreateSymbolicLinkWwithSYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, so Developer Mode suffices; elsewhereos.symlink). It refuses when VARA.exe is already a link, when aVARA-backup.exeexists, or when the target is VARA.exe itself. If the link fails, it renames the original back. Error 1314 (privilege not held) raisesNeedsAdmin, and the caller re-runs elevated.restore(vara_dir)only removes a VARA.exe that is a link, and only when the backup is there to put back.status()reports what is in a folder.- The launcher's symlink resolution (above) is what makes the linked VARA.exe find its
runtime\folder.
varaimp.py: VARA.ini import#
SPEEDBIRD's core.varaimport.parse_files() parses VARA.ini and VarAC.ini tolerantly. Registration codes, licences, passwords and e-mail settings are dropped at parse time. apply() maps the result onto Settings (the table is in the user guide) and moves the SBP port if it would collide with the imported VARA or KISS ports. Explicit installer answers win over imported values.
configure.py: one-shot setup#
run() applies, in order:
- The secrets file: the installer passes the admin password and speedbird.io token in a temp file, never on the command line, and the file is deleted after reading.
- The VARA.ini import.
- The opt-ins. The password becomes a key at once.
- The checks.
- The link install or restore.
- Save.
A restore on its own (the uninstaller) skips the setup checks. main() writes OK / ERROR and messages to --result-file for the installer, and never shows a dialog.
adminkey.py: remote admin key#
derive_key(password, call) = PBKDF2-HMAC-SHA256(password, SBPADMIN:<base call>, 100 000 rounds), hex. It is identical to speedbird.sbp.mesh.admin.derive_key (a check compares them) but needs no NumPy, so the installer's --configure stays light. Only the key is stored. SPEEDBIRD stations sign each SBX command with an HMAC of it, so the password never goes on the air.
gui.py: the windows#
Plain Win32 through ctypes: the embeddable Python has no Tk, and WebView or .NET would add large dependencies.
- Plumbing: structures and signatures are declared once with
_sig(), which matters on 64-bit Windows, where handles do not fit anint._register()keeps window-procedure thunks alive, andCtlcreates controls with one font. Strings passed to Windows by address (CB_ADDSTRING,EM_REPLACESEL,LB_ADDSTRING) are kept in acreate_unicode_bufferfor the whole call.fit_client()sizes windows from their client area (AdjustWindowRectEx), so nothing is clipped at other DPI or title-bar sizes. MainWindow:- Panels for VARA HF and SBP, the waterfall, the sound card, a status line, the log, and on the right the activity chart and stations heard.
- A 200 ms timer refreshes labels and meters, drains the log queue, and invalidates the waterfall or chart area when their version changes.
WM_PAINTblits the engine's BGRA bitmaps withStretchDIBits, then writes the decode labels withTextOutW, keeping them apart.WM_CTLCOLORSTATICcolours the TX indicator and the legend swatches.
SettingsWindow(also the first-time setup): two columns of controls._collect()validates everything and builds a newSettings. The admin password is turned into a key here, and a callsign change asks for the password again. Save writes the ini and restarts the engine. Import, Use as VARA.exe and Restore callvaraimpandvlinkdirectly, and onNeedsAdminre-run VARA.exe elevated throughrun_elevated()(ShellExecuteExW "runas", wait, read the result file).ConsoleWindow: an output pane fed by the console's event sink and an input line. Enter goes throughIsDialogMessageto the default Send button.
The window never calls into the modem except Engine.tune(), restart() and stop(), and the console's run_line(). Everything else is reading Engine.status.
Modules used from SPEEDBIRD and speedbird-python#
| Module | Used for |
|---|---|
speedbird_python.station.hf.Station, tnc.Tnc, hostserver.Host / KissServer, arq.session.Config, cli.warm_up |
the VARA HF modem and its host protocol (as VARA's) |
speedbird_python.audio (PortAudioIo, TxAudio, sample, quantize), ptt.PttCtl |
audio contract, PTT lead, serial PTT thread |
speedbird.sbp (SbpLink, PHY, LDPC, FT/CALL tiers), modes._ftx |
the SBP modem |
speedbird.core.sbptnc.SbpTnc, connect |
SBP behind the VARA host protocol |
speedbird.core.sbpmesh.SbpMesh, sbpadmin.SbpAdmin, speedbird.sbp.mesh.* |
listen-only mesh, station queries, SBX remote admin |
speedbird.core.pskreporter, meshreport |
PSK Reporter uploads, speedbird.io reports |
speedbird.core.varaimport |
VARA.ini / VarAC.ini parsing |
build_express.py copies exactly these SPEEDBIRD files (SB_FILES plus sbp/) into runtime\pkgs. A module imported later must be added there, and the end-to-end check run against the staged copy shows whether anything is missing.
Threads#
| Thread | Started by | Does |
|---|---|---|
| main | Windows | message loop of the window (gui.py); with --headless, waits |
sbexpress-engine |
Engine.start |
warm-up, then the audio loop |
sbp-rx, sbp-tick |
sbpsound.Runtime |
SBP demodulation, link timers |
sbptnc-* (4) |
SbpTnc |
SBP host ports: accepts, events, timers |
host-* |
speedbird-python Host |
VARA host ports: accepts, command and data readers, writers |
| KISS | speedbird-python KissServer |
KISS clients |
| PTT | speedbird-python PttCtl |
serial PTT with tail and watchdog (only with rts / dtr) |
sbpmesh |
SbpMesh.start |
mesh events, admin and queries, once a second |
sbp-console* |
Console |
TCP accept, one thread per client |
pskreporter, mesh report |
SPEEDBIRD | uploads every 5 minutes |
Rules that keep them apart: the audio loop never blocks on anything but the sound card. SBP events arrive on link threads with the link lock held, so listeners only queue (SbpTnc._on_sbp, the console, SbpMesh._on_sbp). The window only reads status, and the engine only appends to the log queue.
Files at run time#
| File | Written by |
|---|---|
<install>\speedbird-express.ini |
template on the first run, Settings, --configure |
%LOCALAPPDATA%\Speedbird Express\speedbird-express.log (+ .1, rotated at 5 MB) |
logging |
…\numba-cache\ |
numba (compiled decoders) |
…\activity.json |
activity chart, stations heard |
…\pskreporter.json, meshreport.json |
reporters (state; switches come from the ini) |
…\sbp\mesh.json, bulletins.json, chat.json, sbp-peers.json, sbp-rx\ |
SBP mesh state, peer memory, received files |
Installer (installer/speedbird-express.nsi)#
NSIS 3, Modern UI. Pages: welcome, folder (C:\SpeedbirdExpress), Station (callsign and locator required, PTT, dial kHz), Reporting and remote access (PSK Reporter, speedbird.io + token, remote admin + password), VARA (folder found in C:\VARA and similar places; install as VARA.exe / restore / leave; import VARA.ini), install, finish.
- The install section copies the files and grants the Users group modify rights on the folder (
icacls). - It writes the secrets file and runs
VARA.exe --configure … --result-file …, then shows the result in the details list. - It creates the shortcuts and the uninstall entry (64-bit registry view).
A silent install (/S) never touches VARA. The uninstaller reads link_dir from the ini and runs --configure --restore-link before removing files, and keeps speedbird-express.ini.
Building (build_express.py)#
Runs on Linux. It needs the mingw-w64 C compiler and windres, NSIS (makensis), and Python 3.11+. The Python 3.12 embeddable zip and win_amd64 wheels come from a local cache when present, else from python.org and PyPI.
python3 packaging/windows/speedbird_exp/build_express.py --out dist [--version X] [--no-installer] [--no-zip] [--no-source]
- Unpack
python-3.12.10-embed-amd64.zipintoruntime\and writepython312._pth. - Unpack wheels into
runtime\pkgs\: numpy, scipy, numba, llvmlite, sounddevice, cffi, pycparser, pyserial, pydantic and its small dependencies. - Copy
speedbird_python, the SPEEDBIRD modules andsbexpress, and stamp the version intosbexpress/_build.py. - Compile the launcher:
windres(icon, version information, manifest for common controls v6 and DPI awareness), thenx86_64-w64-mingw32-gcc -municode -mwindows -O2 -s -static. VARA.exe needs only Windows' own DLLs. - Write
README.txt, the ini example andLICENSES\, then zip the folder, build the installer withmakensis, and pack the source archive.
The last line is RESULT {json} with paths, sizes and SHA-256 values. SPEEDBIRD's own release build (tools/build_release.py, speedbird.core.deploy.build_express) runs this script with the release version and records exp-setup, exp-zip and exp-src in its manifest.
Checks (checks/)#
| Check | Runs on | What it proves |
|---|---|---|
test_units.py (pytest) |
Linux | setup rules, ini round trip, port collisions, AGC, Tune, PSK Reporter packets (fake socket and DNS), admin key = SPEEDBIRD's, link install / restore and refusals, VARA.ini import (synthetic samples in checks/data/vara), the installer's --configure, console login, admin quoting / masking, waterfall marks, activity chart |
test_loopback.py |
Linux or Windows | two engines on an in-memory "air", driven over TCP like Winlink Express: VARA HF connect, 1500 bytes exact, disconnect; the same over SBP; a console message from A to B; signed remote admin from A's console to B |
wine_gui_smoke.py |
Windows or Wine | the windows with a stub engine (synthetic waterfall and chart on Windows), closing themselves |
win_checks.py |
Windows | imports, sound card list, opening a sound card, decoder warm-up times |
win_link_test.ps1 |
Windows | the installer's configure + link install, starting through the link, VERSION and console over TCP, restore |
win_gui.ps1 |
Windows | runs the window smoke test in the desktop session and captures it |
PYTHONPATH=packaging/windows/speedbird_exp:src:speedbird-python/src python3 -m pytest -q packaging/windows/speedbird_exp/checks/test_units.py
PYTHONPATH=packaging/windows/speedbird_exp:src:speedbird-python/src python3 packaging/windows/speedbird_exp/checks/test_loopback.py
Test with ports other than 8300/8310 on a PC where VARA or SPEEDBIRD is running (SBEXPRESS_TEST_PORT=38300). Wine cannot import NumPy 2.x (ucrtbase.crealf is not implemented), so under Wine only the launcher, runtime, setup and windows can be checked.
Extending it#
- A new setting:
- Add it to
TEMPLATE(with a comment),Settings,load()andsave()inconfig.py. - If it is shown in the window, add it to
SettingsWindow._build/_collect. - Add a round-trip assertion to
test_units.py.
- Add it to
- A new console command: add a branch to
Console.command()and a line to the module's help. Commands that transmit go throughSoundcardSbpor the mesh, so they wait while VARA is busy. - Another modem: give it a host port and a
process(x, out)or queue/pull interface like the two here, add an owner name to the ownership rule in_loop(), and tap its host lines into aTncStatusfor the window. - A new SPEEDBIRD module import: add the file to
SB_FILESinbuild_express.py, rebuild, and runtest_loopback.pyagainst the stagedruntime\pkgs.