Automated Modem Testing - Sample Script: ModemScript.pts

<< Click to Display Table of Contents >>

Navigation:  Examples and Tutorials (Scripting) >

Automated Modem Testing - Sample Script: ModemScript.pts

The Docklight script ModemScript.pts and the accompanying project file ModemATCommands.ptp demonstrate how to use a Docklight script for an automated test or configuration task with user interaction.


The project file uses the communication settings listed below. This should work for most standard modems.


Communication Mode


Send/Receive on comm. channel


COM Port Settings

9600 Baud, No parity, 8 Data Bits, 1 Stop Bit


Getting started


Connect the modem to an available COM port, e.g. COM1, and switch it on. The demo may also run on a notebook with a built-in modem. In many cases you will find your notebook's built-in modem on COM3, so you can try and run the sample script without modifying the project settings.

Go to the PROPERTIES Project Settings... dialog and make sure you have selected the same COM Port for Send/Receive on comm. channel.

Press the Startscript_new Run Script button in the toolbar.

Type in the AT command range to be tested, or simply accept the default value by pressing Enter.


The script now establishes a connection with the modem and runs through the AT command set. After successfully completing the test run, the Docklight communication window could look like this:


Waiting for modem ...


3/8/2009 16:23:08.870 [TX] - ATQ0V1E0<CR><LF>


3/8/2009 16:23:08.873 [RX] - ATQ0V1E0<CR>




Checking AT command set...


3/8/2009 16:23:08.888 [TX] - ATI0<CR><LF>


3/8/2009 16:23:08.891 [RX] - <CR><LF>

Agere SoftModem Version 2.1.46<CR><LF>




3/8/2009 16:23:09.091 [TX] - ATI1<CR><LF>


3/8/2009 16:23:09.101 [RX] - <CR><LF>



3/8/2009 16:23:09.293 [TX] - ATI2<CR><LF>


3/8/2009 16:23:09.294 [RX] - <CR><LF>



3/8/2009 16:23:09.496 [TX] - ATI3<CR><LF>


3/8/2009 16:23:09.498 [RX] - <CR><LF>

Agere SoftModem Version 2.1.46<CR><LF>




3/8/2009 16:23:09.700 [TX] - ATI4<CR><LF>


3/8/2009 16:23:09.702 [RX] - <CR><LF>

Built on 07/22/2004 14:50:10<CR><LF>




3/8/2009 16:23:09.901 [TX] - ATI5<CR><LF>


3/8/2009 16:23:09.912 [RX] - <CR><LF>

2.1.46, AMR Intel MB, AC97 ID:SIL REV:0x27, 06<CR><LF>




3/8/2009 16:23:10.104 [TX] - ATI6<CR><LF>


3/8/2009 16:23:10.110 [RX] - <CR><LF>



3/8/2009 16:23:10.308 [TX] - ATI7<CR><LF>


3/8/2009 16:23:10.315 [RX] - <CR><LF>

AMR Intel MB<CR><LF>




3/8/2009 16:23:10.510 [TX] - ATI8<CR><LF>


3/8/2009 16:23:10.513 [RX] - <CR><LF>

AC97 ID:SIL REV:0x27<CR><LF>




3/8/2009 16:23:10.713 [TX] - ATI9<CR><LF>


3/8/2009 16:23:10.723 [RX] - <CR><LF>





3/8/2009 16:23:10.916 [TX] - ATI10<CR><LF>


3/8/2009 16:23:10.921 [RX] - <CR><LF>



3/8/2009 16:23:11.119 [TX] - ATI11<CR><LF>


3/8/2009 16:23:11.120 [RX] - Description                         Status<CR><LF>

---------------                     ------------<CR><LF>

Last Connection                     Unknown<CR><LF>

Initial Transmit Carrier Rate       0<CR><LF>

Initial Receive  Carrier Rate       0<CR><LF>

Final   Transmit Carrier Rate       9600<CR><LF>

Final   Receive  Carrier Rate       9600<CR><LF>

Protocol Negotiation Result         NONE<CR><LF>

Data Compression Result             NONE<CR><LF>

Estimated Signal/Noise Ratio   (dB) 00<CR><LF>

Receive  Signal Power Level  (-dBm) 00<CR><LF>

Transmit Signal Power Level  (-dBm) 10<CR><LF>

Round Trip Delay             (msec) 1000<CR><LF>

Near Echo Level              (-dBm) 00<CR><LF>

Far  Echo Level              (-dBm) 00<CR><LF>

Transmit Frame Count                0<CR><LF>

Transmit Frame Error Count          0<CR><LF>

Receive  Frame Count                0<CR><LF>

Receive  Frame Error Count          0<CR><LF>

Retrain by Local  Modem             0<CR><LF>

Retrain by Remote Modem             0<CR><LF>

Rate Renegotiation by Local  Modem  0<CR><LF>

Rate Renegotiation by Remote Modem  0<CR><LF>

Call Termination Cause              0<CR><LF>

Robbed-Bit Signaling                0<CR><LF>

Digital Loss                   (dB) 00<CR><LF>

Remote Server ID                    NA<CR><LF>




3/8/2009 16:23:11.441 [TX] - ATI12<CR><LF>


3/8/2009 16:23:11.443 [RX] - <CR><LF>



3/8/2009 16:23:11.643 [TX] - ATI13<CR><LF>


3/8/2009 16:23:11.654 [RX] - <CR><LF>



3/8/2009 16:23:11.846 [TX] - ATI14<CR><LF>


3/8/2009 16:23:11.852 [RX] - <CR><LF>




Found 13 valid AT commands.

2 AT command(s) did not work.