Handbook:Basic Server Configuration:Starting Outbound Service

Outbound service is carried out by the HylaFAX scheduler process, the faxq(1M) program. There is one faxq process for all modems on a system. The faxq program learns about modems that can be used for outbound jobs by messages it receives on a FIFO special file located in the HylaFAX spooling area on the server machine. These messages come from two sources: from the faxmodem program that is used to manually enable a modem for use, or from faxgetty processes that are setup to run on each tty device where a fax modem resides.

Specifying modems with faxmodem is useful when HylaFAX is to be used in a send-only configuration. Doing this however limits the functionality of the scheduler because it will not know the true state of each modem; e.g. when a modem is in use by an outbound application such as uucp or tip. Instead faxq will assume that each modem is ready for use except when it is actively being used by HylaFAX to transmit a facsimile or alpha-numeric page.

A modem specified with faxmodem is identified by the tty device it is attached to. Thus, to notify the scheduler that two modems are available for use, the following might be used:

hyla# faxmodem tty01 hyla# faxmodem /dev/tty02

(note that devices may be specified with or without a leading /dev/ prefix.) Modem specified as above are assumed to have a default set of capabilities: whether or not they support polled retrieval of facsimile documents, what speeds they support for transmitting facsimile, whether or not they handle high resolution facsimile, etc. It is a good idea to specify the correct set of capabilities for a modem when using faxmodem, otherwise you may not get best use of a modem. Not identifying when a modem has limited capabilities can also cause HylaFAX to do extra work or cause errors that might be avoided.

Modem capabilities are specified through faxmodem with the syntax used by Class 2 and Class 2.0 modems. This makes it easy to setup a Class 2/2.0 modem: all you need to do is make a simple query to the modem to get the capabilities string to pass to faxmodem. For example, for a Class 2.0 modem the following commands would be used:

hyla% cu -l ttyf2 Connected at+fclass=2.0 OK at+fcc=? (0,1),(0-5),(0-2),(0-2),0,0,0,(0-7) OK

This sets the modem in Class 2.0 and then asks for the set of communication capabilities. The resulting string is then passed to faxmodem:

hyla# faxmodem -c '(0,1),(0-5),(0-2),(0-2),0,0,0,(0-7)' ttyf2

(note the quote marks around the string so that the shell does not interpret the parentheses).

For a Class 2 modem the commands are slightly different:

hyla% cu -l ttyf2 Connected at+fclass=2 OK at+fdcc=? (0,1),(0-5),(0-2),(0-2),0,0,0,(0-7) OK

For a Class 1 modem an entirely different procedure is needed because the modem only implements a small portion of the facsimile protocol. This means that the capabilities are mostly dependent on the HylaFAX software and not on the modem. The only information needed from the modem is which signalling rates are supported for transmitting fax data; this is obtained with:

hyla% cu -l ttyf2 Connected at+fclass=1 OK at+ftm=? 24,48,72,73,74,96,97,98 OK

and from there a capabilities string can be crafted by understanding that the above list indicates the modem can transmit at speeds from 2400 bps (24), 4800 bps (48), 7200 bps (72,73,74), and 9600 bps (96,97,98). (Multiple values for a particular speed indicate support for multiple modulation schemes; if any one value is reported then the corresponding speed should be specified in the capabilities string.) Thus the capabilities string is ``(0,1),(0-3),(0-2),(0-2),0,0,0,(0-7)'' (note the second segment is 0-3 instead of the 0-5 used above which indicated that the modem supported 12200 and 14400 bps signalling rates). Consult the faxmodem(1M) manual page for more information.

When faxq is used in conjunction with faxgetty no modems need to be specified using faxmodem. If modems are specified however; faxq will just treat the modems as ready for use until it receives more up to date information from the faxgetty processes.