Bluetooth KISS TNC bridge and web management interface for Orange Pi / Raspberry Pi running Dire Wolf.
Turns a small single-board computer with a USB radio interface into a field-ready APRS TNC that phones connect to over Bluetooth — with a web UI for setup, pairing, Dire Wolf configuration, and live traffic monitoring. Designed for unattended operation on a read-only filesystem with no persistent logs (SD-card friendly).
Provides Bluetooth Low Energy (BLE) connectivity for iPhone APRS applications such as APRS.fi and other applications that require BLE communication, while also providing seamless Bluetooth pairing for Android devices. KP4PRA TNC is compatible with applications including WOAD, APRSDroid, APRS.fi, and RadioMail. It supports multiple radio and sound-card interfaces, including CM108-based devices, DigiRig Lite, Mobilink, and additional interfaces currently being implemented.
Built by KP4PRA/KP3M Heber Soto — [email protected]
Android (APRSDroid) ──RFCOMM/SPP──┐ ├──> KISS TCP :8001 ──> Dire Wolf ──> Radio iPhone (aprs.fi) ──BLE KISS GATT──┘ ▲ │ WiFi/LAN APRS apps ── DNS-SD discovery ─────┘ Browser ──> http:/// (port 80→8088) ──> Web management UI
- Android pairs over Bluetooth Classic (Just Works — no PIN) and APRSDroid connects via RFCOMM/SPP.
- iPhone connects over BLE KISS GATT — no reboot, using the standard KISS-over-BLE UUIDs.
- Both bridges pass raw KISS binary, auto-reconnect if Dire Wolf restarts, and survive idle periods (no traffic ≠ disconnect).
- APRS TOCALL: KP4PRA TNC's own APRS frames (chat messages and acks, beacons, the hourly AX.25 digipeater beacon, APRS-IS) are sent to APKPPR, its assigned APRS software identifier. It is built in, not a setting. Frames from phone and PC apps (Bluetooth, BLE, WiFi KISS) are sent as the app made them, with the app's own TOCALL.
- WiFi access point (field mode): the TNC can broadcast its own
network (default SSID KP4PRA) so a phone joins it directly and reaches
the web UI at http://172.16.0.1/ - no home WiFi needed. Switchable
between client and AP modes; NetworkManager-based. WPA2-protected on the
Raspberry Pi; open (no WiFi password) on the Orange Pi Zero 2W, whose
onboard WiFi cannot complete WPA2 hotspot joins - set a Dashboard
password there (INSTALL.md, "WiFi: home network or hotspot",
wifi.ap_security). - Web UI (FastAPI + Jinja2, mobile-friendly): dashboard with live status, Bluetooth pairing wizards for Android and iPhone, service control (bridges + Dire Wolf), live Dire Wolf traffic view, and a configuration page.
- Station Information → direwolf.conf: callsign/SSID, grid, lat/lon, sound card (live detection incl. Yaesu FT-991A / Signalink / CM108 disambiguation), PTT method (CM108 GPIO, serial RTS/DTR, VOX, GPIO pin), CDIGIPEAT alias — Preview and Apply regenerates direwolf.conf and restarts Dire Wolf; bridges reconnect automatically.
Native Python implementation (src/rms/) that turns the TNC into a
Winlink RMS gateway, relaying transparently to Winlink CMS. No LinBPQ
or other third-party Winlink software required.
- RF access: a standard AX.25 connected-mode link over Dire Wolf
KISS. Any Winlink client (Winlink Express,
pat, etc.) connects over the air to the gateway's approved callsign; the gateway logs into Winlink CMS using its own secure-login credentials and relays the session transparently. One RF session at a time. - Telnet / "Network Post Office" access: a transparent TCP proxy to the real CMS, reachable on all network interfaces (default port 8772, matching Winlink Express's own "Network Post Office" convention). No login logic on the gateway's side — the connecting client performs its own complete secure login directly against CMS's real protocol, using its own Winlink account credentials, exactly as if plugged in by cable. Fully independent of the RF path; RF and Telnet sessions do not contend with each other.
- Services tab: live gateway status with Start/Stop.
- Config page: enable/disable, gateway Callsign/SSID (can differ from the station callsign), CMS password, RF frequency, and packet mode.
- Live-tested end to end: real RF Winlink sessions and real Telnet/ Network Post Office sessions, both completing full B2F message exchanges against production CMS. See CHANGES.md for the AX.25 protocol fixes found and resolved during testing.
KP4PRA TNC can also run Xara, a free VARA FM/HF compatible modem, so Winlink Express, Pat and other VARA programs can use the TNC as their VARA modem over the network. Xara and Dire Wolf share the radio, so one runs at a time; you switch on the Services page.
- Registered VARA speeds: a workflow in this repo builds each new Xara
version once with Xara's "registered" option and publishes it here
(releases
xara-v<version>), so boards only download, never build. - Installed and upgraded by the install command or
sudo kp4pra-xara update(checksum checked); the previous version is kept forsudo kp4pra-xara rollback. - Uses the station sound card and PTT, including the DRA-Pi-Zero (GPIO PTT through a small rigctld-style helper).
- Settings on the Config page; Xara's own status page on port 8080.
See docs/XARA.md.
When NTP is unavailable (for example a field deployment with no internet), the TNC can keep its clock roughly correct from received APRS traffic. NTP remains the primary time source at all times.
- Receive-only: a listener on Dire Wolf's AGW port (8000) reads timestamped APRS position/object reports from a configured source station. It never transmits and does not consume a KISS client slot, so RMS, BLE, RFCOMM, and external KISS clients are unaffected.
- NTP stays primary: APRS only engages after several consecutive unsynchronized checks, and NTP is re-checked immediately before any step.
- Time-of-day only: APRS provides no reliable year, so the board date is retained; this corrects drift, not a grossly wrong date.
- Config page: set the Clock Source Station (exact call-SSID, e.g. KP3M-5) in the web UI; blank disables the feature.
- Strictly allowlisted privilege: the service may run only
/bin/date --setvia sudo — nothing else.
See docs/APRS_CLOCK.md for supported timestamp formats and details.
The gateway advertises the Dire Wolf KISS TCP port as _kiss-tnc._tcp through
the system Avahi daemon, so a KISS client on WiFi - including a phone or laptop
joined to the TNC's own hotspot in field mode - can find the TNC without being
told an IP address.
- Advertised by the gateway, not by Dire Wolf. Most Dire Wolf builds are compiled without dns-sd support and silently advertise nothing; doing it from the gateway works with any build.
- The service name comes from
dns_sd.instance_nameand the port fromdirewolf.port.scripts/install.shwrites/etc/avahi/services/kiss-tnc.servicefrom those values at install time; changing them later means re-running the installer. - The Dashboard's DNS-SD card reports this TNC's own advertisement only. It
needs
avahi-utils(installed as a prerequisite) to query Avahi.
- Read-only root in production; all persistent state on a small
/rwpartition (config, BlueZ pairing data via bind mount over /var/lib/bluetooth). - No persistent logs — journald is volatile (RAM), status is read from live system state, nothing is written during normal operation.
- Strictly allowlisted privileges — the web service can only run specific systemctl/helper commands via narrow sudoers rules; no arbitrary command execution.
- Self-healing — ADEVICE re-detected at boot (USB renumbering), Dire Wolf auto-restart on failure, permission repair after pairing.
| Path | Contents |
|---|---|
src/common/ |
Config, BlueZ management, filesystem/service control, direwolf.conf generator, runtime status |
src/rfcomm/ |
RFCOMM/SPP bridge (Android) — built-in socket AF_BLUETOOTH, no PyBluez |
src/ble/ |
BLE KISS GATT bridge (iPhone) — dbus-next |
src/web/ |
FastAPI app + Jinja2 templates (green/white theme, CSS variables) |
src/rms/ |
Winlink RMS gateway — AX.25/KISS framing, CMS secure-login, RF and Telnet relay |
systemd/ |
Service units: bridges, web, pairing agent, Dire Wolf, ADEVICE fix, BlueZ bind mount, perms fix |
bin/ |
Helper scripts (remount rw/ro, BlueZ perms, ADEVICE fix) |
sudoers.d/ |
Allowlisted sudo rules |
config/ |
Example config.yaml, tmpfiles rule |
scripts/ |
install.sh (stage 1), install-direwolf-integration.sh (stage 2), sync-from-system.sh |
platform/ |
Board-specific files: orangepi-zero2w/ DRA-Pi-Zero overlay + WM8731 DKMS package |
See INSTALL.md — from blank SD card to working TNC on Orange Pi Zero 2W or Raspberry Pi Zero 2 W.
See CHANGES.md for every fix from on-device bring-up (Python 3.13, BlueZ 5.7x, Debian trixie) and the reasoning behind each.
Boards:
-
Orange Pi Zero 2W (1GB, Unisoc UWE5622 WiFi5/BT5.0) — Debian trixie, Python 3.13, BlueZ 5.7x. Reference unit: full RFCOMM + BLE, on RF. Hotspot: open only (no WiFi password) - the Armbian
unisoc_wifidriver starts a WPA2 hotspot but clients never finish joining, and hostapd cannot drive the chip (tested Armbian 26.11 trunk, kernel 6.18.44). -
Raspberry Pi 3 Model B+ (CYW43455, BT 4.2) — Raspberry Pi OS Lite 32-bit Bookworm, Python 3.11, BlueZ 5.66, kernel 6.12.9x. Full automated install validated (chained stage 2, port-80 redirect). BLE works via the legacy raw-HCI advertising fallback, which is re-asserted automatically every 20s while idle because the controller silently stops it on each connection accept and on classic-BT activity (current Pi kernels carry the June-2026 MGMT regression); iPhone traffic and Android provisioning confirmed.
-
Raspberry Pi 3 Model A+ Rev 1.1 (BCM43455, 512MB) — Raspberry Pi OS Lite 64-bit, Debian 13 trixie (13.6), kernel 6.x, Python 3.13. Full automated install validated on a genuinely fresh image; Bluetooth pairing/provisioning validated end to end including the boot-reliable pairing agent and the pair-from-phone then Trust-and-Authorize flow (v1.3.12). AIOC and AudioInjector I2S audio exercised on this unit.
-
Raspberry Pi Zero 2 W Rev 1.0 (quad-core, 512MB) — Raspberry Pi OS Lite 32-bit, Debian 13 trixie, kernel 6.18.34-v7 (affected by the MGMT regression; legacy raw-HCI fallback active). Fully validated: automated install, BLE with iPhone aprs.fi (incl. 20h soak and WiFi-AP coexistence), Android RFCOMM provisioning incl. remove + reboot path, KP4PRA hotspot mode. Note: the board silkscreen's tiny "2 W" is easily misread as an original Zero W —
cat /proc/device-tree/base/model(or /sys/firmware/devicetree/base/model) is authoritative. -
Raspberry Pi Zero W Rev 1.1 (BCM43438, BT 4.1, ARMv6 512MB) — Raspberry Pi OS Lite 32-bit, kernel 6.18-rpt (affected by the MGMT regression). Full BLE operational via the legacy raw-HCI fallback with capability-bearing tool copies; iPhone aprs.fi traffic confirmed. Android/RFCOMM works. Low-memory caveats in INSTALL.md; fine as a single-user unit, the Zero 2 W or Orange Pi is more comfortable.
-
Inovato Quadra and Inovato Quadra Plus - Armbian 26.5.1 bookworm (Debian 12), 64-bit. Both validated working. The Quadra has no Bluetooth hardware, so it runs as a WiFi/TCP KISS TNC only: clients connect to the Dire Wolf KISS port over the network (discoverable as
_kiss-tnc._tcp, see Network discovery) rather than over Bluetooth. The Bluetooth paths (RFCOMM/BLE) are unavailable on that variant by hardware, not by configuration.
Radios / audio:
- CM108 USB sound dongle with HID PTT
- AIOC (All-In-One-Cable) - validated ADEVICE plughw:AllInOneCable,0
- DigiRig Lite
- Masters Communications DRA-Pi-Zero (I2S WM8731 codec on the 40-pin header; GPIOD relay PTT on header pin 32; red PTT / green DCD / blue Bluetooth LEDs). Opt-in: scripts/setup-dra-pi-zero.sh. Requires a direwolf built with libgpiod. Validated on RF (RX+TX, digipeated) on Raspberry Pi, and (1.4.9) on the Orange Pi Zero 2W with Armbian 26.8.3, kernel 6.18.44-current-sunxi64 - see docs/DRA_PI_ZERO.md.
- Yaesu FT-991A (USB audio codec + CP210x serial pair, PTT via RTS)
Display (optional):
- Adafruit Mini PiTFT 1.3" 240x240 (ST7789) - call sign, live traffic in UZ7HO Soundmodem style, Winlink/WiFi/Bluetooth counters, IP; buttons for screen switch, screen off and a 3-second-hold APRS beacon. Raspberry Pi and Orange Pi Zero 2W. Auto-detected at install; see docs/TFT_DISPLAY.md.
Clients:
- Android APRSDroid (Bluetooth RFCOMM/SPP)
- Android WoAD (Winlink, Bluetooth RFCOMM/SPP)
- iPhone aprs.fi (BLE KISS)
- iPhone/iPad RadioMail 1.6.1 (Winlink, BLE KISS)
- Windows APRSIS32
- Windows PinPoint APRS
- Linux YAAC ("Yet Another APRS Client")
Working: both Bluetooth paths bidirectional, web provisioning end to end (boot-reliable pairing agent; pair-from-phone then explicit Trust-and-Authorize), Dire Wolf generation/control/traffic view, Winlink RMS gateway (RF and Telnet/Network Post Office access), live-tested against production CMS. APRS clock fallback (syncs time from received APRS packets when NTP is unavailable). KISS bridge reliability: clean socket teardown on both bridges and automatic recovery of BLE legacy advertising, so iPhone and Android sessions survive repeated connect/disconnect cycles. Next: production hardening (zram + read-only root switch).
MIT — see LICENSE. Free to use, modify, and share; attribution appreciated. 73 de KP4PRA.
