Control Terminal

The Control Terminal example program is written to be a simple example of how to write such code.  It is not a full-featured terminal program nor is it intended to become such a program.  As such there are no threads but rather the incoming data is polled for every 50 msec which seems to work well for most purposes.

The three zips below contain everything needed to compile CtrlTerm on three platforms (some standard packages may be needed on Linux systems).  Just download a small (3-4 MB) zip file, extract the file, open a terminal, and compile the CtrlTerm program (see instructions below).  This is a *very* easy way to try Free Pascal, the fpGUI widget set, and the Synapse and SynaSer communication libraries, and the result can be a *very* useful communication troubleshooting tool!

There is so little code in the example that it has been easy to customize the program for several real work projects.  One such project added a counter to the 50 msec timer so commands could be issued repeatedly (every 5 seconds for example).  Another project monitored the incoming data for a crash of the ReactOS operating system and then CtrlTerm would issue commands to collect extensive debugging information.  Another project used the timestamps of received data (see example timestamps on the bottom part of this CtrlTerm screen shot) to demonstrate a firmware bug on data streams coming from some expensive embedded equipment.  New!  CtrlTerm.pas in the zips below can be replaced with one of these custom applications.

New! Information on related tools

New! Ports to Delphi and Lazarus (also new console port for Android)

New! Related tutorial


If you get compiler errors when compiling on Linux you might need to install linux libraries.

Intel i386 systems

Win32 - CtrlTerm-fpc-2.6.2.i386-win32-051813.zip 4.0 MB
Unzip the files into a new folder
Open a Command Prompt in the new folder
Compile the program: compile ctrlterm
Run the program that is in the bin folder

Want more information? The "Hello World" page has a tutorial for Win32.  The "Simple Serial" page also has a tutorial.

Linux - CtrlTerm-fpc-2.6.2.i386-linux-051813.zip 2.9 MB
Unzip the files into a new folder
Open a Terminal in the new folder
Set compiler as executable file: chmod 755 ppc386

Temp! Edit CtrlTerm.pas and change line 525 to:
      soc := TTCPBlockSocket.Create;

Compile the program: sh ctrlterm.sh
Run the program that is in the bin folder (as root):
  cd bin
  sudo ./CtrlTerm

ARM systems

Linux - CtrlTerm-fpc-2.6.2.arm-linux-051813.zip 2.9 MB (EABI)
Unzip the files into a new folder
Open a Terminal in the new folder
Set compiler as executable file: chmod 755 ppcarm
Temp! see note for i386-linux above
Compile the program: sh ctrlterm.sh
Run the program that is in the bin folder (as root):
  cd bin
  sudo ./CtrlTerm


Please share your ideas, comments and suggestions. Thanks!
-- Paul Breneman

This page sponsored by: TurboControl.com
Contact information on the home page for TurboControl.com