Modifying the Serial Communications Test (Windows CE 5.0)
The Serial Communications Test executes the tux –o –d pserial
command line on default execution. You can modify the test by editing the command line. For information about how to edit the command line for a test, see Editing the Command Line for a Test. The following table shows the modifications you can make to the test.
To modify the Serial Communications Test
To | Add this command-line parameter |
---|---|
Specify a communications (COM) port where X is the number of the serial port. |
|
Run the test in master mode. |
|
Run the test in slave mode. |
|
Dump binary data. |
|
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 does not run on your development workstation while the Serial Communications Test runs.
The Serial Communications Test requires two Windows CE–based devices. One Windows CE–based device must run as a client with the -s parameter while the another Windows CE–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.
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.
When you use the -x parameter to select 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.
Note The test may abort if you run the test between a device running a desktop operating system (OS) and a Windows CE–based device. It is recommended that you use two Windows CE–based devices to run the test.
The following table shows the test cases for the Serial Communications Test.
Test case | Description |
---|---|
10 | Establishes communication between the Windows CE–based devices and synchronizes the devices. |
11 | Determines the set of serial port properties that the target device and development workstation have in common. |
12 | Checks serial port signals. |
13 | Checks serial port signals. |
14 | Checks serial port signals. |
15 | Checks serial port signals. |
16 | Checks serial port signals. |
17 | Checks the data read timeout options. |
18 | Checks the data write timeout options. |
19 | Checks serial port purging functions. |
20 | Evaluates XON/XOFF performance. This test case performs the following tasks:
This test case fails if communication with software flow control enabled is more than 25 percent slower than communication with software flow control disabled. |
21 | Evaluates the reliability of the XON/XOFF protocol. |
22 | Evaluates the opening and closing of ports. |
23 | Tests communication with TX empty. |
30 | Tests roundtrip loopback time and verifies data at 9600 baud. The master sends out the data and the slave returns it. |
31 | Tests roundtrip loopback time and verifies data at 19200 baud. The master sends out the data and the slave returns it. |
32 | Tests roundtrip loopback time and verifies data at 38400 baud. The master sends out the data and the slave returns it. |
33 | Tests roundtrip loopback time and verifies data at 57600 baud. The master sends out the data and the slave returns it. |
41 | Tests the transmission speed of a 1-byte buffer with a fixed timeout value. |
42 | Tests the transmission speed of a 2-byte buffer with a fixed timeout value. |
43 | Tests the transmission speed of an 8-byte buffer with a fixed timeout value.. |
44 | Tests the transmission speed of a 32-byte buffer with a fixed timeout value. |
45 | Tests the transmission speed of a 64-byte buffer with a fixed timeout value. |
46 | Tests the transmission speed of a 128-byte buffer with a fixed timeout value. |
47 | Tests the transmission speed of a 512-byte buffer with a fixed timeout value. |
48 | Tests the transmission speed of a 1024-byte buffer with a fixed timeout value. |
51 | Tests the reception speed of a 1-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
52 | Tests the reception speed of a 2-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
53 | Tests the reception speed of an 8-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
54 | Tests the reception speed of a 32-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
55 | Tests the reception speed of a 64-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
56 | Tests the reception speed of a 128-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
57 | Tests the reception speed of a 512-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
58 | Tests the reception speed of a 1024-byte buffer with a fixed timeout value. If the ReadFile function times out before the read operation completes, the function returns the bytes that had been read when the function timed out. |
Remarks
For test cases 20 and 21, the client receives data and controls the flow of data. The server transmits data and responds to the flow of data.
This test library can have one or more optional command-line entries to change the behavior of the test. To specify one or more optional command-line entries to the test library, you must use the –c
command-line option. This option forces Tux to pass the specified string into the test library.
The fixed timeout value for test cases 41-48 and 51-58 is 5000 milliseconds (ms).
The following is an example of PSerial test run. The location of the files may vary depending on the version of WinCE is installed and the installation.
- Compile test binary for Windows XP
From the NT Bowmore CEBase prompt
C:\Bowmore\private\test\common> build –c C:\Bowmore\private\test\drivers\Serial\BVT_API\pserial> build –c
From the CEPC Bowmore CEBase prompt
C:\Bowmore\private\test\common> build –c C:\Bowmore\private\test\drivers\Serial\BVT_API\pserial> build –c
- Execute the test
Connect COM2 of XP machine and COM2 of CEPC using a null modem cable
From XP machine, upload Bowmore image to CEPC using Platform Builder
On XP command prompt, execute:
tux -f result.txt -d pserial -c "-p COM2: -m"
On CE command prompt, execute:
s tux –o –d pserial –c "-p COM1: -s"
Note Even though you connect COM2 of CEPC to COM2 of the XP machine, you must use COM1 as the input test parameter on the CE side. WinCE reserves the physical COM1 for debugging purpose and remaps the physical COM2 to COM1.
See Also
Send Feedback on this topic to the authors