UV-TNC

UV-K5 KISS TNC firmware - Convert Quansheng UV-K5 into a packet radio TNC

UV-K5 KISS TNC Project

Convert the Quansheng UV-K5 radio into a KISS TNC (Terminal Node Controller) for packet radio and APRS using egzumer's custom firmware as the base.

๐ŸŽฏ Project Goal

Build a fully functional 1200 baud AFSK KISS TNC that operates over serial, transforming a $30 radio into a capable packet radio modem.

๐Ÿ“Š Project Status

Current Phase: Planning & Build System Complete โœ…

  • โœ… Feasibility analysis complete (75% success probability)
  • โœ… Architecture designed
  • โœ… Firmware base downloaded
  • โœ… Docker build system ready
  • ๐Ÿ”„ Ready to begin development

See PROJECT_STATUS.md for detailed roadmap.

๐Ÿš€ Quick Start

Build the Firmware

# Clone or download this repository
cd UV-TNC

# Build using Docker (recommended)
./build-tnc.sh

# Output will be in compiled-firmware/
ls compiled-firmware/

Flash to Radio

# Using k5prog (Linux/Mac)
k5prog -F -YYY -b compiled-firmware/firmware.packed.bin

# Or use the online flasher
# Visit: https://egzumer.github.io/uvtools

๐Ÿ“š Documentation

Document Description
FEASIBILITY_ANALYSIS.md Technical feasibility study and hardware analysis
ARCHITECTURE.md Detailed system architecture and design
BUILD_GUIDE.md Complete build system documentation
PROJECT_STATUS.md Current status and development roadmap

๐Ÿ—๏ธ Architecture Overview

Host PC (APRS Software)
         โ†• Serial/USB (KISS Protocol)
    UV-K5 TNC Firmware
         โ”œโ”€โ”€ KISS Protocol Handler
         โ”œโ”€โ”€ AFSK Modulator (TX)
         โ”œโ”€โ”€ AFSK Demodulator (RX)
         โ”œโ”€โ”€ PTT Control
         โ””โ”€โ”€ Carrier Detection
         โ†• RF @ 1200 baud AFSK
    BK4819 Transceiver
         โ†• Radio Waves
      Antenna

โœจ Features (Planned)

Core Features

  • โœ… KISS TNC protocol over serial
  • โœ… Bell 202 AFSK modulation (1200 baud)
  • โœ… Compatible with standard APRS software
  • โœ… PTT control with configurable timing
  • โœ… Carrier sense (CSMA)
  • โœ… Configurable via KISS commands

Technical Specifications

  • Modulation: Bell 202 AFSK
  • Baud Rate: 1200 baud (1200Hz mark, 2200Hz space)
  • Serial: 38400 baud (configurable)
  • Protocol: KISS TNC
  • Frequency: 144-148 MHz (2m band, configurable)
  • Half-duplex: Radio limitation

Stretch Goals

  • 9600 baud G3RUH FSK support
  • RSSI-based carrier detection
  • Configuration stored in EEPROM
  • Low power idle mode

๐Ÿ› ๏ธ Hardware Required

Minimum Requirements

  • Radio: Quansheng UV-K5 (~$30)
  • Cable: K-type USB programming cable (~$5)
  • Computer: Linux, Mac, or Windows (WSL2)

Optional

  • Better antenna for packet radio
  • APRS test station for verification
  • Logic analyzer for debugging

๐Ÿ“ฆ Project Structure

UV-TNC/
โ”œโ”€โ”€ build-tnc.sh              # Main build script (use this!)
โ”œโ”€โ”€ BUILD_GUIDE.md            # Build system documentation
โ”œโ”€โ”€ ARCHITECTURE.md           # System design
โ”œโ”€โ”€ FEASIBILITY_ANALYSIS.md  # Technical analysis
โ”œโ”€โ”€ PROJECT_STATUS.md         # Development roadmap
โ”œโ”€โ”€ README.md                 # This file
โ”œโ”€โ”€ compiled-firmware/        # Build output (created on build)
โ””โ”€โ”€ uv-tnc/                   # Firmware source code
    โ”œโ”€โ”€ driver/               # Hardware drivers
    โ”œโ”€โ”€ app/                  # Application code
    โ”œโ”€โ”€ bsp/                  # Board support
    โ”œโ”€โ”€ Makefile              # Build configuration
    โ””โ”€โ”€ Makefile.tnc          # TNC-specific config

๐Ÿ”จ Building the Firmware

Prerequisites

  • Docker installed and running
  • 2GB free disk space

Build Commands

# Build firmware (default)
./build-tnc.sh

# Clean build artifacts
./build-tnc.sh clean

# Rebuild everything from scratch
./build-tnc.sh rebuild

# Open interactive shell for debugging
./build-tnc.sh shell

# Show help
./build-tnc.sh help

See BUILD_GUIDE.md for complete documentation.

๐Ÿ“ก Using the TNC

Connect to Radio

  1. Flash firmware to UV-K5
  2. Connect K-type USB cable
  3. Configure serial port (38400 baud, 8N1)

With APRS Software

# Example with Direwolf
direwolf -p -c tnc.conf

# Example with Xastir
# Configure serial TNC at /dev/ttyUSB0, 38400 baud

KISS Protocol

The TNC implements standard KISS protocol:

  • Frame delimiter: 0xC0
  • Commands: TX delay, persistence, slot time, etc.
  • Compatible with all KISS-aware software

๐Ÿงช Development Status

Completed โœ…

  • Hardware research and analysis
  • Feasibility study (75% success probability)
  • Architecture design
  • Firmware base (egzumer) downloaded
  • Docker build system
  • Build automation script
  • Documentation

In Progress ๐Ÿ”„

  • Test build original firmware
  • Verify firmware size

Planned ๐Ÿ”ฒ

  • Strip firmware to essentials
  • Implement KISS protocol handler
  • Implement AFSK modulator (TX)
  • Implement AFSK demodulator (RX)
  • Integration and testing

๐Ÿ“ˆ Development Timeline

Estimated development time: 24-36 days of active work

Phase Duration Status
Planning & Setup 1-2 days โœ… Complete
Build System 1 day โœ… Complete
Minimal Firmware 3-5 days ๐Ÿ”ฒ Planned
KISS Protocol 3-5 days ๐Ÿ”ฒ Planned
AFSK TX 5-7 days ๐Ÿ”ฒ Planned
AFSK RX 7-10 days ๐Ÿ”ฒ Planned
Integration 5-7 days ๐Ÿ”ฒ Planned

๐ŸŽ“ Technical Background

What is a TNC?

A Terminal Node Controller is a modem for packet radio. It converts digital data to audio tones (AFSK) that can be transmitted over FM radio, and demodulates received tones back to digital data.

Why KISS Protocol?

KISS (Keep It Simple, Stupid) is a simple framing protocol that minimizes processing on the TNC side. The host computer handles all packet protocol logic (AX.25), while the TNC only handles the physical layer (modulation/demodulation).

Why UV-K5?

  • Cheap (~$30) compared to commercial TNCs ($100-300)
  • Open firmware available
  • Capable hardware (ARM Cortex-M0+, BK4819 RF chip)
  • Active development community
  • Amateur radio legal

๐Ÿ“– References

Firmware Base

Protocols & Standards

Reference Implementations

Tools

๐Ÿค Contributing

This is an active development project. Contributions welcome!

Areas Needing Help

  • AFSK demodulation algorithms
  • BK4819 audio path configuration
  • Testing with real APRS stations
  • Documentation improvements

โš–๏ธ License

Based on egzumer's UV-K5 firmware, which is licensed under Apache 2.0.

Copyright 2023 Dual Tachyon
https://github.com/DualTachyon

Licensed under the Apache License, Version 2.0

๐Ÿ† Credits

  • egzumer - UV-K5 custom firmware base
  • DualTachyon - Original UV-K5 firmware reverse engineering
  • OneOfEleven - Many custom firmware features
  • fagci - Spectrum analyzer and other mods

๐Ÿ“ž Legal/Regulatory

Amateur Radio Compliance

  • โœ… Legal for licensed amateur radio operators
  • โœ… Must operate within frequency allocations
  • โœ… Must identify transmissions (handled by host software)
  • โœ… Complies with Part 97 (US) / equivalent regulations

Frequency Bands

  • Primary target: 2m band (144-148 MHz)
  • Radio already type-accepted for amateur use
  • No additional certification required for TNC mode

๐Ÿ”— Links


Project Start: 2026-01-01
Status: Active Development
Success Probability: 75% for 1200 baud AFSK TNC