Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

kiss3 - Python KISS Module

https://github.com/python-aprs/kiss3/actions/workflows/pytest.yml/badge.svg

kiss3 is a Python Module that implements the KISS Protocol for communicating with KISS-enabled devices (such as Serial or TCP TNCs) and provides support for encoding and decoding AX.25 frames.

Versions

  • 8.x branch from python-aprs as kiss3, supports python 3.6+

Previous versions were released by ampledata as kiss:

  • 7.x.x branch and-on will be Python 3.x ONLY.

  • 6.5.x branch will be the last version of this Module that supports Python 2.7.x

Installation

Install from pypi using pip: pip install kiss3

Usage Examples

Read & print frames from a TNC connected to ‘/dev/ttyUSB0’ at 1200 baud:

import kiss

def p(x): print(x)  # prints whatever is passed in.

k = kiss.SerialKISS('/dev/ttyUSB0', 1200)
k.start()  # inits the TNC, optionally passes KISS config flags.
k.read(callback=p)  # reads frames and passes them to `p`.

By default each frame is returned as raw KISS payload, still starting with the KISS command byte (0x00 for data on port 0). To decode frames with ax253, pass strip_df_start=True so the command byte is removed and non-data frames are dropped:

import ax253
import kiss

k = kiss.SerialKISS('/dev/ttyUSB0', 1200, strip_df_start=True)
k.start()
for raw in k.read(min_frames=1):
    print(ax253.Frame.from_bytes(raw))

Without it, ax253.Frame.from_bytes() fails with an error like b'\x00VE3YC' does not match ... (often seen with Kenwood TNCs).

Detecting a lost connection

k.read(min_frames=None) blocks until the connection closes, then returns the frames that were left. Check k.connected (needs the ax253 release after 0.2.0a0) to tell a closed connection from a quiet one, and call stop() and start() to reconnect:

while True:
    k.read(callback=p, min_frames=None)
    if not k.connected:
        k.stop()
        k.start()

A TCP peer that disappears without closing the connection (network cable pulled, host crashed) is only noticed when a write fails or the operating system’s TCP keepalive gives up.

See also: examples/ directory.

Testing

Run the tests with uv:

uv run pytest

See Also

  • Python APRS Module Library for sending, receiving and parsing APRS Frames to and from multiple Interfaces

  • Python KISS Module Handles interfacing-to and encoding-for various KISS Interfaces.

  • Python APRS Gateway Uses Redis PubSub to run a multi-interface APRS Gateway.

  • Python APRS Tracker TK.

  • dirus Dirus is a daemon for managing a SDR to Dire Wolf interface. Manifests that interface as a KISS TCP port.

Similar Projects

  • apex by Jeffrey Phillips Freeman (WI2ARD). Next-Gen APRS Protocol. (based on this Module! :)

  • aprslib by Rossen Georgiev. A Python APRS Library with build-in parsers for several Frame types.

  • aprx by Matti & Kenneth. A C-based Digi/IGate Software for POSIX platforms.

  • dixprs by HA5DI. A Python APRS project with KISS, digipeater, et al., support.

  • APRSDroid by GE0RG. A Java/Scala Android APRS App.

  • YAAC by KA2DDO. A Java APRS Client.

  • Ham-APRS-FAP by aprs.fi: A Perl APRS Parser.

  • Dire Wolf by WB2OSZ. A C-Based Soft-TNC for interfacing with sound cards. Can present as a KISS interface!

Source

Github: https://github.com/ampledata/kiss

Authors

Greg Albrecht W2GMD oss@undef.net

http://ampledata.org/

Masen Furer KF7HVM kf7hvm@0x26.net

License

Apache License, Version 2.0. See LICENSE for details.

Metadata

Release files for kiss3 8.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiss3 8.1.0a1
File Size Uploaded Provenance Actions
kiss3-8.1.0a1.tar.gz 61.5 kB Without provenance Details for kiss3-8.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kiss3 8.1.0a1
File Interpreter ABI Platform Actions
kiss3-8.1.0a1-py3-none-any.whl Python 3 none any Details for kiss3-8.1.0a1-py3-none-any.whl

Total release size: 74.3 kB

Release files / kiss3-8.1.0a1.tar.gz

Download URL kiss3-8.1.0a1.tar.gz
Size 61.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fb1426e0b917d191732440c5c5b91f36720eac1ea71047ec24bd70ebd19d300c
BLAKE2b-256 checksum
How to use checksums
efa6d16d70de693d386489ff84899db84bdd6c79fdf03482351103ee2dc4929b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kiss3-8.1.0a1-py3-none-any.whl

Download URL kiss3-8.1.0a1-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
897c73b06527a1ad24c703987c785a0924eb58e4de1aa59898c828826260cd3f
BLAKE2b-256 checksum
How to use checksums
195d58d8303e33c25375312c0a64d9a9bfdc14f82e06c14a4f341a12e0897f82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for kiss3 8.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page