pstog3, modem - Fax Modem Software

1. Introduction

This is a pair of programs which make an SGI Indy workstation behave like a fax machine, for transmission of PostScript documents to a remote fax machine.

The first program, pstog3, is a filter which converts a PostScript file into Group 3 fax format. The second, modem, takes a document in Group 3 fax format, generates the appropriate tones using the Indy audio output hardware, and squirts them down the 'phone line through a PO-approved isolation device. The result is that the PostScript document appears on a remote fax machine.

Full error checking is performed, and you can be confident that a fax has been delivered if and only if the confirmation message ``Success - delivered n pages'' is displayed.

It is not at present possible to receive faxes by these means. For this reason, all faxes sent by these programs give the number of the office fax machine (+44 1904 432767) as the identification of the originating machine.

modem can also behave as a conventional (non-fax) modem for interactive use of remote computers over a telephone line. Both originate and answer modes are supported.

2. Examples

Sending a fax: Calling the University dial-in modem bank (why?!) (The programs pstog3 and modem are in /usr/fisher/mipsbin.)

3. The program ``pstog3''

This filter converts PostScript into Group 3 fax format, a binary format understood by all modern fax machines. The input (on standard input) must be conforming PostScript, possibly describing a multi-page document. The output (on standard output) consists of a header, which contains a ``magic number'' (identifying the format as Group 3) and density information, followed by concatenated bitmap images of each page.

3.1. Usage:

The optional argument -l specifies low vertical resolution, viz. 100 dots per inch (dpi). The default is 200 dpi. The lower resolution is required by some fax machines (see modem below). The horizontal resolution is always 200 dpi.

The optional argument -v specifies ``verbose'' mode: if you give this option, the program displays the page number of each page as it processes it.

If -n is specified, the header is omitted. This makes the output suitable for input to the pbm package for further conversion, but unsuitable for modem, since the resolution information, which modem needs, is conveyed in the header.

3.2. Diagnostics

The message ``GhostScript failed!'' indicates that the input is not conforming PostScript. The most common reasons are (1) it's not any sort of PostScript - you gave it the wrong sort of file; and (2) it's encapsulated PostScript, which has had its showpages removed. If it will print on a PostScript printer, it ought to be acceptable to pstog3.

4. The program ``modem''

This program emulates a modem. In the ``fax'' mode, it accepts a Group 3 document from standard input and interacts, via a 'phone line, with a remote fax machine, causing the document to be printed on the remote machine. In the ``modem'' mode, it behaves like a ``terminal emulator'': it calls a remote modem (presumably connected to a computer) and then transfers characters from the keyboard (standard input) to the remote modem, and simultaneously from the remote modem to the screen (standard output).

4.1. Usage:

4.1.1. Modem mode

-mode is one of: -V21o, -V21a, -V22o, -V22a, -V23o or -V23a. This parameter specifies the transmission standard for an interactive (non-fax) modem session. The ``a'' variants are ``answer mode'' (used by the modem at the called end of the link) and the ``o'' variants are ``originate mode'' (used by the modem at the calling end). V.21 is a 300 baud standard, and V.23 is a 1200/75 baud standard, now little used. More useful are V.22 (1200 bps full-duplex DPSK) and V.22 bis (2400 bps [bits per second] full-duplex DPSK), which are selected by the -V22[oa] option. The program ``handshakes'' with the remote modem, and the bis (2400 bps) variety will be selected if the other modem can handle it, which is almost always the case. To force V.22 (1200 bps) or V.22 bis (2400 bps), use the -bps 1200 or -bps 2400 parameter (respectively) with -V22[oa].

Faster speeds will probably be available in later versions of the software! For more information, see the appropriate ITU V-series recommendation or the ITU's World Wide Web home page.

4.1.2. Fax mode

If you specify -fax instead of -mode, the program accepts a Group 3 fax document (possibly multi-page) from standard input and sends it to the specified fax machine.

A 200 dpi fax takes up to twice as long to send as a 100 dpi one. Not all fax machines support 200 dpi. If you see a message

re-create the Group 3 file by running pstog3, this time specifying -l on the pstog3 command line, and re-run the modem command.

4.1.3. Other options

The -v option specifies ``verbose'' mode: if you give this option, the program displays low-level protocol information as it progresses.

The -m option means ``route via Mercury 131'': you will be prompted for a Mercury PIN, which will not be echoed to the screen, and ``131...'' will be prefixed to the specified number.

If you specify -p, the call will be logged as ``private'' (rather than ``departmental''): someone will come chasing you for payment, which ought to be less than £1 per page!

-7 forces 7-bit communication: the parity bit will be stripped (set to zero) in transmissions to and from the remote modem.

Telephone numbers are given in international form, even for U.K. numbers, local numbers, and University extensions; see Examples above. If you specify -ans instead of a telephone number, the modem ``picks up'' the line and gives the standard V.25 answering sequence, instead of dialing a number. This option is used on dial-in modem lines in conjunction with auto-answer (ring-detect) hardware and software. If you specify -ans, you will generally use an ``a'' mode (e.g. -V22a); If you specify a telephone number, you will generally use an ``o'' mode (e.g. -V22o).

4.2. Diagnostics

Messages of the form give you information; they are not error messages, even dire-sounding ones like Messages of the form indicate that something has gone wrong, and the document could not be delivered. If you see: you can be confident that the document has been delivered successfully and in its entirety.

4.3. Bugs

The program has been tested on only a small number of fax machines. It ought to work with all modern, fast machines; older machines might use an older version of the protocol, in which case you might see the message There might possibly be problems sending to faxes which are answered manually, or which share a line with a telephone or an answering machine: fax switches are notoriously temperamental.

Note that V.27ter is not implemented. This is an older, slower standard than V.29. Despite being older and slower, it's more complicated to implement.

The ITU standards documents are no longer free.

5. Resource implications

modem will of course only work on an Indy which has a suitable approved connection to a 'phone line. For the present, that means indy009 (which is mine). All usage of modem is logged; the Mercury PIN however is not stored in the log file - you'll have to take my word for that. The only cost involved, in realistic terms (e.g. neglecting the cost of electricity to run the hardware), is the cost of the 'phone call. I suppose a realistic modus operandi for potential users is to restrict their use to departmental business only, unless the -m or -p switch is used.

My 'phone can't make international calls, so your faxes are restricted, for the moment, to destinations in the U.K. If you have a personal Mercury 131 account, however, you can send personal faxes anywhere, at any time.

Tony Fisher /