KISS File Transfer Receiver Documentation

The Receiver is part of the file‑transfer suite. It connects to a TNC (using either a TCP or serial connection), listens for KISS‑framed file data, reassembles the packets into a complete file, verifies its integrity via an MD5 checksum, and either saves, executes, or outputs the file to standard output.

Table of Contents

Overview

The Receiver program is designed to accept incoming file transfers sent using KISS framing. It continuously reads from the underlying TNC connection, extracts and unescapes KISS frames, and parses packets.

Installation & Build

To build the Receiver, ensure that you have Go installed and that you have installed the required packages (such as go.bug.st/serial). Then compile the program:

go build -o receiver receiver.go
  

Command‑Line Options

The table below lists all available command‑line options for the Receiver along with descriptions and default values:

Flag Description Default Value
--my-callsign Your own callsign (required). This identifies you as the receiver. none
--connection Connection type to the TNC. Must be either tcp or serial. tcp
--debug Enable verbose debug output. false
--host TCP host to connect to (used if --connection is set to tcp). 127.0.0.1
--port TCP port to connect to (used if --connection is set to tcp). 9001
--serial-port Serial port device (e.g., /dev/ttyUSB0 or COM3). Required if using a serial connection. empty
--baud Baud rate for the serial connection. 115200
--one-file Exit after successfully receiving one file. false
--execute Instead of saving the received file, if the filename matches this value the file is executed with bash. empty
--replace Overwrite existing files if a file with the same name is received. false
--execute-timeout Maximum number of seconds to allow an executed file to run (0 means no timeout). 0
--stdout If set, the received file is output directly to standard output instead of being saved to disk. false
--callsigns A comma‑delimited list of allowed sender callsign patterns. Only packets with a sender that matches one of these patterns will be processed. Wildcards are supported (e.g. MM5NDH-* or *-15). empty
--tcp-read-deadline Time (in seconds) without data before triggering a reconnect (TCP only). 600
--fileid Specify a file ID (exactly 2 alphanumeric characters). Only allowed with --one-file. empty

Examples

Example 1: TCP Connection, Save File

The following command starts the Receiver using a TCP connection to the TNC at 127.0.0.1:9001 and saves any received file. Your callsign is set to N0CALL.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001
  

Example 2: Serial Connection, Debug Mode

This command uses a serial connection on /dev/ttyUSB0 with a baud rate of 115200. Debug logging is enabled.

go run receiver.go --my-callsign=N0CALL --connection=serial --serial-port=/dev/ttyUSB0 --baud=115200 --debug
  

Example 3: Execute Received File

In this example, if the received file’s name matches runme.sh, the Receiver will execute the file with bash instead of saving it.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001 --execute=runme.sh
  

Example 4: Output File to STDOUT

With the --stdout option, the received file will be output directly to standard output rather than being saved. The --one-file option is recommended.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001 --stdout --one-file
  

Example 5: Overwrite Existing Files and Exit After One File

This command will overwrite an existing file if a new file with the same name is received and exit after a single successful transfer.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001 --replace --one-file
  

Example 6: Filter by Sender Callsign

The following example uses the --callsigns option. Only packets sent from a sender matching one of the allowed patterns (for example, MM5NDH-* or *-15) will be processed.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001 --callsigns=MM5NDH-*,*-15
  

Example 7: Use File ID Restriction

This example restricts the transfer to a specific file ID (e.g. AB). Note that --fileid can only be used with --one-file.

go run receiver.go --my-callsign=N0CALL --connection=tcp --host=127.0.0.1 --port=9001 --fileid=AB --one-file
  

Additional Notes

Contact & Support

For further assistance, bug reports, or feature requests, please contact the project maintainer or visit the project repository.