Go to the first, previous, next, last section, table of contents.

Configuring QFAX

QFAX is controlled by a (simple) text file that defines parameters used to describe the fax quality and the protocols used by your computer and modem. Defaults are built in that should minimise the amount of work you have to do. The file is called `qfax_dat' in your default data directory or defined by the environment variable QFAX_DATA (sic). The name of the `qdax_dat' file may also be changed in all QFAX programs using the QJUMP `Config' program.

SETENV "QFAX_DATA=win1_fax_qfax_stuff"

A `qfax_dat' example file might be:

ID = +968-699407
RES = HIGH
SIGNATURE = Jonathan Hudson
SERDEV = ser2hr
SERBAUD = 19200
MODEM = 5
RMODEM = 3
CODE = 0

The general format is KEYWORD = VALUE.

CLASS2.0 keyword

The CLASS2.0 keyword determines whether QFAX operates in Class 2.0 or Class 2 mode. To use Class 2.0 mode, place the following in qfax_dat. The default (without this key) is Class 2 mode.

CLASS2.0 = 1

ID keyword

This describes the ID transmitted by your fax machine and logged by the remote machine. If you don't give this keyword, it defaults to "" (null string). In the example above, the value is my fax number. It is a requirement of many fax machines that this value only uses the format allowed for phone numbers (i.e.0-9,-+) etc. This value is transmitted between the fax machines / modems during the initial negotiation stage. The text2g3 program will also include this value on the top line of each page it creates. It is a legal requirement (FCC part 68) in the USA that facsimile messages are identified with caller number, "name of entity", and a time stamp.

Note that many modems require the "ID" to be given in quotes.

ID = "+968-699407"

You can test this interactively by trying

AT+FLID=123456
and
AT+FLID="12345"

and seeing which one (if any) the modem accepts. Note that if the modem rejects all variations of the ID (AT+FLID) command, you can still give an ID (for use by text2g3) and over-ride the AT+FLID command. See section Modem Setup Options. Class 2.0 uses AT+FLI.

SIGNATURE keyword

This describes the "name of entity" (individual or business) sending the fax. The text2g3 program will include this value on the top line of each page it creates. It is a legal requirement in the USA that facsimile messages are identified with caller number, "name of entity", and a time stamp.

RES keyword

This is the maximum resolution at which your fax modem will negotiate with the remote machine. Faxes may be encoded at two resolutions, HIGH 7.7 line / mm (200 dpi), or LOW which is 3.85 line/mm (100 dpi), with some loss of definition. If this parameter is not given, then it defaults to high resolution. Most low end "home" fax machines default to the lower resolution unless you use the "Fine" or similar button. If you select high resolution, then twice as much data is transmitted, You can define the resolution at which individual faxes are encoded using text2g3 or gs (PostScript to fax) programs; this parameter should therefore define the maximum capability of your machine; it should remain at the default of HIGH.

SERDEV keyword

This describes the serial device. The default if this parameter is not supplied is ser2hr.

SERDEV = ser3_b38.4k_u2k # superHermes
SERDEV = ser1dhr # SMS2, no TRA

SERBAUD keyword

This is the baud rate between the DTE (computer) and the DCE (modem). If this parameter is not supplied, the SMS/QDOS default is 19200 bps.

If the baud rate defined by "SERBAUD = " is followed by a colon and a second rate, then the first value will be used for receive and the second for send. If only one value is defined, then that is used for both send and receive.

SERBAUD = 19200       # Use 19200 for receive and send
SERBAUD = 19200:9600  # Use 19200 for receive,9600 for send

MODEM keyword

This parameter describes the maximum DCE rate of the modem (it's the value of the br parameter in the AT+FDCC command passed between the modems during the negotiation phase). The values it can take are:

MODEM        Max DCE speed
  0             2400 bps
  1             4800 bps
  2             7200 bps
  3             9600 bps
  4            12000 bps
  5            14400 bps

If you have a v.32 fax modem (to 9600 bps), select 3, if you have a v.32 bis (fax to 14400 bps) modem, select 5. This parameter describes the maximum capability of your modem. If you are communicating with a "normal" fax machine, then it will only run at 9600 bps, and your v.32bis modem will be negotiated down to this speed. QFAX defaults to 5 for this parameter if it isn't defined. With a QL using Hermes and a v.32 modem, you might set MODEM = 3 and SERBAUD = 19200.

RMODEM keyword

Normally, the MODEM parameter is used for send and receive, but you may find, with some hardware options, that you can send faster than you can receive. The RMODEM command may be used to limit the receive baud rate, in the `qfax_dat' example I use RMODEM = 3, which limits fax reception to 9600 bps. If this command is not given, then the MODEM value is used for both send and receive.

CODE keyword

This defines the type of encoding you wish to support.

CODE
Result
0
1-Dimensional. Each pixel line is encoded separately
1
2-Dimensional. Pixel lines may be encoded as the difference from a "Reference" line.

2-D coding is more efficient than 1-D coding (the file is typically 15-30% smaller), but 2-D is not widely supported on fax machines. If you know your correspondent can handle it, 2-D will save you transmission time. If this parameter is not given, QFAX defaults to CODE = 0 (1-D coding).

The qfax encoding program, text2g3, defaults to 1-D coding; I recommend that you set CODE=1 to permit reception of 2-D fax; you can force text2g3 to use 2-D coding to those respondents that you know support it by a command line option (-2).

VIA keyword

The VIA parameter describes an intermediate device or path that is used for reception of fax on slow disk systems (that's either slow disks or slow CPUs or both). This is best illustrated by example. If you are using a twin flp_ system, then you may want your received faxes to be stored to a directory on, say flp2_, to provide security against system crashes, power failure or even operator error. In this case, you might define

INDIR = flp2_faxIn_
LOG = flp2_myfax_log
VIA = ram2_

When an incoming fax is received, qfax will receive it to scratch files ram2_XXXXXXXX_fax, where XXXXXXX is a random number. When reception is complete, qfax will move the fax to `win1_FaxIn_ppppppppp_mmmmm_fax' where pppppppp represents the caller's phone number or a user-defined name. mmmmm is a machine generated sequence number. The temporary file (`ram2_XXXXXXXX_fax') is deleted when the fax has been moved to INDIR. The suffix fax may be changed using the SUFFIX keyword, section Fax file Suffix.

Direct Reception of fax to floppy disk is not supported. while qfax will let you do it, it is an extremely anti-social operation and will annoy your respondents (and probably you too).

The QFAX aliasing feature will automatically substitute meaningful names for the phone number part of the file name.

EXITBAUD keyword

If this parameter is defined, than qfax will reset the baud rate to the value defined by this parameter on exit. If this parameter is not given, then qfax will reset the baud rate to that in force when the program was invoked.

EXITBAUD = 9600

PREINIT keyword

You can use the PREINIT keyword to define modem command(s) to be sent to your modem when qfax initialises the modem. qfax will add a carriage return to the command string. For information on the commands qfax sends by default, see section QFAX Modem commands.. If this parameter is not given, then no additional modem command is sent. Also see section qfax Overview. PREINIT commands are sent before any CLASS 2 commands.

PREINIT = ATM1 L3          ; Speaker on at volume level 3

INIT keyword

You can use the INIT keyword to define modem command(s) to be sent to your modem when qfax initialises the modem. qfax will add a carriage return to the command string. For information on the commands qfax sends by default, see section QFAX Modem commands.. If this parameter is not given, then no additional modem command is sent. Also see section qfax Overview. INIT commands are sent after default QFAX Class 2.0/2 commands.

INIT = AT+FCQ=2         ; Copy quality check

INDIR keyword

This defines a directory where incoming faxes are stored. The default is ram1_fax_. qfax will store the received fax in a unique file name, see section qfax receive for format. See also section VIA keyword.

INFO keyword

This defines a log file that records details of both sent and received faxes including the caller number and time, default is ram2_fax_log.

SENDBITS keyword

This takes the values lsb or msb and defines the bit order that your modem requires when sending faxes. The default, if the parameter is not given, is SENDBITS = LSB

You only need this parameter in the unlikely event of your modem requiring msb first (SENDBITS = MSB).

WAIT2SEND keyword

Most fax modems will return a start character when they are ready to transmit data to the remote fax device. The QFAX default is that the modem will return the start character DC2 (hex 12) when it is ready, it will also accept XON (hex 11). In the unlikely event that your modem does not return DC2 or XON, set WAIT2SEND = NO.

STARTCHAR keyword

This defines the start character required before the modem will return received fax data to the computer; the default is DC2 (hex 12), but some modems may require XON (hex 11) or none. In the unlikely event that your your modem requires XON, then set STARTCHAR = XON. (STARTCHAR = NONE, if none required, even more unlikely).

FONT keyword

The name of of the default font used by text2g3. The default is FONT = flp1_QFax_font.

PATHFONT keyword

The path to search if a font is not found under the name supplied.

PATHFONT = win1_qfaxfnts

TEMP keyword

The directory where text2g3 writes converted files. The default is TEMP = ram2_.

DELAY keyword

qfax pauses, by default, for 0.2 seconds before sending an AT command to your modem, this is to give the modem a chance to process any previous command. This default delay may be too short for your modem, and result in errors or qfax timeout reading the modem reply. You can change this timeout using the delay parameter.

DELAY = nnn

where nnn is the required delay in 20 mSec (1/50 sec) units. For example, to give a one second delay, DELAY = 50. If you have problems with qfax initialising your modem, set DELAY to a large value (say 200), work down until it fails, and then increase it slightly. You don't need to be connected to the phone system for this, just invoke qfax;`-v -R' and wait until qfax returns `NO CARRIER'. Using a good modem (ZyXEL) and a fast system, it is possible to set DELAY=0 to minimise startup times.

PRINT keyword

You may configure qfax to automatically print out your fax when it has been received. This will only be a practical option for users with a powerful CPU (16Mhz 68000 at minimum, 2Mb RAM, a hard disk and a real parallel port (i.e. not a converter from a serial port)). This parameter takes the printfax command, excluding the file name, which will be appended by qfax, that you need to print fax. The default is that it is undefined (i.e. no automatic printing). An example might be

PRINT = printfax -q -a

The command is run as given followed the the name of the fax file; it does not have to be a fax print program. The command is defined as it would be on a UNIX computer, i.e. without ex, ; , or quotes. printfax may use the PFAXINI keyword to obtain other default options. See section PFAXINI.

Caution:Another fax may arrive while the first is being printed, your hardware must be robust enough to support this possibility and have sufficient memory (at least 2Mb to be comfortable).

Modem Setup Options

By default, qfax has used the following "Hayes" (tm) and Class 2 commands:

Dial prefix       ATD
Reset Modem       ATZ
Setup Command 1   AT +FCLASS=2
Setup Command 2   AT +FBOR=0 +FCR=1 +FAA=0
Setup Command 3   AT +FLID = %s
                  (%s replaced by the ID parameter)
Setup Command 4   AT +FDCC=%d,%d,%d,%d,%d,%d,0,0
                  (%d replaced by RES MODEM WIDTH_S PAGE_S,CODE,ECM)

It is now apparent that a number of allegedly Hayes/Class 2 compatible modems cannot accept the format of these commands. All these commands can be over-ridden by `qfax_dat' options.

Class 2.0 modems use:

Dial prefix       ATD
Reset Modem       ATZ
Setup Command 1   AT +FCLASS=2.0
Setup Command 2   AT+FBO=0 +FCR=1 +FLO=2 +FAA=1 +FNR=1,1,1,0
Setup Command 3   AT +FLI = %s
                  (%s replaced by the ID parameter)
Setup Command 4   AT +FCC=%d,%d,%d,%d,%d,%d,0,0
                  (%d replaced by RES MODEM WIDTH_S PAGE_S,CODE,ECM)

Dial and Modem Reset

DIAL = <dial command prefix>

e.g.    DIAL = ATDP    (for pulse dial)

ATZ  = <modem reset command>

e.g.    ATZ = AT&F     (Reset to factory setting)

Modem Setup Commands

Format is MDMx = <value>, x is (1-4).

These are governed by the following rules:

  1. If the MDMx command is not given, then the usual qfax value is used.
  2. If the MDMx command is given without a value, then that command will be ignored completely.
  3. If the MDMx command is given with a value, then that value is used to replace the built in command.

Note that qfax will not attempt to do any parameter substitution for user defined commands. The following examples are for the Class 2 command set.

MDM1 = <1st Modem setup string>
to
MDM4 = <4th Modem setup string>

e.g.

# for modems that expect semi-colon as command delimiter

MDM1 = ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2

# We don't give a MDM2, so qfax value is used

# Ignore +FLID command completely
# (text2g3 will still put any ID on fax head line)

MDM3 =

# Use my specific G3 parameters

MDM4 = AT+FDCC=0,3,0,0

Using the above examples, to send a fax, with the following lines in QFAX_DAT

ATZ = AT&F
DIAL = ATDP
MDM1 = ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2
MDM3 =
MDM4 = AT+FDCC=0,3,0,0

the following commands would be sent to the modem

AT&F
ATS0=0;S2=255;S7=120;S12=255;+FCLASS=2
AT+FBOR=0 +FCR=1 +FAA=0
AT+FDCC=0,3,0,0
ATDP699407

As with other user defined qfax modem commands, you need not give the AT.

The lines:

ATZ = &F
DIAL = DP
MDM1 = S0=0;S2=255;S7=120;S12=255;+FCLASS=2
MDM3 =
MDM4 = +FDCC=0,3,0,0

are equivalent.

PHONEBOOK keyword

The PHONEBOOK keyword defines the (optional) QFAX phone book.

PHONEBOOK = win1_qfax_phone

The PHONEBOOK format uses a KEY=value system. The keys are:

NAME
The name of the respondent, used as the directory name for receive.
ALIAS
An alias that may be used for dialling.
TSI
The TSI returned by the respondent's fax machine.
DCODE
A dial code that is prepended to the TSI to give a dial out number for the respondent.
FULL
The full (dial out) number of the respondent. For occasions when the number cannot be constructed from DCODE and TSI.
2D
A flag that indicated 2D capability. This may just be for reference or maybe used by text2g3 to determine optimum coding method.

For example:

NAME=RacingSailboats, ALIAS=rsb, TSI=01712231448, FULL=00441712231448
NAME=IMTAC, TSI=968797709, FULL=797709, 2D
NAME=JochenMerz, ALIAS=jm, TSI=49203502012, DCODE=00-
NAME=Jonathan, ALIAS=jrh, TSI=1703867843, DCODE=00-

In your entry for me (`jrh'), the TSI is the cleaned up ID (i.e. numbers only) that I send out with faxes The NAME field is the directory where the inbound faxes are to be stored, ALIAS is an abbreviation you can use when sending, DCODE is any additional dial information not in the TSI. As you may sometimes get my 1-D answer-machine, this entry does not have 2D set.

Note that any TSI values should only contain numbers and letters (no punctuation). If the user's ID setting is +44 (0)1703-867843, then use TSI=4401703867843.

ex qfax;'-s jrh ram2_jrh_fax'

You could also

ex qfax;`-s Jonathan ram2_jrh_fax'

or even

ex qfax;`-s 00-44-1703-867843 ram2_jrh_fax'

Somehow I think I'd use the first one. Faxes now go into the named directory, much easier than numbers, where an PHONEBOOK entry exists. So. in the above example, with an INDIR = flp1_ and the above entry in `QFAX_PHONE', a fax from me, would be stored as:

flp1_Jonathan_nnnnn_fax

where nnnnn represent the current numbering scheme.

flp1_Jonathan_00000_fax
flp1_Jonathan_00001_fax         etc

You should be aware of the following implementation details that influence name matching.

Given (in `qfax_phone')

NAME=John,ALIAS=JJ,TSI=123456
NAME=JimJohnson,ALIAS=John,TSI=78778

then `qfax -s John ...' would dial 78778

You must also ensure that ALIAS names do not result in file names that exceed the file system limits.

International aliasing

There are many instances where a respondent gives a national phone number in the TSI that is incompatible with international dialling in your country. The FULL field allows for this. For example, a respondent in the UK might set their TSI to 01703-123456, and to dial that number from overseas, I need to dial 00-44-1703-123465. The combination of TSI and dial code will not do this, but I can override this by setting FULL to 00-44-1703-123456.

Preset Command Options

Programs in the QFAX suite (qfax, text2g3, qfv, printfax) take a number of sometimes arcane and immemorable command options, many of which you will need every time you use the program. To save you having to type these options in every time, default options can be preset using the following keywords in `qfax_dat'. The keys are:

QFAXINI
default options for qfax
QFVINI
default options for qfv
PFAXINI
default options for printfax
T2G3INI
default options for text2g3

The usage of these keys is described in the chapters referring to the specific programs.

Text Equivalents for Dates

text2g3 provides two macros to automatically insert the date in faxes. These default to the full names for days and months in English in standard Unix usage. These keys may be used to define native (non-English) language date fields. Usage of these keys is described in the text2g3 section. See section Using text2g3, and section ~d, ~D Date Formatting.

DAYS
days text string
MONTHS
months text string

LEFTMARGIN keyword

QFAX/text2g3 by default imposes a 160 pixel (c. 20mm) left margin. This may be altered using the LEFTMARGIN keyword. This takes a value in either G3 pixel units (7.7 pix/mm), mm or inches. If no units are given, G3 pixels are assumed.

examples

LEFTMARGIN = 160
LEFTMARGIN = 0.815in
LEFTMARGIN = 20.8mm

should all have the same effect.

PRVIEW keyword

The PRVIEW keyword defines programs and/or file or device names that are associated with printfax devices. Printfax device are conceptually split into two types, printers and file formats.

Format 'devices' may have a program associated with them, that is invoked after the first page of the fax has been decoded, giving the facility to use an alternative fax viewer.

The format is PRVIEW = name, program, file. If the file name contains a 'C' numeric format, then the page number is inserted. The printfax 'pbm' and 'pic' types decode each page to a separate file. If the output device name starts with a vertical bar, then the output of printfax is piped to the standard input of that program.

For example:

PRVIEW = hp-pcl, ,prt
PRVIEW = ps, ,|lpr -l
PRVIEW = pic-scaled, win1_viewers_qspv,win1_tmp_fax_%03d_pic
  1. Write HP pcl output to the device prt.
  2. Pipe postscript output to an "lpr" spooler program.
  3. Write pages to fax_001_pic, fax_002_pic etc in the win1_tmp directory. The qspv PIC viewer would be invoked on the file fax_001_pic after the first page is decoded.

The output file specification may be overridden by a printfax command option.

The default is no PRVIEW entries are defined.

The full list of device names supported by printfax is described in section Running printfax

HANGUPOK keyword

The Class 2 standard requires that all AT commands issued by the fax software have replies from the modem terminated by a string such as OK or CONNECT ... unless you have an ELSA 28.800 modem, which doesn't work like this. This 'intelligent' modem assumes that a AT+FDR command can be terminated by +FHNG:0, when the standard requires +FHNG:0 followed by OK. If you have one of these modem, set HANGUPOK in QFAX_DAT.

Page and Paper Options

QFAX supports (from v2.0) all the ITU-TSS page sizes and combinations thereof and various paper sizes (including ISO A4, US Letter and US Legal), depending on your printer type. These capabilities are defined through the keys listed below and explained in some detail in section Pages and Paging.

The keys are:

WIDTH_S
default page width for text2g3 encoding.
PAGE_S
default page length for text2g3 encoding.
WIDTH_R
advertised capability for qfax reception.
PAGE_R
advertised capability for qfax reception.
PAPERSIZE
The size of paper used to print fax.

The usage of these keys, and implications are described the the section section Pages and Paging.

Fax file Suffix

The SUFFIX keyword defines a suffix that text2g3 and qfax will append to fax file names. The default suffix is fax.

PPR_TRY

The PPR_TRY keyword defines the number of attempts qfax will make to send a fax when the modem returns a ppr (post-page response) error. In previous releases of QFAX, qfax would make four attempts, in v2.0, the default is three (PPR_TRY = 3).

UNLIMITED keyword

The PAGE_S keyword (or text2g3 command options defines how you wish to page faxes you create. In many cases, you will create these paged to ISO A4 size (PAGE_S = 0), but you wish qfax to transmit these as "unlimited". You can achieve this by placing the key

UNLIMITED

in the qfax_dat file.

MONO keyword

The MONO keyword forces qfv, text2g3 and printfax to adopt a monochrome colour scheme.

MONO = Y

SAVETHING

QFAX can save details of a user defined number of received fax in a "Thing" for rapid access of recent fax in qfv. This information may also be saved to disk to ensure it survives system shutdown. The SAVETHING keyword defines a file to be used for this.

SAVETHING = win1_qfax_savething_dat

Details of QFAX Thing functionality is described in section QFAX Thing.

XDIAL keyword

The character '[' in a phone number inserts the string given by the key XDIAL.

so:
# In QFAX_DAT
XDIAL = 00-44-1

#In QFAX_PHONE
NAME=RacingSailboats, ALIAS=rsb, TSI=0712231448, FULL=[712231448
then

ex qfax;"-s rsb rsb.fax"
will dial 00-44-1712231448

RCLASS,SCLASS

The keys RCLASS and SCLASS define the value used for receive and send +FCLASS commands. The default is RCLASS = 2, SCLASS = 2. Most people don't need this. These option was added for a feature of a Supra modem. They are ignored for Class 2.0.

GDELAY

The GDELAY key defines the timeout for an 'OK' response from the modem following a 'BBS Grab' invocation of QFAX. The default is GDELAY = 10 (seconds).

DATA

The DATA key defines a program that is invoked when QFAX answers a data call. The default is DATA = (none). If DATA is defined, and does not start '@', then it is taken to be a program to be invoked as:

ex prog,ser,log,ser;

If the qfax_dat DATA = option starts with an '@', then on data connect, a file may be displayed telling the caller why they cannot make a data connect. Your modem must support adaptive answer for this.

DATA = @win1_qfax_nologin_txt

The +FAA parameter is automatically set to +FAA=1 if DATA is defined. A suitable program as a DATA client may be found as SMBX (Simple Mail Box). SMBX is (was?) maintained by Dave Woodman; he once could be contacted on his dedicated QFAX/SMBX line (+ 44 1628 541753).

Note this functionality may only work in this release with modems that return "CONNECT FAX / CONNECT speed etc" for fax/data in adaptive (+FAA=1) mode. This may be configurable in a future version.

A suitable 'serial monitor' front end that may be configured for this or other modem responses is available as SMBOX_BAS. This may be compiled with QLib (I am informed by a normally reliable source). SMBOX_BAS is not subject to the QFAX (or SMBX) licence and is public domain.

SMBX is not intended as a QBOX replacement or in competition with it. It is intended to provide simple data/e-mail/file transfer facilities for "QBOX Refugees" (or is that "QBOX refusees") who do not need the full capabilities of a traditional BBS.

CHILDLOG

When an external data mode program is invoked, its stderr (log) channel defaults to the current QFAX log channel. This may be changed using the CHILDLOG key.

CHILDLOG = ram2_smbx_log

FAA

The key FAA forces a setting of the +FAA parameter for receive.

FAA = 2

For (example) Supra 'silent' answer. If this key is not defined, QFAX uses its defaults for +FAA (0 or 1).

STARTSCRIPT

If you have CSM ('Client Server Manager') on your system, QFAX can run a startup script, for example to check for the existence of other programs that might be using the serial port. The STARTSCRIPT key defines such a program file (BASIC if you have Minerva, compiled for all OS types) . The script is always run before a WAIT or MONITOR session (-w, -W, -m, -M). The script is never run for a GRAB (-G) or spawned send (-z) session. The key RSFLAG controls whether the script is run for receive (-r, -R) or send (-s, -S).

The only QFAX CSM REQUEST that a startup script can make is EXITPARAM.

STOPSCRIPT

If you have CSM on your system, QFAX can run a shutdown script, for example to reinstate any other program that might be have been previously using the serial port. The STOPSCRIPT key defines such a program file (BASIC if you have Minerva, compiled for all OS types) . The script is always run after a WAIT or MONITOR session (-w, -W, -m, -M). The script is never run for a GRAB (-G) or spawned send (-z) session. The key RSFLAG controls whether the script is run for receive (-r, -R) or send (-s, -S).

RSFLAG

The RSFLAG key defines if any defined startup or shutdown script is run during startup or shutdown processing for receive (-r, -R) or send (-s, -S) sessions. The key may take the values R, S or RS (or SR).

RSFLAG = RS

The default is RSFLAG is blank (no scripts invoked).

SCRIPTLOG

The SCRIPTLOG key defines the name of a log file (stdout, PRINT channel) or QFAX scripts. The default is ram2_script_log.

APRES

The APRES command (if defined) is sent after modem HANGUP. Confused ZyXEL owners may set

APRES=+FREV

to remind themselves of their current ROM (a)version.@node NOPOLL, GFLAG, APRES, Configuring QFAX

NOPOLL

The NOPOLL key will prevent QFAX from issuing any polling commands. For modems that do not support polling commands (+FSPL, +FLPL). The default is to support poll commands.

GFLAG

Some Class 2 modems (like mine) appear very tolerant about the padding and alignment of fax lines. Others may not be, the GFLAG key controls the padding and alignment.

GFLAG = 0
(the default, standard text2g3 conformance) Adds a byte pad before EOL, starts new lines on byte boundary.
GFLAG = 1
Starts new lines on byte boundary
GFLAG = 2
Does no padding or alignment.

LSB

qfax attempts to determine received fax bit order from the data stream. The key LSB will override this automatic detection and tag the received dat as LSB.

MSB

qfax attempts to determine received fax bit order from the data stream. The key MSB will override this automatic detection and tag the received dat as MSB.

PRESCAN

When printfax or qfv prints or displays a fax, it works sequentially through the file, displaying pages as it finds them. This strategy may (in rare circumstances) fail on badly corrupt fax. The PRESCAN key causes qfv and printfax to prescan the fax for end of page markers before it is displayed/printed. This mode provides more accurate recognition of EOP for such faxes at a small time cost (around 2 sec/page for a 16Mhz/68000 system , considerably more from 68008 from flp_) .

EDR

The EDR keyword defines a EDR RINGn value for use by ZyXEL EDR mode.

EDR=1   # RING1 is fax 

ECM

The ECM keyword defines a whether Class 2 error correction mode should be used. Not all modems support ECM.

ECM=1   # Use ecm 

Default values

QFAX supplies defaults for many keywords, so you can ignore them, and accepts abbreviations for most keywords, the following table defines this

Parameter       Minimum Abbreviation    Default

APRES           APRES                   (none)
ATZ             ATZ                     Z
CHILDLOG        CHILDLOG                (none)
CLASS2.0        CLASS2.0                (not defined (Class 2)
CODING          COD                     0
DATA            DATA                    (none)
DAYS            DAYS                    Sunday,Monday etc
DELAY           DELAY                   10
DIAL            DIAL                    D
APRES           APRES                   (none)
APRES           APRES                   (none)
ECM             EC                      (none)
EDR             EDR                     (none)
EXITBAUD        EXIT                    (none)
FAA             FAA                     0 or 1
FONT            FONT                    flp1_QFax_font
GDELAY          GDELAY                  10 (seconds)
GFLAG           GFLAG                   0
HANGUPOK        HANGUPOK                (none)
IDENTIFICATION  ID                      (none)
INDIR           IND                     ram1_fax_
INFO            INF                     ram2_fax_log
INIT            INI                     (none)
LEFTMARGIN      LEFTMAR                 160 pixels
LSB             LSB                     (none)
MDM1            MDM1                    (use QFAX default)
MDM2            MDM2                    (use QFAX default)
MDM3            MDM3                    (use QFAX default)
MDM4            MDM4                    (use QFAX default)
MODEM           MOD                     5
MONTHS          MONTHS                  January,February etc
MSB             MSB                     (none)
NOPOLL          NOPOLL                  (none) (i.e. poll is allowed)
PAGE_RECEIVE    PAGE_R                  2
PAGE_SEND       PAGE_S                  0
PAPERSIZE       PAPERS                  A4
PATHFONT        PATHFO                  (none)
PFAXINI         PFAXINI                 (none)
PHONEBOOK       PHONEBOOK               QFAX_PHONE
PPR_TRY         PPR                     3
PREINIT         PREINI                  (none)
PRESCAN         PRESCAN                 (none)
PRINT           PRINT                   (none)
PRVIEW          PRVIEW                  (none)
QFAXINI         QFAXINI                 (none)
QFVINI          QFVINI                  (none)
RCLASS          RCLASS                  2
RESOLUTION      RES                     1
RMODEM          RMODEM                  (none)
RSFLAG          RSFLAG                  (none)
SAVETHING       SAVET                   (none)
SCLASS          SCLASS                  2
SCRIPTLOG       SCRIPTLOG               ram2_script_log
SENDBITS        SEND                    LSB
SERBAUD         SERB                    19200
SERDEV          SERD                    ser2hr
SIGNATURE       SIG                     QFAX System
STARTCHAR       STARTC                  DC2
STARTSCRIPT     STARTS                  (none)
STOPSCRIPT      STOPS                   (none)
SUFFIX          SUFFIX                  fax
T2G3INI         T2G3INI                 (none)
TEMP            TEMP                    ram2_
UNLIMITED       UNLIM                   (none)
VIA             VIA                     (none)
WAIT2SEND       WAIT                    YES
WIDTH_RECEIVE   WIDTH_R                 0
WIDTH_SEND      WIDTH_S                 0
XDIAL           XDIAL                   (none)

The keywords may occur in any order in the file. Any line that does not start with a key word is assumed to be a comment. If you just wanted the defaults other than the ID, then your file could be:

# This is a comment in my QFAX File
# I use a hash as it can't be mistaken for much else

ID = +44 123 456789
# End of QFAX File

I recommend you use something like a hash to define comments, it makes it simple to see what is in the file. A utility qparse is available to display the effect that any given `qfax_dat' will have on QFAX programs.

Please note: The above may seem like heavy going. in many cases the default values will be suitable for your modem.

G3 File formats

It is possible to say create one G3 format file using a given coding and resolution and then change your `qfax_dat' file (or just change the `QFAX_DATA' environment variable to point to another file) and then create more G3 files with different coding or resolution before they get sent. In order that the sending program is not dependent on a previous setting, this information is recorded in the header of QFAX G3 files.

This header is also filled in, when receiving, by the qfax program from the parameters negotiated with the sending fax machine, so if you receive a fax encoded in low resolution into your default high resolution environment, the qfv and printfax programs don't get confused.

The QFAX file format is described in section QFAX File Format.


Go to the first, previous, next, last section, table of contents.