XRPi Home

Documentation Index
Alphabetic Index

XRPi Documentation - Interfacing

TCP Interface

Name

TCP -- Interface Type "TCP".

Description

The TCP interface type specifies the client end of a client-server TCP/IP connection, within which other protocols can be transported, as if over a wired connection.

It provides an alternative to physical RS232 and pseudo-tty connections, and would typically be used for transporting KISS protocol between XRPi and other applications on the same machine, or across a LAN.

The server (remote) end of the link could be part of a soundcard packet program. Or it could be a simple RS232-to-TCP converter program which accepts TCP connections, passing the data to and from a serial port. The latter could be connected to one or more KISS TNC's.

A typical TCP interface would be defined thus:

INTERFACE=9
	ID=KISS over TCP Interface
	TYPE=TCP
	PROTOCOL=KISS
	IOADDR=127.0.0.1    ; IP addr of server. Default is localhost
	INTNUM=8001         ; TCP port of server. Default is 8001
	MTU=256
ENDINTERFACE

(Choose the interface number to suit yourself).

TYPE, PROTOCOL and MTU are mandatory.

  • ID is an optional plain text string which identifies the interface on various displays. Keep it concise. 20 characters max.

  • PROTOCOL may only be KISS or SLIP at present. The latter probably has no practical purpose, but is technically feasible.

    If the protocol is KISS it can support up to 16 PORTs, one per KISS "channel". SLIP protocol supports only one port.

  • IOADDR specifies the IP address of the remote server. If omitted, it defaults to 127.0.0.1.

  • INTNUM specifies the TCP "service number" used on the server. If omitted it defaults to 8001.

    If you attempt to set up more than one interface associated with the same server you will get the initialisation error "Duplicate Interface".

  • MTU has the usual meaning.

If everything has been set up correctly, XRPi will automatically connect to the server, and protocol traffic can flow. If the connection gets broken it will automatically re-establish.

Caveats

There is no authorisation mechanism at present, so this should only be used on localhost or a LAN.

See also

IFACES -- Interfaces.
PORTS -- Ports.
KISSTCP -- KISS over TCP.
XROUTER.CFG(8) -- Main Configuration File.