KISS (amateur radio protocol)
KISS is a protocol for communicating with a serial terminal node controller device used for amateur radio. This allows the TNC to combine more features into a single device and standardizes communications. KISS was developed by Mike Cheponis and Phil Karn to allow transmission of AX.25 packet radio frames containing IP packets over an asynchronous serial link, for use with the KA9Q NOS program.
Description
The KISS protocol is designed to be easy to implement in simple embedded devices, which are capable of asynchronous serial communications. While it allows arbitrary data to be transferred, there is no support for flow control or error handling.KISS uses Serial Line Internet Protocol framing, but defines its own simple protocol instead of encapsulating raw IP packets, as SLIP does. The KISS protocol messages provide for setting common TNC control variables as well as sending arbitrary message packets to be forwarded by the TNC. While the packets may be arbitrary, protocols commonly used with KISS include AX.25 and IPv4.
Special characters
Similar to SLIP, back-to-back FEND codes should not be interpreted as empty frames. Instead, all but the last FEND code should be discarded. This can be used for synchronization, and can be used to give the receiver's AGC time to stabilize.If the FEND or FESC codes appear in the data to be transferred, they need to be escaped. The FEND code is then sent as FESC, TFEND and the FESC is then sent as FESC, TFESC. Two FESCs in a row are a protocol violation and can be used to signal an aborted transmission. This allows the recipient to avoid misinterpreting subsequent data as part of a valid frame. Any data received before the next FEND would be properly discarded.
Command codes
Any of these codes may be sent from the host to the TNC, but only the "Data frame" code should be sent from the TNC to the host. "In multi-port TNCs, the upper 4 bits of the type indicator byte can specify one of up to sixteen ports."| Command bytes | Name | Argument length | Description |
| 0x?0 | Data frame: port X | Varies | The following bytes should be transmitted by the TNC. The maximum number of bytes, thus the size of the encapsulated packet, is determined by the amount of memory in the TNC. |
| 0x?1, 0x?? | TX DELAY | 1 | The amount of time to wait between keying the transmitter and beginning to send data. |
| 0x?2, 0x?? | P | 1 | The persistence parameter. Persistence=Data*256-1. Used for CSMA. |
| 0x?3, 0x?? | SlotTime | 1 | Slot time in 10 ms units. Used for CSMA. |
| 0x?4, 0x?? | TXtail | 1 | The length of time to keep the transmitter keyed after sending the data. |
| 0x?5, 0x?? | FullDuplex | 1 | 0 means half duplex, anything else means full duplex. |
| 0x?6, | SetHardware | Varies | Device dependent. |
| 0xFF | Return | 0 | Exit KISS mode. The TNC stops processing KISS protocol and returns to its vendor-specific behavior. |
The command bytes are shown here in Hex, but are sent as bytes, not hex strings.
In all cases except the Return command, the high nibble indicates which port the command applies to.
A TNC may support other nonstandard commands, at the vendor's discretion.