Termite is an easy to use and easy to configure RS232 terminal. It uses aninterface similar to that of 'messenger' or 'chat' programs, with a large windowthat contains all received data and an edit line for typing in strings to transmit.Highlights of the utility are the ease of installation (possibly with pre-configuredsettings) using a heuristic search for the appropriate COM port and, as was mentioned,its user-friendliness.
Other features are:
Windows Terminal Similar to the @Himura instructions, but instead of using 'bash.exe' you will using 'ssh.exe'. For connection to the remote host, you can use the hostname from the.ssh/config file e.g ssh.exe test, if you don't want to use a config file, you can use the user@ip ssh.exe [email protected] and the password dialog will be promt. Terminal is a simple serial port (COM) terminal emulation program. It can be used for communication with different devices such as modems, routers, embedded uC systems, GSM phones. It is very useful debugging tool for serial communication applications.
Termite 3.4 is copyrighted software that is free for personal and commercial use.You may use it and distribute it without limitations. You may however not removeor conceal the copyright. There are no guarantees or warranties whatsoever; useit at your own risk.
The example plug-in filters are distributed under thezlib/libpng (opensource) license.
Termite focuses on text data, and specifically text that is sent and receivedas strings terminated with 'new-line' characters. It has no provisions fortransferring files or binary data. (That said, with the 'hexadecimal view' plug-in,you can send and receive bytes as hexadecimal values, and you may write a'plug-in' filter for file transfer as well).
The user interface of Termite, here pictured with the 'Status LEDs' plug-in active
The interface of the Termite program has one large (initially empty) text area,which is called the 'reception view'. Above it is a set of buttons in a 'buttonbar' and below it is a 'transmit' line into which you can type a line of text.The utility automatically opens the RS232 port for which it was set up. It showsthe current configuration at the left in the button bar. If these are not correct,you can use the button Settings to choose a different port orconfiguration. The Settings dialog also allows you to enable/disable'local echo' and/or to append a line termination to every string that you send.
Received bytes with values below ASCII 32 (the space character) are displayed aseither a control character like , or as twohex characters between square brackets. So[08]
stands for the'backspace' character and[1B]
is the Escape key. There is anexception for the tab, carriage return and line feed characters(ASCII 9, 13 and 10 respectively); these cause spacing (tab) or aline break.
Whether you see the control character or[08]
for the backspacekey, depends on whether the 'Unifont' font is present and configured in the settings.
If you wish to send a non-ANSI/ASCII character, you need the'hexadecimal view' plug-in filter, see 'Downloads' above.
After connecting a serial cable between the PC and the remote device (or remotePC, in which case you must use a null-modem cable) and configuring the port, youcan send data by typing text in the transmit line and pressing the 'Enter' key.Any data that the remote device sends, will appear in the reception view.Optionally, the text that you transmit is copied to the reception view (theoption is called 'local echo', you will find in in the dialog under theSettings button). To distinguish the received data from the echoed data,the echoed text is coloured blue, whereas the received data is green.
The remaining functionality is straightforward: the Clear button clearsthe reception view, the About button gives copyright information and theClose button terminates the utility.
One 'hidden' feature is the ability to disconnect the RS232 port, without terminatingthe utility. You can close an RS232 connection with a click in the status fieldin the upper left corner of the window (left of the button bar). Anotherclick on that line re-opens the connection with the current settings.You can use this to 'free' the port temporarily for another application.
Click here to disconnect, or re-connect
To speed up entering repetitive commands, Termite keeps a history of recentlysent commands. This history is in a circular queue with the most recent commandat the top.
To browse through the history, use the 'arrow up' and 'arrow down' keys. If youtype in a few characters in the 'transmit' edit line, Termite will use the historyto auto-complete the entry. Pressing the arrow up and arrow down keys then browsethrough the entries that match in the first letters. For example, if you havesent the words 'test', 'top', 'view' and 'set' previously, and you type theletter 't' on the edit line, Termite will first auto-complete this to either'test' or 'top' (depending on which word you sent last) and the arrow keys willtoggle between 'test' and 'top'. If you clear the edit line and then use the arrowkeys, Termite will loop through the entire history of 'test', 'top', 'view' and'set'.
Auto-completion and history matching are case sensitive, by the way.
Auto-completion is enabled by default, but can be disabled through theSettings dialog.
By default, Termite scrolls its reception window so that the most recentlyreceived text is displayed. In case you want to look back at text that hasscrolled out of the reception view, just scroll the text back into view. Termitewill stop to scroll to the end every time it receives new data.
To make Termite restart with its automatic scrolling to newly received data,scroll the reception view manually to the end of the data.
In other words, Termite only scrolls up text to show newly received data if itis already at the end of the current data.
Some additional functions are available from a pop-up menu that appears when youright-click in the reception view.
The 'Copy' command copies only the selected text to the clipboard if a selectionexists, and copies all text in absense of a selection. Likewise, the 'Save' commandsaves only the selected text to a file if a selection exists (and all text ifno selection exists).
Termite stores the configuration in an INI file (see the next section for thelocation of the INI file). This way, Termite remembers its settings betweensessions.
When distributing Termite, you may wish to include an INI file with pre-sets.You can run Termite directly off a CD-ROM, but the utility will not be ableto store its configuration in the INI file if the INI file resides on aread-only medium. A typical INI file is below.
Most of these settings can be chosen from the 'Settings' dialog. This meansthat to get an appropriate INI file, you can launch Termite, adjust the settings(including activating any plug-in filters that you wish to use),and voilà: you have your pre-configured INI file.
A few more configurations can be done by editing the INI file directly (using atext editor like Notepad). These are the keywords Caption
,TxColour
and RxColour
in the [Options]
topic. The Caption
item allows you to change the titlebar of the main Termite window. Add the item Caption
(below topic[Options]
) and set it to the string that you wish to have displayed—for example, the model name of the product for which you are distributing apre-configured Termite. The items TxColour
and RxColour
allow you to change the colours for transmitted and received text (from the defaultblue and green respectively). The syntax for the colours must be #rrggbb
,where rr
, gg
and bb
are two hexadecimaldigits. So for example, #FF0000
is bright red and #808000
is dark yellow.
Termite accesses the INI file from one of two directories, depending on thestart-up situation.
Most RS232 settings for a device can be chosen by the developer (the Baud rate andthe number of data and stop bits are usually determined by the other device). Onesetting that the developer cannot foresee, however, is what COM port theuser will attach it to. For this reason, Termite contains a 'port lookup' functionplus a simple 'port scanning' protocol.
The 'port lookup' function only works with virtual COM ports, such as USB-to-serialcables. Since Microsoft Windows has drivers pre-installed for USB devices simulatinga serial port, it is a popular design. To use the port lookup function,put the complete device name of the virtual COM port at the 'Port=
'setting. You can find the device names in the registry below the path'HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPSERIALCOMM
'.For example, for a common Prolific USB-to-serial cable, the setting in the INIfile might read: Need for speed most wanted save game ppsspp.
If using the device name of a serial port is not an option, for example, becauseyour hardware has a real serial port instead of a virtual one, you canalternatively use the 'port scanning' protocol. To activate this protocol, set'Port=0
' below the '[Settings]
' section. Port scanningchooses the first port for which the two following conditions hold:
DTR
line, the remote device pullsDSR
up.Port scanning cannot be selected from the Settings dialog, youhave to edit the INI file to activate it.
The tests for port scanning are primitive. They do not check what device or programis hooked at the other end. The only thing that you know after a port scan is thatsomething is connected to the port and that no other program is currentlyusing that particular port.
In the old days, it had become common practice to connect the DTR
and DSR
pins in the connectors of the cable (sometimes even atboth ends). This is bad practice, because with such cables you cannot evendiagnose cable connection problems. Yet, such cables still exist, and the portscan may be fooled by it.
The DRT/DSR handshake usually works with USB-to-RS232 converter cables too.
The MIDI protocol is essentially the RS232 protocol over a current-loop physicallayer and with a Baud rate of 31250 bps —for details, see the article'A MIDI to RS232 adapter'.
Likewise, DMX512 is essentially the RS232 protocol over an RS485 physical layerand with a Baud rate of 250,000 bps.
Termite presents you with a list of standard Baud rates, but it allows you toenter different values. The key issue is that the RS232 hardware must supportthe Baud rate that you select. All RS232 hardware and all USB-to-RS232 converterplugs support the standard Baud rates, but only few support non-standard Baudrates. We have tested non-standard Baud rates successfully with USB-to-RS232converters based on the FT232R chips from FTDI.
You can use Termite to put a PC (or laptop) between two systems and monitor theirRS232 communication. The PC or laptop that Termite runs on must have two RS232ports. Instead of connecting both systems together, you connect both with thePC that runs Termite. Then, you have to choose one port as the primary port andthe other as the 'forward' port, see the Settingsdialog of Termite.
With forwarding set up, all data received on the primary port is transmittedthrough the forward port. All data received on the forward port is transmittedthrough the primary port. The 'sent/received colouring' of Termite is also stillin effect: data received on the primary port is in green and data received on thesecondary port is in blue.
In this configuration, Termite would typically only be used to monitor thecommunication between two devices. If you type in text on the edit line andtransmit it, this text is only sent through the primary port.
In the above diagram, Termite runs on a computer that sits between two othersystems/devices. If one of these systems is also a computer (running MicrosoftWindows), the set-up may be simplified by running Termite on that system. Thedual RS232 port needed for Termite may be replaced by a virtual COM port pair,such as the com0comnull-modem emulator.
A virtual null-modem creates two ports that exist only in software. Any datapresented to one port of this pair is retransmitted at the other port —the sameas how port forwarding works in Termite. If you connect an application to oneport of the pair and Termite to the other port, the application now talks toTermite. When Termite is then configured to forward transmitted/received datato a physical port (to which the other system is connected), the two systemscommunicate as before and Termite intercepts all data.
Plug-in filters allow you to extend Termite in several ways:
On start-up, Termite collects all plug-in filters that are in the same directoryas the Termite application itself. You can enable and disable a filter in theSettings dialog of Termite (see above). Installing a filter is thereforea mere matter of copying the file to the correct location and enabling it.
Optionally, filters may have their own configuration options. Termite launchesthe filter's configuration dialog when the filter is enabled. To access theconfiguration dialog of a filter that is already enabled, double-click on thefilter name (you must double-click on the name, not on the 'check box').Typically, a filter stores its configuration in the same INI file as the oneTermite uses (Termite passes the path to this INI file to the filter when itloads the filter).
Technically, a filter is a DLL with a few special functions (of which only oneis mandatory). The filename extension must be '.flt' instead of '.dll' for afilter. In the Settings dialog, Termite uses the filename minus the '.flt'extension for the filter name. See the short documentWriting plug-in filters for Termitefor details on writing filters. To get you started, the sample filters 'Timestamp','Hexadecimal View' and 'Status LEDs' come with full commented C source code.
If you wish to translate Termite (or correct translations), first get thedocument 'How to translateTermite'. The process is simple, and requires only a simple text editor.
If you wish, you can send the translated files to us (we will gladly accept them).Note that by sending us your translations, you license us to include them infuture versions of Termite.
I made Termite because I needed a utility for monitoring RS232 data coming fromthe hardware devices that we develop. We do that in-house, but devices regularlyneed to be monitored after installation.. at a customers site.. by our customers.Therefore, my design requirements were for the utility to be easy to set up, torun 'out of the box' with preconfigured settings, and to run directly from aCD-ROM or USB stick without requiring installation.
Over time, I added features that were needed for specific communication requirementsthat we stumbled upon, such as non-standard Baud rates, port forwarding, time-stampingreceived data and sending/receiving hexadecimal values. The last two items werelater removed from the utility itself, for the sake of keeping the basic utilitysimple, and added back as plug-in filters.
In case Termite is not what you are looking for, some alternatives are: