Command and Data Modes (modem) - Data Link Escape (DLE) Messages

Data Link Escape (DLE) Messages

For normal dial-up data communications, modems enter data mode only once - starting when the session connects, and ending when the session disconnects. However, when modems are used for fax and voice (audio) communication, they rapidly switch between command and data modes several times during a call. This is because the role of the modem changes more frequently - rather than simply handing bytes from point A to point B, it is either negotiating parameters and pages with a fax machine, or switching between recording, pausing, and playback audio modes.

In fax and voice data modes, sometimes events occur that the modem wishes to signal to the computer regardless of whether it's in command or data mode. An example of such an event is a caller pressing a touch-tone key in voice mode. Other common DLE messages are notifications from the modem that data was lost because the computer is sending data either too slow or too fast, or that the modem hears an unexpected dial-tone on the line (meaning the caller probably hung up), or that the extension handset was picked up or hung up.

This type of event is signalled with a DLE message, which is a single-character message preceded by a Data Link Escape code. DLE is a character sent from the modem to the computer whose definition is unrelated to either command or data mode, and which uses a specific ASCII code (0x10) which never occurs in any AT commands or responses, so that it can be isolated from the command/response stream on that merit alone. In these modes, whenever a DLE (0x10) is sent, the character following it has a special non-command and non-data meaning. For example, a DLE followed by the number 2 means the caller pressed the number 2 on his telephone keypad. This could happen in either command or data mode so long as the phone line is in use by the modem and someone is on the other end of the line.

Of course, the DLE character could legitimately appear in fax or audio data. For this, a special exception is made: two DLE's in a row means "interpret one literal byte 0x10".

DLE is also used lightly in communication from the computer to the modem. One specific DLE event signals the end of a fax page, or the end of an audio file. That event returns the modem back into command mode. Unlike in standard dial-up data mode, dropping DTR isn't an appropriate way to resume command mode since a hangup is not desired, and an escape code with mandatory pauses isn't suitable either. Because of this, literal 0x10 bytes in data are doubled from the computer to the modem as well.

DLE is never used in standard modem-to-modem data modes such as the one used for dial-up Internet access, at least not by the modem itself. In these modes, DLE is passed over the line just like any other character. DLE (and DLE-escaped messages) are only used by a modem for fax and voice applications, when it is specifically placed in a fax or voice mode.

Read more about this topic:  Command And Data Modes (modem)

Famous quotes containing the words data, link, escape and/or messages:

    To write it, it took three months; to conceive it three minutes; to collect the data in it—all my life.
    F. Scott Fitzgerald (1896–1940)

    I know that there are many persons to whom it seems derogatory to link a body of philosophic ideas to the social life and culture of their epoch. They seem to accept a dogma of immaculate conception of philosophical systems.
    John Dewey (1859–1952)

    It is always fair sailing when you escape evil.
    Sophocles (497–406/5 B.C.)

    Joan: I hear voices telling me what to do. They come from God. Robert: They come from your imagination. Joan: Of course. That is how the messages of God come to us.
    George Bernard Shaw (1856–1950)