Jump to content

KISS protocol

From HamWiki
KISS protocol
Full nameKISS (keep it simple, stupid) host-to-TNC protocol
AuthorsMike Chepponis, K3MC, and Phil Karn, KA9Q
Idea fromBrian Lloyd, WB6RQN
Published1987, ARRL 6th Computer Networking Conference
Technical
LinksComputer to TNC, over serial, USB or TCP
Frame delimiterFEND byte (hex C0)
Escape byteFESC (hex DB)
PortsUp to 16 per link
In use
Used byDirewolf, LinBPQ, APRS programs, Linux AX.25, NOS

The KISS protocol is a very simple way for a computer to exchange packet radio frames with a terminal node controller (TNC). The name comes from the engineering motto "keep it simple, stupid," and the protocol lives up to it: the TNC does little more than turn radio signals into raw frames and back, and the computer handles everything else. Published in 1987 as a stopgap, KISS became the standard link between packet software and modems, and today it connects APRS programs, node software and sound-card modems on almost every packet station.

Origins

In the mid-1980s a TNC was a self-contained packet station. It ran the AX.25 protocol internally and talked to the operator through a command prompt designed for a person at a terminal. That worked for keyboard chats but got in the way of more ambitious software. Programs running TCP/IP over radio needed to build their own frames, and multi-user bulletin board systems had to manage many connections over a single serial cable, something the human-oriented command set handled poorly.

The idea of a stripped-down host interface came from Brian Lloyd, WB6RQN. Phil Karn, KA9Q, drafted a specification in 1986, and he and Mike Chepponis, K3MC, presented the finished version at the ARRL's 6th Computer Networking Conference in 1987. The authors described it as a temporary measure until computers had their own synchronous interfaces to radios, but its simplicity made it easy to add to existing TNCs with new firmware, and it stuck.

How it works

A KISS TNC has two jobs. On the radio side it sends and receives frames in HDLC, the synchronous format AX.25 uses on the air, and it decides when to transmit by listening for a clear channel. On the computer side it passes every good frame it hears to the host and transmits whatever frames the host sends, without examining their contents.

On the serial link, each frame is marked off by a special byte called FEND (frame end, hex C0). If that value happens to occur inside the data, it is replaced with a two-byte sequence beginning with FESC (frame escape, hex DB), and an actual FESC byte is escaped the same way. The first byte of each frame is a type byte: its low four bits give a command and its high four bits give a port number, so one link can serve a TNC with up to 16 radio ports.

Command Meaning
0 Data frame to send or received
1 TXDELAY: time to wait after keying before sending data
2 Persistence: how eagerly to transmit when the channel is clear
3 Slot time: how long to wait between channel checks
5 Full duplex on or off
6 Hardware-specific setting
FF Leave KISS mode

There is no checksum and no flow control on the serial link, and the TNC does not acknowledge what it receives. If its buffers fill, it simply drops frames, and the higher-level protocol on the computer, such as connected-mode AX.25 or TCP, notices the loss and sends again.

KISS today

Because a KISS TNC knows nothing about connections, the same hardware can carry ordinary AX.25 packet, APRS, TCP/IP or experimental protocols, depending only on the software at the other end. Many hardware TNCs, such as the Kantronics KPC-3, offer a KISS mode alongside their command mode, and some, such as the TNC-X, TNC-Pi and NinoTNC, speak only KISS.

Software modems have carried the idea onto networks. Dire Wolf offers KISS over TCP, the same frames sent over a network connection instead of a serial cable, so a node program, APRS client or terminal can use a modem running on the same computer or on another machine. LinBPQ, Linux's built-in AX.25 networking, Winlink clients for VHF packet and many APRS programs all connect to radios this way. Projects such as TARPN rely on KISS TNCs for their node links.

When a KISS station transmits but nobody decodes it, check TXDELAY first. If it is too short for the radio, the start of each frame is lost while the transmitter is still keying up.

See also