The magazine of the Melbourne PC User Group

Using HyperTerminal To Diagnose Internet
Connection Problems
 
Kevin Dempster
dempk@melbpc.org.au

Many Internet users have problems with their connections caused by slow speeds, unexpected disconnections, failed dial-up attempts and other faults. Not having sophisticated diagnostic tools and special skills it is often difficult for folk to ascertain what is causing their problem. HyperTerminal, packaged with Windows, can be used with many of the dial-up modems now in use to obtain certain information regarding a connection after it is terminated. Conveniently, the modem stores information about the last call and using HyperTerminal we can easily interrogate the modem.

The method involves a few steps to set up, so I have endeavoured to indicate with screen shots how to achieve a link on the Windows Desktop to make connection details readily available.
 
I expect these instructions to work with Netcomm and USRobotics modems and they may also be used with a number of others. You may have to consult your particular modem handbook or user guide in order to determine the appropriate interrogation codes for your modem.
 
Which COM Port?

The first step involves determining the communications (COM) port to which your modem is connected.

Figure 1 below shows three windows in one screen dump. Work through this by opening the modem setup program, (Click on
Start | Settings | Control Panel), then left-click the Modems icon. Ensure the modem you are currently using is highlighted, then left-click Properties. Note the Port number. In figure 1 it is COM Port 3. Now click OK and Close, and then close the Control Panel window.


Figure 1.

Establishing a Link
 
We will now set up a HyperTerminal link. Click on
Start | Programs | Accessories. If you are using Win95 click on HyperTerminal. If you are using Win98 you will find it under Accessories |Communications. In the C:\Program Files\Accessories\HyperTerminal window double-click on HYPERTRM.EXE. A new Connection Description window will open. Enter a name for your New Connection. Let's use direct as you will be issuing commands "direct" to the modem (Figure 2).


Figure 2.

After you click OK, the connect to window will open. This may already have your particular modem selected and may be waiting for you to enter a phone number. Ignore that. Click on the drop down list box connect using and select the previously established COM port (Figure 3). Click OK to continue and the Port Settings window will appear (Figure 4). Change the "bits per second" setting to 57600, leave the others as they are and click OK.


Figure 3.



Figure 4.

Talking To the Modem
 
You will now have a blank HyperTerminal window with a blinking cursor in the top left corner. Anything you type in here will be sent directly to the modem. This is where you begin the interrogation. You should now be able to use any of the standard "AT" commands, and some that you may find are specific to your particular modem.
 
Type AT and press {enter}. The AT can be either upper or lower case (but they must be the same case). If you see the response "OK", then so far all is well (Figure 5). If you see the OK but your command (ie. the "AT" that you typed) didn't appear on screen, it probably means that "echo" is set off. You can set echo on by typing ATE1 and {enter}. When echo is turned on your commands are echoed back from the modem and this should ensure that both your commands AND the responses from the modem are visible on screen.
 
Now type a number of commands: ATI1 {enter}, ATI2 {enter}, ATI3 {enter}, and so on, to see some of the statistics of your modem (Figure 6).


Figure 5.



Figure 6.

This modem is a Netcomm with Lucent chip v90 shown at ATI3, and the driver is version 5.66 shown at ATI5. There are many manufacturers and styles of modem and some have quite different commands and responses, so you may need to do some reading to learn your particular modem's features. Some manufacturers provide very good manuals, often available on their Web sites - sometimes on the installation CD - with detailed lists of the AT commands and the expected responses; some do not. AT commands can also be used to change settings in your modem, so be sure to read the user guide/manual.


Figure 7.

You have now established and tested a link between your computer and the modem and interrogated it. You can close the HyperTerminal window and come back to it later. When asked do you wish to disconnect, answer Yes (Figure 7) and when asked do you wish to save the session "direct", answer Yes.

Now there will be a new icon in the HyperTerminal window called "direct.ht". Using the right mouse button, drag the icon to the Desktop to create a shortcut there (Figure 8).


Figure 8.

Using It In Anger 

After and Internet session click on the desktop shortcut to direct.ht and in the HyperTerminal window type ATI11 and press {enter}. This will produce a HyperTerminal screen output similar to the information shown in Figure 9.

The "Call Termination Cause" is reported there as a number, which indicates the cause of the disconnection. That cause might be determined from the following list, although again, different modems may have different codes.

0
1
2
3
4
Local modem command
Remote modem
No answer, busy, etc.
Training failure V.90, K56 or V.34
Protocol failure

HyperTerminal retains this and other information so that after a series of connections a history is available. It will enable comparison of your results over a number of Internet sessions and in the case of unexpected disconnections, may well lead to the discovery of the cause.

Other modems may respond to varied commands and produce different results, details of which you should be able to obtain from your modem's users guide. Commands worth trying are ATI5, ATI6 and AT&V1.


Figure 9.

Reprinted from the August 2002 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]