Modem Tutorial - Setting Up Software

About Modem Tutorial
Copyright (c) 1991 Patrick Chen. All rights reserved.

Modem Tutorial Index

Setting Up Software To Work With High-speed Modems

Getting a high-speed modem is only half the battle. You will need to get it to work with your communications program. Most communications programs still come with settings configured for standard 2400 bps modems.

Since all 2400 bps modems are Hayes-compatible, it is relatively easy to set up the software. You simply install the software as if you had a Hayes modem. The software usually will work flawlessly. And you don't really have to worry about things like the initialization string.

Getting a high-speed modem to work with your software is a different story. There is no longer a Hayes standard that everyone follows. Here are some of the reasons why you need to know how to configure your high-speed modem to work with your communications program.

First, your high-speed modem may not be supported by your software.

Secondly, even if your software supports your high-speed modem, the software may not be set up properly.

Finally, even if your software is set up properly, the settings may not work all the times.

The Proper Software Setup

When we say that the software is set up properly, we mean that

  1. the modem is initialized properly by the communications software, and
  2. the settings of your software match those of the modem
What is the proper way to initialize a high-speed modem? In general, your modem needs to be initialized to: We'll use the ATI 9600etc/e modem as an example for our discussions below. The initialization string described here is for the ATI modem only. Refer to your modem manual for the equivalent initialization string for your modem.

The ATI modem is supported by two popular communications programs: Qmodem and HyperAccess 5. Qmodem initializes the modem and also configures itself to use hardware flow control. HyperAccess 5 also initializes the modem properly, however it does not configure itself to use hardware flow control.

All modems come with default settings pre-configured from the factory. Many V.32 high-speed modems are preset to use V.42bis and hardware flow control when they are turned on. This optimal configuration enables the modem to automatically negotiate a connection with either another V.32 modem supporting V.42bis or MNP protocols (or even a standard modem).

Interestingly enough, not all high-speed modems are configured this way. The ATI 9600 etc/e modem, for example, is preset to use V.32 without error control or data compression at power-on. (Why? Good question.)

As a result, your communications program needs to issue the appropriate initialization string (AT&F2) to set up the ATI modem to use V.32 with V.42bis and hardware flow control.

There is another change required. And it has to do with the parameters controlling how the modem deals with two of the RS232 signals: DTR (Data Terminal Ready) and CD (Carrier Detect).

CD is a signal generated by the modem which is used to indicate its connection status. DTR is a signal generated by your computer. DTR is used to enable the modem to accept commands from your communications program, it is also used by most modems to determine when to disconnect a call.

The factory default setting for DTR tells the modem to ignore change in DTR (&D0), and the setting for CD forces CD always on (&C0). These specific settings are required by some dedicated dumb terminals in order to communicate with the modem. (Virtually all modems use &C0&D0 as the default setting.) However, these settings will often cause problems when hanging up the phone lines or produce an error message which says the modem is online when it is not.

Most communications software programs expect the modem to follow DTR and expects CD to follow carrier. &C1&D2 set the parameters for the modem to handle the DTR and CD signals as expected by most communications programs.

Therefore, the proper initialization string to use for the ATI modem should be AT&F2&C1&D2.

Does Your Software Initialize the Modem Properly?

Let's take a look at the initialization strings used by Qmodem and HyperAccess 5 for the ATI 9600etc/e modem.

HyperAccess 5 use the following initialization string

This string is longer than the one we suggest. But does it do more? Actually it doesn't. Many of the commands in the string are redundant or not necessary. Only AT&F2&C1&D2 are crucial.

Four of the commands - E1, V1, Q0 and X4 - are redundant since they are duplications of the factory default settings. (Check your modem manual to find out what they mean. Since you would most likely need to read it sooner or later, you might as well get started now.)

L0 does not apply to the ATI modem. L0 normally is used to set modem speaker volume to the lowest level. However, the ATI 9600etc/e modem does not respond to the L0 command. Unlike most modems, the ATI modem has a slide volume control on the right side for adjusting the volume level.

The other two commands (W2 and S11=55) are not redundant, but they are not necessary.

W2 sets the modem to report Negotiation result codes in single line format instead of the default three line format (W1).

        Three line format:              Single line format:
        -----------------               ------------------
        CARRIER 9600                    CONNECT 9600/LAP-M
        CONNECT 38400
S11=55 (default is 95) sets the modem to dial at a faster speed than the factory setting.

Despite the fact that its initialization string contains some redundant commands, HyperAccess 5 does properly initialize the ATI modem.

Although HyperAccess 5 will initialize the modem with the string every time you dial a remote system, the program does not change the factory default settings for the ATI modem (which is V.32 without error control or data compression). Every time you turn the modem off and back on, the modem will revert to its factory defaults.

Unlike HyperAccess 5 (and other communications programs), Qmodem does it in a different way. It actually replaces the old factory default setting (AT&F) of the ATI modem with a new default configuration (AT&F2&C1&D2).

When you first install Qmodem to work with an ATI 9600 etc/e modem, the program sends the following two strings to the modem (make sure the modem is connected to your PC and is turned on):

The first string sets the modem as V.32 with V.42bis enabled, hardware flow control enabled (among other things). Note that ^M is equivalent to sending a Carriage Return to the modem.

The second string changes the factory settings of the CD and DTR (&C0&D0) and then write (&W) all the new active configuration settings to the nonvolatile memory of the modem. The new settings are now stored by the modem and become the new default configuration when the modem is powered on (or when it received the ATZ command).

Thus, Qmodem simply sends the initialization string "ATZ^M" (which resets the modem to its default state, now AT&F2&C1&D2) to the modem whenever you load the program.

Although the two programs use different techniques, the result is the same. The modem is initialized as V.32/V.42bis with hardware flow control enabled, which is normally the optimum setting.

Does Your Software Configure Itself to Match the Modem Settings?

Besides sending the right initialization string to the modem, the communications software will also need to match the modem setting. Specifically, the communications software should also use hardware flow control since the modem is initialized with hardware flow control enabled.

One would expect that when a software initializes the modem to use hardware flow control, the software itself would also use hardware flow control. But it is not always true. As we mentioned earlier, HyperAccess 5 initializes the modem with hardware flow control enabled, but expect you to change the flow control settings in each individual dialing entry.

Why You May Need to Change the Initialization String

In general, the string AT&F2&C1&D2 should work without any problem. But there is no guarantee that it will always work. When it does not work, you'll normally need to change the initialization string to solve the problems.

Here are a few reasons why the initialization string used by your communications program may not work:

  1. The settings need adjustments to work with the system you are calling.
    Case 1: When I called the Hayes BBS, the modem would abort and failed to make a connection. It turned out that the default setting (30 seconds) of the S7 register is not long enough for the ATI modem to make a connection with the Hayes Ultra 96 modem on the other end.

    Solution: To establish a connection to the Hayes BBS, I need to add "S7=60" to the modem initialization string and also change the setting in the communications software to wait 60 seconds for a connection.

    By initializing the modem with the string AT&F2&C1&D2S7=60, I was able to connect without any problem. (The default setting for the S7 register is not universal, the Hayes Ultra and Practical Peripheral use 50 seconds as the default value.) Note that there is nothing special about the number 60. In my particular case, any number larger than 45 will work.

    Case 2: When I call a system that uses the Telebit T1600 modems, I cannot make a connection if the ATI modem is set to use V.42bis or MNP-5. The ATI modem will only connect reliably when it is set to use MNP-4.

    Solution: To connect successfully, I have to set up the modem as V.32 with MNP-4 by sending the string AT&F1&U0 to the ATI modem. (AT&F1 sets the ATI modem as V.32 with MNP-5, &U0 turns off data compression.)

  • Your communication software may not be compatible with the setting. For example, America Online implemented an error-correcting scheme in the software (both the PC and the Mac versions) which is not compatible with the modem's error correction protocol.

    Solution: To use America Online, you need to turn off error control on the modem. AT&F configures the ATI modem as V.32 without error control.

  • Your computer hardware may not work with the setting. As I mention earlier, you need a properly wired cable for the Mac to use hardware flow control. If you do not have the right cable or if your Mac simply won't work with the cable, you will need to use software flow control. (&K4 tells the ATI modem to use software flow control.)

    Solution: To use the ATI modem in V.32/V.42bis mode with my Mac, I need to disable hardware flow control and use XON/XOFF software flow control instead. The string AT&F2&K4&C1&D2S7=60 sets up the modem properly (again, S7=60 is for calling the Hayes BBS).

  • You may need to change the setting to achieve better performance. It is advisable that you turn off MNP-5 while downloading pre-compressed files from a remote system that has a MNP-5 modem. You can initialize the ATI modem to turn off MNP-5 data compression with the string AT&F1&U0.

    Again, the initialization string used here is for the ATI modem only. If you use a different modem, you would need to check with the modem manual to find out the equivalent commands to use.

    Editing the Initialization String

    If the initialization string provided by your software does not work (or if your software does not support your modem at all), you'll need to edit the initialization string in your communications program.

    The modem initialization string consists of a series of commands (called the AT commands). They can be divided into three groups:

    1. 1. A capital character followed by a digit. For example, M1.
    2. 2. An ampersand & and a capital character followed by a digit. For example, &M1. Note that M1 is different from &M1.
    3. 3. Sr=n where "r" is the number of the register to be changed and "n" is the new value that is being assigned. For example, S7=60.

    There are some other characters that may also appear in the modem initialization string. These characters normally should not be changed.

    tells the modem that modem commands follow.
    resets the modem to default state
    makes your software pause for half a second. You can use more than one ~ in a row. For example, ~~~~ tells the software to pause two seconds.
    sends the terminating Carriage Return character to the modem. This is a control code that most communication software translate as a "carriage return."

    Let's assume that the appropriate initialization string to use is AT&F2&C1&D2S7=60 (for the ATI modem). You'll need to replace this string with the one provided by your communications software.

    If your software does not support your modem, you can install the program by telling it that you have a Hayes modem. After the installation, you'll simply edit the initialization string with the appropriate one. Please make sure you do not delete any ~ or ^M.

    Here are some examples,

    1. To change the string provided by Procomm Plus ATE1 S7=60 S11=60 V1 X1 Q0 S0=0^M
      Use the string
    2. To edit the string used by Telix
      ATZ^M~~~AT S7=45 S0=0 V1 X4^M
      change it to
    3. To replace the initialization string provided by ZTerm (Macintosh)
      ATE1M1 V1^M
      use the following string
      Match Software Settings To the Modem Settings

      Besides using the right initialization string, you also need to make sure that the settings in your communications program match those of the modem.

      Speed setting

      If you have a modem that supports data compression. You want to make sure that the speed setting for the entries in your dialing directory is the maximum throughput. Here are the general rules of thumb:

      For a V.32bis/V.42bis modem, set speed to 38400 or 57600 bps (check your modem manual).
      For a V.32/V.42bis modem, set speed to 38400 bps.
      For a V.32/MNP-5 modem, set speed to 19200 bps.
      For a V.22bis/V.42bis modem, set speed to 9600 bps.
      For a V.22bis/MNP-5 modem, set speed to 4800 bps.

      Note: Your computer may not be fast enough to work reliably at 38400 or 57600 bps. Also, the communications programs you use may not support speed higher than 19200 bps.

      Hardware flow control

      Note that you will need to configure your software to use hardware handshaking if the modem is initialized to use hardware flow control.

      Dialing Time-out Value

      Independent from your modem setting, your software may also impose a limit on how long it will wait for a connection. If you initialize the modem with the command S7=60, you'll need to change the time-out value used by your software to 60 seconds accordingly.

      Next Configuring Popular Communications Software to Work with High-speed Modems

      Modem Tutorial Index