
           FACSIMILE SERVICE CLASS 2.0 COMMANDS FOR THE ZyXEL MODEM



1)SERVICE CLASS 2 ACTION COMMANDS

   COMMAND:    +FDT (DATA TRANSMISSION)  
   SYNTAX:     +FDT<CR>
   DESCRIPTION:     The FDT command requests the DCE to transmit a 
                    Phase C page. It is issued at the beginning of 
                    each page, either in Phase B or in Phase D.
                    When the DCE is ready to accept Phase C data,
                    it shall issue the negotiation responses and
                    the CONNECT result code to the DTE
   
   COMMAND:    +FDR (DATA RECEPTION)
   SYNTAX:     +FDR<CR>
   DESCRIPTION:     The +FDR command initiates transition to Phase
                    C data reception. This can occur after
                    answering, after dialing, after a document is
                    received, or after a page is received.  When
                    the DCE is ready to commence data transfer, it
                    shall issue a CONNECT response code.

   COMMAND:    +FKS (SESSION TERMINATION)
   SYNTAX:     +FKS<CR>
   DESCRIPTION:     The +FKS command causes the DCE to terminate
                    the session in an orderly manner and the DCE
                    will respond with a +FHS result code.

   COMMAND:    +FIP (INITIALIZE FAX PARAMETERS)
   SYNTAX:     +FIP<CR>
               +FIP{=<value>} [optional not supported by ZyXEL]   
   DESCRIPTION:     The +FIP command causes the DCE to initialize
                    all the parameters to the manufacturer
                    determined default settings. You could also   
                    issue individual commands to accomplish the
                    same.

2. Service class 2 DCE responses

   RESPONSE:   +FCO (FAX CONNECTION)
   SYNTAX:     +FCO
   DESCRIPTION:     The +FCO response indicates that a connection
                    has been made with a Group 3 facsimile
                    station.

   RESPONSE:   +FCS (DCS FRAME INFORMATION)
   SYNTAX:     +FCS:VR, BR, WD, LN, DF, EC, BF, ST
   DESCRIPTION:     Reports negotiated parameters and is sent
                    after the +FDT or +FDR command execution but
                    before the CONNECT result code. Basically this
                    is the final negotiation after both sides have
                    identified their respective capabilities
                    through +FIS
 
   RESPONSE:   +FIS (DIS FRAME INFORMATION)
   SYNTAX:     +FIS:VR, BR, WD, LN, DF, EC, BF, ST
   DESCRIPTION:     Reports remote station capabilities.
                    Originate, Answer, +FDT or +FDR  command
                    executions could generate these responses and
                    is followed by "OK".

   RESPONSE:   +FPO (REMOTE POLLING INDICATION)
   SYNTAX:     +FPO
   DESCRIPTION:     +FPO indicates that the remote station has a  
                    document to poll, and invites the DTE to poll
                    it. The +FPO response is delivered between the
                    +FIS and the "OK" result code if
                    enabled(+FSP=1 and +FLP=1).

   RESPONSE:   +FCI (REPORT REMOTE ID, CALLED STATION ID(CSI))
   SYNTAX:     +FCI:"<CSI ID String>" CALLED STATION ID
   DESCRIPTION:     This response reports the received remote ID  
                    string, if any.

   RESPONSE:   +FPI (POLLING STATION ID)
   SYNTAX:     +FPI:"<CIG ID String>" Polling station ID
   DESCRIPTION:     This response reports the received remote ID  
                    string, if any.

   RESPONSE:   +FNF (REPORT NSF FRAME)
   SYNTAX:     +FNF:<NSF FIF string>  Non Standard Facilities
   DESCRIPTION:     Reports any received Non Standard negotiation 
                    frames, one response per frame. They are      
                    presented in hex notation and separated by    
                    spaces.

   RESPONSE:   +FPS (T.30 Phase C Page Reception Response)
   SYNTAX:     +FPS:<ppr>, <lc>,<blc>,<clbc>,<lbc>
   DESCRIPTION:     The +FPS message is generated by the receiving 
                    DCE at the end of data reception in Phase C.
                    This is after the receiving station has
                    obtained the RTC from the sending side. This
                    response is also controlled by how +FCQ
                    parameter is set.

   The post page response(ppr) is as follows:
   Value  T.30 Label     Result code    Description
    1          MCF            OK        Page Good
    2          RTN            ERROR     Page Bad; retrain
                                        Requested
    3          RTP            OK        Page good; retrain
                                        requested
    4          PIP            OK        Page good; remote request 
                                        for procedure interrupt   
                                                                  
                                        requested
    5          PIN            ERROR     Page Bad; retrain
                                        requested; remote request
                                        for procedure interrupt
                                        accepted.

   If +FCQ is set, the receiving DCE may count lines<lc>, bad     
   lines<blc>, maximum consecutive bad line count; this is the    
   number of lines in the largest group of consecutive bad        
   lines<cblc> and lost byte count<lbc>.

   Please note that these capabilities are controlled by the DCE's 
   copy quality checking capabilities, controlled by the +FCQ
   parameter.

   RESPONSE:   +FET (POST PAGE MESSAGE)
   SYNTAX:     +FET:<ppm>
   DESCRIPTION:     The +FET:<post page message(ppm)> response is 
                    generated by a receiving facsimile DCE after
                    the receipt of Phase C data and post-page
                    message from the transmitting station when in
                    data reception mode(+FDR).

   The <post page message> codes are as follows:
   PPM code    T.30 Label          Description
     0              MPS            another page next, same
                                   document
     1              EOM            another document next
     2              EOP            no more pages or documents
     3              PRI-MPS        another page next, same
                                   document, procedure interrupt
                                   requested
     4              PRI-EOM        another document next,
                                   procedure interrupt requested
     5              PRI-EOP        no more pages or documents,    
                                   procedure interrupt requested

   RESPONSE:   +FHS (CALL TERMINATION STATUS)
   SYNTAX:     +FHS:<hsc>
   DESCRIPTION:     +FHS indicates that the call has been
                    terminated. The hangup cause is reported
                    through a result code and stored in the +FHS
                    parameter. The final "OK" result code always
                    follows the +FHS:<hsc>. This is a good
                    debugging tool. A brief description of the
                    values will be described here but for a more
                    complete explanation please refer to the
                    actual standard.

   Values        Hangup Cause Description
   00-0F         Call placement and termination
   10-1F         Transmit Phase A and miscellaneous               
                 errors
   20-3F         Transmit Phase B hangup codes
   40-4F         Transmit Phase C Hangup Codes
   50-6F         Transmit Phase D Hangup codes
   70-8F         Receive Phase B Hangup codes
   90-9F         Receive Phase C Hangup codes
   A0-BF         Receive Phase D hangup codes
                

   
   SERVICE CLASS 2 PARAMETERS
   All service class 2 parameters can be read, written and tested 
   for a range of legal values.

   PARAMETER:  +FCLASS (SERVICE CLASS IDENTIFICATION and CONTROL)
               Valid Values: 0,2,2.0,6,8

   Default value:0
   DESCRIPTION:     Sets the modems as a data modem, fax modem or
                    a voice modem

   Value            Operation
    0               Data modem
    2               SP-2388(August 1990)
    2.0             Service Class 2.0
    6               ZyXEL's propriety fax AT# commands
    8               Voice DCE (TIA IS-101)

   To read the current service class indication : AT+FCLASS?
   The response will be a single value.

   To test the service class capabilities : AT+FCLASS=?
   The response is a string of values, separated by commas and    
   followed by "OK". For example :<CR><LF>0,2,2.0,6,8<CR><LF>OK

   To write the service class selection: AT+FCLASS=<value>
   The Service class may be set by the DTE from the choices   
   available.
   Please note that in ZyXEL modems it will go back to the        
   efault value once the carrier has dropped regardless of which  
   mode it was in previously.

   PARAMETER:  +FMI (REQUEST MANUFACTURER ID (READ ONLY))
   SYNTAX:     +FMI?
   DESCRIPTION:     Returns "ZyXEL"

   PARAMETER:  +FMM (REQUEST MODEL IDENTIFICATION (READ ONLY))
   SYNTAX:     +FMM?
   DESCRIPTION:     Returns the product identification.

   PARAMETER:  +FMR (REQUEST MODEM REVISION (READ ONLY))
   SYNTAX:     +FMR?  
   DESCRIPTION:     Returns the model number and revision level of
                    the firmware. 

   
   T.30 Session Parameters
   PARAMETER:  +FCC (DCE CAPABILITIES PARAMETERS)
   SYNTAX:     +FCC=VR,BR,WD,LN,DF,EC,BF,ST
   VALID VALUES:    Shown below
   DEFAULT VALUES:  0,5,0,2,0,0,0,0
   DESCRIPTION:     The +FCC allows the DTE to constrain the
                    capabilities of the modem.

   Below is the T.30 Session Subparameter codes (capabilities) that 
   are supported by the ZyXEL modems:
   Label       Function            Values         Description
    VR         Resolution          00             Normal 98 lpi
                                   01             Fine   196lpi
    
    BR         Bit Rate            0              2400 bps
                                   1              4800 bps
                                   2              7200 bps
                                   3              9600 bps
                                   4              12000bps
                                   5              14400bps

    WD         Page Width          0              1728 pixels in
                                                  215mm
                                   1              2048 pixels in
                                                  255mm
                                   2              2432 pixels in
                                                  303mm
 
    LN         Page Length         0              A4, 297mm
                                   1              B4, 364mm
                                   2              Unlimited
 
    DF         Data compression    0              1-D Modified
                                                  Huffman
                                   1              2-D Modified
                                                  Read
 
    EC         Error Correction    0              Disable ECM

    BF         File Transfer       0              Disable BFT

    ST         Scan Time/Line                     VR=0      Vr=1
                                   0              0 ms      0 ms
                                   1              5 ms      5 ms
                                   2              10 ms     5 ms
                                   3              10 ms     10 ms
                                   4              20 ms     10 ms
                                   5              20 ms     20 ms
                                   6              40 ms     20 ms
                                   7              40 ms     40 ms

   Please note that the +FCC or +FIS command can be issued again  
   after +FCO is received and the capabilities of the remote device 
   is obtained through +FIS and renegotiated before the final     
   negotiation results are reported through +FCS. Please also note 
   that the resolution or the data compression can be changed     
   between pages through the +FCC or +FIS command and renegotiated 
   again will take place between both stations.


   PARAMETER:  +FIS (Current Session Parameters)
   SYNTAX:     +FIS=VR,BR,WD,LN,DF,EC,BF,ST
   VALID VALUES:    As defined above
   DEFAULT VALUES:  0,5,0,2,0,0,0,0
   DESCRIPTION:     The +FIS command allows the DTE to constrain
                    the capabilities used for the current session
                    on the modem.

   PARAMETER:  +FCS (CURRENT SESSION RESULTS (READ ONLY))
   SYNTAX:     +FCS?
   RESPONSE:        VR,BR,WD,LN,DF,EC,BF,ST
   VALID VALUES:    As defined previously
   DESCRIPTION:     Returns the current results of the negotiation 
                    between the sending and the receiving
                    stations. The parameters negotiated would be
                    the current session capabilities.

   PARAMETER:  +FLI (LOCAL ID STRING)
   SYNTAX:     +FLI="<local ID string>
   VALID VALUES:    upto 20 printable ASCII characters
   DEFAULT VALUE:   null string
   DESCRIPTION:     As an identification this is used by the
                    remote station to identify the calling
                    station.

   PARAMETER:  +FNS (Non-Standard Frame FIF octet string)
   SYNTAX:     +FNS="<string of hexadecimal coded octets>"   
   VALID VALUES:    upto 90 characters
   DEFAULT VALUES:  null string
   DESCRIPTION:     The DCE shall send the corresponding non-     
                    standard facilities frame if +FNS is not a
                    null string.

   PARAMETER:  +FLP (INDICATE A DOCUMENT TO POLL)
   SYNTAX:     +FLP=<value>
   VALID VALUES:    0, 1
   DEFAULT VALUE:   0
   DESCRIPTION:     Indicate whether there is a document to poll  
                    or not. Setting +FLP=0 indicates that there is 
                    no document to poll and setting +FLP=1        
                    indicates that there is a document to be      
                    polled.

                    What is polling ?

                    Polling is where the calling station calls    
                    another station and retrieves (polls)
                    documents from the remote station with the
                    calling station in the receipt mode.

   PARAMETER:  +FSP (REQUEST TO POLL)
   SYNTAX:     +FSP=<value>
   VALID VALUES:    0, 1
   DEFAULT VALUES:  0
   DESCRIPTION:     Indicates whether the DTE wants to allow      
                    polling or not. Setting +FSP=0 indicates that 
                    the DTE does not want to poll and setting     
                    +FSP=1 indicates that the DTE can receive a   
                    polled document. Please note that turning off 
                    the receiving capability (+FCR=0) will cause  
                    the DCE to behave as if +FSP=0 has been set.

   PARAMETER:  +FCR (CAPABILITY TO RECEIVE)
   SYNTAX:     +FCR=<value>
   VALID VALUES:    0,1
   DEFAULT VALUES:  0
   DESCRIPTION:     Setting +FCR=0 will indicate that the DCE     
                    will not be able to receive any fax messages  
                    nor be able to poll a remote station. Setting 
                    +FCR=1 will allow the DCE to receive fax      
                    messages.

   PARAMETER:  +FNR (NEGOTIATION MESSAGE REPORTING)
   SYNTAX:     +FNR=<rpr>,<tpr>,<idr>,<nsr>
   VALID VALUES:    0, 1 for each subparameter
   DEFAULT VALUES:  0, 0, 0, 0
   DESCRIPTION:     This is a useful tool in reporting messages   
                    that are generated during T.30 Phase B        
                    negotiations. Here is more description on the 
                    settings:

   Switch setting   Description
     rpr=0          Suppress the receiving(+FIS) parameters 
     rpr=1          The receiving(+FIS) parameter is reported

     tpr=0          Suppress the transmitting(+FCS) parameters
     tpr=1          The transmitting(+FCS) parameters is reported

     idr=0          Suppress the reporting of the ID Strings(+FCI)
     idr=1          ID strings(+FCI) parameters is reported

     nsr=0          Non-standard frames(+FNF) are suppressed
     nsr=1          Non-standard frames(+FNF) are reported

   
   PARAMETER:  +FIE (PROCEDURE INTERRUPT ENABLE)
   SYNTAX:     +FIE=<VALUE>
   VALID VALUES:    0, 1
   DEFAULT VALUE:   0
   DESCRIPTION:     The T.30 protocol allows either station to    
                    initiate Procedure Interrupts with the other  
                    station having the option to accept or ignore 
                    it. When +FIE=0 the procedures interrupt      
                    requests from the remote station are ignored  
                    and when +FIE=1 the procedures interrupt      
                    requests are accepted.

   PARAMETER:  +FPS (PAGE STATUS)
   SYNTAX:     +FPS=<ppr>
   VALID VALUES:    1,2,3,4,5,6
   DEFAULT VALUES:  1
   DESCRIPTION:     The +FPS parameter shows you the post page
                    response, which includes copy quality(+FCQ)
                    and related end-of-page status. Here are the
                    valid values of <ppr>:


   VALUE            T.30 Mnemonic  DESCRIPTION
    1               MCF            Page good
    2               RTN            Page bad; retrain requested
    3               RTP            Page good; retrain requested
    4               PIN            Page bad; interrupt requested
    5               PIP            page good; interrupt requested


   PARAMETER:  +FCQ (COPY QUALITY CHECKING)
   SYNTAX:     +FCQ=<rq>,<tq>
   VALID VALUES:    0, 1, 2 
   DEFAULT VALUES:  0 for <rq> and <tq>
   DESCRIPTION:     The +FCQ parameter controls the copy quality
                    checking and correction. The <tq> sub-
                    parameter controls the copy quality checking
                    and correction of data sent to the remote
                    side. The <rq> sub-parameter controls the     
                    copy quality checking and correction of data  
                    received from the remote station. Here is     
                    further description of each copy quality      
                    checking subparameters.

   Setting          DESCRIPTION
    rq=0            DCE Receive Copy Quality Checking is disabled. 
                    The DCE will generate Copy Quality OK (MCF)   
                    responses to complete pages, and set +FPS=1.

    rq=1            DCE Receive Copy Quality Checking is enabled. 
                    The DCE will determine the recommended Post-
                    Page Message, and store it into the +FPS
                    parameter. 

    rq=2            DCE Receive Copy Quality Correction is
                    enabled. The DCE will determine the
                    recommended Post-Page Message, and store it
                    into the +FPS parameter. The DCE will detect
                    and correct errors in data received from the
                    remote station.

    tq=0            DCE Transmit Copy Quality Checking is
                    disabled. The DTE is responsible for T.4 and
                    T.6 compliance.

    tq=1            DCE Transmit Copy Quality Checking is enabled. 
                    The DTE is responsible for T.4 or T.6         
                    compliance. The DCE shall return a <CAN> to
                    the DTE if errors are detected.

    tq=2            DCE Transmit Copy Quality Correction is
                    enabled. The DCE will detect and correct
                    errors received from the local DTE is
                    manufacturer specific.   

   
   PARAMETER:  +FRQ (RECEIVE QUALITY THRESHOLD)
   SYNTAX:     +FRQ=<pgl>,<cbl>
   VALID VALUES:    0 - 64 for <pgl>
                    0 - FF for <cbl>
   DEFAULT VALUES:  64, FF
   DESCRIPTION:     The <pgl> parameter specifies the percentage  
                    of good lines and the second parameter<cbl>   
                    specifies the maximum tolerable number of     
                    consecutive bad lines. The modem uses this    
                    parameter to make the Copy Quality decision.


   PARAMETER:  +FAA (Adaptive Answer)
   SYNTAX:     +FAA=<value>
   VALID VALUES:    0, 1
   DEFAULT VALUES:  0
   DESCRIPTION:     This parameter allows auto-switching from a   
                    class 2(fax) to class 0(data) for call        
                    answering only. Setting +FAA=0 will cause the 
                    DCE to answer only as a class 2 fax device    
                    and setting +FAA=1 will indicate that the DCE 
                    will auto switch between a data call and a    
                    fax call. 
                    
                    Here is a brief explanation on how it works:  
                    The modem is first set to receive in fax      
                    mode(class 2) and when the call comes in the  
                    modem looks for CNG tones from the sending    
                    side and here is the decision process:
                    
                    1)DCE detects CNG tones and receives a 
                      "CONNECT FAX".
                    2)DCE does not detect CNG tones and switch into 
                      data mode(class 0) and get a                
                      "CONNECT........." data message.
                    3)Please set bit 3 of S38 on(S38=8).
                       
   PARAMETER:  +FCT (DTE PHASE C RESPONSE TIMEOUT)
   SYNTAX:     +FCT=<value>
   VALID VALUES:    00 - FF
   DEFAULT VALUE:   1E
   DESCRIPTION:     This parameter determines the time period     
                    that the modem will wait for a command after  
                    completing the transmission of Phase C data.

   PARAMETER:  +FMS
   SYNTAX:     +FMS=<value>
   VALID VALUES:    0 to 5
   DEFAULT VALUES:  0(2400bps)
   DESCRIPTION:     This limits the minimum speed that you would  
                    want to negotiate with the other station and  
                    failure of the other station to support this  
                    speed will result in the modem doing an       
                    orderly disconnect. The call termination      
                    status that will be reported by the DCE will  
                    be +FHS:27(Failure to train at 2400 bps or    
                    +FMS value.
                                              
   PARAMETER:  +FLO (FLOW CONTROL SELECT)
   SYNTAX:     +FLO=<value>
   VALID VALUES:    0, 1, 2
   DEFAULT VALUES:  1
   DESCRIPTION:     The DCE must support XON/XOFF flow            
                    control(software flow control) and may support 
                    CTS/RTS(hardware flow control). Here are the  
                    options in more detail:

               +FLO=0  XON/XOFF and 133/106 flow control turned off 
               +FLO=1  XON/XOFF flow controlled in either direction 
               +FLO=2  Use 106/133 for flow control

   PARAMETER:  +FPR (SERIAL PORT RATE CONTROL)
   SYNTAX:     +FPR=<value>
   VALID VALUES:    0 (Auto baud detect on)
                    >0 Serial rate is fixed at the value          
                    multiplied by 2400 bps
   DEFAULT VALUES:  0
   DESCRIPTION:     This command allows the DTE to fix the port   
                    rate of the DCE and if set to "0" then the    
                    modem will autobaud.

   PARAMETER:  +FBO (DATA BIT ORDER)
   SYNTAX:     +FBO=<value>
   VALID VALUES:    0,1,
   DEFAULT VALUES:  0
   DESCRIPTION:     This parameter controls the data between the
                    DCE and DTE. There are two choices:       
                    Direct: The first bit transferred of each byte
                    on the DTE-DCE link is the first bit
                    transferred out of the phone lines.
                    Reversed: The last bit transferred of each byte
                    on the DTE-DCE link is the first bit
                    transferred on the phone lines.
   The following are the two valid values for the ZyXEL modems:
   +FBO=0     Selects direct bit order for Phase C data and for   
              Phase B/D data. 
   +FBO=1     Selects reversed bit order for Phase C data and     
              selects direct bit order for Phase B/D data.  
   
   Please note that ZyXEL modems adhere to this strictly. In the  
   SP-2388(issued August 1990) although the standard did say the  
   above most of the software and hardware companies including    
   ZyXEL were doing this reversed. ZyXEL was doing this           
   intentionally because the majority of the software packages were 
   written this way to accommodate a majority of the modems out   
   there.


   PARAMETER:  +FEA (PHASE C RECEIVED EOL ALIGNMENT)
   SYNTAX:     +FEA=<value>
   VALID VALUES:    0, 1
   DEFAULT VALUES:  0
   DESCRIPTION:     This parameter allows optional byte-alignment 
                    of EOL in received T.4 data streams. The      
                    following are the options and the byte        
                    patterns:
  +FEA=0            Determine that T.4 EOL patterns are bit       
                    aligned
  +FEA=1            Determine that the last received bits of T.4  
                    EOL patterns are byte aligned by the modem,   
                    with necessary zero bits inserted. The two    
                    2-byte patterns depending on the data bit     
                    order are as following:
                   
                    +FBO            binary EOL pattern
                       0             0000xxxx 10000000
                       1             xxxx0000 00000001
                    where xxxx represents previous data bits, zero 
                    bits, or other leading data.

 
