Personal tools
HylaFAX The world's most advanced open source fax server

Difference between revisions of "Handbook:Basic Server Configuration:Checking your Modem"

(Using faxaddmodem to Configure Modems)
(Starting Outbound Service)
Line 30: Line 30:
  
 
On some systems, especially SVR4-based systems, device special files are located in subdirectories. Thus a typical device name might be '''/dev/term/10'''. HylaFAX server processes often reference a modem by a ''device identifier'' that is derived from the device filename by removing the leading '''/dev/''' prefix and then converting any remaining ``/'' characters to ``_'' characters. Thus '''/dev/term/10''' would have a device identifier of ``term_10''. Usually this work is transparent and device filenames can be interchanged freely with device identifiers. However because of this interchangability it is not possible to use device files that have names that include ``_'' in them, e.g. ``/dev/my_tty''.
 
On some systems, especially SVR4-based systems, device special files are located in subdirectories. Thus a typical device name might be '''/dev/term/10'''. HylaFAX server processes often reference a modem by a ''device identifier'' that is derived from the device filename by removing the leading '''/dev/''' prefix and then converting any remaining ``/'' characters to ``_'' characters. Thus '''/dev/term/10''' would have a device identifier of ``term_10''. Usually this work is transparent and device filenames can be interchanged freely with device identifiers. However because of this interchangability it is not possible to use device files that have names that include ``_'' in them, e.g. ``/dev/my_tty''.
 
 
 
 
 
==Starting Outbound Service==
 
Outbound service is carried out by the HylaFAX scheduler process, the <tt>faxq(1M)</tt> 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.
 

Revision as of 21:51, 17 December 2005

Once you have a modem to use with HylaFAX first make sure that the modem works for data use. One can not say this enough. If you can not use a communication program such as minicom, cu, tip, or kermit with your modem, do not try to configure it for use with HylaFAX. This means in particular that you should verify that you have a working cable between your host and modem and that this cable is suitable for use. That is, that the cable has the relevant signals for doing hardware flow control if that is necessary and that it passes the DCD and DTR signals appropriately.

If you're feeling ambitious, you can actually verify that the modem you are using is a fax modem. This can be done by communicating directly with the modem using a communication program such as cu; for example:

hyla% cu -l ttyf2
Connected
at+fclass=? 0,1,2
OK
~[hyla].
Disconnected 

The at+fclass=? command asks the modem to report which classes it is capable of supporting. Class 0 is for data use. Class 1, Class 1.0, Class 2, and Class 2.0 are for facsimile use. Other classes may be reported, for example, for modems that provide digitized voice support. HylaFAX™ can be used with any modem that supports Class 1, Class 1.0, Class 2, or Class 2.0.

Selecting a Flow Control Scheme

Flow control refers to the mechanism used to control the transfer of data between the host and the modem (there may also be a flow control scheme used in modem-to-modem communication but the discussion here is specific to the scheme used between the host and a modem). The rules to use for selecting a host-modem flow control method for facsimile use are:

  • If you have a Class 1 modem, then you can use either hardware or software flow control, but beware of using hardware flow control as the Class 1 specification only requires vendors to support software flow control (and many of the Class 1 modems tried so far do not properly support hardware flow control).
  • If you have a Class 2 or Class 2.0 modem, then you can use either hardware or software flow control, but if you are going to communicate with the modem faster than 9600 baud then you should probably use hardware flow control.

Note! Beware that although a modem may properly implement hardware flow control when doing data communication, it may not support hardware flow control during facsimile communication. Consult the modem information for specifics on some modems.

When in doubt or having trouble, configure the modem to use software flow control for fax use.

Choosing a TTY device

There are two things to beware of in selecting a tty device file to use with your modem: flow control usage and port locking mechanisms.

On many systems different devices are used to select different flow control schemes and/or whether or not the system will monitor the DCD signal. For example, IRIX systems use ttym* and ttyf* device names to identify devices that monitor DCD but only the latter support RTS/CTS flow control. Similarly, the FAS driver for SCO uses a different names as does the standard HP-UX terminal driver.

On some systems inbound and outbound port use is interlocked by using a pair of devices, one for inbound use and another for outbound use. Typically this scheme works by stopping programs that use the inbound device until an inbound call is received (and DCD is raised by the modem). Outbound usage is also interlocked against applications waiting for the inbound device. HylaFAX provides no direct support for this because this scheme requires that a modem auto-answer incoming calls (something that is hard to make work with multi-mode--i.e. fax and data--modems). When faced with a system that uses this scheme most people elect to avoid the inbound device and run both incoming and outgoing traffic on the outbound device, using the built-in interlocking mechanism provided by HylaFAX. In this case the appropriate device to use is typically named /dev/cu*, but check local conventions.

On some systems, especially SVR4-based systems, device special files are located in subdirectories. Thus a typical device name might be /dev/term/10. HylaFAX server processes often reference a modem by a device identifier that is derived from the device filename by removing the leading /dev/ prefix and then converting any remaining ``/ characters to ``_ characters. Thus /dev/term/10 would have a device identifier of ``term_10. Usually this work is transparent and device filenames can be interchanged freely with device identifiers. However because of this interchangability it is not possible to use device files that have names that include ``_ in them, e.g. ``/dev/my_tty.



Powered by MediaWiki
Attribution-ShareAlike 2.5

Project hosted by iFAX Solutions