Partager via


Regular Serial Test (Compact 2013)

3/26/2014

The serial communications test verifies the functionality of serial communications on a Windows Embedded Compact-based device. The serial communications test evaluates basic functions, conducts stress tests, and tests hardware functionality.

The test requires two Windows Embedded Compact-based devices. One Windows Embedded Compact-based device must run as a client with the "-s" parameter while the other Windows Embedded Compact-based device runs as a server with the "-m" parameter. Each time you run this test, you must have one server and one client. The test does not support a server-to-server or client-to-client arrangement.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following tables show the hardware requirements for the Serial communications test.

Requirements

Description

A serial null modem cable and available serial ports.

A male-to-male null modem cable. A null modem cable differs from a standard serial cable in that it has its RX and TX lines crossed.

Two Windows Embedded Compact-based devices

You must connect the devices to each other with the null modem cable.

One or more serial ports available

At least one COM port must be available on both Windows Embedded Compact devices in order to run this test.

The following tables show the software requirements for the serial communications test.

Requirements

Description

Tux.exe

Tux test harness, required to execute the test.

Kato.dll

Kato logging engine, required for logging test data.

Pserial.dll

The serial communication test file.

Subtests

The table below lists the subtests included in this test.

SubTest ID

Description

10

Establishes communication between Windows Embedded Compact-based devices and synchronizes the devices.

11

Determines the set of serial port properties that the server and client have in common.

12

Performs a configuration test of the rates, data bits, parity, and stop bit, by using GetCommState to get the current DCB.

13

Checks WaitCommEvent on EV_CTS and EV_DSR by using EscapeComm function for RTS and DTR.

14

Checks WaitCommEvents for BREAK by using EscapeCommFunction. Checks WaitCommEvents for BREAK by using EscapeCommFunction.

15

Checks WaitCommEvents for EV_RXCHAR and EV_RXFLAG by using TransmitCommChar.

16

Tests the GetCommModemStatus function.

17

Tests the data read time-outs by using SetCommTimeouts to set the desired time-outs.

18

Tests the data write time-outs by using SetCommTimeouts to set the desired time-outs.

19

Determines whether PurgeComm stops a write operation.

20

Evaluates XON/XOFF performance.

21

Evaluates the reliability of the XON/XOFF protocol.

22

Evaluates the opening and closing of ports.

23

Tests WaitCommEvents with TX empty.

41

Tests the transmission speed of a 1-byte buffer with a fixed time-out value.

42

Tests the transmission speed of a 2-byte buffer with a fixed time-out value.

43

Tests the transmission speed of an 8-byte buffer with a fixed time-out value.

44

Tests the transmission speed of a 32-byte buffer with a fixed time-out value.

45

Tests the transmission speed of a 64-byte buffer with a fixed time-out value.

46

Tests the transmission speed of a 128-byte buffer with a fixed time-out value.

47

Tests the transmission speed of a 512-byte buffer with a fixed time-out value.

48

Tests the transmission speed of a 1024-byte buffer with a fixed time-out value.

1000

Stress test at baud 9600 for 100 iterations.

1001

Stress test at baud 19,200 for 100 iterations.

1002

Stress test at baud 38,400 for 100 iterations.

1003

Stress test at baud 57,600 for 100 iterations.

2000

Performance test at baud 9600.

2001

Performance test at baud 19,200.

2002

Performance test at baud 38,400.

2003

Performance test at baud 57,600.

Setting Up the Test

Prior to running this test, confirm that all serial cable connections have a cable for debug output and a cable for serial communications. Verify that the RAS server is not running on your development computer while the Serial Communications Test runs.

The flags for performance (-e) or stress (-t) must be added to the command line in order to run these test cases, even if you use the -x option to specify individual performance or stress test cases.

Running the Test

The serial communications test verifies the functionality of serial communications on a Windows Embedded Compact powered device. It evaluates basic functions, conducts stress tests, and tests hardware functionality.

Syntax

tux.exe -o -d pserial.dll [-c "[-p COMX:] [-x] [-m] [-s] [-g device] [-d] [-t iterations] [-e seconds]"]

Command line parameter

Description

tux.exe tuxparams

For information about the command-line parameters of the Tux test harness, see Tux Command-Line Parameters.

-c " … "

Specifies a list of test-specific parameters that Tux passes to the test DLL.

-p COMx:

Specifies a communications (COM) port to test, where COM is a literal string and 'x' represents the number of the serial port. For example: -p COM1: or -p COM2:

-x

Specifies individual test cases to run.

-m

Runs the test in master mode.

-s

Runs the test in subordinate mode.

-g device

Specifies the name of the serial device attached to the COM port being tested.

-d

Dumps binary data.

-t iterations

Specifies how many times to run a stress test. This parameter is required when running a stress test case.

-e seconds

Specifies how long to runs the performance test, measured in seconds. This parameter is required when running a performance test case.

Remarks

When using the Tux parameter -x to specify individual test cases, always include test cases 10 and 11. Test case 10 verifies the serial connection and the ability of the two devices to synchronize. Test case 11 determines what properties the two serial ports share and is required when running the other test cases.

Running the serial communications tests:

Use a Null Modem cable to connect the serial port of CEPC1 to the serial port of CEPC2.

Upload Windows Embedded Compact images to both the CEPCs using Platform Builder.

On the CE command prompt of CEPC1 execute the following command: s tux -o -d pserial.dll -c "-p COM1: -m"

If COM1: is not available use another COM port available, for example, COM2:

On the CE command prompt of CEPC2 execute: s tux -o -d pserial.dll -c "-p COM1: -s"

If COM1: is not available use another COM port available, for example, COM2:

You should run the test on the target device with the target device being the client and also with the target device being the server. Tests that succeed when the target device is the server may fail when the target device is the client.

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all subtests.

Troubleshooting the Test

If you encounters problems when running this test, some things to look are:

* Make sure the serial cables are connected through a null modem and known to be working.

* Make sure the serial ports under test are not being used by another process or application.

See Also

Other Resources

Communication Bus Tests