The following section describes information stored in specific modem registry keys that might help advanced users correct problems with the commands that Windows 98 uses to control a modem. To identify modem problems, you can enable Windows 98 to create a Modemlog.txt file (as described in Chapter 21, "Modems and Communications Tools"), which contains responses to and from a modem when a connection was made. The Modemlog.txt file might indicate when Windows 98 is sending an incorrect command string to a modem, or when a response code is not being correctly interpreted. After consulting the documentation for the modem, you might be able to adjust the modem’s registry keys to restore proper operation.
Modem registry keys are stored under the following key:
HKEY_LOCAL_MACHINE
\System\CurrentControlSet\Services\Class\Modem
For each installed modem, Windows 98 creates one registry key (starting with \0000); additional subkeys, which contain AT commands that Windows 98 uses to initialize, dial, and answer the modem; plus other entries that communications and modem drivers use.
Some of the more important entries that you can use to correct or optimize modem operation are described in the following sections. The full set of modem registry keys and the INF file format are documented in the Microsoft Windows 98 Device Development Kit.
The multiple, modem-command string entries in the Init key initialize the modem before Windows 98 uses it. The name of each entry is its sequence number, starting with the number 1, and its data is the command that is sent to the modem. Usually, the Init key entry 1 is AT<cr>, which starts the modem. Init entry 2 usually contains &F or a similar command to restore the modem to its default settings. Subsequent Init key entries contain miscellaneous commands to configure the modem so it is compatible with Windows 98.
The Responses key contains strings that the modem might report to Windows 98 in response to a command or during the connection process. The name of each subkey is the text of a single modem response, and its data is a 10-byte binary value specifying the meaning of the response to Windows in a coded format. The first two characters (byte 0) specify the meaning of the response code, using one of the following values.
Value | Type | Description |
---|---|---|
00 | OK | The modem accepted the previous command. |
01 | Negotiation Progress | Status information about a new connection is being reported. |
02 | Connect | A call is connected; the modem is in data mode. |
03 | Error | The modem rejected the previous command. |
04 | No Carrier | The call was disconnected. |
05 | No Dial Tone | No dial tone is present. |
06 | Busy | The dialed modem is busy. |
07 | No Answer | The dialed modem did not answer. |
08 | Ring | There is an incoming call. |
1C | Blacklisted | The remote number does not answer as a modem. |
ID | Delayed | The user should wait before trying this call again. |
The second two characters (byte 1) specify information about a connection that is being made. It is used only for response codes of type Negotiation Progress or Connect, and is one of the following values.
Value |
Error control negotiated | Compression negotiated | Cellular protocol negotiated |
---|---|---|---|
00 | – | – | – |
01 | – | X | – |
02 | X | – | – |
03 | X | X | – |
08 | – | – | X |
09 | – | X | X |
0A | X | – | X |
0B | X | X | X |
The next eight characters (bytes 2 – 5) specify the modem-to-modem line speed negotiated in bits per second (bps). The characters represent a 32-bit integer, doubleword format (byte and word reversed). Common examples for this value include the following.
Bits per second | String |
---|---|
2400 | 60 09 00 00 |
9600 | 80 25 00 00 |
14400 | 40 38 00 00 |
19200 | 00 4b 00 00 |
28800 | 80 70 00 00 |
33600 | 40 83 00 00 |
56000 | C0 DA 00 00 |
The last eight characters (bytes 6 – 9) indicate that the modem is changing to a different port or Data Terminal Equipment (DTE) speed. Usually, this field is not used, because modems make connections at a "locked" port speed, regardless of the modem-to-modem or Data Communications Equipment (DCE) speed. However, for modems that support only "direct" modes, you can lower the DTE speed by specifying a negotiated DTE speed for a response code, using the same format as the DCE speed described in the preceding table.
The Settings key contains commands for configuring various modem settings. After the Init key commands are sent, Windows 98 builds a dynamic configuration command string by concatenating various entries shown in Table 31.16. The command string depends on the settings selected in the modem’s properties.
Table 31.16 Settings key entries
Subkey | Description | Example |
---|---|---|
Prefix | Configuration command prefix | AT |
Terminator | Configuration command suffix | <cr> |
DialPrefix | Dial command prefix | D |
Dial_Pulse | Use pulse dialing | P |
Dial_Tone | Use tone dialing | T |
Blind_Off | Detect dial tone before dialing | X4 |
Blind_On | Do not detect dial tone before dialing | X3 |
CallSetupFailTimeout | Specify call setup time-out | S7=<#> |
InactivityTimeout | Specify inactivity time-out | S30=<#> |
SpeakerVolume_Low | Low speaker volume | L1 |
SpeakerVolume_Med | Medium speaker volume | L2 |
SpeakerVolume_High | High speaker volume | L3 |
SpeakerMode_Off | Speaker always off | M0 |
SpeakerMode_Dial | Speaker on during dial and negotiation | M1 |
SpeakerMode_On | Speaker always on | M2 |
SpeakerMode_Setup | Speaker on only during negotiation | M3 |
FlowControl_Off | No flow control | &K0 |
FlowControl_Hard | Hardware flow control | &K1 |
FlowControl_Soft | Software flow control | &K2 |
ErrorControl_Off | Error control disabled (normal mode, not direct) | +Q6S36=3S48=128 |
ErrorControl_On | Error control enabled (auto reliable) | +Q5S36=7S48=7 |
ErrorControl_Forced | Error control required to connect (reliable) | +Q5S36=4S48=7 |
ErrorControl_Cellular | Cellular protocol enabled | \N3-K1)M1-Q1*H1 |
Compression_On | Compression enabled | S46=138 |
Compression_Off | Compression disabled | S46=136 |
Modulation_CCITT | Use CCITT modulations for 300 and 1200 bps | B0 |
Modulation_Bell | Use Bell modulations for 300 and 1200 bps | B1 |
SpeedNegotiation_Off | Connect only at default modem speed; do not fall back | N0 |
SpeedNegotiation_On | Use lower DCE speed to connect, if necessary | N1 |
To support the telephone answering machine functions of recording incoming phone messages and playing the messages back through the handset when there is no active call, you must use your modem INF file to put values in the different registry keys outlined in Table 31.17.
Table 31.17 Phone message record and playback registry keys
Registry key | Value |
---|---|
AbortPlay | Command that stops playing audio data immediately (does not play the rest of the audio buffer contents). This command is not used for modems that are not using a serial wave device. |
CloseHandset | Command that resets the modem to Class 0. |
HandsetSetPlayFormat | Command that sets the modem’s handset playback format. |
HandsetSetRecordFormat | Command that sets the modem’s handset recording format. |
LineSetPlayFormat | Command that sets the modem’s line playback format. |
LineSetRecordFormat | Command that sets the modem’s line recording format. |
OpenHandset | Command that puts modem in a mode that enables audio to be played back through the handset when there is no active call. |
StartPlay | Command that starts playing audio (wave files) out of the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud is set prior to the StartPlay command or after the StartPlay command. |
StartRecord | Command that starts recording audio (wave files) from the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud is set prior to the StartRecord command or after the StartRecord command. |
StopPlay | Command that can be used to reset the modem’s baud after an AbortPlay or TerminatePlay command. A bit in the VoiceProfile key indicates whether Unimodem/V has to reset the UART’s baud. |
StopRecord | Command that stops recording audio (wave files) from the modem. If a serial wave driver is being used, a bit in the VoiceProfile key controls whether the baud is set prior to the StopRecord command or after the StopRecord command. |
TerminateRecord | Command that causes the modem to finish recording its local buffer and stop recording audio data. This command is not used for modems that are not using a serial wave device. |
TerminatePlay | Command that causes the modem to finish playing the contents of its local buffer and stop playing audio data after that. This command is not used for modems that are not using a serial wave device. |