Serial Port Direct Access

At SINQ serial devices are connected to a UNIX/LINUX computer. On this machine runs a serial port server which allows to read and write data through TCP/IP sockets to a serial port connected to the machine. This document describes a simple interface for communicating with such serial devices.


The interface to a serial device connected to a UNIX/LINUX computer is initialised with the following command given at the Tcl prompt:
Controller name computer port channel
This command opens a connection to the serial port on the UNIX/LINUX machine and installs a new command in order to interact with it. The parameters:


Once the connection has been initialised name is available as a new command in Tcl. Let us assume, MC as the name for the purpose of this description. MC then can be used as follows:
MC -tmo value
Configures the timeout for the connection to value. Value is in microseconds.
MC arg1 arg2 ..... argn
Everything after MC is written to the serial port. The reply received from the port is returned.

All these commands can return errors. Mostly these refer to the wrong device being specified on initialisation. The others are network problems.