Click here to Skip to main content
15,441,149 members
Articles / Programming Languages / C#
Posted 15 Feb 2008

Tagged as


153 bookmarked

Termie: A Simple RS232 Terminal

Rate me:
Please Sign up or sign in to vote.
4.83/5 (46 votes)
13 Oct 2008BSD2 min read
Termie opens a serial port and allows you to communicate with it in a chat-like interface.


Termie opens a serial port and logs data received to a window. It is useful for embedded software development. It can also send data so it is actually a RS232 terminal with a chat-like interface.

An embedded system is a special-purpose computer such as a Wii, MP3 player, or cell phone. To develop for such a system, you need a development "kit" which allows you to download software and debug. Communication between your PC and the embedded system is often a serial cable (RS-232).

In my case, I get output from the embedded system (a game console) via an RS-232 cable. So if I want to see my printfs, I need a program that will display anything that comes in the COM port on my PC.


Termie is an open source clone of Termite from ITB CompuPhase.

What I liked about Termite is that it is simple and fast. Hyperterminal is clunky. I wanted something similar to Termite that was open source. Writing it in C# turned out to be easy; a weekend project. Once done, I can add new features as needed and get great suggestions here!


Settings are stored in an INI file in the application startup folder:



  • Multiple select, select all, and copy to the clipboard
  • Hex Output (not in Termite)
  • Output filter (not in Termite)
  • Partial line output (so you can see "..." one dot at a time)
  • Click status to close/open with current port settings
  • Toggle Scrolling button
  • Send File button
  • Color coded lines (green=received, blue=sent)
  • Send escape sequences (\n, \x7f)
  • Send history

Using the Code

System.IO.Ports has a SerialPort class that does everything we want. I wrapped it in a singleton class with delegates for status and data events.


  • February-2008: Original submission
  • March-2008: Added clipboard, output filter, hex output, monospace font, and all settings
  • May-2008: Added read thread, partial output, color coding, and "send file"
  • October-2008: Fixed thread bug, added history and escape sequences to send (\n, \x7f), and upgraded project files to Visual C# 2008 Express


This article, along with any associated source code and files, is licensed under The BSD License

Written By
Software Developer Buzz Monkey Software
United States United States
David McClurg is a game programmer from Oregon, USA. He is currently interested in C#, xna for zune, and steering behaviors. When not coding, David enjoys tennis, kayaking, and botany.

Comments and Discussions

Questionis termite is available in vc++ MFC ? Pin
Member 1253312228-Jul-18 0:37
MemberMember 1253312228-Jul-18 0:37 
QuestionCustom Pin
Member 1227470119-Jan-16 15:33
MemberMember 1227470119-Jan-16 15:33 
QuestionMy vote of 5! Pin
Steve Hageman18-Sep-15 18:07
MemberSteve Hageman18-Sep-15 18:07 
QuestionReading data from a RS485 port Pin
Bahram Ettehadieh2-Jul-13 6:40
MemberBahram Ettehadieh2-Jul-13 6:40 
QuestionClose? Pin
YDLU2-May-13 7:34
MemberYDLU2-May-13 7:34 
Why sometime the "Windows Form" not closed after click close button?
I think the "StopReading" is a block routine, when closing the form and still reading from comport, so the _readThread never could stop it.
Modified the code as
if (_keepReading)
_keepReading = false;
_readThread.Join(100); // teminate thread on 100ms until exits
_readThread.Abort(); // sure it happen
_readThread = null;

the form will close always.

modified 3-May-13 14:19pm.

QuestionTo plot a data Pin
Ananthinatesan18-Jan-13 22:39
MemberAnanthinatesan18-Jan-13 22:39 
QuestionFilter usage/syntax? Pin
Member 976553217-Jan-13 13:20
MemberMember 976553217-Jan-13 13:20 
QuestionIt works great! Pin
Member 388480229-Aug-12 7:35
MemberMember 388480229-Aug-12 7:35 
QuestionCOM port already in use Pin
Member 859645325-Jan-12 7:02
MemberMember 859645325-Jan-12 7:02 
Questiontermie Pin
silvio pontes10-Aug-11 18:24
Membersilvio pontes10-Aug-11 18:24 
AnswerRe: termie Pin
milkplus10-Aug-11 18:37
Membermilkplus10-Aug-11 18:37 
GeneralRe: termie Pin
ocaccy11-Aug-11 4:41
Memberocaccy11-Aug-11 4:41 
AnswerRe: termie Pin
silvio pontes14-Sep-11 14:51
Membersilvio pontes14-Sep-11 14:51 
GeneralFormatting string [modified] Pin
robert-t198320-Jan-11 3:42
Memberrobert-t198320-Jan-11 3:42 
GeneralRe: Formatting string Pin
milkplus20-Jan-11 5:44
Membermilkplus20-Jan-11 5:44 
QuestionTermie code? Pin
steve7606316-Aug-10 13:44
Membersteve7606316-Aug-10 13:44 
GeneralTransmit delay (char/line) Pin
Dragon2004_fr27-Jun-10 22:06
MemberDragon2004_fr27-Jun-10 22:06 
GeneralNon-standard Baud Rates Pin
CamCoder6623-Oct-09 12:29
MemberCamCoder6623-Oct-09 12:29 
GeneralRe: Non-standard Baud Rates Pin
CamCoder6623-Oct-09 12:32
MemberCamCoder6623-Oct-09 12:32 
GeneralRe: Non-standard Baud Rates Pin
milkplus23-Oct-09 12:48
Membermilkplus23-Oct-09 12:48 
GeneralRe: Non-standard Baud Rates Pin
Ukkie913-Feb-10 4:29
MemberUkkie913-Feb-10 4:29 
GeneralMoving cursor to the right one position (right arrow) Pin
Fernando Vargas22-Sep-09 7:01
MemberFernando Vargas22-Sep-09 7:01 
Questioncool~ Pin
nube0112-Sep-09 4:44
Membernube0112-Sep-09 4:44 
GeneralThanks for your greate work Pin
PBalaKumar2-Aug-09 16:16
MemberPBalaKumar2-Aug-09 16:16 
GeneralHEX output. Pin
nathanteepee24-Jul-09 19:32
Membernathanteepee24-Jul-09 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.