KISS File Transfer Repeater Documentation

The KISS File Transfer Repeater is a specialized application designed for environments where a single TNC must be shared between a file‐transfer sender and receiver. The repeater buffers and forwards complete bursts of KISS‑framed data between the sender and receiver while simultaneously offering two‑way pass‑through connectivity. In addition to file transfers, the application also immediately forwards CMD/RSP (command/response) packets. Furthermore, the repeater enforces allowed callsigns if desired.

Table of Contents

Overview

The repeater operates with a single TNC connection (via TCP or serial) and employs a state machine to distinguish and manage different packet types: Header, data, ACK, and CMD/RSP packets. When a header packet is received, its payload—containing metadata such as timeout settings, filename, fileID, encoding method (0 = binary, 1 = base64), compression flag, and total packet count—is logged. Once the sender’s burst of data packets is complete, the state machine forwards the entire burst to the receiver.

In addition, the repeater supports two‑way pass‑through connections: Outgoing: Every KISS frame sent to the TNC is immediately broadcast to all connected pass‑through clients. Incoming: Any data received on the pass‑through port is forwarded to the TNC.

A comma‑delimited --callsigns filter allows you to restrict transfers to specific sender and receiver callsigns (wildcards are supported). When the --save-files option is enabled, the repeater will reassemble received file transfers—decoding (if base64‑encoded) and decompressing (if compressed) as needed—and save the file locally. The application also automatically attempts to reconnect to the TNC if the connection is lost or if no data is received for a specified period.

Installation & Build

To build the application, ensure you have Go installed. Then compile the program:

go build -o repeater repeater.go
  

This produces an executable named ax25repeater.

Command‑Line Options

The following table lists all available command‑line options along with their descriptions and default values:

Flag Description Default Value
--tnc-connection-type Connection type for the TNC. Use tcp for a TCP connection or serial for a serial connection. tcp
--tnc-host TCP host address of the TNC (used when --tnc-connection-type=tcp). 127.0.0.1
--tnc-port TCP port number for the TNC connection (used when --tnc-connection-type=tcp). 9000
--tnc-serial-port Serial port for the TNC (e.g. /dev/ttyUSB0 or COM3). Used when --tnc-connection-type=serial. empty
--tnc-baud Baud rate for the TNC serial connection. 115200
--passthrough-port TCP port for pass‑through clients. This repeater supports two‑way pass‑through: Outgoing: All KISS frames sent to the TNC are broadcast to these clients. Incoming: Any data received on this port is forwarded to the TNC. 5010
--callsigns Optional comma‑delimited list of valid sender/receiver callsigns with support for wildcards. When set, only packets whose both sender and receiver match one of the allowed callsigns are processed. Otherwise, all callsigns are accepted. empty
--debug Enable verbose debug logging for detailed state and packet processing information. false
--save-files When enabled, the repeater reassembles received file transfers from their data packets. The application decodes (if base64‑encoded) and decompresses (if compressed) the file data, then saves the resulting file locally using a unique filename based on the sender, receiver, and file ID. false
--send-delay Delay in milliseconds before sending frames to the TNC if a recent frame was received. This minimum turnaround delay can help address timing issues with certain TNCs. 0
--tcp-read-deadline TCP read deadline (in seconds) for TNC connections. If no complete KISS frame is received within this period, the connection is closed and a reconnect is triggered. 600

Examples

Example 1: TCP Repeater with Default Settings

The following command runs the repeater using a TCP connection to the TNC at 127.0.0.1:9000. Pass‑through clients can connect on port 5010.

go run ax25repeater.go
  

Example 2: Serial Repeater with Two‑Way Pass‑Through

This command uses a serial connection for the TNC (e.g. /dev/ttyUSB0 at 115200 baud) and allows two‑way communication on the pass‑through port (5010).

go run ax25repeater.go --tnc-connection-type=serial --tnc-serial-port=/dev/ttyUSB0 --tnc-baud=115200
  

Example 3: Restricting Transfers to Specific Callsigns

The following command restricts transfers to the callsigns N0CALL and any SSID matching *-R, while also enabling debug logging.

go run ax25repeater.go --callsigns=N0CALL,*-R --debug
  

Example 4: Enabling File Saving

To enable saving of received files, add the --save-files flag. When enabled, the repeater reassembles the file transfer by decoding (if base64‑encoded) and decompressing (if compressed) the data, then saves it locally with a filename that includes the sender, receiver, and file ID.

go run ax25repeater.go --save-files
  

Additional Notes

Contact & Support

For additional questions, issue reports, or support, please contact the project maintainer or visit the source repository.