Skip to content

CBielstein/airkiss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

airkiss

Share your serial KISS TNC on the network via TCP.

Description

airkiss can be used to create a TCP server to interface with a serial KISS TNC device for APRS or other packet modes. This allows the amateur radio operator to interface with physical hardware without being physically present.

airkiss differs from simple byte-forwarding implementations by buffering incoming serial data until an entire KISS frame is received. This means each KISS frame is sent in a single TCP packet, which was required in testing with some APRS applications.

Currently, airkiss can only handle a single TCP client at a time.

Real World Example

Although other setups are valid, I'll share my personal usage (the scenario for which I developed this tool) for an example. In my home, I have the following setup:

  • Yaesu FT-8800 transceiver
  • TNC-X packet radio hardware
  • Raspberry Pi v1
  • My personal laptop

I run airkiss on the Raspberry Pi. The Pi connects to the TNC-X via USB serial, and the TNC-X connects to the transceiver's data port. This allows me to use my personal laptop from anywhere in my house (or elsewhere with a VPN) and send and receive APRS packets. This comes in handy for me while developing APRS#, but is also fun with mobile software like APRSdroid (not affiliated).

Example Diagram

For the visually inclined, here's a diagram of that scenario.

flowchart TB
    radio["Yaesu FT-8800"]
    server["Raspberry Pi v1 running airkiss"]
    mobile["Phone/Laptop Running APRS Application"]
    tnc["TNC-X"]

    mobile <-- "TCP connection" --> server
    server <-- "serial connection" --> tnc
    tnc <-- "radio data port connection" --> radio
Loading

Example Usage

In the above scenario, I know the following information:

  • USB serial connection is on /dev/ttyUSB0
  • I want my TCP server on port 8001

To make that happen, I run the following command airkiss --serial /dev/ttyUSB0 --tcp 8001 and that's all it takes.

Although I don't need it in my scenario, you may need to change the baud rate of the serial connection, which can be done via the --baud flag.

Full usage can be see by running airkiss --help.

Building

Following steps to build and run:

  1. Download/clone this repository
  2. Install Rust
  3. Install libudev-dev on your system (e.g. sudo apt install libudev-dev)
  4. Build with cargo build!

Developing

Linting

For a change to be accepted to the repository, it must both build and pass linting at a minimum. Build steps are above. For linting, this project uses Clippy. Follow the instructions at that link to install.

Once installed, run this command in the repository root to lint: cargo clippy --all-targets --all-features

"Frequently" Asked Questions

Admittedly, nobody has ever asked me about this. Literally ever. So frequently goes in scare quotes.

Q: Why not just use direwolf? It already has built-in TCP support, it's free, and software TNCs can be technically superior!

A: Great points. direwolf is fantastic software that I also enjoy using. But sometimes the radio doesn't do vox mode and making a custom PTT cable feels like more work than building a custom software tool ya just gotta kick it old school with some physical hardware. Friends and family will be more impressed with all the flashing lights on your desk than with your assurances that a soft-TNC is running in a docker container on your home server...probably.

Q: Can I just use socat or similar tool to bridge ports?

A: Probably. I have read about people doing it. Though in my testing, it seems some of the APRS applications expected a one-to-one mapping of KISS frame to TCP packet. airkiss buffers an incoming serial packet and sends it over the TCP connection when it's fully received. That bit of functionality helped several apps work better than simple forwarding of bytes. Honestly, I also just find this a much easier command to run.

Q: Does airkiss support AGWPE so I can use Xastir or other software that doesn't support KISS via TNC?

A: Not at this time. There is likely other software (AGWPE itself?) that you can use. Or feel free to implement and submit a PR to either this repo or your favorite application missing TCP support. :)

Q: Why does airkiss not support multiple simultaneous TCP clients?

A: I just haven't written that yet. If you would like to handle that, please consider submitting a PR!

Q: Why Rust?

A: I wanted to run on pretty old hardware (Raspberry Pi v1). Rust will compile for basically anything.

Q: How can I help support airkiss?

A: Several ways, thanks for asking!

  • Submit or comment on issues if you have bugs or feature requests.
  • If you like to code and want to help with any bugs or new features, code contributions through pull requests are welcome!
  • Otherwise, a GitHub star on the repo is great. Helps me know there are actually people who care about this project. It also helps my day job by allowing me to show my current and future employers that I can build things that people appreciate.

About

Share your serial KISS TNC on the network via TCP.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages