This project is read-only.
Project Description
A suite of serial port test apps to test streaming packets from one serial port to another on the same device.Target systems are ARM and x86 Compact 2013 and 7.


These tests arose during the development of a Windows Embedded Compact system that sends commands to peripherals over serial ports. The peripherals asynchronously send messages back at random times, not necessarily in response to the commands. The serial communications have no handshaking, soft or hard. Also there is no message acknowledgement, no keep-alive nor heartbeat messages. Hence the serial communications need to intrinsically be reliable.

These apps stream packets from one serial port to another (or the same port via a loopback) on the same device to test the reliability of the ports. Command line options set options such as BAUD rate, serial timeouts and packet length. The packet length can be fixed or sequentially in order, range from one byte to a specified maximum, then repeat. Received packets are compared to that sent for verification.

The apps are Native Code C++ or Managed Code (C#).
  • The Native Code app is synchronous in that after a transmission it blocks waiting for the reception.
There are three Managed Code apps: (Not in version 1.00 .. coming)
  • Synchronous as per the Native Code app.
  • Synchronous as well, but PInvokes Win32 serial code
  • Asynchronous in that the reception is in a separate thread to the transmission. The transmission waits for signal from the receiver before sending another packet.

The apps are designed for a headless system and will typically be run over Telnet. It is suggested that the target test system operating systems include Telnet and FTP.

Loopback and Com Port Bridging

With a loopback test, only one Com port is used. The transmit signal Tx is directly connected to the receive Rx signal. The test writes to and reads from the same serial port. A Com Port bridge, connecting 2 Com ports, is used when testing between two ports.

On many development systems one or more RS232 Com ports are available as DB9 connectors. A loopback can easily be created with a DB9 connector that plugs into on board DB9 by connecting pins 2 and 3. A Comport bridge is similarly implemented using two DB9s connecting Tx on one to Rx on the other. Alternatively, development systems such as the BeagleBone Black present Com ports at TTL (3V3) levels in an expansion connector. Loopback or Com port bridges are simply implemented by jumpering two expansion pads with a wire.

A secondary app is also supplied for implementing loopback and bridges using a PC Host. This can assist with monitoring what is transmitted.

Last edited Sep 25, 2014 at 1:29 PM by DJonesEmbedded, version 14