home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / fax067.zip / frec.doc < prev    next >
Text File  |  1997-04-21  |  81KB  |  1,740 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                              Frec Version x.yyz
  12.                               Reference Manual
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.            Created 1992 - 1997 by Dr. Harald Pollack & Bernhard Seidl
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. -------------------------------------------------------------------------------
  31.     ABBREVIATIONS USED IN THIS DOCUMENTATION
  32. -------------------------------------------------------------------------------
  33.  
  34.     DTE . . . . . . . . . . Data Terminal Equipment, your PC
  35.     DCE . . . . . . . . . . Data Communication Equipment, your MODEM
  36.  
  37.     CCITT/ITU T.4 . . . . . International standard for coding fax data.
  38.     CCITT/ITU T.30  . . . . International standard for transmitting fax over
  39.                             a public switched telephone network.
  40.  
  41.     ANSI/EIA/TIA-578-1990 . Asynchronous Facsimile DCE Control Standard
  42.                             Service Class I (the common used class 1).
  43.  
  44.     ANSI/TIA/EIA-592-1993 . Asynchronous Facsimile DCE Control Standard
  45.                             Service Class II (the real class 2.0).
  46.  
  47.  
  48.  
  49. -------------------------------------------------------------------------------
  50.     WARRANTY:
  51. -------------------------------------------------------------------------------
  52.  
  53.     There is no warranty on this program. You can use it for your own risk.
  54.     The program should work the best way it can. If you detect some
  55.     malefunction or bugs, please report it with the correspondent FREC.DEB
  56.     log file to the autor. Without the log file it is almost inpossible to
  57.     find and fix a bug. Common bugs will be corrected if they are of vital
  58.     interrest to the program. Wishes for some extentions (but not printing
  59.     and viewing) and hints for making things better are welcome.
  60.  
  61.  
  62.  
  63. -------------------------------------------------------------------------------
  64.     SOURCE CODE OF THE PROGRAM:
  65. -------------------------------------------------------------------------------
  66.  
  67.     There was very much work and brain in creating Frec. To much for one
  68.     person. So, if anybody has senseful interrest in getting the source
  69.     code (IBM CSet) he could get it. There is only one restriction: do not
  70.     name your program 'Frec'. You can do anything with the sourcecode, read
  71.     it, sell it, eat it, use it, but please do not make a clone named Frec.
  72.     Due to the enhancement to FREC.DLL necessary includes (CLGLOBAL.H and
  73.     COMCAPI.H) are not supplied.
  74.  
  75.  
  76.  
  77. -------------------------------------------------------------------------------
  78.     ABOUT FREC
  79. -------------------------------------------------------------------------------
  80.  
  81.     Frec is a multi-featured fax receive software usable together with
  82.     a FidoNet mailer or standalone. All functionality of Frec is in
  83.     accordance to ITU-T.4, ITU-T.30, EIA-578 and EIA-592.
  84.  
  85.     The evidence of existence of a lot of non conformable fax modem and fax
  86.     receiving software to these standards, makes it more than possible, that
  87.     faxes, received with Frec, will fail or be corrupted! This often is not a
  88.     misbehaviour of Frec! But nobody is perfect and you have detected a bug.
  89.  
  90.  
  91.  
  92. -------------------------------------------------------------------------------
  93.     UPGRADING TO A NEW VERSION
  94. -------------------------------------------------------------------------------
  95.  
  96.     New versions of Frec are always packed in LZH type archives. It is
  97.     recommended to replace all EXE and DLL files and not to use parts of
  98.     older version (especially DLL files). New versions of Frec often use
  99.     new or modified configuration entries and commandline options. Please
  100.     read all available documentation carefully before using a new version.
  101.  
  102.  
  103.  
  104. -------------------------------------------------------------------------------
  105.     THE CONFIGURATION FILE
  106. -------------------------------------------------------------------------------
  107.  
  108.     The configuration file keeps all information required. FREC.CFG needs
  109.     to be modified to suit your system. Please have a look at the sample
  110.     configuration file included in the Frec package. In the following
  111.     section all keywords and parameters are listed and described.
  112.  
  113.  
  114.     NOLOGONBAD
  115.         If Frec is used in conjunction with third party environment (e.g.
  116.         FaxWorks, see also FAXLOG and FAXIDX keywords) and this keyword
  117.         is used, no log entry will be generated if there occured an error
  118.         while receiving or no fax session was established.
  119.  
  120.     [TASK <n>]
  121.         Starts a section within the configuration file which only effects
  122.         the selected task. To end a section you can either use another
  123.         [TASK <n>] keyword which would start another section or use the
  124.         keyword [CONNON], described below.
  125.  
  126.     [COMMON]
  127.         All keywords after this statement belong to all tasks.
  128.  
  129.     CONFIGEND
  130.         Frec will stop working off the configuration file and everything
  131.         following this keyword will be ignored.
  132.  
  133.     LOGBINKLEYSTYLE
  134.         Using this keyword Frec will generate BinkleyTerm like log entries.
  135.  
  136.     USROBOTICS
  137.         Special keyword to indicate that a USRobotics modem is used. Must
  138.         be set to allow some workarounds for nonstandardized actions!
  139.  
  140.     OLDDTR
  141.         Frec uses the methode of 'DTR-drop' (switching modemline DTR off
  142.         and on) to reset the modem and to force a on-hook condition. This
  143.         switching might be done in two ways (different calls to DosDevIOCtl).
  144.  
  145.     CLMINIMIZEDNOVIEW
  146.         If FREC.DLL is called from a minimized CantaLoup/2, FaxView is not
  147.         started at all. If machine is highly stressed this is recommanded.
  148.  
  149.     CHANGEBAUD <n>
  150.         Some modems on the market must have 19200 bps set in phase C (faxdata
  151.         reception). To properly switch to 19200 bps, FAXBAUDRATE must be set
  152.         to 19200 also.
  153.         Depending on value <n>, the switch is performed at different states
  154.         of (nonstandardized) Class 2 protocol:
  155.             0 . . . nothing happens, is equal to not using this keyword
  156.             1 . . . FaxBaudRate is set a startup
  157.             2 . . . FaxBaudRate is set, when +FCON is detected
  158.             3 . . . FaxBaudRate is set, when OK is detected
  159.         Note: If CHANGEBAUD is used without parameter <n>, a value of 1 is
  160.         assumed (for compatibility of older versions of Frec).
  161.         If using n=2, Frec must be called, when modemresponse FAX is received!
  162.         Almost all Rockwell chipset modems report 'FAX' before '+FCON'.
  163.         Unfortunately there is no common rule which says what value of this
  164.         keyword is required for a specific modem. You have to try it out ...
  165.  
  166.     FORCERETRAIN
  167.         If Frec is used to receive only raw fax data in PAGEnnnn.RAW files,
  168.         no checking of copyquality is done at all. Enabling this feature will
  169.         always send RTP (ReTrain Positiv) instead of MCF (MessageConFirmation)
  170.         to sender of fax. Preferable on known weak or bad phonelines.
  171.         Attention: Fax transmissions by fax modems and unknown fax software
  172.         (trashware :-) may fail when receiving this post page message.
  173.  
  174.     LOGLEVEL <n>
  175.         Writing to FAXDEBUG depends on this value (0 to 5).
  176.             0 ... do NOT write to FAXDEBUG (is equal to 'FAXDEBUG NUL')
  177.             1 ... ERROR only
  178.             2 ... ERROR + SEND + RECEIVE only
  179.             3 ... ERROR + SEND + RECEIVE + ACTION only
  180.             4 ... ERROR + SEND + RECEIVE + ACTION + WAIT FOR only
  181.             5 ... ERROR + SEND + RECEIVE + ACTION + WAIT FOR + INFO (default)
  182.  
  183.     DEBUG
  184.         Enables a lot of stuff for debugging. Do not use, because LOG will
  185.         increase enormous.
  186.  
  187.     TIFEXT <extension>
  188.         Default extension for saved fax files ".TIF" may be overwritten. If
  189.         commandline switch '-z' is used, this is automatically overwritten by
  190.         ".FAX". Use this to enable some compatibility to third party software.
  191.         Attention: If '-z' switch is used, TIFEXT is not used!
  192.  
  193.     INBOUND <path to inbound>
  194.         If DESTNAME and DESTADDR are also defined, a netmail (????????.PKT)
  195.         is created each time a fax is stored. Is not in affect, if '-x'
  196.         commandline switch is used!
  197.  
  198.     DESTNAME <string>
  199.         If this, INBOUND and DESTADDR is defined in FREC.CFG, a netmail is
  200.         created and addressed to.
  201.  
  202.     DESTADDR <FidoNet style address>
  203.         Must be defined to create an announcing netmail.
  204.  
  205.     SRCNAME <string>
  206.         Used to form the 'From:' part of the announcing netmail. Default is:
  207.         "FREC".
  208.  
  209.     SRCADDR <FidoNet style address>
  210.         Normally this is the address of local system. Defaults to DESTADDR.
  211.  
  212.     SUBJECTRECFAX <string or '%'>
  213.         Used in creation of announcing netmail on incoming fax. If '%' is
  214.         the first (or only) character, the filename in which the fax is stored
  215.         will be placed in subject part of netmail. Default is: "Announcement
  216.         of incoming FAX".
  217.  
  218.     RINGCNT <n>
  219.         Number of rings FREC is skipping till modem goes off-hook. In
  220.         stand alone mode only.
  221.  
  222.     TEXTCOLOR <colorvalue>
  223.         Select color of characters on Frec status screen:
  224.             0 . . . BLACK
  225.             1 . . . BLUE
  226.             2 . . . GREEN
  227.             3 . . . CYAN
  228.             4 . . . RED
  229.             5 . . . MAGENTA
  230.             6 . . . BROWN
  231.             7 . . . LIGHTGRAY
  232.             8 . . . DARKGRAY
  233.             9 . . . LIGHTBLUE
  234.             10  . . LIGHTGREEN
  235.             11  . . LIGHTCYAN
  236.             12  . . LIGHTRED
  237.             13  . . LIGHTMAGENTA
  238.             14  . . YELLOW
  239.             15  . . WHITE
  240.  
  241.     TEXTBACKGROUNDCOLOR <colorvalue>
  242.         Select color of background on Frec status screen.
  243.  
  244.     FRAMECOLOR <colorvalue>
  245.         Select color of the frame on Frec status screen.
  246.  
  247.     CLPAGEOK <script or errorlevel or shellno>
  248.         If FREC.DLL is called from CantaLoup/2, a simple mechanism will allow
  249.         further actions of the mailer if faxreception was sucessful:
  250.             - A positiv value forces mailer to exit with this errorlevel.
  251.             - A negativ value forces mailer to 'shell' to abs(value).
  252.             - A name of a script forces the mailer to execute it.
  253.  
  254.     POLLFILE <filename> [<numerical page indicator>]
  255.         Name of file which is passed to FSEND if FREC is frontend for a
  256.         pollserver. Can be defined as often as needed.
  257.  
  258.         The filenames are collected and when calling FSEND (DLL or EXE)
  259.         a temporary file is created where all filenames and pageindicators
  260.         are stored. FSEND is called with '-o@<temp_file>' to pass filenames.
  261.  
  262.         Pollfiles can also be supplied by '-o' and '-o@' commandline switch.
  263.  
  264.         Attention: Not used if Frec acts as a fax poll requester ('-g'
  265.         parameter)! This prevents Frec to call Fsend! May be in further
  266.         versions both send and receive in one call would be possible!
  267.  
  268.     FSENDCFG <configuration file for FSEND> [<commandline parameter>]
  269.         Is the key for Frec to work also as a frontend for Fsend to satisfy
  270.         faxpolling. See also POLLFILE.
  271.         It is no longer supported, to choose between FSEND.EXE and FSEND.DLL!
  272.         From now on, FREC searches for FSEND.DLL in LIBPATH and if not found,
  273.         FSEND.EXE is called.
  274.         After the name of the config file for FSEND, optional commandline
  275.         parameters for FSEND may be submitted to DLL (or EXE). These
  276.         parameter are submitted as last, so it will overwrite any choice
  277.         from FREC itself.
  278.         Note: If primarly a fax pollservice is offered, use Fsend as the
  279.         frontend. Fsend is also capable to receive fax if configured right.
  280.  
  281.     CHECKCOPYQUALITY <YES or NO>
  282.         Enables special algorithms to decide if page was of acceptable quality
  283.         or if a retrain should be performed by sender. If not a single scanline
  284.         is received correctly, a RTN (ReTrain Negativ) is sent. This means a
  285.         total page reject and sender normally gives up!
  286.         Attention: If '-x' commandline switch is in effect (saving raw data)
  287.         or ECM is selected, copyquality is NOT checked.
  288.         Note: Frec shows copyquality both in DEBUGFILE and onscreen, like
  289.         "Page n decompressed <lc,blc,cblc,llc>".
  290.             lc . . . total decompressed correct scanlines,
  291.             blc  . . total detected bad lines,
  292.             cblc . . detected maximal consecutive bad scanlines and
  293.             llc  . . lost scanlines if LINEBAD DELETE is selected.
  294.         This may match modems +FPTS (+FPS) report but if FREC has detected
  295.         more errors than modem, FRECs decision counts and modems page status
  296.         parameter is overwritten!
  297.  
  298.     PERCENTAGEGOOD <1-100>
  299.         Gives Frec an upper boundry for deciding to send RTP (ReTrain Positiv)
  300.         and force a retrain. If the percentual part of correct received scan
  301.         lines is equal or above this value, a MCF (MessageCoFirmation) is
  302.         sent. Defaults to 100 (%) but should be set to 95 or 99 if partial
  303.         page errors could be accepted.
  304.  
  305.     CONSECUTIVEBADMAX <1-255>
  306.         If detected consecutive bad scanlines are above this limit, FREC will
  307.         send a RTP. Consecutive bad scanlines are normally a good sign for a
  308.         mismatch in compression (1-D versus 2-D) or bitorder of faxdata
  309.         (try with '-f1' or '-f2' command line parameter).
  310.  
  311.     LOCALID <local faxnumber>
  312.         Is used to form CSI (Called Subscriber Identification) or CIG (CallInG
  313.         subscriber identification). CSI is sent to modem as +FLID (+FLI) and
  314.         CIG is sent as +FCIG (+FPI).
  315.         Attention: This parameter is mandatory, Frec is stopped if not defined!
  316.         Note: Only '+', ' ' and '0' - '9' are valid characters! All other
  317.         characters are invalid and strictly discarded by Frec. String length
  318.         is limited to 20 characters.
  319.  
  320.     STATIONID <your company or elsewhat>
  321.         This information is only transmitted, if faxmodem is able to handle
  322.         NSF (NonStandardFacility) frames. Usualy, class 1 modems can do it.
  323.  
  324.     LINEBAD <IGNORE or DELETE or PREVIOUS or BLANK>
  325.         If a bad scanline is detected, Frec could either IGNORE (default) or
  326.         DELETE or copy the PREVIOUS one or leave it BLANK.
  327.  
  328.         Note: Detection of bad scanlines is not a trivial job. On bad phone
  329.         lines normally single bits change their state and resynchronisation
  330.         (to next scanline) could be performed. If DCE-DTE connection is
  331.         distorted (e.g. 14400 bps carrier in class 2 with 19200 bps DCE-DTE),
  332.         one ore more bytes are lost and resynchronisation may skip one ore
  333.         more scanlines.
  334.  
  335.         Hint: Avoid 14400 bps carrier in class 2! Keep in mind, that time
  336.         between scanlines effects transmission time more than bitrate. Use
  337.         class 1 if highspeed is wished. Frec can decide if overall performance
  338.         is good enough. Even if modem accepts 14400 bps training, DCE-DTE
  339.         connection may limit the result. Because of DLE-shielding bursts of
  340.         more than 1920 CPS may occure! A carrier of 14400 bps yields in
  341.         14400 / 8 = 1800 CPS.
  342.  
  343.     FAXCLASS <1 or 2 or 2.0>
  344.         Select a fax class, your modem is able to handle. Frec is designed to
  345.         deal with the standardized methods of class 1 (EIA/TIA-578) or class
  346.         2.0 (EIA/TIA-592). ONE version of the manufacturer specific class 2
  347.         (publicated either as CLASS_2.TXT from SUPRA or for the 28800 bps V.FC
  348.         data-pump from ROCKWELL) is relativly compatible to class 2.0 in
  349.         receive mode. Frec supports (without any warranty) this class 2 also.
  350.  
  351.         Although nobody will believe, first choice of fax class should always
  352.         be class 1. All lowprice modems support this class in an excellent
  353.         manner. As a rule of thumb: the cheaper the modem the lower the fax
  354.         class :-)
  355.  
  356.         Manufacturer specific fax classes other then the above (like Zyxels
  357.         class 6 or the AT#.. version of class 2) or not supported!
  358.  
  359.     FAXBAUDRATE <DCE-DTE bitrate>
  360.         Only if fax class 2.0 (two point zero) is used, higher values than
  361.         19200 can be defined here. In class 1 or class 2 strictly use 19200 or
  362.         leave the default of 19200.
  363.  
  364.         Some modem on the market allow higher bitrates than 19200 in class 1
  365.         and class 2. For 14400 bps carrier, 38400 bps DCE-DTE is highly
  366.         recommended in this case of modem.
  367.  
  368.     DATABAUDRATE <DCE-DTE bitrate>
  369.         Set to a desirable bitrate or do not use this setting.
  370.  
  371.     RESET <modem command>
  372.         It is recommended to use either ATZ or AT&Fn to bring modem to well
  373.         defined state. See also flowchart of initialisation. A response of OK
  374.         must come from modem or FREC will abort.
  375.         Note: modem_init() is not performed if Frec is called with '-p'
  376.         command line parameter.
  377.  
  378.             Save callers BaudRate
  379.             Switch BaudRate to DataBaudRate
  380.             If RESET is defined -> send <modem command> to modem
  381.             Wait for OK response
  382.             If response not equal OK or timeout -> abort Frec
  383.             If FaxBaudRate not equal to DataBaudRate -> switch to FaxBaudRate
  384.             Send AT+FCLASS=n to modem
  385.             Wait for OK response
  386.             If response not equal OK or timeout -> abort Frec
  387.             While INIT
  388.                 Send <modem command> to modem
  389.                 Wait for OK response
  390.                 If response not equal OK or timeout -> abort Frec
  391.             If fax class is 2 (or 2.0) -> send AT+FLID (+FLI) to modem
  392.             Wait for OK response
  393.             If response not equal OK or timeout -> abort Frec
  394.             Send AT+FCR=1 to modem
  395.             Wait for OK response
  396.             If response not equal OK or timeout -> abort Frec
  397.             Aend AT+FDCC (+FDC) to modem
  398.             Wait for OK response
  399.             If response not equal OK or timeout -> abort Frec
  400.             If FREC should poll a fax from elsewhere ->
  401.                 Send AT+FSPL=1 (+FSP) to modem
  402.                 Wait for OK response
  403.                 If response not equal OK or timeout -> abort Frec
  404.                 Send AT+FCIG (+FPI) to modem
  405.                 Wait for OK response
  406.                 If response not equal OK or timeout -> abort Frec
  407.             else ->
  408.                 If FREC is frontend for FSEND to satisfy poll request ->
  409.                     Send AT+FLPL=1 (+FLP) to modem
  410.                     Wait for OK response
  411.                     If response not equal OK or timeout -> abort Frec
  412.  
  413.         ATTENTION! If FREC is called from elsewhere (mailer or other front end)
  414.         all of the above initialisation and decisions MUST be performed before
  415.         FREC is called! Changing to FaxBaudRate (if CHANGEBAUD is defined) will
  416.         occure after receiving OK just before AT+FDR is sent. Keep in mind,
  417.         that certain modems need 19200 bps just before switching to fax class!
  418.  
  419.     INIT <modemcommand>
  420.         Unlimited number of additional commands to modem which must be
  421.         acceptable in the appropiate fax class. See also the flow chart which
  422.         is performed while initializing the modem. A response of OK must come
  423.         from modem or Frec will abort.
  424.  
  425.     CAPABILITIES <vr,br,wd,ln,df,ec,bf,st[,jp]>
  426.         Default is 1,3,0,2,0,0,0,0,0 which means: high resolution, maximal
  427.         9600 bps in V.29 modulation, 8 inches paperwidth, endless paperlength,
  428.         1-D Huffman coded data, no ECM, no BFT and 0 ms wait between scanlines.
  429.  
  430.         With these values, successful transmission to each receiving station is
  431.         possible. If the receiver is not capable of any of these values, Fsend
  432.         will adjust to such values, the receiver can (and must) handle.
  433.  
  434.         vr (vertical resolution):
  435.             00 . . . normal 204x98  dpi (R8 x  3.85/mm),
  436.             01 . . . fine   204x196 dpi (R8 x   7.7/mm),
  437.             02 . . . high   204x392 dpi (R8 x  15.4/mm),
  438.             04 . . . extra  408x392 dpi (R16 x 15.4/mm),
  439.             08 . . . 200x100 dpi,
  440.             10 . . . 200x200 dpi,
  441.             20 . . . 200x400 dpi,
  442.             40 . . . 300x300 dpi,
  443.             80 . . . 400x400 dpi (not defined in T.32)
  444.         All values for 'vr' are in hexadecimal notation!
  445.         Not all resolutions are supported!
  446.  
  447.         br (bit rate):
  448.             0 . . .  2400 bps
  449.             1 . . .  4800 bps
  450.             2 . . .  7200 bps
  451.             3 . . .  9600 bps
  452.             4 . . . 12000 bps
  453.             5 . . . 14400 bps
  454.  
  455.         wd (page width):
  456.                     R8    R16   200   300   400
  457.                     d/mm  d/mm  dpi   dpi   dpi
  458.             0 . . . 1728  3456  1728  2592  3456 (A4 width)
  459.             1 . . . 2048  4096  2048             (B4 width)
  460.             2 . . . 2432  4864  2432             (A3 width)
  461.             3 . . . 1216  2432                   (A5 width)
  462.             4 . . .  864  1728                   (A6 width)
  463.             Not all resolutions are supported!
  464.  
  465.         ln (page length):
  466.             0 . . . A4 length, 297 mm (not supported)
  467.             1 . . . B4 length, 364 mm (not supported)
  468.             2 . . . Unlimited length
  469.  
  470.         df (compression scheme):
  471.             0 . . . 1-D Modified Huffman (ITU T.4),
  472.             1 . . . 2-D Modified read (ITU T.4),
  473.             2 . . . 2-D Uncompressed mode (ITU T.4), (not supported)
  474.             3 . . . 2-D Modified modified read (ITU T.6)
  475.  
  476.         ec (error correction):
  477.             0 . . . do not use ECM
  478.             1 . . . Enable Annex A/T.30, ECM (only supported in class 1)
  479.             2 . . . Enable Annex C/T.30, half duplex (not supported)
  480.             3 . . . Enable Annex C/T.30, full duplex (not supported)
  481.  
  482.         bf (binary file):
  483.             00  . . Disable file transfer modes,
  484.             01  . . Select enable BFT (ITU T.434), (not supported)
  485.             02  . . Select document transfer mode, (not supported)
  486.             04  . . Select edifact mode, (not supported)
  487.             08  . . Select basic transfer mode, (not supported)
  488.             10  . . Select character mode Annex D/T.4, (not supported)
  489.             20  . . Selcet mixed mode Annex E/T.4, (not supported)
  490.             40  . . Select processable mode (ITU T.505) (not supported)
  491.         All values for 'bf' are in hexadecimal notation !!!
  492.  
  493.         st (time/scanline):
  494.                     vr = 0    vr > 0
  495.             0 . . .  0 ms      0 ms
  496.             1 . . .  5 ms      5 ms
  497.             2 . . . 10 ms      5 ms
  498.             3 . . . 10 ms     10 ms
  499.             4 . . . 20 ms     10 ms
  500.             5 . . . 20 ms     20 ms
  501.             6 . . . 40 ms     20 ms
  502.             7 . . . 40 ms     40 ms
  503.  
  504.         jp (JPEG coding):
  505.             00  . . Disable JPEG coding,
  506.             01  . . Enable JPEG coding (ITU T.81), (not supported)
  507.             02  . . Full color mode, (not supported)
  508.             04  . . Enable preferred Huffman tables, (not supported)
  509.             08  . . 12 bits/pel/component, (not supported)
  510.             10  . . No subsampling (1:1:1), (not supported)
  511.             20  . . Custom illuminant, (not supported)
  512.             40  . . Custom gamut range (not supported)
  513.         All values for 'jp' are in hexadecimal notation !!!
  514.  
  515.     CLEANUP <modem command>
  516.         Define any modemcommand which will be sent to. No check for any
  517.         response is done. CLEANUP is performed in hang_up() like:
  518.             If fax class is 1 -> send ATH0 to modem
  519.             Drop DTR line for 300 ms
  520.             If FaxBaudRate not equal to DataBaudRate -> switch to DatabaudRate
  521.             If actual BaudRate not equal to callers BaudRate ->
  522.                 Switch to callers BaudRate
  523.             If CLEANUP is defined -> Send <modem command> to modem
  524.             Trash modem response
  525.  
  526.     FAXPATH [SUB [PWD]] <path to where incoming faxes are stored>
  527.  
  528.         This entry is MANDATORY!
  529.  
  530.         If combined with FAXLOG and FAXIDX, compatibility to third parties
  531.         programs is given, incoming faxes are stored in <path>\FXnnnnnn.FAX
  532.         files and entries in FAXLOG is done. FAXIDX is also incremented.
  533.  
  534.         If used without FAXLOG and FAXIDX (at least one of both keywords
  535.         must have OFF in CFG), incoming faxes are stored in
  536.         <path>\FRECnnnn.TIF, where '.TIF' may be replaced by setting TIFEXT
  537.         in CFG (look there).
  538.  
  539.         Filetemplates are no more supported!
  540.  
  541.         Values for SUB and PWD can be supplied. If caller sends a SUB-frame
  542.         (Subaddressing), incoming faxes are store in the FAXPATH with the
  543.         defined SUB for it. Optionally, a PWD (password) can be defined. If
  544.         caller sends SUB and PWD, both must match to select FAXPATH.
  545.  
  546.         It is recommanded, to define one FAXPATH without SUB and PWD, to give
  547.         caller without this a chance.
  548.  
  549.         Examples:
  550.  
  551.         FaxPath X:\PATH\ALLFAXES
  552.         FaxPath 123 Y:\LANPATH\USERFAX
  553.         FaxPath 123 987 Y:\LANPATH\PROTFAX
  554.  
  555.         First one is the 'normal' entry and compatible with former versions of
  556.         FREC. Second one defines a subaddress (123) which yields in routing
  557.         faxes with subaddress 123 to this path. Third one defines a
  558.         password (987) protected path for callers, who supply both. FAXPATH
  559.         is also used, to form fully qualified drive, path and filenames for
  560.         FAXLOG and FAXIDX, which means, that each 'subaddres' has its own log
  561.         and index!
  562.  
  563.     FAXLOG <file name> | OFF
  564.         Filename to FAX.LOG and only neccessary, if other than
  565.         'FAX.LOG'. Received faxes from FREC will be joined to FAX.LOG.
  566.         Each well received fax (hangup code 0) is flagged as 'Rcvd'. If fax is
  567.         received in (partial) error or even no session was established at all,
  568.         entry in FAXLOG is flagged as 'BadRcv'. See also keyword NOLOGONBAD.
  569.  
  570.     FAXIDX <file name> | OFF
  571.         Filename to FAX.IDX and only neccessary, if other than
  572.         'FAX.IDX'.
  573.  
  574.     FAXDEBUG <[+]x:\path\frec.log>
  575.         This is FREC log and debugging file. Nearly all activities are stored
  576.         in this file. If a '+' precedes the path, append mode is used: one log
  577.         is chained to the next. Select NUL as filename to disable logging.
  578.         The logfile contains a lot of informations in case of errors or
  579.         situations where help is needed. Bugreports to the author are only
  580.         sensful if this logfile is part of the report.
  581.  
  582.     DIAL <dial command>
  583.         Default, a ATD is used. You can define here ATDP or ATDT, if your modem
  584.         is not able to distinct between pulse and tone dialing.
  585.  
  586.     COMPORT <COM device>
  587.         This keyword is mandatory. If Frec is called with port handle (from
  588.         elsewhere) this keyword must exist! The name of the com device is
  589.         used as a unique identifier for internal use.
  590.  
  591.     INITFIFO
  592.         If a hardware fifo (UART 16550) is detected by COM-device driver, the
  593.         fifo is initiallized to Rx=8 and Tx=16.
  594.  
  595.     BINKLOG <file name>
  596.         Fully qualified drive, path and filename to your mailers log file. Used
  597.         either if FREC works only as an converter for PAGEnnnn.FAX to TIF or
  598.         if FREC is used in two pass mode (filename may be any). Supported is
  599.         BinkleyTerm 2.50 EE (by Michael Buenter), BinkleyTerm 2.59, 2.60 and
  600.         2.60 XE (by Vince Periello and authorized coauthors) and CantLoup/2
  601.         (by Michael Buenter).
  602.         Xenia/2 (by Arjen Lentz) is not (yet) supported, because the raw fax is
  603.         stored in Zyxels ZFAX format, which is in fact only useable for
  604.         one single page.
  605.         Maybe, Arjen will be able to read 'spagetti code' in future and switch
  606.         to senseful fax formats :-)
  607.  
  608.     DEBUGIDLEPRIORITY <value> or DEBUGREGULARPRIORITY <value>
  609.         These keywords, which are mutual exclusive, define the priority (0-31)
  610.         for the task (thread) which writes the data to FAXDEBUG file. Default
  611.         is IDLEPRIORITY 30. Change this setting only, if you are absolutly sure
  612.         knowing what you do! Lower priority may yield in a endless blocking
  613.         debug_thread! No data will be written to FAXDEBUG and FREC may become
  614.         'uncloseable'. On very slow or high stressed machines, you can
  615.         try REGULARPRIORITY 0, if IDLEPRIORITY blocks writing to FAXDEBUG.
  616.  
  617.         Attention: It was reported by users, that some CPU load meters (like
  618.         MEMSize or CPUDrive) will TOTALY brake down working of debug_thread.
  619.         If FREC seems to be blocked, quite after fax reception is finished,
  620.         and will never be closed (even if 'killed') than omit using of such
  621.         utilities!
  622.  
  623.     SAVEIDLEPRIORITY <value> or SAVEREGULARPRIORITY <value>
  624.         These keywords, which are mutual exclusive, define the priority (0-31)
  625.         for the task (thread) which writes fax file to disk. Default is
  626.         IDLEPRIORITY 31. Lower priority may slow down writing, yielding in
  627.         incorrect faxreception! SAVEPRIORITY must be higher than
  628.         DEBUGPRIORITY. On slow or high stressed machines, try
  629.         REGULARPRIORITY 1. You can disable this priority switching by using
  630.         the '-fastsave' commandline switch (which is in fact the same as
  631.         REGULARPRIORITY 0).
  632.  
  633.  
  634.     Additional information:
  635.  
  636.     All file and path specifiers in configuration file are checked against
  637.     %<environment>%. If a valid environment entry is found, %<env>% is
  638.     replaced by the content of the variable, e.g.:
  639.  
  640.         SET LOG=D:\LOGFILES
  641.  
  642.         BinkLog %LOG%\BINKLEY%TASK%.LOG
  643.         FaxDebug %LOG%\FREC%TASK%.LOG
  644.  
  645.     A special 'replacement' is done in all file name entries in configuration
  646.     file when '%TASK%' is detected. %TASK% (must be uppercase) is replaced
  647.     by the defined task number.
  648.  
  649.     If using FREC.DLL with Cantaloup mailer, the task number from mailer is
  650.     provided to Frec. Nevertheless you can overwrite this task number in
  651.     'ExtrnDesc' by using '-TASK<n>' command line parameter.
  652.  
  653.     If a debug file is defined and this debug file can not be accessed, than
  654.     a 'default' in the root of the current drive (\FREC.DEB) is used instead.
  655.  
  656.     It is strongly recommended to use a debug file !! In case of misbehaviour
  657.     99% of faults can be localized quickly and (from the author :-).
  658.  
  659.  
  660.  
  661. -------------------------------------------------------------------------------
  662.     COMMAND LINE PARAMETERS AND SYNTAX
  663. -------------------------------------------------------------------------------
  664.  
  665.     The format of the commandline is as follows:
  666.  
  667.     FREC <switch> <switch> ...
  668.  
  669.     -c<config file>
  670.         Default Frec assumes the configuration file is named FREC.CFG and
  671.         located in the current directory. The '-c' command line parameter
  672.         can be used to define an other path and file name.
  673.  
  674.         Configuration file can also be supplied via environment:
  675.  
  676.         SET FAX=x:\path\frec.cfg
  677.  
  678.         or
  679.  
  680.         SET FAXCFG=x:\path\frec.cfg
  681.  
  682.     -Task<n>
  683.         Where <n> specifies the task number to be used. See also [TASK <n>]
  684.         and [COMMON] keywords in configuration file. If this parameter is
  685.         not used the common task will be used.
  686.  
  687.     -s<WAIT_OK>
  688.         In accordance to fax standards, Frec uses the +FCO (or +FCON) response
  689.         from modem to detect a fax call (in fact the HDLC-flags in V.21). If
  690.         Frec is called from a FidoNet mailer than +FCO (or +FCON) is already
  691.         received when Frec takes over control (this modem response is used to
  692.         spwan Frec) and '-sWAIT_OK' parameter must be used to ensure correct
  693.         functionality. Default is WAIT_FCON that means Frec will wait for +FCO
  694.         (or +FCON) modem response in class 2.0 (or 2).
  695.  
  696.     -x
  697.         Realtime decompression and creation of Tiff is switched off. Frec will
  698.         work in a minimal state and will save raw data as it comes out of the
  699.         modem if '-x' parameter is used. Only inserted DLEs are stripped and
  700.         received bytes are inverted back to their regular form (MSB first) in
  701.         class 2.0 (or 2).
  702.         Note: This parameter also is used to perform the first passage of two
  703.         passage fax receive mode. A 'BINKLOG' file must be defined to store all
  704.         session parameters needed for the second passage (convertig raw fax
  705.         data to Tiff). Also see '-i' parameter.
  706.  
  707.     -p<com port handle>
  708.         If this parameter is used, Frec assumes it is called by a FidoNet
  709.         mailer or other front end. Note: The port handle is not the same as
  710.         the port number (e.g. COM1)! The port handel must be put at Frec's
  711.         proposal by the FidoNet mailer or front end. Only 'FAXBAUDRATE' is
  712.         set if 'CHANGEBAUD' is selected in configuration file. No modem
  713.         initialisation is performed. Hang_up() and close_port() are called.
  714.         While in hang_up() DTR-drop and 'CLEANUP' is performed, close_port()
  715.         should be without any effect. Note: All initialisation must be done by
  716.         the FidoNet mailer or other front end.
  717.  
  718.     -ForceV33
  719.         Signal only V.33 for bitrates higher than 9600 bps (class 1 only).
  720.  
  721.     -PollSEP<numerical page indicator>
  722.         Is used to make a SEP (SElective Polling) frame when polling a fax
  723.         from somebody. Also see '-o' parameter and 'POLLFILE'.
  724.         Attention: Only '0' - '9', '#' and '*' are valid characters. All other
  725.         characters are invalid and strictly discarded by Frec. String length
  726.         is limited to 20 characters. '-PollSEP' can be used in Class 1 and 2.0
  727.         (if supported by the modem) only!
  728.  
  729.     -PollPWD<numerical password>
  730.         Is used to make a PWD (PassWorD) frame when polling a fax from
  731.         somebody. Also see '-o' parameter and 'POLLFILE'.
  732.         Attention: Only '0' - '9', '#' and '*' are valid characters. All other
  733.         characters are invalid and strictly discarded by Frec. String length
  734.         is limited to 20 characters. '-PollPWD' can be used in Class 1 and 2.0
  735.         (if supported by the modem) only!
  736.  
  737.     -NoFineSign
  738.         Some general switched network suppliers demand a special sign on
  739.         each fax page transmitted in 'fine resolution'. Frec therefore places
  740.         a small black rectangle in the right bottom corner of each 'fine
  741.         resolution' page to satisfy that. Using '-NoFineSign' this feature
  742.         will be deactivated.
  743.  
  744.     -FsendExe
  745.         Overrides 'FRECDLL' keyword in configuration file. This parameter may
  746.         be used to temporarly use FSEND.EXE as fax sender instead of calling
  747.         FSEND.DLL to do that.
  748.  
  749.     -FastSave
  750.         Overrides 'SAVE...PRIORTY' keyword in configuration file. The fax file
  751.         is saved with priority REGULAR 0. This effects only Tiff saving and not
  752.         saving fax raw data in PAGEnnnn.RAW files.
  753.  
  754.     -PollServer
  755.         If Frec is used as a front end for FSEND to satisfy poll requests,
  756.         Frec is disabled to receive fax. T.4 transmitter bit in class 1 is
  757.         not cleared because a lot of fax machines and fax modem will fail if
  758.         that is done.
  759.  
  760.     -DISPoll
  761.         Normally, if Frec is used to poll a fax form somebody, a DTC (Digital
  762.         Transmit Command) is sent to indicate your wish to poll for a fax
  763.         instead of sending a fax. For class 1 alternativly a DIS (Digital
  764.         Identification Signal) may be sent, mainly to test the fax poll server
  765.         if capable of this condition.
  766.  
  767.     -z
  768.         Frec will store received fax files in a format defined by ZyXEL. It
  769.         is recommended, not to use this format or only to use it in conjunction
  770.         with '-e' parameter to force single page storage. ZFAX format is not
  771.         able to deal with different resolution and compression in a single
  772.         multipage fax file. File extension is set to '.FAX' and 'OUTFILLORDER'
  773.         is set to '2'.
  774.  
  775.     -ECMraw
  776.         If this parameter is used, all received fax data will be stored in
  777.         'BLOCKnnn.RAW' files in case of an ECM (Error Correction Mode)
  778.         connection. The contents of these files is in fact senseless for the
  779.         user, but from vital interest for Frec if any ECM protocol failure
  780.         is detected.
  781.  
  782.     -ECMError<error count>
  783.         For testing purposes only! Do not use it!
  784.         Attention: ECM reception in class 1 is already implemented in Frec.
  785.         The functionality is not fully tested yet. This parameter says Frec
  786.         to act as if partial frame errors have been detected which shall force
  787.         the sender to retransmitted the corrupted data.
  788.  
  789.     -g<phone number>
  790.         Frec calls the phone number to poll for a fax. Keep in mind, that some
  791.         fax modems (in class 2) are not able to poll for a fax. In that case
  792.         use class 1 instead if your fax modem supports it.
  793.  
  794.     -l<faxclass>
  795.         This parameter overrides 'FAXCLASS' in configuration file. Only
  796.         senseful, if Frec is called from FSEND or an other front end.
  797.         Attention: 'INIT's in configuration file have to match the fax class
  798.         or must not be used. Fax class 2.0 is internal coded as '3'!
  799.  
  800.     -o<poll file> [<numerical page indicator>]
  801.         Exactly the same as 'POLLFILE' in configuration file. The file name
  802.         will be added to the list of files which will be sent if an fax poll
  803.         request from somebody is received. You can send bitmap ('.BMP'), Tiff
  804.         ('.TIF') or text files (also see 'TEXTEXTENSION'). You can define as
  805.         much files as the command line can accept. Wildcards (*, ?) are also
  806.         allowed. A blank separated 'numerical page indicator', following the
  807.         file name is possible (also see '-o@'). This 'pageindicator' must be
  808.         one number (only '0' -'9', '#' and '*' and no blanks) and must not have
  809.         not more than 20 digits. Note: Poll files from '-o' are placed first
  810.         (before 'POLLFILE' entries) in the file list.
  811.  
  812.     -o@<file name>
  813.         As an enhancement to the '-o' option, you can instead define a
  814.         pointer file, which contains the file names. Each line must contain
  815.         only one filename. Wildcards (*, ?) are allowed. In accordance to
  816.         'selective poll', a 'numerical page indicator' may also be given.
  817.         Content of file POLLFILE.LST:
  818.  
  819.         X:\PATH\NEWLIST.TXT
  820.         Y:\OTHERPATH\FILELIST.TXT 1
  821.         Z:\NEWPATH\ECHOLIST.TXT 2
  822.  
  823.         Which means, NEWLIST will be sent to all callers whereas FILELIST only
  824.         will be sent to those callers supplying '1' in SEP frame and ECHOLIST
  825.         only will be sent to callers supplying '2' in SEP frame. If the caller
  826.         does not use any SEP frame, than ALL three files will be sent.
  827.  
  828.     -a<pipe name>
  829.         A pipe of the given name will be created to which all screen output
  830.         will be sent.
  831.  
  832.         Note: Frec uses DosCreateNPipe() with open mode NP_ACCESS_OUTBOUND
  833.         (outbound pipe - server to client) and pipe modes NP_NOWAIT (non
  834.         blocking mode) and NP_TYPE_MESSAGE (message type pipe) to create the
  835.         pipe. DosConnectNPipe() is used to connect the pipe, DosWrite() to
  836.         write to the pipe and DosDisConnectNPipe() and DosClose() to close
  837.         the pipe at program termination.
  838.  
  839.     -k<Tiff compression>
  840.         Select a compression scheme (default is 3) used for the stored decoded
  841.         fax files. The following compression schemes are available:
  842.  
  843.             <1> . . . uncompressed,
  844.             <2> . . . 1-D Huffman, without EOL
  845.             <3> . . . 1-D Huffman, as defined in T.4
  846.             <4> . . . 2-D Read, as defined in T.4
  847.             <4.1> . . 2-D Read, without EOL, starting
  848.                       from an imaginary white line
  849.             <32773> . PackBits compression.
  850.  
  851.         Note: Compression scheme 5 (LZW) is not supported because of copyright
  852.         protections in various countries.
  853.  
  854.     -i<raw fax data file name>
  855.         Frec 'conversion only' mode is selected when using this parameter. Any
  856.         number of '-i' parameters are allowed (the only limit is the maximum
  857.         length of a single command line). Wildcards (*, ?) are supported. Frec
  858.         reads in raw fax data (exactly as received from modem) - e.g. as stored
  859.         by Frec using '-x' parameter or also raw fax data files generated by
  860.         internal fax routines of some FidoNet mailers like BinkleyTerm or
  861.         CantaLoup/2. If a mailer log file (see 'BINKLOG') is defined, required
  862.         fax session information (resolution, coding scheme, ...) will be
  863.         extracted from it. This performes the second passage of Frec's two
  864.         passage operating method (also see '-x' parameter).
  865.         Note: Try with '-f1' or '-f2' if conversion fails because of bitorder
  866.         mismatch. Also try '-FDCC:vr,br,...' parameter to specify session
  867.         parameters manually.
  868.         Attention: ZFAX file format is not subject of this parameter. Single
  869.         page ZFAX files may be converted, but it is not the originally job of
  870.         Frec, to do that.
  871.  
  872.     -FDCC:<capabilities>
  873.         This parameter replaces '-1' and '-2' parameters. It can be used to
  874.         submit a DCC (current session capabilities) value for the raw fax data
  875.         supplied with '-i' parameter. Only values for compression scheme and
  876.         resolution are used.
  877.  
  878.     -h or -?
  879.        A short help screen is shown. This printout can be redirected into
  880.        a file.
  881.  
  882.     -v<faxviewer>
  883.         If FREC is not operating in raw data mode ('-x' parameter), an external
  884.         fax viewer (please refer FAXVIEW.DOC for more information) can be used
  885.         to display an incoming fax in realtime on the screen.
  886.         Note: On slow or highly stressed machines, especially in class 2 or
  887.         class 2.0 negotiation of session parameters may fail or no fax data is
  888.         displayed. Also see 'CLMINIMIZEDNOVIEW'.
  889.  
  890.         There are TWO possible modes to use:
  891.  
  892.         1) <faxviewer> is the name of a compatible viewer (obviously
  893.             FAXVIEW.EXE), which will be started (by DosStartSession) and closed
  894.             by FREC.
  895.  
  896.         2) <faxviewer> is the name of a pipe (eg. '\PIPE\LINE1'). In this case
  897.             the viewer (FAXVIEW.EXE) must be already loaded (see FAXVIEW.DOC)
  898.             and is only actived by FREC (by pipe).
  899.  
  900.     -BITS or -LARGE or -STANDARD or -PREVIEW
  901.         Scaling option for optional external fax viewer.
  902.         Note: Do not use 'scaled' option in FAXVIEW.EXE.
  903.  
  904.     -q
  905.         If the external fax viewer is used in combination with '-i' mode,
  906.         Frec waits after each page for a keystroke. This option is helpful
  907.         to watch each single page of a fax.
  908.  
  909.     -f<1_or_2>
  910.         Bitorder in fax raw data. Default is 2, which is the 'normal' order.
  911.  
  912.     -e
  913.         Forces Frec to generate single page Tiff files. Default, all pages are
  914.         stored together in one multipage Tiff file. But not all programs are
  915.         able to read all pages stored in a multipage Tiff file.
  916.  
  917.     -d
  918.         If used, input files ('-i') are deleted after conversion.
  919.  
  920.  
  921.  
  922. -------------------------------------------------------------------------------
  923.     ERROR LEVELS USED BY FREC
  924. -------------------------------------------------------------------------------
  925.  
  926.         <0> . . . . no error, at least one page received
  927.         <1> . . . . error, no page received
  928.         <2> . . . . wait for RING aborted
  929.         <20>  . . . DATA received, finish with open port
  930.         <100> . . . deb_thread not started
  931.         <101> . . . com_thread not started
  932.         <102> . . . bink_thread not started
  933.         <103> . . . decompr_thread not started
  934.         <104> . . . time_thread not started
  935.         <251> . . . SIGNAL termination
  936.         <252> . . . modem init error (timeout or ATV0 is set)
  937.         <253> . . . COM does not exist or is already in use
  938.         <253> . . . COM error get/set parameters
  939.         <253> . . . can not initialize COM
  940.         <254> . . . error in CFG
  941.         <255> . . . no commandline parameters
  942.         <255> . . . incorrect commandline parameter
  943.         <255> . . . -? or -h in commendline
  944.         <255> . . . -i<filename> not found
  945.  
  946.     Note: If FSEND is called to satisfy a fax poll request, the error level
  947.     of Fsend is returned.
  948.  
  949.  
  950.  
  951. -------------------------------------------------------------------------------
  952.     FAX SERVICE CLASS COMMAND SET:
  953. -------------------------------------------------------------------------------
  954.  
  955.     This is a short explanation of the fax service class command set used by
  956.     Frec. The commands in parantheses are for fax service class 2.0!
  957.  
  958.     AT+FCLASS=2 (AT+FCLASS=2.0):
  959.         Command to set modem to Fax mode. Modem will manage fax session
  960.         and negotiates (T.30 protocol).
  961.  
  962.     AT+FDCC=vr,br,wd,ln,df,ec,bf,st (AT+FIS):
  963.         With this command you can set the communications parameter
  964.         of your fax modem.
  965.             vr (vertical resolution):
  966.                 0 . . . normal (204x98 dpi)
  967.                 1 . . . high (204x196 dpi)
  968.             br (bit rate):
  969.                 0 . . . 2400 bit/s (V.27ter)
  970.                 1 . . . 4800 bit/s (V.27ter)
  971.                 2 . . . 7200 bit/s (V.29 or V.17)
  972.                 3 . . . 9600 bis/s (V.29 or V.17)
  973.                 4 . . . 12000 bit/s (V.33 or V.17)
  974.                 5 . . . 14400 bit/s (V.33 or V.17)
  975.             wd (page width):
  976.                 has to be 0 for use with Frec (1728 pixels)
  977.             ln (page length):
  978.                 This has to be 2 (unlimited length) for use with Frec.
  979.             dt (data compression):
  980.                 0 . . . 1-D Huffman
  981.                 1 . . . 2-D Read (also see the '-2' command line parameter)
  982.             ec (error correction):
  983.                 0 . . . disable error correction mode
  984.                 1 . . . enable ECM (only in class 1)
  985.             bf (binary file)
  986.                 This has to be 0 for use with Frec.
  987.             st (time per scanline)
  988.                 0 - 7 . 0 ms - 40 ms
  989.  
  990.     AT+FLID="..." (AT+FLI):
  991.         Command to set local station ID.
  992.  
  993.     AT+FCIG="..." (AT+FPI):
  994.         Command to set local poll ID. Class 2 modems hardly supports
  995.         this, usefull only in Class 2.0!
  996.  
  997.     AT+FLPL=1 (AT+FLP):
  998.         Command to indicate that the local station can serve a poll
  999.         request from a remote fax. A valid fax document must be ready
  1000.         for sending (with Fsend).
  1001.  
  1002.     AT+FSPL=1 (AT+FSP):
  1003.         Command to indicate that the local station wants to poll a fax
  1004.         from a remote fax. The remote fax must have a document ready to
  1005.         poll. Frec can be use either as a 'poller' or as a 'pollserver'!
  1006.  
  1007.         If you want to know if your modems supports fax-polling do the
  1008.         following short test: AT+FLPL=? (AT+FLP). If only '0' is reported,
  1009.         than you modem is obviously not able to support poll ('0,1' must
  1010.         be reported).
  1011.  
  1012.     AT+FBOR=n (AT+FBO):
  1013.         This command is often misunderstood and not so easy to explain.
  1014.         Normally, FBOR is zero, meaning databits comming over the line
  1015.         were stored from right to left in a byte (you can see in fax raw
  1016.         data the byte pattern 4D 9A 80 which stands for an empty, white
  1017.         scanline). Some fax modems and software uses the invers byte order,
  1018.         which corresponds to FBOR is one (you see the patter B2 59 01).
  1019.         Binkley's internal fax reception inverses the bytes also and
  1020.         stores them in the B2 59 01 order although Binkley gets them as
  1021.         4D 9A 80. Frec defaults to Binkley's (inverted) byteordering.
  1022.  
  1023.     AT+FCR=1 (AT+FCR):
  1024.         The fax modem never can receive a fax when +FCR is not set to 1.
  1025.  
  1026.     AT+FDR (AT+FDR):
  1027.         Command to release HDLC-frames in phase B.
  1028.  
  1029.     +FCON (+FCO):
  1030.         The fax modem response to signal that the remote station is a
  1031.         calling fax machine. Initializes phase B.
  1032.  
  1033.     +FTSI (+FTI):
  1034.         The fax modem response to show who is calling. This response is
  1035.         followed by the caller's ID string.
  1036.  
  1037.     +FDTC (+FTC):
  1038.         The fax modem response to show who is polling. This response is
  1039.         followed by the caller's ID string. This is the one and only sign
  1040.         for Frec to decide that a remote fax wants to poll on us!
  1041.  
  1042.     +FDCS (+FCS):
  1043.         The fax modem response to show the current session results. The
  1044.         information is shown in the same manner as +FDIS (+FIS).
  1045.  
  1046.     CONNECT (CONNECT):
  1047.         This message signals the end of frame exchange and start of page
  1048.         data transmission.
  1049.  
  1050.     +FHNG (+FHS), +FPTS (+FPS) and +FET (+FET):
  1051.         Faxmodem responses at the end of pagedata transfer.
  1052.  
  1053.     +FK (+FKS):
  1054.         If there is some timing problem with the conversion, Frec will
  1055.         abort with this command.
  1056.  
  1057.  
  1058.  
  1059. -------------------------------------------------------------------------------
  1060.     FREC AS A CONVERTER OF RAW FAX DATA:
  1061. -------------------------------------------------------------------------------
  1062.  
  1063.     If you want to use Binkley's internal fax facilities you can use Frec
  1064.     only to do the job of converting the raw fax data from binkley, that is
  1065.     saved in PAGExxxx.FAX files, into one multipage TIFF. You have to modify
  1066.     your Binkley batch job as follows:
  1067.  
  1068.     BINK.CMD
  1069.  
  1070.         ...
  1071.         If Exist X:\FAX\PAGE????.FAX Goto FAX
  1072.         Goto NOFAX
  1073.         ...
  1074.         :FAX
  1075.         FREC -iX:\FAX\PAGE????.FAX -cX:\FAX\FREC.CFG -k3 -f2 -d
  1076.         ...
  1077.         :NOFAX
  1078.  
  1079.  
  1080.     If yout want Frec store eache page into a single Tiff file you have
  1081.     to use the following commands instead:
  1082.  
  1083.     BINK.CMD
  1084.  
  1085.         ...
  1086.         If Exist X:\FAX\PAGE????.FAX Goto FAX
  1087.         Goto NOFAX
  1088.         ...
  1089.         :FAX
  1090.         For %i In (X:\FAX\PAGE????.FAX) Do FREC -i%i -cX:\FAX\FREC.CFG -k3 -f2 -e -d
  1091.         ...
  1092.         :NOFAX
  1093.  
  1094.  
  1095.  
  1096. -------------------------------------------------------------------------------
  1097.     FREC AS A FRONT END CALLED FAX RECEIVER:
  1098. -------------------------------------------------------------------------------
  1099.  
  1100.     BinkleyTerm will make a fax connect, but will not receive the fax itself.
  1101.     Instead of receiving the fax data Binkley spawns the com port to the
  1102.     external program Frec, which will receive the fax data and return back
  1103.     to Binkley Term after reception.
  1104.  
  1105.     As a fact, there exists a so called Binkley-Fax-Carrier-Bug in older
  1106.     Versions of Binkley Term (till the later 2.59 betas)! Binkley checks
  1107.     the presents of a valid carrier and DOES NOT spawn if not activ.
  1108.  
  1109.     And there is obviously NO carrier present (except USR modems) when modem
  1110.     is reporting +FCO(N)! To work around, try AT&C0 to force DCD-line always
  1111.     in active state.
  1112.  
  1113.     You have to modify your ANSWER statement in BINKLEY.CFG file so that your
  1114.     modem answers an incomming call in adaptive answering mode of the fax
  1115.     service class spezified in FREC.CFG file.
  1116.  
  1117.     Binkley 2.50EE:
  1118.         You have to put the following lines into your BINKLEY.CFG file:
  1119.  
  1120.             ModemFax +FCON
  1121.             ExitBaud -1 FCON
  1122.  
  1123.         You have to generate an EXTMAIL.CMD file containing one of the
  1124.         following lines:
  1125.  
  1126.             FREC -p%3 -k3 -cX:\FAX\FREC.CFG -sWAIT_OK
  1127.             to save all pages of the fax session in one multipage TIFF file
  1128.  
  1129.             or ...
  1130.             FREC -p%3 -k3 -cX:\FAX\FREC.CFG -sWAIT_OK -e
  1131.             to save each page of the fax session in a single TIFF file.
  1132.  
  1133.     Binkley 2.59, 2.60 and 2.60 XE:
  1134.         You have to put the following lines into your BINKLEY.CFG file:
  1135.  
  1136.             ModemFax +FCON
  1137.             Extern Spawn
  1138.             ExtrnMail <Errorlevel> +FCON
  1139.  
  1140.         You have to generate an EXTMAIL.CMD file containing one of the
  1141.         following lines:
  1142.  
  1143.             FREC -p%3 -k3 -cX:\Fax\FREC.CFG -sWAIT_OK
  1144.             to save all pages of the fax session in one multipage TIFF file
  1145.  
  1146.             or ...
  1147.             FREC -p%3 -k3 -e -cX:\Fax\FREC.CFG -sWAIT_OK
  1148.             to save each page of the fax session in a single TIFF file.
  1149.  
  1150.     If you selected the generation of a Netmail after fax reception, you
  1151.     should also start mail import after FREC in EXITBAUD.CMD or EXTMAIL.CMD.
  1152.     BinkleyTerm will not recognize the mail itself after returning from
  1153.     spawning!!!
  1154.  
  1155.  
  1156.  
  1157. -------------------------------------------------------------------------------
  1158.     CANTALOUP/2:
  1159. -------------------------------------------------------------------------------
  1160.  
  1161.     Many thanks to Michael Bünter, who was so kind to let me participate
  1162.     in the closed beta test of his famous new mailer CantaLoup. From the
  1163.     first day I got the description of the 'ExternMail-DLL-Interface' in
  1164.     June 1995, I worked hard of reconstructing FREC to FREC.DLL. Well, I
  1165.     have done my homework and FREC.DLL is stil ready. Both EXE and DLL have
  1166.     the same version number and are, in fact, the same product (with little
  1167.     differences, but compiled from identical C source).
  1168.  
  1169.     So, FREC.EXE and FREC.DLL are twins, all documentation for FREC.EXE is
  1170.     still acceptable for FREC.DLL (from now on named 'DLL' if special
  1171.     meaning is signed).
  1172.  
  1173.     Special settings in CL.CFG are needed to invoke FREC.DLL.
  1174.  
  1175.     For class 2 type of faxmodems (all Rockwell chipset modems and Zyxel):
  1176.  
  1177.         Init           ATZ| or similar command which resets to FCLASS=0
  1178.         Answer         AT+FAA=1|AT+FCR=1|ATA|
  1179.         ExtrnMail      FREC M +FCON
  1180.         ExtrnDesc      FREC -cx:\path\frec.cfg -k3 -sWAIT_OK
  1181.  
  1182.     For class 2.0 type of faxmodems (USR V.FC/V.34 and Zyxel):
  1183.  
  1184.         Init           ATZ| or similar command which resets to FCLASS=0
  1185.         Answer         AT+FCLASS=2.0|AT+FNR=1,1,1,1|AT+FAA=1|AT+FCR=1|ATA|
  1186.         ExtrnMail      FREC M +FCO
  1187.         ExtrnDesc      FREC -cx:\path\frec.cfg -k3 -sWAIT_OK
  1188.  
  1189.     For class 1 type of faxmodems
  1190.  
  1191.     Please contact the autor. It will work with a lot of modems, but the
  1192.     'Answer' part must be constructed carefully for each case.
  1193.  
  1194.     The part in 'ExtrnDesc' is in fact the same as you use to call FREC.EXE,
  1195.     expect the '-p<PortHandle> parameter. The porthandle is internally
  1196.     submitted from CL/2 to the DLL !!!
  1197.  
  1198.     It is also possible to use FAXVIEW by adding '-vFAXVIEW.EXE' and the
  1199.     corresponding screenformat like '-STANDARD' as described elsewhere in
  1200.     this document.
  1201.  
  1202.     Attention: The DLL does not return any errorlevel, look into FREC.LOG
  1203.     and CL.LOG for cause of error.
  1204.  
  1205.     To signal an incoming fax, a new mechanism is invented to the DLL which
  1206.     results, of course, in a new keyword in FREC.CFG: CLPageOK
  1207.  
  1208.     Use this feature to select either an ErrorLevelExit of CL/2 or a predefined
  1209.     Shell or even a Script. For details see the sample CFGs in the paket!
  1210.  
  1211.     Commandline option in 'ExtrnDesc':
  1212.  
  1213.     -c<config_file>
  1214.         This is a absolutely must! The parameter 'ComPort' must also be
  1215.         defined and match the 'port' in CL.CFG. ISDN is not supported (yet :-)
  1216.  
  1217.     -sWAIT_OK
  1218.         Also absolutely required! As far as CL/2 is not able to work with
  1219.         'ExtrnMail FREC RING' (where -sWAIT_FCON is useful) Frec will be
  1220.         called in the 'traditional' but less useful way when modem is
  1221.         reporting +FCON (in Class 2) or +FCO (in Class 2.0).
  1222.  
  1223.     -k
  1224.         This is not needed, because the default of Tiff format is compression
  1225.         in Huffman 1-D which corresponds to '-k3'.
  1226.  
  1227.     -f
  1228.         This should not be used! Use the AT+FBOR=1 (Class 2) or AT+FBO=1 (in
  1229.         Class 2.0) instead.
  1230.  
  1231.     -z
  1232.         This parameter is possible but not recommanded (Zyxel ZFax format).
  1233.  
  1234.     -x
  1235.         May be used, but in then FREC.DLL will do exactly the same as CLFAX.DLL
  1236.         and PAGEnnnn.RAW is created for each fax page incoming. One exception
  1237.         is, that FREC.DLL cannot create task depended files (PAGEttnn.FAX).
  1238.  
  1239.     -v<PM-driver>
  1240.         PM-realtime fax image is created on screen as described in
  1241.         this document. CAN NOT be used in combination with '-x'!
  1242.  
  1243.     -e
  1244.         Single page Tiff may be used if necessary.
  1245.  
  1246.     -i
  1247.         This parameter must not be used with DLL version of Frec.
  1248.  
  1249.     -d, -g, -pollsep, -q and -h
  1250.         These parameters should not be used with DLL version of Frec.
  1251.  
  1252.  
  1253.  
  1254. -------------------------------------------------------------------------------
  1255.     FREC AS A STAND ALONE FAX RECEIVER:
  1256. -------------------------------------------------------------------------------
  1257.  
  1258.     To use Frec as a stand alone fax receiver simply start the program
  1259.     with the syntax as follows:
  1260.  
  1261.         FREC -cX:\FAX\FREC.CFG -k3
  1262.  
  1263.     Where 'X:\FAX\FREC.CFG' is the path and file name of your Frec
  1264.     configuration file and '-k3' the selected compression scheme.
  1265.  
  1266.  
  1267.  
  1268. -------------------------------------------------------------------------------
  1269.     FREC AS A STAND ALONE FAX POLL REQUESTER:
  1270. -------------------------------------------------------------------------------
  1271.  
  1272.     To poll for a fax from somebody, the syntax is as follows:
  1273.  
  1274.         FREC -cX:\FAX\FREC.CFG -g123456 -pollsep12
  1275.  
  1276.     Where 'X:\FAX\FREC.CFG' is the path and file name of your Frec
  1277.     configuration file, '123456' is the phone number of the remote fax
  1278.     machine and '12' is an optional page indicator transmitted via a
  1279.     selective polling (SEP) frame.
  1280.  
  1281.  
  1282.  
  1283. -------------------------------------------------------------------------------
  1284.     FREC AS FAX POLL SERVER:
  1285. -------------------------------------------------------------------------------
  1286.  
  1287.     Configuration is mostly like as Frec as a stand alone fax receiver. In
  1288.     addition one or more documents have to be defined in 'POLLFILE' (via
  1289.     configuration file and/or command line parameter). Also 'FSENDCFG'
  1290.     keyword is required, so that Frec knows the name and
  1291.     location of the Fsend configuration file. If Frec is used in combination
  1292.     with a front end (e.g. FidoNet mailer) the AT+FLPL=1 command must be set
  1293.     in 'ANSWER' or 'INIT' command of the mailer's configuration file!
  1294.  
  1295.     Frec only will work as a poll server if FSEND.EXE (FSEND.DLL) is found
  1296.     in the current path or directory (libpath).
  1297.  
  1298.     Frec 'spawns' (branches) FSEND.EXE (or loads FSEND.DLL) and calls the
  1299.     TxHandler() which will do the 'send work'. You will (if you can :-) see,
  1300.     that Frec uses some 'undocumented' commandline parameters when calling
  1301.     Fsend. Never use these parameters when starting Fsend from command line!
  1302.  
  1303.  
  1304.  
  1305. -------------------------------------------------------------------------------
  1306.     HISTORY OF FREC:
  1307. -------------------------------------------------------------------------------
  1308.  
  1309.     Version 3.51:
  1310.         Large parts of code (esp threadhandling, memoryallocation, exception-
  1311.     handling and CFG/CMD-handling) was redesigned. All parts of code, which are
  1312.     also in FSEND and ANSW were put to FAXPROC, which is from now on a dynamic
  1313.     link library (FAXPROC.DLL). Linking of C-runtime is never more statically,
  1314.     instead, C-runtime is linked dynamically (at loadtime) for FREC, FAXPROC and
  1315.     IMGPROC. So, the overall amount of codesize was reduced. Some keywords in
  1316.     CFG were also altered:
  1317.  
  1318.         INBOUNDREC    -->    INBOUND (sorry for twice altering)
  1319.         SUBJECTREC    -->    SUBJECTRECFAX
  1320.     NEW:
  1321.         InitFifo (see above)
  1322.  
  1323.     Not longer supported:
  1324.         FSENDDLL (see FSENDCFG)
  1325.  
  1326.     Finally, the COM port open methode is now checked in FAXPROC. Only if COM
  1327.     is opend in READWRITE and SHARE_DENYREADWRITE, work is continued! I hope
  1328.     some problems (when called from a mailer, which uses a patched MAXCOMM to
  1329.     open COM in SHARE_DENYNONE mode) are solved now. Also SIO.SYS in
  1330.     'share mode' should never more work!
  1331.  
  1332.     Maybe some users will disagree, but 'sharing' a communication port is NOT
  1333.     usefull on a multitasking environment! Each application MUST have unique
  1334.     access to its own resources.
  1335.  
  1336.     Version 3.50:
  1337.         Only internal test version and not distributed.
  1338.  
  1339.     Version 3.49:
  1340.  
  1341.         While FREC (and FSEND) grow larger and larger, some system immanent
  1342.         bugs became more and more effectiv. So, some functions, belonging to
  1343.         thread handling, were 'perfectized' to avoid system inkonsistence.
  1344.  
  1345.         Things like DosKillThread() and free() were removed or made more
  1346.         reliable. Priority settings are still an usually 'unknown' mistery.
  1347.  
  1348.         As a result of experience, there is absolutly NO BENEFIT in common
  1349.         priorisation of certain threads! In FREC (and FSEND) parts of code
  1350.         are set internally to LOWER priority, in case other threads (in
  1351.         parallel) need more CPU. If CPU consuming threads are in an idle
  1352.         state, other thread with (temporary) lower priority are set again to
  1353.         REGULAR priority and threads in idle state are 'boosted' to higher
  1354.         priority. This sounds like a paradoxon (idle threads have TIMECRITICAL
  1355.         and heavy busy threads have REGULAR priority) but in fact the result
  1356.         is better than any other approach:
  1357.  
  1358.         If thread is idle (has nothing to do), higher priority does NOT EFFECT
  1359.         other threads, and the idle thread 'comes up' VERY QUICK if anything
  1360.         is to do for it! On the other side, 'power' of CPU is constant and
  1361.         CAN NOT be raised by raising priority. So, if one thread needs
  1362.         (temporarly) more of (the ONE) CPU, an other thread must be limited
  1363.         in 'power consuming' be setting to IDLETIME.
  1364.  
  1365.     Version 3.48:
  1366.         Commandline switches '-RecPWD' and '-RecSUB' are not longer supported
  1367.         and needed. Functionalyty of them is included in 'FaxPath' in CFG.
  1368.         Therefore SUBADDRESSING is fully supported and highly compatible to
  1369.         third parties fax program behavior. FAXLOG and FAXIDX have also
  1370.         changed their meaning! Both have defaults (FAX.LOG and FAX.IDX) and
  1371.         should only be altered, if neccessary. Fully qualified filenames will
  1372.         be constructed from 'FaxPath' and FaxLog/FaxIdx.
  1373.  
  1374.     Version 3.47:
  1375.         Frec shall be capable to receive fax in any resolution (only in
  1376.         class 1), defined in ITU-T.30 (200x400, 300x300 and 400x400 dpi).
  1377.         This new feature is not tested, because there seems to be no fax
  1378.         machine (and no fax modem) which do support that. Some new command
  1379.         line parameters (which partly replaces other ones) added, read
  1380.         documentation for more information.
  1381.  
  1382.     Version 3.46:
  1383.         Frec and Fsend now can use one and the same configuration file.
  1384.         Certain keywords have been updated, like:
  1385.  
  1386.             INBOUND -> INBOUNDSEND and INBOUNDREC
  1387.             SUBJECT -> SUBJECTSEND and SUBJECTREC
  1388.  
  1389.         It is recommanded, to distinguish between Frec and Fsend portions
  1390.         of configuration file by using '[TASK <n>]' keyword.
  1391.  
  1392.         Name of TIFPROC.DLL changed to IMGPROC.DLL.
  1393.  
  1394.         Atention: IMGPROC.DLL is able to create multipage Tiff with a maximum
  1395.         of 100 pages! So fax with more pages (in one single session) are cut
  1396.         off! If you expect to receive more than 100 pages, use single page
  1397.         Tiff files (parameter '-e').
  1398.  
  1399.     Version 3.44:
  1400.         Some versions 3.44 of FREC have a BUG (a great one :-). In 3.44f
  1401.         revision, this BUG (FREC hangs after Phase E) is eliminated (a
  1402.         function has get a return value, but the setting of '{' and '}'
  1403.         while testing return value was not consistent :-)
  1404.  
  1405.         FREC was tested on WARP 4.0 (Merlin US GA) and it seems, that all
  1406.         works fine.
  1407.  
  1408.     Version 3.44:
  1409.         Minor changes from version 3.42b.
  1410.         TIFPROC.DLL is reduced because LZW (Lempel, Ziv & Welch) compression
  1411.         is under patent regulation in some countries. So TIFPROC.DLL is no
  1412.         longer able to handle Compression=5 (normally known as LZW).
  1413.         TIFPROC.DLL is 'under study' and will be changed/upgraded when
  1414.         LZ-compression will work in unrestricted manner!
  1415.  
  1416.     Version 3.43:
  1417.          This version was rejected! To much problems occured with TIFPROC.DLL!
  1418.  
  1419.     Version 3.43:
  1420.         Version 2.34 is up to date (3.43c) but HUFFMAN.DLL is replaced by
  1421.         TIFPROC.DLL. As in 3.43b a module named TIFPROC.OBJ was included, now
  1422.         this module is combined with HUFFMAN.OBJ to form TIFPROC.DLL. Also the
  1423.         other utilities (Fsend 1.26c and FaxView 0.34b) require TIFPROC.DLL and
  1424.         do not require HUFFMAN.DLL any more!
  1425.  
  1426.         Now Tiff and compression/decompression is performed only in one file
  1427.         (TIFPROC.DLL) and changes influence all EXE and DLL which use this DLL.
  1428.         HUFFMAN.DLL is only valid for older version as mentioned above.
  1429.  
  1430.         No significant changes were made to Frec/Fsend/FaxView (only some
  1431.         details) and are mainly Tiff internas (Fsend will from now on be able
  1432.         to include color Tiff files in all compression schemes). FaxView has
  1433.         mutated to a truely Tiff reader, also BMP are furthermore supported
  1434.         (scaling with BMP will show things not expected :-)
  1435.  
  1436.         TIFPROC is able to read and write compression 1 (uncompressed),
  1437.         2 (Huffman without EOL), 3 (Huffman with EOL), 4 (2-D Read without
  1438.         EOL), 4.1 (2-D Read with EOL), 5 (LZW, maybe under law of patent) and
  1439.         32773 (PackBit). TIFPROC does not (yet) support commpression 6 (JPEG
  1440.         as in Tiff 6.0 specification)
  1441.  
  1442.         While copression 2, 3, 4 (4.1) and 32773 are well optimized,
  1443.         compression 5 (LZW) is implemented only to do the job and routines are
  1444.         not optimized and not tested for consistance.
  1445.  
  1446.         As mentioned, compression 4 will give BEST results on BiLevel
  1447.         (black&white) documents construted with a typewrite or similar
  1448.         methodes. A page in A4 dimensions with text in low resolution will
  1449.         need app. 10-15 kb where values under 5 kb are realistic!
  1450.  
  1451.     Version 3.43:
  1452.         is released because in 3.42 there were some things WRONG (linking
  1453.         FAXPROC.OBJ for EXE to DLL and vice versa).
  1454.  
  1455.     Version 3.42:
  1456.         is released now. Main things are EQUAL routines (faxproc.c)
  1457.         in FREC and FSEND. Therefore both applications can be handled in
  1458.         one source.
  1459.  
  1460.         There is a new CFG entry, called LOGBINKLEYSTYLE. Try to use it for
  1461.         third party LOG-analyzers. The idea comes from Th. Waldmann, I hope
  1462.         I had understand right. The problem of generating announcing netmail
  1463.         still exists. If multipage fax is received in error a netmail is
  1464.         generated if ONLY one good page was received with no sign to the bad
  1465.         reception. I hope for future, I will solve this problem.
  1466.  
  1467.         While vers. 3.40 was released in some newer packages, up from 3.41
  1468.         the SEP frame was 'invented' to make Selective Polling easier. Not
  1469.         fully tested.
  1470.  
  1471.     Version 3.40:
  1472.         has a bug in ECM reception fixed. Nevertheless, ECM is further
  1473.         in a quite 'unprove' state. The implemented methode to receive the HDLC
  1474.         frames is in an unorthodox manner and may or may not work with every
  1475.         modem. This is not a reason of 'not understanding', it is a limitation
  1476.         of class 1 implementation in current modems on the market! If you are a
  1477.         'brave' fax receiver, than look to '-ECMraw' commandline switch to
  1478.         enable storing raw ECM HDLC blocks and send them to the author, if
  1479.         reception fails.
  1480.  
  1481.     Version 3.39:
  1482.         in conjunction with CantaLoup (WB2 or younger) is able to work in
  1483.         class 1 AND adaptiv autoanswer! Use '-sWAIT_FCON' and set the
  1484.         'USROBOTICS' keyword in configuration file. Frec will send the "ATO"
  1485.         command to modem if 'DATA' is detected and resulting modem response
  1486.         is transfered to CantaLoup.
  1487.  
  1488.         If well set up, fax receive and pollserver possible.
  1489.  
  1490.     Version 3.37:
  1491.         has some enhancements in calling fax viewer. Class 1 reception
  1492.         with ECM had have some minor bugs which should be fixed now.
  1493.  
  1494.         A test for a 'locked' bitrate of COM port driver is implemented now.
  1495.         In cases where it is not senseful to work with a locked speed, Frec
  1496.         simply gives up.
  1497.  
  1498.         It is a common behaviour of users to 'lock' the COM port
  1499.         (especially SIO.SYS).
  1500.  
  1501.         This is only usefull, if communication software needs bitrates above
  1502.         57600 bps (e.g. 115200 bps) but can not set this speed by itself!
  1503.  
  1504.         There is absolutly NO SENSE in 'locking' the port (which is in fact a
  1505.         'shortcutting' of DosDevIOCtl(SETBITRATE)) in case where software can
  1506.         properly set the desired speed.
  1507.  
  1508.         Frec accepts a 'locked' port only, if all of the following conditions
  1509.         are true:
  1510.  
  1511.             FaxBaudRate = DataBaudRate = LockedBaudRate
  1512.             and 'CHANGEBAUD' = 0 (not used).
  1513.  
  1514.         Maybe, this 'lock-detection-facility' will be cancelled in further
  1515.         versions of Frec, but in this case, the author will STOP all further
  1516.         support in cases where failures, based on locked ports, are reported.
  1517.  
  1518.         It is not the intention of the author, to 'teach' people, how to use
  1519.         there communication software, but 95% of error reports of misfunction
  1520.         in fax reception are based on such 'locked' ports.
  1521.  
  1522.         Some major redesign tooks place, starting from version 3.26! Actually,
  1523.         no fax modem on the market satisfies all standards belonging to fax.
  1524.         So, Frec looks like a big patchwork to deal with a lot of fax modems.
  1525.         Well, this was not my indention! I had redesign (in fact rewritten)
  1526.         the complete logic of all parts in Frec. My target was 100% accordance
  1527.         to CCITT-ITU T.4 and T.30 and EIA/TIA-578 and EIA/TIA-592. Because of
  1528.         the nonstandardized class_2, I hope to have realized a good compromise
  1529.         for all fax modems with Rockwell-Chipset.
  1530.  
  1531.         Class 1 should now be as perfect as possible. Also a first try for
  1532.         ECM is implemented in class 1. Checking of T.4 datastream was improved,
  1533.         but, in contrary to real faxmachines, not all errorconditions are
  1534.         treated as an error (if doing so, really ALL fax sending software must
  1535.         be put to trash :-).
  1536.  
  1537.         Oh Lord! Why programmers of fax software could not read the standards?
  1538.  
  1539.         FREC.DLL, which primarly was designed for CantaLoup/2 is now able to
  1540.         work with almost all programs, which are designed for it. Please ask
  1541.         the author for details, a documentation of the calling routine is to
  1542.         hard to write.
  1543.  
  1544.     Version 3.23:
  1545.         should have been the LAST version of FREC in this kind of
  1546.         application.
  1547.  
  1548.         Well it should not happened :-). Since version 3.24 'was' the best
  1549.         Frec I ever released, now 3.25 is stil ready. See also to the end
  1550.         of this document for some bandnew products !!!
  1551.  
  1552.         One problem fixed in 3.22e which had caused misterious SIGSEGV aborts.
  1553.         In case of nonexisting path to FAXIDX, FREC gave up. Also ALL fopen()
  1554.         are checked for error. See also Errorlevel in this document.
  1555.  
  1556.         With WARP there came the problems :-) IDLE-TIME Priority in WARP is
  1557.         handeled different like in 2.1(1) ...
  1558.  
  1559.         While in Frec 3.19 and 3.20 only DebugIdlePriority and SaveIdlePriority
  1560.         were used to 'finetune' Frec, this solution was not satisfying !!!
  1561.  
  1562.         It was reported by MANY users, that their FREC session was still
  1563.         blocked (either between pages or at the end). Different reasons
  1564.         were detected, e.g. one ore more DOS-Session open with
  1565.         'pollingroutines in it' or native OS/2 sreen savers or (in my case :-)
  1566.         MsgEd!
  1567.  
  1568.         I have NOT fixed the problem yet !!! On my systems (one 486DX2-66 with
  1569.         L2-cache, one 486DX2-66 without L2-cache, a NoteBook, and a 386DX-25)
  1570.         Frec behaves quite normal on OS/2 2.1 and values of 0 (ZERO) for
  1571.         DebugIdlePriority and SaveIdlePriority. When updating both 486DX2-66
  1572.         with WARP, the PC with L2-cache always blocks when terminating (TIF
  1573.         was not written to disk).
  1574.  
  1575.         As a solution, I had closed all OS/2 and DOS-Session and Frec
  1576.         terminates well. These effects I never see on my NoteBook with WARP.
  1577.  
  1578.         So I recommanded to increase DebugIdlePriority to 30 and
  1579.         SaveIdlePriority to 31 but there are still problems on other users
  1580.         machines.
  1581.  
  1582.     Version 3.21:
  1583.         Now, in Version 3.21 of FREC, I have implimented also
  1584.         DebugRegularPriority and SaveRegularPriority to 'finetune' your
  1585.         machine.
  1586.  
  1587.         You should use only ONE keyword (either ...Idle... or ...Regular...).
  1588.         As a hint: start with 'DebugIdlePriority 30' and 'SaveIdlePriority 31'.
  1589.         If Frec still blocks a thread, than use 'SaveRegularPriority -31' and
  1590.         increase this value to values below 0. Do not increase to 0 or above!!!
  1591.         If you use DebugRegularPriority, do not use Class 1, because frame
  1592.         timing will come out of sync! As a rule: Save...Priority must be
  1593.         larger then Debug...Priority!
  1594.  
  1595.         Many thanks to Thomas Gaul and Juergen Pflanz! Thomas reported a
  1596.         serious BUG in reading BINKLEY.LOG from a Binkleyterm 2.50 EE Beta E3.
  1597.         This version of 2.50 EE (I think it is the best Binkley (n)ever
  1598.         released :-) saves internal received PAGEnnnnn.FAX with a bytelength
  1599.         of X and writes in the LOG-file a bytelength of X-9. FREC never found
  1600.         a match between log and real file! With Binkley 2.59 FREC still works
  1601.         perfect :-)
  1602.  
  1603.         To answer a 'frequently asked question' here:
  1604.         Frec can not be used to convert Xenia/2 *.FAX, because these files
  1605.         are in a 'ZFAX-format' which is multipaged and the SessionInformation
  1606.         in the header of this file is 'crippled' and NOT useable for a correct
  1607.         decompression. Also Frec can not read Xenia/2 logfile at all !!!! The
  1608.         'crippled' header is NOT caused by Xenia/2 (!!!) it is system immanent
  1609.         of ZFAX fileformat. I hope, the author of Xenia/2 will use (in future)
  1610.         an other file format to store its faxes.
  1611.  
  1612.         Thanks to Christian Voelker, for reporting a serious bug in generating
  1613.         a NetMail after fax reception. This bug may be invented in one of the
  1614.         last versions and was never seen before.
  1615.  
  1616.         The feature 'ChangeBaud' is practically working, but fax reception
  1617.         with some Rockwell-Chipset based modems is not possible in any case.
  1618.         The problem maker is Binkley and the RxBuffer. Binkley collects a
  1619.         lot of bytes AFTER receiving the key +FCO(N), which in fact means,
  1620.         that important information like the +FDCS and +FTSI and the 'vital'
  1621.         OK are in Binkley's RxBuffer with the wrong bitrate and therefor lost
  1622.         for ever. Sorry, if you have such an modem, your compromise is: fax
  1623.         and data at 19200 bps or data-only with higher bitrates!
  1624.  
  1625.         Removing an error in version 3.17b, thanks to Alberto Pasquale.
  1626.         Binkley (especially the EE Beta E3-32 ISDN-IBMC) switches to XON/XOFF
  1627.         transmitting handshake when spawning to ExitBaud.Cmd. FREC now disables
  1628.         all XON/XOFF handshake in either case (standalone or called from
  1629.         Mailer).
  1630.  
  1631.         Obviously, this had no effect with COM.SYS but SIO.SYS makes external
  1632.         fax reception impossible. Maybe this was the great 'SIO-Bug' in Frec!
  1633.  
  1634.         Due to some discussion with Thomas Denecke, the new keyword
  1635.         'ChangeBaud' was added to the configuration file:
  1636.  
  1637.         Some (older) modems can only transmit their fax data at a fixed rate
  1638.         of 19200 bps. This is quite a slow bps-rate for data transfers. You
  1639.         can from now on use your high data bitrate and when FREC is called
  1640.         from your mailer (after receiving +FCON), DCE-DTE speed is changed
  1641.         to 'FaxBaudRate' (normally 19200).
  1642.  
  1643.         You must define 'FaxBaudRate 19200' and 'ChangeBaud' to use this
  1644.         feature!
  1645.  
  1646.         Frec changes back to callers bitrate before the 'CleanUp' string is
  1647.         sent to the modem. Therefore a 'CleanUp ATZ' (or 'CleanUp AT' if you
  1648.         do not want to change your modem settings) is a MUST, to signal the
  1649.         new bitrate to your modem!
  1650.  
  1651.         Some hints, if reception of faxdata is not as good as you expected:
  1652.  
  1653.         Use the '-x' switch to force the generation of PAGEnnnn.RAW ! You can
  1654.         easyly convert this fax rawdatafile in a second pass with FREC. With
  1655.         '-x' enabled, 95 % of FREC is switched off and FREC works only like
  1656.         'COPY COMx PAGEnnnn.RAW'.
  1657.  
  1658.         Some mainboards on the market inserts so much waitstates while doing
  1659.         IO, there is not enough time to make the decompression job. This
  1660.         belongs also to 'fast' 486 66 MHz CPU-mainboards !!! FREC is tested
  1661.         with 386SX 20 MHz without any missing byte from COM-port!
  1662.  
  1663.         If your modem (in Class 2) does not support fax polling, do not
  1664.         forget to comment out the 'PollFile' entry in configuration file!
  1665.  
  1666.         A 'quantum leap' to Version 3.00b has taken place:
  1667.  
  1668.         COM-Port handling and decompression is synchronized via EventQueues
  1669.         (oh, what a horror :-). Frec is now a little bit smarter in detecting
  1670.         byte fillorder which is different in Class 2 and Class 2.0. The crazy
  1671.         '-f' commandline switch is now only neccessary if you want to convert
  1672.         special RAW files (e.g. without useable entries in BINKLEY.LOG). In all
  1673.         other cases, you can omit this switch. Many thanks to Claus Matthies,
  1674.         who gave me the hint with sopen() to read BINKLEY.LOG even if Binkley
  1675.         is running!
  1676.  
  1677.     Version 2.21:
  1678.         New in 2.11b, Frec can be used as a Fax-Poll-Server. You define a
  1679.         document which can be requested from a remote fax. For this purpose,
  1680.         Fsend is needed! FSEND.EXE (from the same autors) must be in the same
  1681.         directory as Frec or in the 'PATH'.
  1682.  
  1683.         Some enhancements took place from 2.04 to 2.08, 2.09b adds polling
  1684.         feature to Frec. Class 2.0 is perfectly running on Zyxel (6.13) and
  1685.         USR. The new '-x' switch allows a two-step operation on slower systems
  1686.         like 386SX. First Frec generates PAGEnnnn.RAW in the same way as
  1687.         Binkley's internal faxreception. In a second step, FREC converts the
  1688.         PAGEnnnn.RAW to *.TIF.
  1689.  
  1690.         Because Fsend, the opposit to Frec was finished, it seems a good thing,
  1691.         to combine some functions in one DLL for both. So HUFFMAN.DLL serves
  1692.         for Frec and Fsend.
  1693.  
  1694.     Version 2.03:
  1695.         Bug fix in 2.03b: Thanks to Ferenc Pal, detecting a serious bug in
  1696.         handling the callers phonenumber when using FREC only as a converter
  1697.         for Binkley PAGEnnnn.FAX. This bug should be fixed now.
  1698.  
  1699.         New Features:
  1700.  
  1701.         ZyXEL Fax Files instead of TIF-File may be generated by use the '-z'
  1702.         switch in the commandline. But remember! Frec does not support Zyxel's
  1703.         propriatory FCLASS=6 fax modus!
  1704.  
  1705.         Many thanks to Juergen Roehrbein for solving the problem with the
  1706.         'Lost Carrier' error in Binkley when spawning to EXITBAUD.CMD. Juergens
  1707.         workaround for Rockwell-Chipset-Modems will use the inactivity-timer
  1708.         S30 to compensate AT&C0:
  1709.  
  1710.         Answer AT&C0S30=nnn|....
  1711.  
  1712.         Obviously, some modem interprets 'nnn' as tenth of seconds, other as
  1713.         true seconds. so you should try to get an inactivity timeout of
  1714.         aprox. 30 sec.
  1715.  
  1716.  
  1717.  
  1718.  
  1719. -------------------------------------------------------------------------------
  1720.     FINALY:
  1721. -------------------------------------------------------------------------------
  1722.  
  1723.     Please also read carefully FREC.CFG and FSEND.CFG.
  1724.  
  1725.     FSEND and FREC are updated either if there is a serious bug or if some
  1726.     new or requested features were added. The documentation is updated, if
  1727.     there is time in the authors 36 hour day :-).
  1728.  
  1729.     Looking backwards, Frec was a 'partial' success. More then 90 % of users
  1730.     only 'misuses' Frec as a converter for Binkley raw faxes (as originally
  1731.     R2T has done). Quite a lot of users (mainly in USA) were 'forced' by me
  1732.     to change from R2T to Frec, but they never try to use Frec as a fax
  1733.     receiver.
  1734.  
  1735.     Frec and its 'debug file' has teached a lot of people how fax reception
  1736.     works and has shrinked the mistery, named FAX :-)
  1737.  
  1738.  
  1739. <end of doc>
  1740.