Sunday 25 November 2012

Using a Null Modem Emulator for Testing


A recent application needed to send messages to an Epson DM-D110 display.  The device is connected via a serial cable.  My problem was I didn't have the device, or indeed even a serial port on my computer.  How to test sending data to a serial port?

Turned out there's a very simple solution, use a null-modem emulator.  This will, in effect, create 2 virtual serial ports and connect them.  Your application can then write to one port and you can use something like PuTTY to read the output from the other:

                         null modem emulator
      application ---> COM4 <----> COM5 --->PuTTY

I can now run my application and see the output (in PuTTY console) that would have been sent to the display.