INTERFACE.fax 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. $Id: INTERFACE.fax,v 1.1.1.1 2007/06/12 07:27:12 eyryu Exp $
  2. Description of the fax-subinterface between linklevel and hardwarelevel of
  3. isdn4linux.
  4. The communication between linklevel (LL) and hardwarelevel (HL) for fax
  5. is based on the struct T30_s (defined in isdnif.h).
  6. This struct is allocated in the LL.
  7. In order to use fax, the LL provides the pointer to this struct with the
  8. command ISDN_CMD_SETL3 (parm.fax). This pointer expires in case of hangup
  9. and when a new channel to a new connection is assigned.
  10. Data handling:
  11. In send-mode the HL-driver has to handle the <DLE> codes and the bit-order
  12. conversion by itself.
  13. In receive-mode the LL-driver takes care of the bit-order conversion
  14. (specified by +FBOR)
  15. Structure T30_s description:
  16. This structure stores the values (set by AT-commands), the remote-
  17. capability-values and the command-codes between LL and HL.
  18. If the HL-driver receives ISDN_CMD_FAXCMD, all needed information
  19. is in this struct set by the LL.
  20. To signal information to the LL, the HL-driver has to set the
  21. parameters and use ISDN_STAT_FAXIND.
  22. (Please refer to INTERFACE)
  23. Structure T30_s:
  24. All members are 8-bit unsigned (__u8)
  25. - resolution
  26. - rate
  27. - width
  28. - length
  29. - compression
  30. - ecm
  31. - binary
  32. - scantime
  33. - id[]
  34. Local faxmachine's parameters, set by +FDIS, +FDCS, +FLID, ...
  35. - r_resolution
  36. - r_rate
  37. - r_width
  38. - r_length
  39. - r_compression
  40. - r_ecm
  41. - r_binary
  42. - r_scantime
  43. - r_id[]
  44. Remote faxmachine's parameters. To be set by HL-driver.
  45. - phase
  46. Defines the actual state of fax connection. Set by HL or LL
  47. depending on progress and type of connection.
  48. If the phase changes because of an AT command, the LL driver
  49. changes this value. Otherwise the HL-driver takes care of it, but
  50. only necessary on call establishment (from IDLE to PHASE_A).
  51. (one of the constants ISDN_FAX_PHASE_[IDLE,A,B,C,D,E])
  52. - direction
  53. Defines outgoing/send or incoming/receive connection.
  54. (ISDN_TTY_FAX_CONN_[IN,OUT])
  55. - code
  56. Commands from LL to HL; possible constants :
  57. ISDN_TTY_FAX_DR signals +FDR command to HL
  58. ISDN_TTY_FAX_DT signals +FDT command to HL
  59. ISDN_TTY_FAX_ET signals +FET command to HL
  60. Other than that the "code" is set with the hangup-code value at
  61. the end of connection for the +FHNG message.
  62. - r_code
  63. Commands from HL to LL; possible constants :
  64. ISDN_TTY_FAX_CFR output of +FCFR message.
  65. ISDN_TTY_FAX_RID output of remote ID set in r_id[]
  66. (+FCSI/+FTSI on send/receive)
  67. ISDN_TTY_FAX_DCS output of +FDCS and CONNECT message,
  68. switching to phase C.
  69. ISDN_TTY_FAX_ET signals end of data,
  70. switching to phase D.
  71. ISDN_TTY_FAX_FCON signals the established, outgoing connection,
  72. switching to phase B.
  73. ISDN_TTY_FAX_FCON_I signals the established, incoming connection,
  74. switching to phase B.
  75. ISDN_TTY_FAX_DIS output of +FDIS message and values.
  76. ISDN_TTY_FAX_SENT signals that all data has been sent
  77. and <DLE><ETX> is acknowledged,
  78. OK message will be sent.
  79. ISDN_TTY_FAX_PTS signals a msg-confirmation (page sent successful),
  80. depending on fet value:
  81. 0: output OK message (more pages follow)
  82. 1: switching to phase B (next document)
  83. ISDN_TTY_FAX_TRAIN_OK output of +FDCS and OK message (for receive mode).
  84. ISDN_TTY_FAX_EOP signals end of data in receive mode,
  85. switching to phase D.
  86. ISDN_TTY_FAX_HNG output of the +FHNG and value set by code and
  87. OK message, switching to phase E.
  88. - badlin
  89. Value of +FBADLIN
  90. - badmul
  91. Value of +FBADMUL
  92. - bor
  93. Value of +FBOR
  94. - fet
  95. Value of +FET command in send-mode.
  96. Set by HL in receive-mode for +FET message.
  97. - pollid[]
  98. ID-string, set by +FCIG
  99. - cq
  100. Value of +FCQ
  101. - cr
  102. Value of +FCR
  103. - ctcrty
  104. Value of +FCTCRTY
  105. - minsp
  106. Value of +FMINSP
  107. - phcto
  108. Value of +FPHCTO
  109. - rel
  110. Value of +FREL
  111. - nbc
  112. Value of +FNBC (0,1)
  113. (+FNBC is not a known class 2 fax command, I added this to change the
  114. automatic "best capabilities" connection in the eicon HL-driver)
  115. Armin
  116. mac@melware.de