Help in Solving Your
Communications Problems: Part 2

by M. L. Giggleman

How to set up and control your modem

You can write a Doskey macro to automatically dial phone numbers. The macro is: DOSKEY /BUFSIZE=1024 DIAL=ECHO ATDT$1 $G COM1 $T PAUSE $T ECHO ATH $G COM1.

This line can be loaded from AUTOEXEC.BAT, the DOS command line or a batch file. Once loaded, use by typing DIAL at the DOS prompt followed by a space and the phone number: DIAL 1112345

When you hear the modem dial the number, pick up the phone. When you hear the phone ring, press any key to disconnect the modem.

For local numbers, the above setting for /BUFSIZE should be sufficient. This switch sets the DOSKEY command buffer size. But if you dial long distance numbers with access codes, it may not be sufficient. If this is the case, increase to 2048 or more as needed.

Checking the modem stored profile

Most modems have an area in memory where up to four phone numbers may be stored. You will need to obtain a status report from the modem to see if it can store phone numbers. This must be done in the communication software's terminal mode. The command could be run from the DOS prompt, but as mentioned above, the DOS command line is not capable of displaying the modem's response.

From the communication software's terminal mode (such as Windows TERMINAL), type: AT&V

You should see a lengthy status report that scrolls off the screen. At the end should be a heading "Telephone Numbers" with four blank settings (0 through 3).

Alternately, you could write a simple QBasic program that demonstrates sending an AT command to the modem and capturing the response both on screen and in a file.

REM SAVE AS PROFILE.BAS

OPEN "COM1:" FOR RANDOM AS #1

OPEN "profile.doc" FOR OUTPUT AS #2

count% = 1

PRINT #1, "at&v"

CLS

DO WHILE count% < 25

LINE INPUT #1, info$

PRINT info$

PRINT #2, info$

count% = count% + 1

LOOP

CLOSE

Storing phone numbers in the modem

You may store and dial four phone numbers in the modem NVRAM (non-volatile RAM) from the DOS prompt or from the terminal mode of your communications software.

The syntax to store a phone number is: AT&Zx = phone_number where x = location 0, 1, 2 or 3 and phone_number = phone number (up to 36 characters)

Notice that the four locations are numbered from 0 to 3.

To store the phone number 111-2345 to location 0: AT&Z0 = 111-2345.

To change a phone number, simply overwrite with a new number. For example, to change the number stored at location 0 from 111-2345 to 222-4567, just store the new number to location 0: AT&Z0=222-4567.

To delete a phone number, enter the AT&Zx command without a number following the equal sign: AT&Zx=.

For example, to delete the phone number stored at location 0: AT&Z0=.

Dialing phone numbers stored in the modem

Once the phone number is stored in the modem, it can be easily dialed from within the communication program or from a DOS prompt. To dial a stored number, the syntax is: ATDS=x where x is the location (0, 1, 2 or 3). To dial the number entered above in location 0, enter: ATDS=0.

Files on the HAL-PC BBS

The following nine files were uploaded to the HAL-PC BBS under the title NOV96MLG.ZIP (programs referenced in this article):

CALL.BAS - Simple QBasic program to dial a phone number.

PROFILE.BAS - Simple QBasic program to obtain modem stored profile.

FF.BAT - Batch file to eject page on printer using ECHO, DK_DIAL.BAT.

DOSKEY macro to enable phone dialing from DOS command line.

HAYES.TXT - Technical Reference for Hayes Modem Users, version 2.0. Downloaded from the Hayes BBS.

HAYESREF.HLP - Technical Reference for Hayes Modem Users as above, except in Windows Help format with hypertext. Downloaded from the Hayes BBS.

PRACCON.HLP - Practical Peripherals technical reference in Windows Help format. Downloaded from vendor BBS.

WW0645.TXT - Microsoft Product Support Services Application Notes 02/93. Information about serial communications in the Microsoft Windows operating system environment. Sections discuss basic and advanced concepts in serial communications (port addresses, device contention, etc.), common causes for serial communications difficulties, what to do once a problem has been identified, and troubleshooting.

PCM_AT.DOC - Jeff Prosise's excellent article on the AT Command Set from the 09/27/94 issue of PC Magazine.

M. L. Giggleman, a HAL-PC member, works contract as a Network Administrator/PC System Specialist. She has authored a series of technical tutorials on exploring the computer using DEBUG and is currently working on a "cookbook" of programs to test and troubleshoot computer systems and peripherals.


E-mail me at webmaster@hal-pc.org with any comments you have and tell me what you want to see here.

Back to the Magazine Home Page