Testing a Modem - Sample Project: ModemDiagnostics.ptp

Top  Previous  Next

The Docklight project ModemDiagnostics.ptp can be used to perform a modem check. A set of modem diagnostic commands are defined in the Send Sequences list.

 

This is a simple example for Testing a serial device or a protocol implementation. The sample project uses the communication settings listed below. This should work for most standard modems.

 

Communication Mode

Send/Receive

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 demo 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 play Start Communication button in the toolbar.
Try sending any of the predefined modem commands by pressing the Pt_Send_Button Send button

 

You should now receive a response from your modem, e.g. "OK" if your command was accepted, a model identification number, etc. The response will vary with the modem model.

 

After sending several sequences, the Docklight communication window could look like this:

 

3/8/2009 15:00:44.034 [TX] - ATQ0V1E0<CR><LF>

 

3/8/2009 15:00:44.040 [RX] - <CR><LF>

OK<CR><LF>

 

3/8/2009 15:00:44.608 [TX] - AT+GMM<CR><LF>

 

3/8/2009 15:00:44.610 [RX] - <CR><LF>

H.324 video-ready rev. 1.0<CR><LF>

<CR><LF>

OK<CR><LF>

 

3/8/2009 15:00:45.049 [TX] - AT+FCLASS=?<CR><LF>

 

3/8/2009 15:00:45.060 [RX] - <CR><LF>

0,1,8<CR><LF>

...

 

Further Information

 

The Send Sequences list includes the following standard AT modem commands:

 

Send Sequence

Description / Modem Response

ATQ0V1E0

Initializes the query.

AT+GMM

Model identification (ITU V.250 recommendation is not supported by all modems).

AT+FCLASS=?

Fax classes supported by the modem, if any.

AT#CLS=?

Shows whether the modem supports the Rockwell voice command set.

ATI<n>

Displays manufacturer's information for <n> = 1 through 7. This provides information such as the port speed, the result of a checksum test, and the model information. Check the manufacturer's documentation for the expected results.

 

The \Samples folder also contains a log file ModemDiagnostics_Logfile_asc.txt. It shows a test run where the above Send Sequences were sent to a real modem.