<< First | < Previous | > Next | >> Last

5. FAX CLASS 1

5.1. FAX I/O PROCESSING

The fax I/O interface uses the SoftModem I/O API as with data mode. Both transmit and receive data are buffered. Flow control using XON/XOFF (DC1/DC3) or RTS/CTS is provided.

Unique control character strings are identified, filtered, or reinserted into the I/O data stream. These control characters and their resultant action are described below.

5.1.1. DTE-to-Modem Transmit Data Stream

Characters Detection Action Taken
<DLE><data> Delete <DLE><data> characters
<DLE><ETX> Recognize as a string terminator and take appropriate action
<DLE><DLE> Replace with single <DLE> character.

5.1.2. Modem-to-DTE Receive Data Stream

Characters Detection Action Taken
<DLE> Insert extra <DLE> ahead of <DLE>.

The modem also identifies the end of a frame by inserting <DLE><ETX> into the data stream after the FCS bytes.

5.1.3. Fax Mode Selection

Fax class 1 commands are identified in Table 5-1. Fax modes and rates are determined by the AT+F commands as described in Section 5.2.

Table 5-1. Fax Class 1 Commands
Command Function
+FCLASS= Set Service Class
+FTS=n Stop Transmission and Wait
+FRS=n Receive Silence
+FTH=n Transmit Data with HDLC Framing
+FRH=n Receive Data with HDLC Framing
+FTM=n Transmit raw fax data
+FRM=n Receive raw fax data
+FPR=n Set DTE-DCE Fax port rate
+FLO=n Set DTE-DCE Fax flow control
+FMM? Product Identification
+FMR? Version/Revision Information
+FMI? Manufacturer Identification

5.1.4. Fax Origination

Origination of fax calls is made using the ATD command. Upon completion of the dial function, a calling tone at 1100 Hz is transmitted, with a cadence of 0.5 seconds on and 3 seconds off. The modem automatically enters mode +FRH=3 and sends the CONNECT message when FSK flags are detected from the remote.

5.1.5. Fax Answering

Answering of fax calls is identical to answering of data calls with the exception that SoftModem enters the fax handshaking mode instead of the data handshaking mode after going off-hook.

If +FAE=0, after SoftModem sends the answer tone, it automatically enters fax mode (+FTH=3), sends the CONNECT message to the DTE, and starts sending FSK flags.

If +FAE=1, SoftModem determines whether the caller is a data modem or fax modem and sends the DATA or FAX result code, respectively, to the interface.

5.1.6. Fax Control Transmission

Fax control transmission is initiated by the +FTH=n command. After this command is issued, SoftModem generates the CONNECT message and transmits carrier in the modulation scheme specified by the parameter n. The modem then transmits HDLC flags for a minimum of 1 second. The modem continues to transmit the HDLC flags until it receives a character from the interface.

When characters are received from the DTE, SoftModem adds start and end flags, performs zero-bit insertion, generates FCS, and deletes <DLE><chr> character pairs before transmitting the characters to the remote fax machine. Each <DLE><DLE> sequence is transmitted as a single <DLE>. <DLE><ETX> is considered as the end of frame marker and is not transmitted. All data received from the DTE after <DLE><ETX> is ignored by SoftModem until SoftModem generates either the CONNECT, OK, or ERROR result code.

If no more data is in the transmit buffer and the final bit was a 1 (bit 4 of the second byte received from the DTE), SoftModem generates the OK result code and returns to the command mode. If the final bit was a 0, SoftModem generates the CONNECT message and waits for further data from the DTE while transmitting HDLC flags. If no more data is received before 5 seconds elapse, SoftModem drops carrier, goes on-hook, and generates the ERROR result code.

5.1.7. Fax Control Reception

Fax control reception is initiated using the AT+FRH=n command. After this command is issued, SoftModem looks for carrier in the modulation scheme specified by the parameter n. If no carrier is detected before the period of time specified by register S7 expires, SoftModem generates the NO CARRIER message and returns to command mode. If a carrier is detected that is not the one specified by the parameter n, SoftModem generates the +FCERROR message and returns to the command mode. If the specified carrier is detected, SoftModem generates the CONNECT message and enters the HDLC receive mode.

In HDLC receive mode, SoftModem receives HDLC frames from the remote fax machine, strips the flags, performs zero-bit deletion, performs error checking, and handles <DLE><chr> character pairs before passing the data to the DTE. The modem prefixes each <DLE> character with another <DLE> character before sending it to the DTE. After the last byte in the frame, SoftModem sends <DLE><ETX> to the DTE marking the end of the frame. The modem then generates either the OK message if no errors were detected or the ERROR message if errors were detected (FCS is incorrect), and returns to command mode.

While in command mode, SoftModem continues to receive data in the selected modulation scheme, and sends the data after sending the CONNECT message to the DTE when the DTE reissues the +FRH command with the same parameter. If the DTE issues the +FRH command with a different parameter, SoftModem clears all buffers and proceeds as described previously.

If carrier is lost while in command mode and the DTE reissues the +FRH command with the same parameter, and there is no data in the buffer, the modem sends the ERROR result code to the DTE and returns to the command mode. If there is data in the buffer, SoftModem sends the next frame of buffered data to the DTE, followed by <DLE><ETX>, and either the ERROR result code if errors were detected or the OK result code if no errors were detected. The modem then returns to command mode.

The modem concludes an error is detected if carrier is lost for any period of time during or before the reception of a frame. If carrier is lost for a time period longer than timeout, SoftModem finishes delivering the data in the receive buffer (if any) to the DTE, sends <DLE><ETX>, generates the ERROR message, and returns to command mode. All subsequent data received from the remote is discarded.

If SoftModem detects a frame abort sequence (seven consecutive ones with no zero insertion) while it is waiting for a frame beginning flag (it was receiving HDLC flags), it will wait for the HDLC flags again until either carrier is lost, or the DTE aborts the process by sending an abort character or by dropping DTR with &D2 in effect. If the frame abort sequence is detected while SoftModem is receiving a frame it finishes delivering the data in the receive buffer (if any) to the DTE, sends <DLE><ETX>, generates the ERROR message, and returns to command mode. The modem keeps looking for HDLC flags followed by more data from the remote, with the selected modulation scheme.

If SoftModem detects a receive buffer overflow condition, it concludes that there was an FCS error in that frame. The modem will receive more frames only if a starting flag is detected and there is room in the receive buffer. If a starting flag is detected and there is no room in the buffer, SoftModem discards all data in that frame.

If SoftModem receives any character from the DTE after the +FRH command (except flow control characters if software flow control is in effect), or if SoftModem detects a high-to-low transition of the DTR signal while &D1 is in effect, it sends <DLE><ETX> to the DTE, generates OK result code, and returns to command mode. The receive buffer is cleared and all data received from the remote is discarded. If SoftModem detects a DTR drop while &D2 is in effect, it goes on-hook, sends <DLE><ETX> to the DTE, generates OK result code, and returns to command mode. If SoftModem detects a DTR drop while &D3 is in effect, SoftModem performs a warm reset.

5.1.8. Fax Data Transmission

Fax data transmission is initiated by the AT+FTM=n command. After this command is issued, SoftModem generates the CONNECT message and transmits carrier in the modulation scheme specified by the parameter n. The modem then transmits constant 1 bits for a minimum of one second and continues to transmit constant 1 bits until it receives a character from the DTE.

When data is received from the DTE, SoftModem deletes start and stop bits and deletes all <DLE><chr> character pairs before transmitting the data to the remote. Each <DLE><DLE> sequence is transmitted as a single <DLE>. <DLE><ETX> is considered as the end of stream marker, and is not transmitted. All data received from the DTE after the <DLE><ETX> is ignored by SoftModem until SoftModem generates either the CONNECT, OK, or ERROR result code.

If no more data is in the transmit buffer, and the last transmitted character was not an ASCII NULL, SoftModem generates the OK result code and returns to the command mode. If the last character transmitted was an ASCII NULL, SoftModem generates the CONNECT message to the DTE and waits for further data from the DTE while transmitting NULLs to the remote. If more data is received before five seconds elapse, SoftModem continues to transmit the data as described in the previous paragraph. If five seconds elapse and no data is received from the DTE, SoftModem drops carrier, goes on-hook, and generates the ERROR result code.

5.1.9. Fax Data Reception

Fax data reception is initiated using the AT+FRM=n command. After this command is issued, SoftModem looks for carrier in the modulation scheme specified by the parameter n. If no carrier is detected before the period of time specified by register S7 expires, SoftModem generates the NO CARRIER message and returns to command mode. If a V.21 carrier is detected when a high speed carrier is expected, SoftModem generates the +FCERROR message and returns to the command mode. If the specified carrier is detected, SoftModem generates the CONNECT message and enters the data receive mode.

While in data receive mode, SoftModem receives data from the remote, adds start and stop bits, and handles <DLE><chr> character pairs before passing the data to the DTE. The modem prefixes each <DLE> character with another <DLE> character before sending it to the DTE.

If SoftModem detects a receive buffer overflow condition, it stops receiving from the remote until there is room in the receive buffer. The modem informs the DTE of the buffer overflow after it sends to the DTE the last character that was stored in the buffer before the overflow occurred.

If SoftModem receives any character from the DTE after the +FRM command (except flow control characters if software flow control is in effect), or if SoftModem detects a high-to-low transition of the DTR signal while &D1 is in effect, it sends <DLE><ETX> to the DTE, generates the OK result code, and returns to command mode. The receive buffer is cleared and all data received from the remote is discarded. If loss of DTR is detected while &D2 is in effect, SoftModem goes on-hook, sends <DLE><ETX> followed by OK result code to the DTE, and returns to command mode. If SoftModem detects a DTR drop while &D3 is in effect, SoftModem performs a warm reset.

5.2. COMMANDS

5.2.1. +FCLASS=n - Select Service Class

+FCLASS=n command sets the active service class.

Parameters: 0-1

Command options:

5.2.2. +F<command>? - Report Active Configuration

+F<command>? interrogates SoftModem to determine the active configuration.

Typical responses are:

Valid responses are:

5.2.3. +FTS=n - Stop Transmission and Wait

+FTS=n causes SoftModem to terminate a transmission and wait for n 10-ms intervals before responding with the OK result code. An ERROR response code results if this command is issued while SoftModem is on-hook.

5.2.4. +FRS=n - Receive Silence

+FRS=n causes SoftModem to report back to the DTE with an OK result code after n 10 ms-intervals of silence have been detected on the line. This command is aborted if any character is received from the DTE. The modem discards the aborting character and issues an OK result code. An ERROR response code results if this command is issued while SoftModem is on-hook.

5.2.5. +FTM=n - Transmit Data

+FTM=n causes SoftModem to transmit data using the modulation defined below. An ERROR response code results if this command is issued while SoftModem is on-hook.

Parameters: See Command options

Command options:

5.2.6. +FRM=n - Receive Data

+FRM=n causes SoftModem to enter the receiver mode using the modulation defined below. An ERROR response code results if this command is issued while SoftModem is on-hook.

Parameters: See Command options

Command options:

5.2.7. +FTH=n - Transmit Data with HDLC Framing

+FTH=n causes SoftModem to transmit data using HDLC protocol and the modulation defined below. An ERROR response code results if this command is issued while SoftModem is on-hook.

Parameters: See Command options.

Command options:

5.2.8. +FRH=n - Receive Data with HDLC Framing

+FRH=n causes SoftModem to receive frames using HDLC protocol and the modulation defined below. An ERROR response code results if this command is issued while SoftModem is on-hook.

Parameters: See Command options.

Command options:

5.2.9. +FPR=<n> Select Fax Port Rate

+FPR=n This command sets SoftModem DTE to DCE fax port rate.

Parameters: See Command options.

Command options:

5.2.10. +FLO=<n> Select Fax Flow Control

+FLO=n This command sets SoftModem fax flow control.

Parameters: See Command options.

Command options:


| << First | < Previous | > Next | >> Last
| Table of Contents | Modem Installation and Removal | AT Command Syntax | AT Command Set | S Registers | FAX Class 1
Copyright © 1997, 2000 by Lucent Technologies