home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
fax067.zip
/
frec.doc
< prev
next >
Wrap
Text File
|
1997-04-21
|
81KB
|
1,740 lines
Frec Version x.yyz
Reference Manual
Created 1992 - 1997 by Dr. Harald Pollack & Bernhard Seidl
-------------------------------------------------------------------------------
ABBREVIATIONS USED IN THIS DOCUMENTATION
-------------------------------------------------------------------------------
DTE . . . . . . . . . . Data Terminal Equipment, your PC
DCE . . . . . . . . . . Data Communication Equipment, your MODEM
CCITT/ITU T.4 . . . . . International standard for coding fax data.
CCITT/ITU T.30 . . . . International standard for transmitting fax over
a public switched telephone network.
ANSI/EIA/TIA-578-1990 . Asynchronous Facsimile DCE Control Standard
Service Class I (the common used class 1).
ANSI/TIA/EIA-592-1993 . Asynchronous Facsimile DCE Control Standard
Service Class II (the real class 2.0).
-------------------------------------------------------------------------------
WARRANTY:
-------------------------------------------------------------------------------
There is no warranty on this program. You can use it for your own risk.
The program should work the best way it can. If you detect some
malefunction or bugs, please report it with the correspondent FREC.DEB
log file to the autor. Without the log file it is almost inpossible to
find and fix a bug. Common bugs will be corrected if they are of vital
interrest to the program. Wishes for some extentions (but not printing
and viewing) and hints for making things better are welcome.
-------------------------------------------------------------------------------
SOURCE CODE OF THE PROGRAM:
-------------------------------------------------------------------------------
There was very much work and brain in creating Frec. To much for one
person. So, if anybody has senseful interrest in getting the source
code (IBM CSet) he could get it. There is only one restriction: do not
name your program 'Frec'. You can do anything with the sourcecode, read
it, sell it, eat it, use it, but please do not make a clone named Frec.
Due to the enhancement to FREC.DLL necessary includes (CLGLOBAL.H and
COMCAPI.H) are not supplied.
-------------------------------------------------------------------------------
ABOUT FREC
-------------------------------------------------------------------------------
Frec is a multi-featured fax receive software usable together with
a FidoNet mailer or standalone. All functionality of Frec is in
accordance to ITU-T.4, ITU-T.30, EIA-578 and EIA-592.
The evidence of existence of a lot of non conformable fax modem and fax
receiving software to these standards, makes it more than possible, that
faxes, received with Frec, will fail or be corrupted! This often is not a
misbehaviour of Frec! But nobody is perfect and you have detected a bug.
-------------------------------------------------------------------------------
UPGRADING TO A NEW VERSION
-------------------------------------------------------------------------------
New versions of Frec are always packed in LZH type archives. It is
recommended to replace all EXE and DLL files and not to use parts of
older version (especially DLL files). New versions of Frec often use
new or modified configuration entries and commandline options. Please
read all available documentation carefully before using a new version.
-------------------------------------------------------------------------------
THE CONFIGURATION FILE
-------------------------------------------------------------------------------
The configuration file keeps all information required. FREC.CFG needs
to be modified to suit your system. Please have a look at the sample
configuration file included in the Frec package. In the following
section all keywords and parameters are listed and described.
NOLOGONBAD
If Frec is used in conjunction with third party environment (e.g.
FaxWorks, see also FAXLOG and FAXIDX keywords) and this keyword
is used, no log entry will be generated if there occured an error
while receiving or no fax session was established.
[TASK <n>]
Starts a section within the configuration file which only effects
the selected task. To end a section you can either use another
[TASK <n>] keyword which would start another section or use the
keyword [CONNON], described below.
[COMMON]
All keywords after this statement belong to all tasks.
CONFIGEND
Frec will stop working off the configuration file and everything
following this keyword will be ignored.
LOGBINKLEYSTYLE
Using this keyword Frec will generate BinkleyTerm like log entries.
USROBOTICS
Special keyword to indicate that a USRobotics modem is used. Must
be set to allow some workarounds for nonstandardized actions!
OLDDTR
Frec uses the methode of 'DTR-drop' (switching modemline DTR off
and on) to reset the modem and to force a on-hook condition. This
switching might be done in two ways (different calls to DosDevIOCtl).
CLMINIMIZEDNOVIEW
If FREC.DLL is called from a minimized CantaLoup/2, FaxView is not
started at all. If machine is highly stressed this is recommanded.
CHANGEBAUD <n>
Some modems on the market must have 19200 bps set in phase C (faxdata
reception). To properly switch to 19200 bps, FAXBAUDRATE must be set
to 19200 also.
Depending on value <n>, the switch is performed at different states
of (nonstandardized) Class 2 protocol:
0 . . . nothing happens, is equal to not using this keyword
1 . . . FaxBaudRate is set a startup
2 . . . FaxBaudRate is set, when +FCON is detected
3 . . . FaxBaudRate is set, when OK is detected
Note: If CHANGEBAUD is used without parameter <n>, a value of 1 is
assumed (for compatibility of older versions of Frec).
If using n=2, Frec must be called, when modemresponse FAX is received!
Almost all Rockwell chipset modems report 'FAX' before '+FCON'.
Unfortunately there is no common rule which says what value of this
keyword is required for a specific modem. You have to try it out ...
FORCERETRAIN
If Frec is used to receive only raw fax data in PAGEnnnn.RAW files,
no checking of copyquality is done at all. Enabling this feature will
always send RTP (ReTrain Positiv) instead of MCF (MessageConFirmation)
to sender of fax. Preferable on known weak or bad phonelines.
Attention: Fax transmissions by fax modems and unknown fax software
(trashware :-) may fail when receiving this post page message.
LOGLEVEL <n>
Writing to FAXDEBUG depends on this value (0 to 5).
0 ... do NOT write to FAXDEBUG (is equal to 'FAXDEBUG NUL')
1 ... ERROR only
2 ... ERROR + SEND + RECEIVE only
3 ... ERROR + SEND + RECEIVE + ACTION only
4 ... ERROR + SEND + RECEIVE + ACTION + WAIT FOR only
5 ... ERROR + SEND + RECEIVE + ACTION + WAIT FOR + INFO (default)
DEBUG
Enables a lot of stuff for debugging. Do not use, because LOG will
increase enormous.
TIFEXT <extension>
Default extension for saved fax files ".TIF" may be overwritten. If
commandline switch '-z' is used, this is automatically overwritten by
".FAX". Use this to enable some compatibility to third party software.
Attention: If '-z' switch is used, TIFEXT is not used!
INBOUND <path to inbound>
If DESTNAME and DESTADDR are also defined, a netmail (????????.PKT)
is created each time a fax is stored. Is not in affect, if '-x'
commandline switch is used!
DESTNAME <string>
If this, INBOUND and DESTADDR is defined in FREC.CFG, a netmail is
created and addressed to.
DESTADDR <FidoNet style address>
Must be defined to create an announcing netmail.
SRCNAME <string>
Used to form the 'From:' part of the announcing netmail. Default is:
"FREC".
SRCADDR <FidoNet style address>
Normally this is the address of local system. Defaults to DESTADDR.
SUBJECTRECFAX <string or '%'>
Used in creation of announcing netmail on incoming fax. If '%' is
the first (or only) character, the filename in which the fax is stored
will be placed in subject part of netmail. Default is: "Announcement
of incoming FAX".
RINGCNT <n>
Number of rings FREC is skipping till modem goes off-hook. In
stand alone mode only.
TEXTCOLOR <colorvalue>
Select color of characters on Frec status screen:
0 . . . BLACK
1 . . . BLUE
2 . . . GREEN
3 . . . CYAN
4 . . . RED
5 . . . MAGENTA
6 . . . BROWN
7 . . . LIGHTGRAY
8 . . . DARKGRAY
9 . . . LIGHTBLUE
10 . . LIGHTGREEN
11 . . LIGHTCYAN
12 . . LIGHTRED
13 . . LIGHTMAGENTA
14 . . YELLOW
15 . . WHITE
TEXTBACKGROUNDCOLOR <colorvalue>
Select color of background on Frec status screen.
FRAMECOLOR <colorvalue>
Select color of the frame on Frec status screen.
CLPAGEOK <script or errorlevel or shellno>
If FREC.DLL is called from CantaLoup/2, a simple mechanism will allow
further actions of the mailer if faxreception was sucessful:
- A positiv value forces mailer to exit with this errorlevel.
- A negativ value forces mailer to 'shell' to abs(value).
- A name of a script forces the mailer to execute it.
POLLFILE <filename> [<numerical page indicator>]
Name of file which is passed to FSEND if FREC is frontend for a
pollserver. Can be defined as often as needed.
The filenames are collected and when calling FSEND (DLL or EXE)
a temporary file is created where all filenames and pageindicators
are stored. FSEND is called with '-o@<temp_file>' to pass filenames.
Pollfiles can also be supplied by '-o' and '-o@' commandline switch.
Attention: Not used if Frec acts as a fax poll requester ('-g'
parameter)! This prevents Frec to call Fsend! May be in further
versions both send and receive in one call would be possible!
FSENDCFG <configuration file for FSEND> [<commandline parameter>]
Is the key for Frec to work also as a frontend for Fsend to satisfy
faxpolling. See also POLLFILE.
It is no longer supported, to choose between FSEND.EXE and FSEND.DLL!
From now on, FREC searches for FSEND.DLL in LIBPATH and if not found,
FSEND.EXE is called.
After the name of the config file for FSEND, optional commandline
parameters for FSEND may be submitted to DLL (or EXE). These
parameter are submitted as last, so it will overwrite any choice
from FREC itself.
Note: If primarly a fax pollservice is offered, use Fsend as the
frontend. Fsend is also capable to receive fax if configured right.
CHECKCOPYQUALITY <YES or NO>
Enables special algorithms to decide if page was of acceptable quality
or if a retrain should be performed by sender. If not a single scanline
is received correctly, a RTN (ReTrain Negativ) is sent. This means a
total page reject and sender normally gives up!
Attention: If '-x' commandline switch is in effect (saving raw data)
or ECM is selected, copyquality is NOT checked.
Note: Frec shows copyquality both in DEBUGFILE and onscreen, like
"Page n decompressed <lc,blc,cblc,llc>".
lc . . . total decompressed correct scanlines,
blc . . total detected bad lines,
cblc . . detected maximal consecutive bad scanlines and
llc . . lost scanlines if LINEBAD DELETE is selected.
This may match modems +FPTS (+FPS) report but if FREC has detected
more errors than modem, FRECs decision counts and modems page status
parameter is overwritten!
PERCENTAGEGOOD <1-100>
Gives Frec an upper boundry for deciding to send RTP (ReTrain Positiv)
and force a retrain. If the percentual part of correct received scan
lines is equal or above this value, a MCF (MessageCoFirmation) is
sent. Defaults to 100 (%) but should be set to 95 or 99 if partial
page errors could be accepted.
CONSECUTIVEBADMAX <1-255>
If detected consecutive bad scanlines are above this limit, FREC will
send a RTP. Consecutive bad scanlines are normally a good sign for a
mismatch in compression (1-D versus 2-D) or bitorder of faxdata
(try with '-f1' or '-f2' command line parameter).
LOCALID <local faxnumber>
Is used to form CSI (Called Subscriber Identification) or CIG (CallInG
subscriber identification). CSI is sent to modem as +FLID (+FLI) and
CIG is sent as +FCIG (+FPI).
Attention: This parameter is mandatory, Frec is stopped if not defined!
Note: Only '+', ' ' and '0' - '9' are valid characters! All other
characters are invalid and strictly discarded by Frec. String length
is limited to 20 characters.
STATIONID <your company or elsewhat>
This information is only transmitted, if faxmodem is able to handle
NSF (NonStandardFacility) frames. Usualy, class 1 modems can do it.
LINEBAD <IGNORE or DELETE or PREVIOUS or BLANK>
If a bad scanline is detected, Frec could either IGNORE (default) or
DELETE or copy the PREVIOUS one or leave it BLANK.
Note: Detection of bad scanlines is not a trivial job. On bad phone
lines normally single bits change their state and resynchronisation
(to next scanline) could be performed. If DCE-DTE connection is
distorted (e.g. 14400 bps carrier in class 2 with 19200 bps DCE-DTE),
one ore more bytes are lost and resynchronisation may skip one ore
more scanlines.
Hint: Avoid 14400 bps carrier in class 2! Keep in mind, that time
between scanlines effects transmission time more than bitrate. Use
class 1 if highspeed is wished. Frec can decide if overall performance
is good enough. Even if modem accepts 14400 bps training, DCE-DTE
connection may limit the result. Because of DLE-shielding bursts of
more than 1920 CPS may occure! A carrier of 14400 bps yields in
14400 / 8 = 1800 CPS.
FAXCLASS <1 or 2 or 2.0>
Select a fax class, your modem is able to handle. Frec is designed to
deal with the standardized methods of class 1 (EIA/TIA-578) or class
2.0 (EIA/TIA-592). ONE version of the manufacturer specific class 2
(publicated either as CLASS_2.TXT from SUPRA or for the 28800 bps V.FC
data-pump from ROCKWELL) is relativly compatible to class 2.0 in
receive mode. Frec supports (without any warranty) this class 2 also.
Although nobody will believe, first choice of fax class should always
be class 1. All lowprice modems support this class in an excellent
manner. As a rule of thumb: the cheaper the modem the lower the fax
class :-)
Manufacturer specific fax classes other then the above (like Zyxels
class 6 or the AT#.. version of class 2) or not supported!
FAXBAUDRATE <DCE-DTE bitrate>
Only if fax class 2.0 (two point zero) is used, higher values than
19200 can be defined here. In class 1 or class 2 strictly use 19200 or
leave the default of 19200.
Some modem on the market allow higher bitrates than 19200 in class 1
and class 2. For 14400 bps carrier, 38400 bps DCE-DTE is highly
recommended in this case of modem.
DATABAUDRATE <DCE-DTE bitrate>
Set to a desirable bitrate or do not use this setting.
RESET <modem command>
It is recommended to use either ATZ or AT&Fn to bring modem to well
defined state. See also flowchart of initialisation. A response of OK
must come from modem or FREC will abort.
Note: modem_init() is not performed if Frec is called with '-p'
command line parameter.
Save callers BaudRate
Switch BaudRate to DataBaudRate
If RESET is defined -> send <modem command> to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
If FaxBaudRate not equal to DataBaudRate -> switch to FaxBaudRate
Send AT+FCLASS=n to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
While INIT
Send <modem command> to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
If fax class is 2 (or 2.0) -> send AT+FLID (+FLI) to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
Send AT+FCR=1 to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
Aend AT+FDCC (+FDC) to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
If FREC should poll a fax from elsewhere ->
Send AT+FSPL=1 (+FSP) to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
Send AT+FCIG (+FPI) to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
else ->
If FREC is frontend for FSEND to satisfy poll request ->
Send AT+FLPL=1 (+FLP) to modem
Wait for OK response
If response not equal OK or timeout -> abort Frec
ATTENTION! If FREC is called from elsewhere (mailer or other front end)
all of the above initialisation and decisions MUST be performed before
FREC is called! Changing to FaxBaudRate (if CHANGEBAUD is defined) will
occure after receiving OK just before AT+FDR is sent. Keep in mind,
that certain modems need 19200 bps just before switching to fax class!
INIT <modemcommand>
Unlimited number of additional commands to modem which must be
acceptable in the appropiate fax class. See also the flow chart which
is performed while initializing the modem. A response of OK must come
from modem or Frec will abort.
CAPABILITIES <vr,br,wd,ln,df,ec,bf,st[,jp]>
Default is 1,3,0,2,0,0,0,0,0 which means: high resolution, maximal
9600 bps in V.29 modulation, 8 inches paperwidth, endless paperlength,
1-D Huffman coded data, no ECM, no BFT and 0 ms wait between scanlines.
With these values, successful transmission to each receiving station is
possible. If the receiver is not capable of any of these values, Fsend
will adjust to such values, the receiver can (and must) handle.
vr (vertical resolution):
00 . . . normal 204x98 dpi (R8 x 3.85/mm),
01 . . . fine 204x196 dpi (R8 x 7.7/mm),
02 . . . high 204x392 dpi (R8 x 15.4/mm),
04 . . . extra 408x392 dpi (R16 x 15.4/mm),
08 . . . 200x100 dpi,
10 . . . 200x200 dpi,
20 . . . 200x400 dpi,
40 . . . 300x300 dpi,
80 . . . 400x400 dpi (not defined in T.32)
All values for 'vr' are in hexadecimal notation!
Not all resolutions are supported!
br (bit rate):
0 . . . 2400 bps
1 . . . 4800 bps
2 . . . 7200 bps
3 . . . 9600 bps
4 . . . 12000 bps
5 . . . 14400 bps
wd (page width):
R8 R16 200 300 400
d/mm d/mm dpi dpi dpi
0 . . . 1728 3456 1728 2592 3456 (A4 width)
1 . . . 2048 4096 2048 (B4 width)
2 . . . 2432 4864 2432 (A3 width)
3 . . . 1216 2432 (A5 width)
4 . . . 864 1728 (A6 width)
Not all resolutions are supported!
ln (page length):
0 . . . A4 length, 297 mm (not supported)
1 . . . B4 length, 364 mm (not supported)
2 . . . Unlimited length
df (compression scheme):
0 . . . 1-D Modified Huffman (ITU T.4),
1 . . . 2-D Modified read (ITU T.4),
2 . . . 2-D Uncompressed mode (ITU T.4), (not supported)
3 . . . 2-D Modified modified read (ITU T.6)
ec (error correction):
0 . . . do not use ECM
1 . . . Enable Annex A/T.30, ECM (only supported in class 1)
2 . . . Enable Annex C/T.30, half duplex (not supported)
3 . . . Enable Annex C/T.30, full duplex (not supported)
bf (binary file):
00 . . Disable file transfer modes,
01 . . Select enable BFT (ITU T.434), (not supported)
02 . . Select document transfer mode, (not supported)
04 . . Select edifact mode, (not supported)
08 . . Select basic transfer mode, (not supported)
10 . . Select character mode Annex D/T.4, (not supported)
20 . . Selcet mixed mode Annex E/T.4, (not supported)
40 . . Select processable mode (ITU T.505) (not supported)
All values for 'bf' are in hexadecimal notation !!!
st (time/scanline):
vr = 0 vr > 0
0 . . . 0 ms 0 ms
1 . . . 5 ms 5 ms
2 . . . 10 ms 5 ms
3 . . . 10 ms 10 ms
4 . . . 20 ms 10 ms
5 . . . 20 ms 20 ms
6 . . . 40 ms 20 ms
7 . . . 40 ms 40 ms
jp (JPEG coding):
00 . . Disable JPEG coding,
01 . . Enable JPEG coding (ITU T.81), (not supported)
02 . . Full color mode, (not supported)
04 . . Enable preferred Huffman tables, (not supported)
08 . . 12 bits/pel/component, (not supported)
10 . . No subsampling (1:1:1), (not supported)
20 . . Custom illuminant, (not supported)
40 . . Custom gamut range (not supported)
All values for 'jp' are in hexadecimal notation !!!
CLEANUP <modem command>
Define any modemcommand which will be sent to. No check for any
response is done. CLEANUP is performed in hang_up() like:
If fax class is 1 -> send ATH0 to modem
Drop DTR line for 300 ms
If FaxBaudRate not equal to DataBaudRate -> switch to DatabaudRate
If actual BaudRate not equal to callers BaudRate ->
Switch to callers BaudRate
If CLEANUP is defined -> Send <modem command> to modem
Trash modem response
FAXPATH [SUB [PWD]] <path to where incoming faxes are stored>
This entry is MANDATORY!
If combined with FAXLOG and FAXIDX, compatibility to third parties
programs is given, incoming faxes are stored in <path>\FXnnnnnn.FAX
files and entries in FAXLOG is done. FAXIDX is also incremented.
If used without FAXLOG and FAXIDX (at least one of both keywords
must have OFF in CFG), incoming faxes are stored in
<path>\FRECnnnn.TIF, where '.TIF' may be replaced by setting TIFEXT
in CFG (look there).
Filetemplates are no more supported!
Values for SUB and PWD can be supplied. If caller sends a SUB-frame
(Subaddressing), incoming faxes are store in the FAXPATH with the
defined SUB for it. Optionally, a PWD (password) can be defined. If
caller sends SUB and PWD, both must match to select FAXPATH.
It is recommanded, to define one FAXPATH without SUB and PWD, to give
caller without this a chance.
Examples:
FaxPath X:\PATH\ALLFAXES
FaxPath 123 Y:\LANPATH\USERFAX
FaxPath 123 987 Y:\LANPATH\PROTFAX
First one is the 'normal' entry and compatible with former versions of
FREC. Second one defines a subaddress (123) which yields in routing
faxes with subaddress 123 to this path. Third one defines a
password (987) protected path for callers, who supply both. FAXPATH
is also used, to form fully qualified drive, path and filenames for
FAXLOG and FAXIDX, which means, that each 'subaddres' has its own log
and index!
FAXLOG <file name> | OFF
Filename to FAX.LOG and only neccessary, if other than
'FAX.LOG'. Received faxes from FREC will be joined to FAX.LOG.
Each well received fax (hangup code 0) is flagged as 'Rcvd'. If fax is
received in (partial) error or even no session was established at all,
entry in FAXLOG is flagged as 'BadRcv'. See also keyword NOLOGONBAD.
FAXIDX <file name> | OFF
Filename to FAX.IDX and only neccessary, if other than
'FAX.IDX'.
FAXDEBUG <[+]x:\path\frec.log>
This is FREC log and debugging file. Nearly all activities are stored
in this file. If a '+' precedes the path, append mode is used: one log
is chained to the next. Select NUL as filename to disable logging.
The logfile contains a lot of informations in case of errors or
situations where help is needed. Bugreports to the author are only
sensful if this logfile is part of the report.
DIAL <dial command>
Default, a ATD is used. You can define here ATDP or ATDT, if your modem
is not able to distinct between pulse and tone dialing.
COMPORT <COM device>
This keyword is mandatory. If Frec is called with port handle (from
elsewhere) this keyword must exist! The name of the com device is
used as a unique identifier for internal use.
INITFIFO
If a hardware fifo (UART 16550) is detected by COM-device driver, the
fifo is initiallized to Rx=8 and Tx=16.
BINKLOG <file name>
Fully qualified drive, path and filename to your mailers log file. Used
either if FREC works only as an converter for PAGEnnnn.FAX to TIF or
if FREC is used in two pass mode (filename may be any). Supported is
BinkleyTerm 2.50 EE (by Michael Buenter), BinkleyTerm 2.59, 2.60 and
2.60 XE (by Vince Periello and authorized coauthors) and CantLoup/2
(by Michael Buenter).
Xenia/2 (by Arjen Lentz) is not (yet) supported, because the raw fax is
stored in Zyxels ZFAX format, which is in fact only useable for
one single page.
Maybe, Arjen will be able to read 'spagetti code' in future and switch
to senseful fax formats :-)
DEBUGIDLEPRIORITY <value> or DEBUGREGULARPRIORITY <value>
These keywords, which are mutual exclusive, define the priority (0-31)
for the task (thread) which writes the data to FAXDEBUG file. Default
is IDLEPRIORITY 30. Change this setting only, if you are absolutly sure
knowing what you do! Lower priority may yield in a endless blocking
debug_thread! No data will be written to FAXDEBUG and FREC may become
'uncloseable'. On very slow or high stressed machines, you can
try REGULARPRIORITY 0, if IDLEPRIORITY blocks writing to FAXDEBUG.
Attention: It was reported by users, that some CPU load meters (like
MEMSize or CPUDrive) will TOTALY brake down working of debug_thread.
If FREC seems to be blocked, quite after fax reception is finished,
and will never be closed (even if 'killed') than omit using of such
utilities!
SAVEIDLEPRIORITY <value> or SAVEREGULARPRIORITY <value>
These keywords, which are mutual exclusive, define the priority (0-31)
for the task (thread) which writes fax file to disk. Default is
IDLEPRIORITY 31. Lower priority may slow down writing, yielding in
incorrect faxreception! SAVEPRIORITY must be higher than
DEBUGPRIORITY. On slow or high stressed machines, try
REGULARPRIORITY 1. You can disable this priority switching by using
the '-fastsave' commandline switch (which is in fact the same as
REGULARPRIORITY 0).
Additional information:
All file and path specifiers in configuration file are checked against
%<environment>%. If a valid environment entry is found, %<env>% is
replaced by the content of the variable, e.g.:
SET LOG=D:\LOGFILES
BinkLog %LOG%\BINKLEY%TASK%.LOG
FaxDebug %LOG%\FREC%TASK%.LOG
A special 'replacement' is done in all file name entries in configuration
file when '%TASK%' is detected. %TASK% (must be uppercase) is replaced
by the defined task number.
If using FREC.DLL with Cantaloup mailer, the task number from mailer is
provided to Frec. Nevertheless you can overwrite this task number in
'ExtrnDesc' by using '-TASK<n>' command line parameter.
If a debug file is defined and this debug file can not be accessed, than
a 'default' in the root of the current drive (\FREC.DEB) is used instead.
It is strongly recommended to use a debug file !! In case of misbehaviour
99% of faults can be localized quickly and (from the author :-).
-------------------------------------------------------------------------------
COMMAND LINE PARAMETERS AND SYNTAX
-------------------------------------------------------------------------------
The format of the commandline is as follows:
FREC <switch> <switch> ...
-c<config file>
Default Frec assumes the configuration file is named FREC.CFG and
located in the current directory. The '-c' command line parameter
can be used to define an other path and file name.
Configuration file can also be supplied via environment:
SET FAX=x:\path\frec.cfg
or
SET FAXCFG=x:\path\frec.cfg
-Task<n>
Where <n> specifies the task number to be used. See also [TASK <n>]
and [COMMON] keywords in configuration file. If this parameter is
not used the common task will be used.
-s<WAIT_OK>
In accordance to fax standards, Frec uses the +FCO (or +FCON) response
from modem to detect a fax call (in fact the HDLC-flags in V.21). If
Frec is called from a FidoNet mailer than +FCO (or +FCON) is already
received when Frec takes over control (this modem response is used to
spwan Frec) and '-sWAIT_OK' parameter must be used to ensure correct
functionality. Default is WAIT_FCON that means Frec will wait for +FCO
(or +FCON) modem response in class 2.0 (or 2).
-x
Realtime decompression and creation of Tiff is switched off. Frec will
work in a minimal state and will save raw data as it comes out of the
modem if '-x' parameter is used. Only inserted DLEs are stripped and
received bytes are inverted back to their regular form (MSB first) in
class 2.0 (or 2).
Note: This parameter also is used to perform the first passage of two
passage fax receive mode. A 'BINKLOG' file must be defined to store all
session parameters needed for the second passage (convertig raw fax
data to Tiff). Also see '-i' parameter.
-p<com port handle>
If this parameter is used, Frec assumes it is called by a FidoNet
mailer or other front end. Note: The port handle is not the same as
the port number (e.g. COM1)! The port handel must be put at Frec's
proposal by the FidoNet mailer or front end. Only 'FAXBAUDRATE' is
set if 'CHANGEBAUD' is selected in configuration file. No modem
initialisation is performed. Hang_up() and close_port() are called.
While in hang_up() DTR-drop and 'CLEANUP' is performed, close_port()
should be without any effect. Note: All initialisation must be done by
the FidoNet mailer or other front end.
-ForceV33
Signal only V.33 for bitrates higher than 9600 bps (class 1 only).
-PollSEP<numerical page indicator>
Is used to make a SEP (SElective Polling) frame when polling a fax
from somebody. Also see '-o' parameter and 'POLLFILE'.
Attention: Only '0' - '9', '#' and '*' are valid characters. All other
characters are invalid and strictly discarded by Frec. String length
is limited to 20 characters. '-PollSEP' can be used in Class 1 and 2.0
(if supported by the modem) only!
-PollPWD<numerical password>
Is used to make a PWD (PassWorD) frame when polling a fax from
somebody. Also see '-o' parameter and 'POLLFILE'.
Attention: Only '0' - '9', '#' and '*' are valid characters. All other
characters are invalid and strictly discarded by Frec. String length
is limited to 20 characters. '-PollPWD' can be used in Class 1 and 2.0
(if supported by the modem) only!
-NoFineSign
Some general switched network suppliers demand a special sign on
each fax page transmitted in 'fine resolution'. Frec therefore places
a small black rectangle in the right bottom corner of each 'fine
resolution' page to satisfy that. Using '-NoFineSign' this feature
will be deactivated.
-FsendExe
Overrides 'FRECDLL' keyword in configuration file. This parameter may
be used to temporarly use FSEND.EXE as fax sender instead of calling
FSEND.DLL to do that.
-FastSave
Overrides 'SAVE...PRIORTY' keyword in configuration file. The fax file
is saved with priority REGULAR 0. This effects only Tiff saving and not
saving fax raw data in PAGEnnnn.RAW files.
-PollServer
If Frec is used as a front end for FSEND to satisfy poll requests,
Frec is disabled to receive fax. T.4 transmitter bit in class 1 is
not cleared because a lot of fax machines and fax modem will fail if
that is done.
-DISPoll
Normally, if Frec is used to poll a fax form somebody, a DTC (Digital
Transmit Command) is sent to indicate your wish to poll for a fax
instead of sending a fax. For class 1 alternativly a DIS (Digital
Identification Signal) may be sent, mainly to test the fax poll server
if capable of this condition.
-z
Frec will store received fax files in a format defined by ZyXEL. It
is recommended, not to use this format or only to use it in conjunction
with '-e' parameter to force single page storage. ZFAX format is not
able to deal with different resolution and compression in a single
multipage fax file. File extension is set to '.FAX' and 'OUTFILLORDER'
is set to '2'.
-ECMraw
If this parameter is used, all received fax data will be stored in
'BLOCKnnn.RAW' files in case of an ECM (Error Correction Mode)
connection. The contents of these files is in fact senseless for the
user, but from vital interest for Frec if any ECM protocol failure
is detected.
-ECMError<error count>
For testing purposes only! Do not use it!
Attention: ECM reception in class 1 is already implemented in Frec.
The functionality is not fully tested yet. This parameter says Frec
to act as if partial frame errors have been detected which shall force
the sender to retransmitted the corrupted data.
-g<phone number>
Frec calls the phone number to poll for a fax. Keep in mind, that some
fax modems (in class 2) are not able to poll for a fax. In that case
use class 1 instead if your fax modem supports it.
-l<faxclass>
This parameter overrides 'FAXCLASS' in configuration file. Only
senseful, if Frec is called from FSEND or an other front end.
Attention: 'INIT's in configuration file have to match the fax class
or must not be used. Fax class 2.0 is internal coded as '3'!
-o<poll file> [<numerical page indicator>]
Exactly the same as 'POLLFILE' in configuration file. The file name
will be added to the list of files which will be sent if an fax poll
request from somebody is received. You can send bitmap ('.BMP'), Tiff
('.TIF') or text files (also see 'TEXTEXTENSION'). You can define as
much files as the command line can accept. Wildcards (*, ?) are also
allowed. A blank separated 'numerical page indicator', following the
file name is possible (also see '-o@'). This 'pageindicator' must be
one number (only '0' -'9', '#' and '*' and no blanks) and must not have
not more than 20 digits. Note: Poll files from '-o' are placed first
(before 'POLLFILE' entries) in the file list.
-o@<file name>
As an enhancement to the '-o' option, you can instead define a
pointer file, which contains the file names. Each line must contain
only one filename. Wildcards (*, ?) are allowed. In accordance to
'selective poll', a 'numerical page indicator' may also be given.
Content of file POLLFILE.LST:
X:\PATH\NEWLIST.TXT
Y:\OTHERPATH\FILELIST.TXT 1
Z:\NEWPATH\ECHOLIST.TXT 2
Which means, NEWLIST will be sent to all callers whereas FILELIST only
will be sent to those callers supplying '1' in SEP frame and ECHOLIST
only will be sent to callers supplying '2' in SEP frame. If the caller
does not use any SEP frame, than ALL three files will be sent.
-a<pipe name>
A pipe of the given name will be created to which all screen output
will be sent.
Note: Frec uses DosCreateNPipe() with open mode NP_ACCESS_OUTBOUND
(outbound pipe - server to client) and pipe modes NP_NOWAIT (non
blocking mode) and NP_TYPE_MESSAGE (message type pipe) to create the
pipe. DosConnectNPipe() is used to connect the pipe, DosWrite() to
write to the pipe and DosDisConnectNPipe() and DosClose() to close
the pipe at program termination.
-k<Tiff compression>
Select a compression scheme (default is 3) used for the stored decoded
fax files. The following compression schemes are available:
<1> . . . uncompressed,
<2> . . . 1-D Huffman, without EOL
<3> . . . 1-D Huffman, as defined in T.4
<4> . . . 2-D Read, as defined in T.4
<4.1> . . 2-D Read, without EOL, starting
from an imaginary white line
<32773> . PackBits compression.
Note: Compression scheme 5 (LZW) is not supported because of copyright
protections in various countries.
-i<raw fax data file name>
Frec 'conversion only' mode is selected when using this parameter. Any
number of '-i' parameters are allowed (the only limit is the maximum
length of a single command line). Wildcards (*, ?) are supported. Frec
reads in raw fax data (exactly as received from modem) - e.g. as stored
by Frec using '-x' parameter or also raw fax data files generated by
internal fax routines of some FidoNet mailers like BinkleyTerm or
CantaLoup/2. If a mailer log file (see 'BINKLOG') is defined, required
fax session information (resolution, coding scheme, ...) will be
extracted from it. This performes the second passage of Frec's two
passage operating method (also see '-x' parameter).
Note: Try with '-f1' or '-f2' if conversion fails because of bitorder
mismatch. Also try '-FDCC:vr,br,...' parameter to specify session
parameters manually.
Attention: ZFAX file format is not subject of this parameter. Single
page ZFAX files may be converted, but it is not the originally job of
Frec, to do that.
-FDCC:<capabilities>
This parameter replaces '-1' and '-2' parameters. It can be used to
submit a DCC (current session capabilities) value for the raw fax data
supplied with '-i' parameter. Only values for compression scheme and
resolution are used.
-h or -?
A short help screen is shown. This printout can be redirected into
a file.
-v<faxviewer>
If FREC is not operating in raw data mode ('-x' parameter), an external
fax viewer (please refer FAXVIEW.DOC for more information) can be used
to display an incoming fax in realtime on the screen.
Note: On slow or highly stressed machines, especially in class 2 or
class 2.0 negotiation of session parameters may fail or no fax data is
displayed. Also see 'CLMINIMIZEDNOVIEW'.
There are TWO possible modes to use:
1) <faxviewer> is the name of a compatible viewer (obviously
FAXVIEW.EXE), which will be started (by DosStartSession) and closed
by FREC.
2) <faxviewer> is the name of a pipe (eg. '\PIPE\LINE1'). In this case
the viewer (FAXVIEW.EXE) must be already loaded (see FAXVIEW.DOC)
and is only actived by FREC (by pipe).
-BITS or -LARGE or -STANDARD or -PREVIEW
Scaling option for optional external fax viewer.
Note: Do not use 'scaled' option in FAXVIEW.EXE.
-q
If the external fax viewer is used in combination with '-i' mode,
Frec waits after each page for a keystroke. This option is helpful
to watch each single page of a fax.
-f<1_or_2>
Bitorder in fax raw data. Default is 2, which is the 'normal' order.
-e
Forces Frec to generate single page Tiff files. Default, all pages are
stored together in one multipage Tiff file. But not all programs are
able to read all pages stored in a multipage Tiff file.
-d
If used, input files ('-i') are deleted after conversion.
-------------------------------------------------------------------------------
ERROR LEVELS USED BY FREC
-------------------------------------------------------------------------------
<0> . . . . no error, at least one page received
<1> . . . . error, no page received
<2> . . . . wait for RING aborted
<20> . . . DATA received, finish with open port
<100> . . . deb_thread not started
<101> . . . com_thread not started
<102> . . . bink_thread not started
<103> . . . decompr_thread not started
<104> . . . time_thread not started
<251> . . . SIGNAL termination
<252> . . . modem init error (timeout or ATV0 is set)
<253> . . . COM does not exist or is already in use
<253> . . . COM error get/set parameters
<253> . . . can not initialize COM
<254> . . . error in CFG
<255> . . . no commandline parameters
<255> . . . incorrect commandline parameter
<255> . . . -? or -h in commendline
<255> . . . -i<filename> not found
Note: If FSEND is called to satisfy a fax poll request, the error level
of Fsend is returned.
-------------------------------------------------------------------------------
FAX SERVICE CLASS COMMAND SET:
-------------------------------------------------------------------------------
This is a short explanation of the fax service class command set used by
Frec. The commands in parantheses are for fax service class 2.0!
AT+FCLASS=2 (AT+FCLASS=2.0):
Command to set modem to Fax mode. Modem will manage fax session
and negotiates (T.30 protocol).
AT+FDCC=vr,br,wd,ln,df,ec,bf,st (AT+FIS):
With this command you can set the communications parameter
of your fax modem.
vr (vertical resolution):
0 . . . normal (204x98 dpi)
1 . . . high (204x196 dpi)
br (bit rate):
0 . . . 2400 bit/s (V.27ter)
1 . . . 4800 bit/s (V.27ter)
2 . . . 7200 bit/s (V.29 or V.17)
3 . . . 9600 bis/s (V.29 or V.17)
4 . . . 12000 bit/s (V.33 or V.17)
5 . . . 14400 bit/s (V.33 or V.17)
wd (page width):
has to be 0 for use with Frec (1728 pixels)
ln (page length):
This has to be 2 (unlimited length) for use with Frec.
dt (data compression):
0 . . . 1-D Huffman
1 . . . 2-D Read (also see the '-2' command line parameter)
ec (error correction):
0 . . . disable error correction mode
1 . . . enable ECM (only in class 1)
bf (binary file)
This has to be 0 for use with Frec.
st (time per scanline)
0 - 7 . 0 ms - 40 ms
AT+FLID="..." (AT+FLI):
Command to set local station ID.
AT+FCIG="..." (AT+FPI):
Command to set local poll ID. Class 2 modems hardly supports
this, usefull only in Class 2.0!
AT+FLPL=1 (AT+FLP):
Command to indicate that the local station can serve a poll
request from a remote fax. A valid fax document must be ready
for sending (with Fsend).
AT+FSPL=1 (AT+FSP):
Command to indicate that the local station wants to poll a fax
from a remote fax. The remote fax must have a document ready to
poll. Frec can be use either as a 'poller' or as a 'pollserver'!
If you want to know if your modems supports fax-polling do the
following short test: AT+FLPL=? (AT+FLP). If only '0' is reported,
than you modem is obviously not able to support poll ('0,1' must
be reported).
AT+FBOR=n (AT+FBO):
This command is often misunderstood and not so easy to explain.
Normally, FBOR is zero, meaning databits comming over the line
were stored from right to left in a byte (you can see in fax raw
data the byte pattern 4D 9A 80 which stands for an empty, white
scanline). Some fax modems and software uses the invers byte order,
which corresponds to FBOR is one (you see the patter B2 59 01).
Binkley's internal fax reception inverses the bytes also and
stores them in the B2 59 01 order although Binkley gets them as
4D 9A 80. Frec defaults to Binkley's (inverted) byteordering.
AT+FCR=1 (AT+FCR):
The fax modem never can receive a fax when +FCR is not set to 1.
AT+FDR (AT+FDR):
Command to release HDLC-frames in phase B.
+FCON (+FCO):
The fax modem response to signal that the remote station is a
calling fax machine. Initializes phase B.
+FTSI (+FTI):
The fax modem response to show who is calling. This response is
followed by the caller's ID string.
+FDTC (+FTC):
The fax modem response to show who is polling. This response is
followed by the caller's ID string. This is the one and only sign
for Frec to decide that a remote fax wants to poll on us!
+FDCS (+FCS):
The fax modem response to show the current session results. The
information is shown in the same manner as +FDIS (+FIS).
CONNECT (CONNECT):
This message signals the end of frame exchange and start of page
data transmission.
+FHNG (+FHS), +FPTS (+FPS) and +FET (+FET):
Faxmodem responses at the end of pagedata transfer.
+FK (+FKS):
If there is some timing problem with the conversion, Frec will
abort with this command.
-------------------------------------------------------------------------------
FREC AS A CONVERTER OF RAW FAX DATA:
-------------------------------------------------------------------------------
If you want to use Binkley's internal fax facilities you can use Frec
only to do the job of converting the raw fax data from binkley, that is
saved in PAGExxxx.FAX files, into one multipage TIFF. You have to modify
your Binkley batch job as follows:
BINK.CMD
...
If Exist X:\FAX\PAGE????.FAX Goto FAX
Goto NOFAX
...
:FAX
FREC -iX:\FAX\PAGE????.FAX -cX:\FAX\FREC.CFG -k3 -f2 -d
...
:NOFAX
If yout want Frec store eache page into a single Tiff file you have
to use the following commands instead:
BINK.CMD
...
If Exist X:\FAX\PAGE????.FAX Goto FAX
Goto NOFAX
...
:FAX
For %i In (X:\FAX\PAGE????.FAX) Do FREC -i%i -cX:\FAX\FREC.CFG -k3 -f2 -e -d
...
:NOFAX
-------------------------------------------------------------------------------
FREC AS A FRONT END CALLED FAX RECEIVER:
-------------------------------------------------------------------------------
BinkleyTerm will make a fax connect, but will not receive the fax itself.
Instead of receiving the fax data Binkley spawns the com port to the
external program Frec, which will receive the fax data and return back
to Binkley Term after reception.
As a fact, there exists a so called Binkley-Fax-Carrier-Bug in older
Versions of Binkley Term (till the later 2.59 betas)! Binkley checks
the presents of a valid carrier and DOES NOT spawn if not activ.
And there is obviously NO carrier present (except USR modems) when modem
is reporting +FCO(N)! To work around, try AT&C0 to force DCD-line always
in active state.
You have to modify your ANSWER statement in BINKLEY.CFG file so that your
modem answers an incomming call in adaptive answering mode of the fax
service class spezified in FREC.CFG file.
Binkley 2.50EE:
You have to put the following lines into your BINKLEY.CFG file:
ModemFax +FCON
ExitBaud -1 FCON
You have to generate an EXTMAIL.CMD file containing one of the
following lines:
FREC -p%3 -k3 -cX:\FAX\FREC.CFG -sWAIT_OK
to save all pages of the fax session in one multipage TIFF file
or ...
FREC -p%3 -k3 -cX:\FAX\FREC.CFG -sWAIT_OK -e
to save each page of the fax session in a single TIFF file.
Binkley 2.59, 2.60 and 2.60 XE:
You have to put the following lines into your BINKLEY.CFG file:
ModemFax +FCON
Extern Spawn
ExtrnMail <Errorlevel> +FCON
You have to generate an EXTMAIL.CMD file containing one of the
following lines:
FREC -p%3 -k3 -cX:\Fax\FREC.CFG -sWAIT_OK
to save all pages of the fax session in one multipage TIFF file
or ...
FREC -p%3 -k3 -e -cX:\Fax\FREC.CFG -sWAIT_OK
to save each page of the fax session in a single TIFF file.
If you selected the generation of a Netmail after fax reception, you
should also start mail import after FREC in EXITBAUD.CMD or EXTMAIL.CMD.
BinkleyTerm will not recognize the mail itself after returning from
spawning!!!
-------------------------------------------------------------------------------
CANTALOUP/2:
-------------------------------------------------------------------------------
Many thanks to Michael Bünter, who was so kind to let me participate
in the closed beta test of his famous new mailer CantaLoup. From the
first day I got the description of the 'ExternMail-DLL-Interface' in
June 1995, I worked hard of reconstructing FREC to FREC.DLL. Well, I
have done my homework and FREC.DLL is stil ready. Both EXE and DLL have
the same version number and are, in fact, the same product (with little
differences, but compiled from identical C source).
So, FREC.EXE and FREC.DLL are twins, all documentation for FREC.EXE is
still acceptable for FREC.DLL (from now on named 'DLL' if special
meaning is signed).
Special settings in CL.CFG are needed to invoke FREC.DLL.
For class 2 type of faxmodems (all Rockwell chipset modems and Zyxel):
Init ATZ| or similar command which resets to FCLASS=0
Answer AT+FAA=1|AT+FCR=1|ATA|
ExtrnMail FREC M +FCON
ExtrnDesc FREC -cx:\path\frec.cfg -k3 -sWAIT_OK
For class 2.0 type of faxmodems (USR V.FC/V.34 and Zyxel):
Init ATZ| or similar command which resets to FCLASS=0
Answer AT+FCLASS=2.0|AT+FNR=1,1,1,1|AT+FAA=1|AT+FCR=1|ATA|
ExtrnMail FREC M +FCO
ExtrnDesc FREC -cx:\path\frec.cfg -k3 -sWAIT_OK
For class 1 type of faxmodems
Please contact the autor. It will work with a lot of modems, but the
'Answer' part must be constructed carefully for each case.
The part in 'ExtrnDesc' is in fact the same as you use to call FREC.EXE,
expect the '-p<PortHandle> parameter. The porthandle is internally
submitted from CL/2 to the DLL !!!
It is also possible to use FAXVIEW by adding '-vFAXVIEW.EXE' and the
corresponding screenformat like '-STANDARD' as described elsewhere in
this document.
Attention: The DLL does not return any errorlevel, look into FREC.LOG
and CL.LOG for cause of error.
To signal an incoming fax, a new mechanism is invented to the DLL which
results, of course, in a new keyword in FREC.CFG: CLPageOK
Use this feature to select either an ErrorLevelExit of CL/2 or a predefined
Shell or even a Script. For details see the sample CFGs in the paket!
Commandline option in 'ExtrnDesc':
-c<config_file>
This is a absolutely must! The parameter 'ComPort' must also be
defined and match the 'port' in CL.CFG. ISDN is not supported (yet :-)
-sWAIT_OK
Also absolutely required! As far as CL/2 is not able to work with
'ExtrnMail FREC RING' (where -sWAIT_FCON is useful) Frec will be
called in the 'traditional' but less useful way when modem is
reporting +FCON (in Class 2) or +FCO (in Class 2.0).
-k
This is not needed, because the default of Tiff format is compression
in Huffman 1-D which corresponds to '-k3'.
-f
This should not be used! Use the AT+FBOR=1 (Class 2) or AT+FBO=1 (in
Class 2.0) instead.
-z
This parameter is possible but not recommanded (Zyxel ZFax format).
-x
May be used, but in then FREC.DLL will do exactly the same as CLFAX.DLL
and PAGEnnnn.RAW is created for each fax page incoming. One exception
is, that FREC.DLL cannot create task depended files (PAGEttnn.FAX).
-v<PM-driver>
PM-realtime fax image is created on screen as described in
this document. CAN NOT be used in combination with '-x'!
-e
Single page Tiff may be used if necessary.
-i
This parameter must not be used with DLL version of Frec.
-d, -g, -pollsep, -q and -h
These parameters should not be used with DLL version of Frec.
-------------------------------------------------------------------------------
FREC AS A STAND ALONE FAX RECEIVER:
-------------------------------------------------------------------------------
To use Frec as a stand alone fax receiver simply start the program
with the syntax as follows:
FREC -cX:\FAX\FREC.CFG -k3
Where 'X:\FAX\FREC.CFG' is the path and file name of your Frec
configuration file and '-k3' the selected compression scheme.
-------------------------------------------------------------------------------
FREC AS A STAND ALONE FAX POLL REQUESTER:
-------------------------------------------------------------------------------
To poll for a fax from somebody, the syntax is as follows:
FREC -cX:\FAX\FREC.CFG -g123456 -pollsep12
Where 'X:\FAX\FREC.CFG' is the path and file name of your Frec
configuration file, '123456' is the phone number of the remote fax
machine and '12' is an optional page indicator transmitted via a
selective polling (SEP) frame.
-------------------------------------------------------------------------------
FREC AS FAX POLL SERVER:
-------------------------------------------------------------------------------
Configuration is mostly like as Frec as a stand alone fax receiver. In
addition one or more documents have to be defined in 'POLLFILE' (via
configuration file and/or command line parameter). Also 'FSENDCFG'
keyword is required, so that Frec knows the name and
location of the Fsend configuration file. If Frec is used in combination
with a front end (e.g. FidoNet mailer) the AT+FLPL=1 command must be set
in 'ANSWER' or 'INIT' command of the mailer's configuration file!
Frec only will work as a poll server if FSEND.EXE (FSEND.DLL) is found
in the current path or directory (libpath).
Frec 'spawns' (branches) FSEND.EXE (or loads FSEND.DLL) and calls the
TxHandler() which will do the 'send work'. You will (if you can :-) see,
that Frec uses some 'undocumented' commandline parameters when calling
Fsend. Never use these parameters when starting Fsend from command line!
-------------------------------------------------------------------------------
HISTORY OF FREC:
-------------------------------------------------------------------------------
Version 3.51:
Large parts of code (esp threadhandling, memoryallocation, exception-
handling and CFG/CMD-handling) was redesigned. All parts of code, which are
also in FSEND and ANSW were put to FAXPROC, which is from now on a dynamic
link library (FAXPROC.DLL). Linking of C-runtime is never more statically,
instead, C-runtime is linked dynamically (at loadtime) for FREC, FAXPROC and
IMGPROC. So, the overall amount of codesize was reduced. Some keywords in
CFG were also altered:
INBOUNDREC --> INBOUND (sorry for twice altering)
SUBJECTREC --> SUBJECTRECFAX
NEW:
InitFifo (see above)
Not longer supported:
FSENDDLL (see FSENDCFG)
Finally, the COM port open methode is now checked in FAXPROC. Only if COM
is opend in READWRITE and SHARE_DENYREADWRITE, work is continued! I hope
some problems (when called from a mailer, which uses a patched MAXCOMM to
open COM in SHARE_DENYNONE mode) are solved now. Also SIO.SYS in
'share mode' should never more work!
Maybe some users will disagree, but 'sharing' a communication port is NOT
usefull on a multitasking environment! Each application MUST have unique
access to its own resources.
Version 3.50:
Only internal test version and not distributed.
Version 3.49:
While FREC (and FSEND) grow larger and larger, some system immanent
bugs became more and more effectiv. So, some functions, belonging to
thread handling, were 'perfectized' to avoid system inkonsistence.
Things like DosKillThread() and free() were removed or made more
reliable. Priority settings are still an usually 'unknown' mistery.
As a result of experience, there is absolutly NO BENEFIT in common
priorisation of certain threads! In FREC (and FSEND) parts of code
are set internally to LOWER priority, in case other threads (in
parallel) need more CPU. If CPU consuming threads are in an idle
state, other thread with (temporary) lower priority are set again to
REGULAR priority and threads in idle state are 'boosted' to higher
priority. This sounds like a paradoxon (idle threads have TIMECRITICAL
and heavy busy threads have REGULAR priority) but in fact the result
is better than any other approach:
If thread is idle (has nothing to do), higher priority does NOT EFFECT
other threads, and the idle thread 'comes up' VERY QUICK if anything
is to do for it! On the other side, 'power' of CPU is constant and
CAN NOT be raised by raising priority. So, if one thread needs
(temporarly) more of (the ONE) CPU, an other thread must be limited
in 'power consuming' be setting to IDLETIME.
Version 3.48:
Commandline switches '-RecPWD' and '-RecSUB' are not longer supported
and needed. Functionalyty of them is included in 'FaxPath' in CFG.
Therefore SUBADDRESSING is fully supported and highly compatible to
third parties fax program behavior. FAXLOG and FAXIDX have also
changed their meaning! Both have defaults (FAX.LOG and FAX.IDX) and
should only be altered, if neccessary. Fully qualified filenames will
be constructed from 'FaxPath' and FaxLog/FaxIdx.
Version 3.47:
Frec shall be capable to receive fax in any resolution (only in
class 1), defined in ITU-T.30 (200x400, 300x300 and 400x400 dpi).
This new feature is not tested, because there seems to be no fax
machine (and no fax modem) which do support that. Some new command
line parameters (which partly replaces other ones) added, read
documentation for more information.
Version 3.46:
Frec and Fsend now can use one and the same configuration file.
Certain keywords have been updated, like:
INBOUND -> INBOUNDSEND and INBOUNDREC
SUBJECT -> SUBJECTSEND and SUBJECTREC
It is recommanded, to distinguish between Frec and Fsend portions
of configuration file by using '[TASK <n>]' keyword.
Name of TIFPROC.DLL changed to IMGPROC.DLL.
Atention: IMGPROC.DLL is able to create multipage Tiff with a maximum
of 100 pages! So fax with more pages (in one single session) are cut
off! If you expect to receive more than 100 pages, use single page
Tiff files (parameter '-e').
Version 3.44:
Some versions 3.44 of FREC have a BUG (a great one :-). In 3.44f
revision, this BUG (FREC hangs after Phase E) is eliminated (a
function has get a return value, but the setting of '{' and '}'
while testing return value was not consistent :-)
FREC was tested on WARP 4.0 (Merlin US GA) and it seems, that all
works fine.
Version 3.44:
Minor changes from version 3.42b.
TIFPROC.DLL is reduced because LZW (Lempel, Ziv & Welch) compression
is under patent regulation in some countries. So TIFPROC.DLL is no
longer able to handle Compression=5 (normally known as LZW).
TIFPROC.DLL is 'under study' and will be changed/upgraded when
LZ-compression will work in unrestricted manner!
Version 3.43:
This version was rejected! To much problems occured with TIFPROC.DLL!
Version 3.43:
Version 2.34 is up to date (3.43c) but HUFFMAN.DLL is replaced by
TIFPROC.DLL. As in 3.43b a module named TIFPROC.OBJ was included, now
this module is combined with HUFFMAN.OBJ to form TIFPROC.DLL. Also the
other utilities (Fsend 1.26c and FaxView 0.34b) require TIFPROC.DLL and
do not require HUFFMAN.DLL any more!
Now Tiff and compression/decompression is performed only in one file
(TIFPROC.DLL) and changes influence all EXE and DLL which use this DLL.
HUFFMAN.DLL is only valid for older version as mentioned above.
No significant changes were made to Frec/Fsend/FaxView (only some
details) and are mainly Tiff internas (Fsend will from now on be able
to include color Tiff files in all compression schemes). FaxView has
mutated to a truely Tiff reader, also BMP are furthermore supported
(scaling with BMP will show things not expected :-)
TIFPROC is able to read and write compression 1 (uncompressed),
2 (Huffman without EOL), 3 (Huffman with EOL), 4 (2-D Read without
EOL), 4.1 (2-D Read with EOL), 5 (LZW, maybe under law of patent) and
32773 (PackBit). TIFPROC does not (yet) support commpression 6 (JPEG
as in Tiff 6.0 specification)
While copression 2, 3, 4 (4.1) and 32773 are well optimized,
compression 5 (LZW) is implemented only to do the job and routines are
not optimized and not tested for consistance.
As mentioned, compression 4 will give BEST results on BiLevel
(black&white) documents construted with a typewrite or similar
methodes. A page in A4 dimensions with text in low resolution will
need app. 10-15 kb where values under 5 kb are realistic!
Version 3.43:
is released because in 3.42 there were some things WRONG (linking
FAXPROC.OBJ for EXE to DLL and vice versa).
Version 3.42:
is released now. Main things are EQUAL routines (faxproc.c)
in FREC and FSEND. Therefore both applications can be handled in
one source.
There is a new CFG entry, called LOGBINKLEYSTYLE. Try to use it for
third party LOG-analyzers. The idea comes from Th. Waldmann, I hope
I had understand right. The problem of generating announcing netmail
still exists. If multipage fax is received in error a netmail is
generated if ONLY one good page was received with no sign to the bad
reception. I hope for future, I will solve this problem.
While vers. 3.40 was released in some newer packages, up from 3.41
the SEP frame was 'invented' to make Selective Polling easier. Not
fully tested.
Version 3.40:
has a bug in ECM reception fixed. Nevertheless, ECM is further
in a quite 'unprove' state. The implemented methode to receive the HDLC
frames is in an unorthodox manner and may or may not work with every
modem. This is not a reason of 'not understanding', it is a limitation
of class 1 implementation in current modems on the market! If you are a
'brave' fax receiver, than look to '-ECMraw' commandline switch to
enable storing raw ECM HDLC blocks and send them to the author, if
reception fails.
Version 3.39:
in conjunction with CantaLoup (WB2 or younger) is able to work in
class 1 AND adaptiv autoanswer! Use '-sWAIT_FCON' and set the
'USROBOTICS' keyword in configuration file. Frec will send the "ATO"
command to modem if 'DATA' is detected and resulting modem response
is transfered to CantaLoup.
If well set up, fax receive and pollserver possible.
Version 3.37:
has some enhancements in calling fax viewer. Class 1 reception
with ECM had have some minor bugs which should be fixed now.
A test for a 'locked' bitrate of COM port driver is implemented now.
In cases where it is not senseful to work with a locked speed, Frec
simply gives up.
It is a common behaviour of users to 'lock' the COM port
(especially SIO.SYS).
This is only usefull, if communication software needs bitrates above
57600 bps (e.g. 115200 bps) but can not set this speed by itself!
There is absolutly NO SENSE in 'locking' the port (which is in fact a
'shortcutting' of DosDevIOCtl(SETBITRATE)) in case where software can
properly set the desired speed.
Frec accepts a 'locked' port only, if all of the following conditions
are true:
FaxBaudRate = DataBaudRate = LockedBaudRate
and 'CHANGEBAUD' = 0 (not used).
Maybe, this 'lock-detection-facility' will be cancelled in further
versions of Frec, but in this case, the author will STOP all further
support in cases where failures, based on locked ports, are reported.
It is not the intention of the author, to 'teach' people, how to use
there communication software, but 95% of error reports of misfunction
in fax reception are based on such 'locked' ports.
Some major redesign tooks place, starting from version 3.26! Actually,
no fax modem on the market satisfies all standards belonging to fax.
So, Frec looks like a big patchwork to deal with a lot of fax modems.
Well, this was not my indention! I had redesign (in fact rewritten)
the complete logic of all parts in Frec. My target was 100% accordance
to CCITT-ITU T.4 and T.30 and EIA/TIA-578 and EIA/TIA-592. Because of
the nonstandardized class_2, I hope to have realized a good compromise
for all fax modems with Rockwell-Chipset.
Class 1 should now be as perfect as possible. Also a first try for
ECM is implemented in class 1. Checking of T.4 datastream was improved,
but, in contrary to real faxmachines, not all errorconditions are
treated as an error (if doing so, really ALL fax sending software must
be put to trash :-).
Oh Lord! Why programmers of fax software could not read the standards?
FREC.DLL, which primarly was designed for CantaLoup/2 is now able to
work with almost all programs, which are designed for it. Please ask
the author for details, a documentation of the calling routine is to
hard to write.
Version 3.23:
should have been the LAST version of FREC in this kind of
application.
Well it should not happened :-). Since version 3.24 'was' the best
Frec I ever released, now 3.25 is stil ready. See also to the end
of this document for some bandnew products !!!
One problem fixed in 3.22e which had caused misterious SIGSEGV aborts.
In case of nonexisting path to FAXIDX, FREC gave up. Also ALL fopen()
are checked for error. See also Errorlevel in this document.
With WARP there came the problems :-) IDLE-TIME Priority in WARP is
handeled different like in 2.1(1) ...
While in Frec 3.19 and 3.20 only DebugIdlePriority and SaveIdlePriority
were used to 'finetune' Frec, this solution was not satisfying !!!
It was reported by MANY users, that their FREC session was still
blocked (either between pages or at the end). Different reasons
were detected, e.g. one ore more DOS-Session open with
'pollingroutines in it' or native OS/2 sreen savers or (in my case :-)
MsgEd!
I have NOT fixed the problem yet !!! On my systems (one 486DX2-66 with
L2-cache, one 486DX2-66 without L2-cache, a NoteBook, and a 386DX-25)
Frec behaves quite normal on OS/2 2.1 and values of 0 (ZERO) for
DebugIdlePriority and SaveIdlePriority. When updating both 486DX2-66
with WARP, the PC with L2-cache always blocks when terminating (TIF
was not written to disk).
As a solution, I had closed all OS/2 and DOS-Session and Frec
terminates well. These effects I never see on my NoteBook with WARP.
So I recommanded to increase DebugIdlePriority to 30 and
SaveIdlePriority to 31 but there are still problems on other users
machines.
Version 3.21:
Now, in Version 3.21 of FREC, I have implimented also
DebugRegularPriority and SaveRegularPriority to 'finetune' your
machine.
You should use only ONE keyword (either ...Idle... or ...Regular...).
As a hint: start with 'DebugIdlePriority 30' and 'SaveIdlePriority 31'.
If Frec still blocks a thread, than use 'SaveRegularPriority -31' and
increase this value to values below 0. Do not increase to 0 or above!!!
If you use DebugRegularPriority, do not use Class 1, because frame
timing will come out of sync! As a rule: Save...Priority must be
larger then Debug...Priority!
Many thanks to Thomas Gaul and Juergen Pflanz! Thomas reported a
serious BUG in reading BINKLEY.LOG from a Binkleyterm 2.50 EE Beta E3.
This version of 2.50 EE (I think it is the best Binkley (n)ever
released :-) saves internal received PAGEnnnnn.FAX with a bytelength
of X and writes in the LOG-file a bytelength of X-9. FREC never found
a match between log and real file! With Binkley 2.59 FREC still works
perfect :-)
To answer a 'frequently asked question' here:
Frec can not be used to convert Xenia/2 *.FAX, because these files
are in a 'ZFAX-format' which is multipaged and the SessionInformation
in the header of this file is 'crippled' and NOT useable for a correct
decompression. Also Frec can not read Xenia/2 logfile at all !!!! The
'crippled' header is NOT caused by Xenia/2 (!!!) it is system immanent
of ZFAX fileformat. I hope, the author of Xenia/2 will use (in future)
an other file format to store its faxes.
Thanks to Christian Voelker, for reporting a serious bug in generating
a NetMail after fax reception. This bug may be invented in one of the
last versions and was never seen before.
The feature 'ChangeBaud' is practically working, but fax reception
with some Rockwell-Chipset based modems is not possible in any case.
The problem maker is Binkley and the RxBuffer. Binkley collects a
lot of bytes AFTER receiving the key +FCO(N), which in fact means,
that important information like the +FDCS and +FTSI and the 'vital'
OK are in Binkley's RxBuffer with the wrong bitrate and therefor lost
for ever. Sorry, if you have such an modem, your compromise is: fax
and data at 19200 bps or data-only with higher bitrates!
Removing an error in version 3.17b, thanks to Alberto Pasquale.
Binkley (especially the EE Beta E3-32 ISDN-IBMC) switches to XON/XOFF
transmitting handshake when spawning to ExitBaud.Cmd. FREC now disables
all XON/XOFF handshake in either case (standalone or called from
Mailer).
Obviously, this had no effect with COM.SYS but SIO.SYS makes external
fax reception impossible. Maybe this was the great 'SIO-Bug' in Frec!
Due to some discussion with Thomas Denecke, the new keyword
'ChangeBaud' was added to the configuration file:
Some (older) modems can only transmit their fax data at a fixed rate
of 19200 bps. This is quite a slow bps-rate for data transfers. You
can from now on use your high data bitrate and when FREC is called
from your mailer (after receiving +FCON), DCE-DTE speed is changed
to 'FaxBaudRate' (normally 19200).
You must define 'FaxBaudRate 19200' and 'ChangeBaud' to use this
feature!
Frec changes back to callers bitrate before the 'CleanUp' string is
sent to the modem. Therefore a 'CleanUp ATZ' (or 'CleanUp AT' if you
do not want to change your modem settings) is a MUST, to signal the
new bitrate to your modem!
Some hints, if reception of faxdata is not as good as you expected:
Use the '-x' switch to force the generation of PAGEnnnn.RAW ! You can
easyly convert this fax rawdatafile in a second pass with FREC. With
'-x' enabled, 95 % of FREC is switched off and FREC works only like
'COPY COMx PAGEnnnn.RAW'.
Some mainboards on the market inserts so much waitstates while doing
IO, there is not enough time to make the decompression job. This
belongs also to 'fast' 486 66 MHz CPU-mainboards !!! FREC is tested
with 386SX 20 MHz without any missing byte from COM-port!
If your modem (in Class 2) does not support fax polling, do not
forget to comment out the 'PollFile' entry in configuration file!
A 'quantum leap' to Version 3.00b has taken place:
COM-Port handling and decompression is synchronized via EventQueues
(oh, what a horror :-). Frec is now a little bit smarter in detecting
byte fillorder which is different in Class 2 and Class 2.0. The crazy
'-f' commandline switch is now only neccessary if you want to convert
special RAW files (e.g. without useable entries in BINKLEY.LOG). In all
other cases, you can omit this switch. Many thanks to Claus Matthies,
who gave me the hint with sopen() to read BINKLEY.LOG even if Binkley
is running!
Version 2.21:
New in 2.11b, Frec can be used as a Fax-Poll-Server. You define a
document which can be requested from a remote fax. For this purpose,
Fsend is needed! FSEND.EXE (from the same autors) must be in the same
directory as Frec or in the 'PATH'.
Some enhancements took place from 2.04 to 2.08, 2.09b adds polling
feature to Frec. Class 2.0 is perfectly running on Zyxel (6.13) and
USR. The new '-x' switch allows a two-step operation on slower systems
like 386SX. First Frec generates PAGEnnnn.RAW in the same way as
Binkley's internal faxreception. In a second step, FREC converts the
PAGEnnnn.RAW to *.TIF.
Because Fsend, the opposit to Frec was finished, it seems a good thing,
to combine some functions in one DLL for both. So HUFFMAN.DLL serves
for Frec and Fsend.
Version 2.03:
Bug fix in 2.03b: Thanks to Ferenc Pal, detecting a serious bug in
handling the callers phonenumber when using FREC only as a converter
for Binkley PAGEnnnn.FAX. This bug should be fixed now.
New Features:
ZyXEL Fax Files instead of TIF-File may be generated by use the '-z'
switch in the commandline. But remember! Frec does not support Zyxel's
propriatory FCLASS=6 fax modus!
Many thanks to Juergen Roehrbein for solving the problem with the
'Lost Carrier' error in Binkley when spawning to EXITBAUD.CMD. Juergens
workaround for Rockwell-Chipset-Modems will use the inactivity-timer
S30 to compensate AT&C0:
Answer AT&C0S30=nnn|....
Obviously, some modem interprets 'nnn' as tenth of seconds, other as
true seconds. so you should try to get an inactivity timeout of
aprox. 30 sec.
-------------------------------------------------------------------------------
FINALY:
-------------------------------------------------------------------------------
Please also read carefully FREC.CFG and FSEND.CFG.
FSEND and FREC are updated either if there is a serious bug or if some
new or requested features were added. The documentation is updated, if
there is time in the authors 36 hour day :-).
Looking backwards, Frec was a 'partial' success. More then 90 % of users
only 'misuses' Frec as a converter for Binkley raw faxes (as originally
R2T has done). Quite a lot of users (mainly in USA) were 'forced' by me
to change from R2T to Frec, but they never try to use Frec as a fax
receiver.
Frec and its 'debug file' has teached a lot of people how fax reception
works and has shrinked the mistery, named FAX :-)
<end of doc>