summaryrefslogtreecommitdiffstats
path: root/Documentation/isdn/INTERFACE.fax
blob: 2c9659f0df01f520a2e1ecf7af29fd2c3726d490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
$Id: INTERFACE.fax,v 1.1 1999/08/11 20:30:28 armin Exp $


Description of the fax-subinterface between linklevel and hardwarelevel of 
  isdn4linux. 

  The communication between linklevel (LL) and harwarelevel (HL) for fax
  is based on the struct T30_s (defined in isdnif.h).
  This struct is allocated in the LL.  
  In order to use fax, the LL provides the pointer to this struct with the 
  command ISDN_CMD_SETL3 (parm.fax). This pointer expires in case of hangup 
  and when a new channel to a new connection is assigned. 


Data handling:
  In send-mode the HL-driver has to handle the <DLE> codes and the bit-order 
  conversion by itself. 
  In receive-mode the LL-driver takes care of the bit-order conversion
  (specified by +FBOR)

Structure T30_s description:

  This structure stores the values (set by AT-commands), the remote-
  capability-values and the command-codes between LL and HL.

  If the HL-driver receives ISDN_CMD_FAXCMD, all needed information
  is in this struct set by the LL.
  To signal information to the LL, the HL-driver has to set the 
  the parameters and use ISDN_STAT_FAXIND.
  (Please refer to INTERFACE)

Structure T30_s:

  All members are 8-bit unsigned (__u8)

  -  resolution     
  -  rate
  -  width
  -  length
  -  compression
  -  ecm
  -  binary
  -  scantime
  -  id[]
  Local faxmachine's parameters, set by +FDIS, +FDCS, +FLID, ...

  -  r_resolution
  -  r_rate
  -  r_width
  -  r_length
  -  r_compression
  -  r_ecm
  -  r_binary
  -  r_scantime
  -  r_id[]
  Remote faxmachine's parameters. To be set by HL-driver.

  -  phase      
  Defines the actual state of fax connection. Set by HL or LL
  depending on progress and type of connection.
  If the phase changes because of an AT command, the LL driver
  changes this value. Otherwise the HL-driver takes care of it, but
  only neccessary on call establishment (from IDLE to PHASE_A).
  (one of the constants ISDN_FAX_PHASE_[IDLE,A,B,C,D,E])

  -  direction
  Defines outgoing/send or incoming/receive connection.
  (ISDN_TTY_FAX_CONN_[IN,OUT])

  -  code
  Commands from LL to HL; possible constants : 
      ISDN_TTY_FAX_DR        signals +FDR command to HL

      ISDN_TTY_FAX_DT        signals +FDT command to HL 

      ISDN_TTY_FAX_ET        signals +FET command to HL


  Other than that the "code" is set with the hangup-code value at
  the end of connection for the +FHNG message.
        
  -  r_code 
  Commands from HL to LL; possible constants :
      ISDN_TTY_FAX_CFR       output of +FCFR message. 

      ISDN_TTY_FAX_RID       output of remote ID set in r_id[]
                             (+FCSI/+FTSI on send/receive)

      ISDN_TTY_FAX_DCS       output of +FDCS and CONNECT message,
                             switching to phase C.

      ISDN_TTY_FAX_ET        signals end of data,
                             switching to phase D.

      ISDN_TTY_FAX_FCON      signals the established, outgoing connection,
                             switching to phase B.

      ISDN_TTY_FAX_FCON_I    signals the established, incoming connection,
                             switching to phase B.

      ISDN_TTY_FAX_DIS       output of +FDIS message and values.

      ISDN_TTY_FAX_SENT      signals that all data has been sent 
                             and <DLE><ETX> is acknowledged,
                             OK message will be sent.

      ISDN_TTY_FAX_PTS       signals a msg-confirmation (page sent successful),
                             depending on fet value:
                             0: output OK message (more pages follow)
                             1: switching to phase B (next document)

      ISDN_TTY_FAX_TRAIN_OK  output of +FDCS and OK message (for receive mode).

      ISDN_TTY_FAX_EOP       signals end of data in receive mode,
                             switching to phase D.

      ISDN_TTY_FAX_HNG       output of the +FHNG and value set by code and
                             OK message, switching to phase E.


  -  badlin
  Value of +FBADLIN  

  -  badmul
  Value of +FBADMUL

  -  bor
  Value of +FBOR

  -  fet
  Value of +FET command in send-mode.
  Set by HL in receive-mode for +FET message.

  -  pollid[]  
  ID-string, set by +FCIG

  -  cq
  Value of +FCQ

  -  cr
  Value of +FCR

  -  ctcrty
  Value of +FCTCRTY

  -  minsp
  Value of +FMINSP

  -  phcto
  Value of +FPHCTO

  -  rel
  Value of +FREL

  -  nbc
  Value of +FNBC (0,1)
  (+FNBC is not a known class 2 fax command, I added this to change the
   automatic "best capabilities" connection in the eicon HL-driver)

  
Armin
mac@melware.de