Share via


Responses

Use Responses entries to specify the response strings that Unimodem is programmed to receive from the modem.

Note  The ProCalc tool, which is included in the Microsoft Windows Driver Kit (WDK), should be used to create this entry. For more information about ProCalc, see Using ProCalc. For more information about using ProCalc to create this entry, see Response State.

 

Format

A single entry that contains the exact response string, and a data structure that contains information about the response.

Examples

The following two examples demonstrate the use of Responses entry.

HKR, Responses, "<cr><lf>CONNECT<cr><lf>",    1, 02, 00, 00,00,00,00, 00,00,00,00

HKR, Responses, "<cr><lf>CONNECT 300<cr><lf>",     1, 02, 00, 2C,01,00,00, 00,00,00,00

Remarks

The binary data structure corresponds to the following C structure:

typedef struct MSS {
BYTE  bResponseState;
BYTE  bNegotiatedOptions;
DWORD dwNegotiatedDCERate;
DWORD dwNegotiatedDTERate;
};

The members of this structure are defined as follows:

  • bResponseState
    Indicates the type of response. Response types belong to one of the following three groups:

    1. Data/fax modem responses

    2. Additional voice responses

    3. Additional call control responses

The data/fax modem responses are listed in the following table.

Response description Response string bResponseState

The modem accepted the previous command

OK

0x00

Status information about a new connection is being reported

Negotiation Progress

0x01

A call is connected, the modem is in DATA mode

Connect

0x02

The modem rejected the previous command

Error

0x03

The call was disconnected

No Carrier

0x04

No dial tone is present

No Dialtone

0x05

The dialed modem is busy

Busy

0x06

The dialed modem did not answer

No Answer

0x07

There is an incoming call

Ring

0x08

Reserved for VoiceView responses

0x09-0x10

 

Additional Voice responses include:

Response description Response string bResponseState

Date reported by Caller ID - variable length response

Date

0x93

Time reported by Caller ID - variable length response

Time

0x94

Number reported by Caller ID - variable length response

Number

0x95

Name reported by Caller ID - variable length response

Name

0x96

Message reported by Caller ID - variable length response

Message

0x97

Reserved for Sierra Voice Modem

0x9B

 

Additional call control responses are listed in the following table.

Response description Response string bResponseState

The modem will not dial because there have been too many unsuccessful attempts (for example, Blocked, as per ETS 300 001)

Blocked

0x0000001C

The modem will not dial until after some time has elapsed, because there have been too many recent unsuccessful attempts (for example, Delayed, as per ETS 300 001)

Delayed

0x0000001D

 

Note   The VCON modem response should be entered as an OK response from the modem.

 

  • bNegotiatedOptions
    Specifies information about a connection being made. This value is used only for response codes of type Negotiation Progress or Connect. Unimodem recognizes the following values (which may be combined in a single response):

    Connection type bNegotiatedOptions

    Compression negotiated

    0x00000001

    Error control negotiated

    0x00000002

    Cellular protocol negotiated

    0x00000008

     

    The only valid values for this member are 0x01, 0x02, 0x03, 0x0a, and 0x0b, because compression is not used unless error correction is required.

  • dwNegotiatedDCERate
    Specifies a DWORD containing the modem-to-modem line speed, in bits per second, to be negotiated. For example, 300 bps is 0x0000012c, as indicated in the previous sample.

  • dwNegotiatedDTERate
    Specified only to cause Unimodem to change its DTE port speed. Generally setting this member is not required because modems make "normal" connections with automatic speed buffering and the port speed remains locked. However, for modems that support only direct modes, it is possible to cause Unimodem to lower its DTE speed by specifying this value. dwNegotiatedDTERate is specified in bits per second. For example, 300 bps is 0x0000012c.

The Responses entries contain all of the modem's response codes. Unimodem matches these entries to modem responses and uses the state information defined in the binary data structure to determine the meaning of the response.

Use ether verbose or numeric response strings in the Responses entries. Specify your verbose or numeric response choice in the Init entry and verify that the Responses entries match this Init setting. In addition, it is usually necessary to include entries for the following two response strings:

<cr><lf>OK<cr><lf>
<cr><lf>ERROR<cr><lf>

Numeric responses 0 through 8 might also need to be listed in case the modem gets into a numeric response state.

The modem may return these strings after Unimodem's first few initialization commands (before the modem is fully configured).

The response strings can contain the following macros:

Description Macro

Carriage Return

<CR> or <cr>

Line feed

<LF> or <lf>

Binary

<hxx> or <Hxx> where xx are two hex digits. Example: <h41> = 'A'.

Less-than escape

<<

 

See also

Init

 

 

Send comments about this topic to Microsoft