home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / fas-2.11.0 / part03 < prev    next >
Text File  |  1993-10-12  |  61KB  |  1,492 lines

  1. Newsgroups: comp.sources.unix
  2. From: fas@geminix.in-berlin.de (FAS Support Account)
  3. Subject: v27i069: FAS-2.11.0 - asynch serial driver for System V, Part03/08
  4. References: <1.750471074.20539@gw.home.vix.com>
  5. Sender: unix-sources-moderator@gw.home.vix.com
  6. Approved: vixie@gw.home.vix.com
  7.  
  8. Submitted-By: fas@geminix.in-berlin.de (FAS Support Account)
  9. Posting-Number: Volume 27, Issue 69
  10. Archive-Name: fas-2.11.0/part03
  11.  
  12. #!/bin/sh
  13. # this is fas211pl0.03 (part 3 of a multipart archive)
  14. # do not concatenate these parts, unpack them in order with /bin/sh
  15. # file fas.7 continued
  16. #
  17. if test ! -r _shar_seq_.tmp; then
  18.     echo 'Please unpack part 1 first!'
  19.     exit 1
  20. fi
  21. (read Scheck
  22.  if test "$Scheck" != 3; then
  23.     echo Please unpack part "$Scheck" next!
  24.     exit 1
  25.  else
  26.     exit 0
  27.  fi
  28. ) < _shar_seq_.tmp || exit 1
  29. if test ! -f _shar_wnt_.tmp; then
  30.     echo 'x - still skipping fas.7'
  31. else
  32. echo 'x - continuing file fas.7'
  33. sed 's/^X//' << 'SHAR_EOF' >> 'fas.7' &&
  34. XIf at this time there are still characters in the output
  35. Xbuffer the last process closing this port can't terminate
  36. Xuntil the buffer has drained.
  37. XBut as \fBDSR\fP will also go low if you switch off the device
  38. Xthe blocking of the output will be prevented.
  39. X.LP
  40. XIn short:
  41. XHardware output handshake is only used if the connected
  42. Xdevice sets \fBDSR\fP high, that is, the device is switched
  43. Xon and is ready.
  44. XSo make sure that you keep this in mind when you make
  45. Xserial cables and when you configure your serial devices.
  46. X\fBDSR\fP must be on if you want \fBCTS\fP handshake.
  47. X.LP
  48. XThe other advantage of this \fBCTS\fP/\fBDSR\fP mechanismn
  49. Xis that you can still connect "dumb" serial devices to an
  50. X\fIFAS\fP hardware handshake port using a minimal 3\-wire cable.
  51. XAs an unconnected \fBDSR\fP line is automatically low, hardware
  52. Xoutput handshake is disabled, which is just what you
  53. Xwant in this case.
  54. XHowever, it's safer to use a minor device number of
  55. X\fB0\fP + device # for 3\-wire cables (see section \fBCABLING\fP).
  56. X.LP
  57. XThe CLOCAL flag doesn't affect this mode.
  58. X.IP "Note:" 6
  59. XIf you use a minor device number where hardware handshake
  60. Xis disabled (see ``First mode'' below) you can, if you have
  61. XSCO UNIX 3.2.4, enable full duplex hardware flow control
  62. Xby setting the CRTSFL \fItermio\fP(M) flag.
  63. XThis works, however, only if neither
  64. XCTSFLOW/RTSFLOW nor CLOCAL are set.
  65. X.IP "" 6
  66. XIn SCO UNIX 3.2.4.2 the meaning of CTSFLOW/RTSFLOW has changed.
  67. XThese flags enable full duplex hardware flow control.
  68. XFor backward compatibility there is the ORTSFL flag which
  69. Xenables, when set together with CTSFLOW and/or RTSFLOW,
  70. Xhalf duplex flow control.
  71. XThese flags only work if CLOCAL is \fBnot\fP set.
  72. X.SS "Half duplex mode"
  73. XThere are actually three half duplex modes selected by
  74. Xthe minor device number:
  75. X.RS 3
  76. X.IP "First mode" 3
  77. XIf the RTSFLOW \fItermio\fP(M) flag is set and the CLOCAL flag
  78. Xis \fBnot\fP set the \fBRTS\fP line is used to signal the connected
  79. Xdevice that there is data in the output buffer.
  80. XAs long as there is output data to come the \fBRTS\fP line stays high.
  81. XIf the output buffer has drained \fBRTS\fP drops to low until there
  82. Xis more data to be sent to the connected device.
  83. X.IP "" 3
  84. XIf the CTSFLOW \fItermio\fP(M) flag is set and the CLOCAL flag
  85. Xis \fBnot\fP set the \fBCTS\fP line is used to control the
  86. Xoutput character flow.
  87. XThis works as in full duplex mode.
  88. X.IP "" 3
  89. XIf neither CTSFLOW nor RTSFLOW are set hardware flow control
  90. Xis disabled.
  91. XBut see the description of the CRTSFL/ORTSFL \fItermio\fP(M) flags
  92. Xat the end of the section \fBFull duplex mode\fP.
  93. X.RS 3
  94. X.IP "Note:" 6
  95. XSetting the CTSFLOW and RTSFLOW flags (and CRTSFL/ORTSFL,
  96. Xif available) only applies to SCO UNIX and Xenix.
  97. XTo my knowledge, other UNIX flavors don't have these flags.
  98. XFor them, hardware flow control is always disabled in this mode.
  99. X.RE
  100. X.IP "Second mode" 3
  101. XThis mode overrides the RTSFLOW, CTSFLOW, CRTSFL and ORTSFL
  102. Xflags and works as if the CTSFLOW flag is set permanently
  103. X(all UNIX flavors).
  104. XThe CLOCAL flag doesn't affect this mode.
  105. X.IP "Third mode" 3
  106. XThis mode overrides the RTSFLOW, CTSFLOW, CRTSFL and ORTSFL flags
  107. Xand works as if both the RTSFLOW and CTSFLOW flags (in SCO UNIX
  108. Xprior to 3.2.4.2 and SCO Xenix) are set permanently
  109. X(all UNIX flavors).
  110. XThe CLOCAL flag doesn't affect this mode.
  111. X.RE
  112. X.IP "Note:" 6
  113. XUnder SCO UNIX prior to 3.2.4.2 and Xenix the \fItermio\fP(M) RTSFLOW
  114. Xflag is intended for half duplex hardware flow control devices.
  115. XSetting it when the connected device does \fBfull\fP duplex
  116. Xhardware flow control is a configuration error!
  117. XThe \fBRTS\fP signalling for half duplex devices has a
  118. Xcompletely different meaning than for full duplex devices.
  119. XSo you should either set only CTSFLOW (or CRTSFL, if available),
  120. Xor you should select hardware flow control via the
  121. Xminor device number.
  122. XIf you set RTSFLOW for full duplex hardware flow control
  123. Xdevices it is likely that the port won't work.
  124. XThis is in line with SCO's \fIsio\fP driver implementation.
  125. X.SS "Direct control"
  126. XOn UNIX flavors where the RTS_TOG \fIioctl\fP(2|S) command is
  127. Xavailable the hardware handshake output (\fBRTS\fP by default)
  128. Xcan be set under program control.
  129. XAn \fIioctl\fP(2|S) argument of \fB0\fP sets the output to
  130. Xlow and an argument of \fB1\fP sets it to high.
  131. XHowever, this only works if the hardware handshake modes
  132. Xas well as \fIVP/ix\fP DOS mode are disabled.
  133. XIf one of these modes is enabled \fIFAS\fP needs the hardware
  134. Xhandshake output for its own flow control.
  135. X.LP
  136. XOn the other hand, even if one of these modes is in use
  137. Xand \fIFAS\fP gets an RTS_TOG command, the state of the
  138. Xhandware handshake output that this command tries to set
  139. Xis stored and the output is set to the state of the last
  140. XRTS_TOG command as soon as both hardware handshake mode
  141. Xand DOS mode are disabled.
  142. X.LP
  143. XIn other words, \fIFAS\fP doesn't ignore the RTS_TOG command
  144. Xif hardware handshake modes or DOS mode are set but rather
  145. Xoverrides the hardware handshake output with the appropriate
  146. Xstate computed internally.
  147. X.SH "\fIVP/ix\fP SUPPORT"
  148. X\fIFAS\fP allows DOS programs running under \fIVP/ix\fP
  149. Xto access serial ports.
  150. XYou simply need to modify your personal \fIVP/ix\fP
  151. Xconfiguration file (\fIvpix.cnf\fP) to tell the DOS emulator
  152. Xwhich \fIFAS\fP devices to use for COM1
  153. X(or COM1MOUSE) and COM2.
  154. X.LP
  155. XNote that \fIVP/ix\fP opens these devices at startup time,
  156. Xso you better make sure that the desired devices aren't
  157. Xused by other processes when you start \fIVP/ix\fP as
  158. X\fIVP/ix\fP wants to use them exclusively.
  159. X.LP
  160. XThere are some special features with the handling of the
  161. X\fBRTS\fP and \fBDTR\fP lines you should know about.
  162. XIf your DOS program asserts the \fBDTR\fP line this will
  163. Xactually cause action on the modem enable line you
  164. Xconfigured in \fIspace.c\fP.
  165. XLikewise, \fBRTS\fP asserts the half duplex hardware
  166. Xhandshake line configured in \fIspace.c\fP.
  167. X.LP
  168. XIf the used \fIFAS\fP device has full duplex hardware handshake
  169. Xenabled, asserting \fBRTS\fP from DOS actually stops the
  170. Xcharacter flow from \fIFAS\fP to \fIVP/ix\fP.
  171. XThis prevents input buffers of interrupt driven
  172. XDOS programs from overflowing.
  173. X\fIFAS\fP, on the other hand, uses its hardware handshake
  174. Xto prevent an overflow of its own input buffer.
  175. XTherefore, you can use DOS telecommunication programs
  176. Xeven at high baud rates without losing characters,
  177. Xprovided your DOS programs are configured to use
  178. Xfull duplex \fBRTS\fP/\fBCTS\fP flow control.
  179. X.LP
  180. XAll this virtual handling has the advantage that
  181. Xthe DOS program doesn't need to know certain details
  182. Xabout your actual port setup.
  183. XReading the modem status register, on the other hand,
  184. Xdoesn't cause any translation of the register value.
  185. X.LP
  186. XTo enable \fIVP/ix\fP support, the HAVE_VPIX define
  187. Xin \fIfas.h\fP has to be uncommented.
  188. X.SH "MODIFYING A PORT'S DEFAULT BEHAVIOUR"
  189. XThere are some flags that you can set in the \fIfas_modify\fP[]
  190. Xarray (\fIspace.c\fP) for each port independently.
  191. XYou have to relink the kernel before these
  192. Xflags have any effect.
  193. XHere is a description:
  194. X.RS 3
  195. X.IP "\fBNO_TEST\fP" 3
  196. XIf for some reason a UART doesn't pass the functionallity
  197. Xtest \fIFAS\fP makes at boot time you can override the test
  198. Xresult and use this port, anyway.
  199. XHowever, you do this on your own risk.
  200. XDon't be surprised if ports get hung
  201. Xor your machine crashes.
  202. XI won't support \fIFAS\fP installations
  203. Xwhere this flag is used.
  204. XIt is intended as a last resort.
  205. X.IP "" 3
  206. XThere is one exception to this, though.
  207. XIf the \fBNO_TEST\fP flag is already set in the sample
  208. Xconfig files for certain serial cards and provided that
  209. Xthese sample files are part of the original \fIFAS\fP
  210. Xdistribution, you won't lose my support because in this
  211. Xcase I've tested the respective product myself and decided
  212. Xthat it is safe to use the \fBNO_TEST\fP flag with it.
  213. X.IP "\fBNO_HUP_PROTECT\fP" 3
  214. XNormally, with modem control enabled, after the carrier
  215. Xis lost the carrier is ignored and assumed to be missing
  216. Xeven if the physical carrier line is asserted again.
  217. X.IP "" 3
  218. XAdditionally, as the device can't accept a call in this
  219. Xstate, anyway, the modem enable line is set to low so
  220. Xthat the modem won't answer calls.
  221. XThis prevents users from getting the shell of a
  222. Xprevious user in case that the shell doesn't react
  223. Xto SIGHUP for some reason.
  224. XSo the modem port is dead until this
  225. Xsituation is dealt with.
  226. X.IP "" 3
  227. XThis adds some security to modem ports.
  228. XHowever, if this feature breaks one of your applications
  229. Xfor some reason, just set \fBNO_HUP_PROTECT\fP and
  230. Xthe hangup protection is disabled for this port.
  231. X.IP "\fBNO_OVERRUN\fP" 3
  232. XThe device has some sort of receiver overrun protection.
  233. XFor instance, it may be used with certain internal modems
  234. Xthat use a \fINS16x50\fP UART emulation and have their own
  235. Xreceiver buffer.
  236. XThis flag only affects the position of the device
  237. Xin the interrupt users chain, that is, because the device
  238. Xcan't overrun it is serviced only after all devices that
  239. Xdon't have an overrun protection have been taken care of.
  240. X.IP "\fBNEW_CTSRTS\fP" 3
  241. XSome "intelligent" serial cards from third party vendors
  242. Xhave the meaning of the RTSFLOW \fItermio\fP(M)
  243. Xflag redefined.
  244. XIt is used, together with CTSFLOW, to enable
  245. Xfull duplex hardware flow control, whereas SCO
  246. Xintroduced RTSFLOW for the more traditional half
  247. Xduplex hardware flow control that is implemented
  248. Xin their \fIsio\fP driver.
  249. XBy default, \fIFAS\fP emulates the \fIsio\fP driver
  250. Xfor compatibility reasons.
  251. X.IP "" 3
  252. XHowever, if you like to use CTSFLOW/RTSFLOW for
  253. Xfull duplex hardware flow control in a way that
  254. Xis compatible with the above mentioned "intelligent"
  255. Xcards, you can do this by setting \fBNEW_CTSRTS\fP.
  256. XAlso, CTSFLOW/RTSFLOW are no longer affected by
  257. XCLOCAL if \fBNEW_CTSRTS\fP is set.
  258. XIn this mode CTSFLOW enables the output flow control
  259. Xand RTSFLOW enables the input flow control.
  260. XBoth flags are independent from each other.
  261. X.IP "" 3
  262. XNote that under SCO UNIX 3.2.4.2 the
  263. XCTSFLOW/RTSFLOW flags have changed their meaning in
  264. Xthat they enable full duplex hardware flow control.
  265. X.RE
  266. X.LP
  267. XThese flags are defined in \fIfas.h\fP.
  268. XFor example, if you want to use the meaning
  269. Xof RTSFLOW that is compatible to some of the
  270. X"intelligent" serial cards you would write
  271. X.nf
  272. X.IP
  273. XNEW_CTSRTS
  274. X.fi
  275. X.LP
  276. Xat the appropriate position in \fIfas_modify\fP[].
  277. XIf you additionally want to skip the test routine
  278. Xfor this port you would write
  279. X.nf
  280. X.IP
  281. XNO_TEST | NEW_CTSRTS
  282. X.fi
  283. X.SH "UART FIFO CONTROL"
  284. XIn order to control the operating modes of UARTs that
  285. Xhave built\-in FIFOs you can select the desired mode
  286. Xfor each port independently by modifying the
  287. X\fIfas_fifo_ctl\fP[] array (\fIspace.c\fP).
  288. XYou have to relink the kernel before these
  289. Xchanges have any effect.
  290. XThere are a number of predefined, mutually exclusive
  291. Xsymbols available:
  292. X.RS 3
  293. X.IP "\fBFIFO_DEFAULT\fP" 3
  294. XAll UART types with FIFOs.
  295. X.br
  296. XThe FIFOs are enabled and in case that an \fINS16550A\fP
  297. Xwas detected, the receiver FIFO trigger level is set to
  298. X4 or 8 characters (depending on the UNIX flavour,
  299. Xsee the description of LOW_INT_LAT in section
  300. X\fBTROUBLE\-SHOOTING\fP, subsection \fBCharacter loss\fP).
  301. X.IP "\fBFIFO_OFF\fP" 3
  302. XAll UART types with FIFOs.
  303. X.br
  304. XThe FIFOs are disabled and the UART works in the
  305. X\fINS16450\fP compatible mode.
  306. X.IP "\fBFIFO_EMUL_NS16450\fP" 3
  307. XAll UART types with FIFOs.
  308. X.br
  309. XThe FIFOs are enabled and in case that an \fINS16550A\fP
  310. Xwas detected, the receiver FIFO trigger level is set to
  311. X1 character.
  312. XThe transmitter FIFO is filled with only 1 character
  313. Xper transmitter interrupt.
  314. XThis emulates the \fINS16450\fP UART and additionally gives
  315. Xyou the overrun protection provided by the receiver FIFO.
  316. X.IP "\fBFIFO_POINTER_DEV\fP" 3
  317. X\fINS16550A\fP, only.
  318. X.br
  319. XThe FIFOs are enabled and the receiver FIFO trigger level
  320. Xis set to 1 character.
  321. XThis should be used for pointer devices like mice
  322. Xor trackballs because it prevents the short receiver FIFO
  323. Xtimeout delay that could lead to jerky pointer movement.
  324. X.IP "\fBFIFO_TRIGGER_1\fP" 3
  325. X\fINS16550A\fP, only.
  326. X.br
  327. XThe FIFOs are enabled and the receiver FIFO trigger level
  328. Xis set to 1 character.
  329. X.IP "\fBFIFO_TRIGGER_4\fP" 3
  330. X\fINS16550A\fP, only.
  331. X.br
  332. XThe FIFOs are enabled and the receiver FIFO trigger level
  333. Xis set to 4 characters.
  334. X.IP "\fBFIFO_TRIGGER_8\fP" 3
  335. X\fINS16550A\fP, only.
  336. X.br
  337. XThe FIFOs are enabled and the receiver FIFO trigger level
  338. Xis set to 8 characters.
  339. X.IP "\fBFIFO_TRIGGER_14\fP" 3
  340. X\fINS16550A\fP, only.
  341. X.br
  342. XThe FIFOs are enabled and the receiver FIFO trigger level
  343. Xis set to 14 characters.
  344. X.RE
  345. X.LP
  346. XNote that you can set these values even if the respective
  347. XUART doesn't have FIFOs, in which case they are ignored.
  348. XIf you later upgrade to a UART with FIFOs the FIFO control
  349. Xvalues automatically become active without having
  350. Xto build a new kernel.
  351. X.SH "SELECTING ALTERNATIVE BAUD RATES"
  352. XThe UNIX \fItermio\fP(7|M) interface only supports
  353. Xbaud rates of up to 38400 bps.
  354. XHowever, with the advent of V32bis and faster modems with
  355. Xcompression ratios of up to 4:1 (V.42bis) this
  356. Xupper baud rate boundary isn't adequate anymore.
  357. XBaud rates of 57600 or even 115200 are necessary to
  358. Xmake full use of these modems.
  359. X.LP
  360. X\fIFAS\fP provides these high baud rates even though
  361. Xthe \fItermio\fP(7|M) interface doesn't know them.
  362. XTo make this work, \fIFAS\fP has one or more baud rate
  363. Xtables in \fIspace.c\fP (\fIfas_baud\fP[][]) which
  364. Xcontain the baud rate base and the 15 baud rates that
  365. Xcorrespond to B50 to B38400.
  366. XArbitrary baud rates can be assigned to these
  367. Xbaud rate symbols.
  368. XBaud rate table 0 by default contains the standard
  369. Xbaud rates that coincide with the standard
  370. X\fItermio\fP(7|M) baud rates.
  371. XTable 1 contains the same values for the first
  372. X13 baud rates.
  373. XHowever, B19200 is assigned to a baudrate of 57600
  374. Xand B38400 is assigned to 115200 bps.
  375. XThese values are the default in the \fIFAS\fP distribution,
  376. Xand you can change these tables to whatever values you need.
  377. X.LP
  378. XNote, however, that the baud rate base in this table has
  379. Xto be dividable by all 15 baud rate values without remainder,
  380. Xor at least with a very small remainder.
  381. XOtherwise there would be a noticeable deviation between
  382. Xthe requested and the actually used baud rate.
  383. XIt helps a little that \fIFAS\fP rounds the result
  384. Xof this division to minimize the deviation.
  385. X.LP
  386. XNote also that it isn't advisable to use the B50
  387. Xand B75 symbols for 57600 and 115200 bps.
  388. XThis has two reasons.
  389. X.LP
  390. XIn the worst case (SCO UNIX and Xenix) \fIFAS\fP transfers
  391. Xthe characters between its ring buffers and the
  392. XUNIX CLIST buffers only every 17 milliseconds.
  393. XThis optimizes performance and reduces the CPU load.
  394. XNow, there are certain baud rate dependent threshold
  395. Xvalues that limit the number of characters the
  396. XCLIST buffers can hold.
  397. XThis is to reduce the drain time of the output buffers.
  398. XSo, at low baud rates these thresholds are very low,
  399. Xand because \fIFAS\fP transfers characters only
  400. X60 times a second, the maximum throughput for
  401. Xtransmitted characters is threshold * 60.
  402. XOne can easily calculate that the threshold has to be
  403. Xat least 192 characters for 115200 bps (11520 cps).
  404. XA sufficient threshold is only provided
  405. Xfor baud rates >= B9600.
  406. X.LP
  407. XBecause the threshold table in the UNIX kernel is a
  408. Xglobal object that is also used by other drivers,
  409. X\fIFAS\fP can't simply override these values.
  410. XSo max. throughput is only possible with baud rate
  411. Xtable positions of B9600 or better.
  412. X.LP
  413. XThe other reason not to use B50 etc. is that
  414. Xprograms like \fIvi\fP and \fIemacs\fP make their
  415. Xbehaviour dependent on the baud rate
  416. Xof the tty they run on.
  417. XAnd this behaviour clearly wouldn't fit baud
  418. Xrates like 57600 and 115200.
  419. X.LP
  420. XTherefore, even if it looks tempting to use
  421. Xbaud rate symbols that aren't in use anymore
  422. Xtoday (like B50 and B75), just don't do it.
  423. XIt won't work very well.
  424. X.LP
  425. XSo we have two or more baud rate tables in
  426. X\fIspace.c\fP, one for the standard \fItermio\fP(7|M)
  427. Xassignment and the others for non\-standard
  428. Xbaud rates.
  429. XYou can select which table to use for each port
  430. Xby simply putting the table number in the
  431. X\fIfas_bt_select\fP[] array in \fIspace.c\fP.
  432. XProvided you use the default baud rate table values
  433. Xyou would use a table selector value of \fB0\fP
  434. Xfor ports that should have the standard \fItermio\fP(7|M)
  435. Xbaud rate assignment, and a value of \fB1\fP to have
  436. X57600 and 115200 bps available instead of 19200 and
  437. X38400 bps.
  438. X.IP "Note:" 6
  439. XAt speeds of more than 38400 bps it is likely that
  440. Xeven an \fINS16550A\fP will lose incoming characters
  441. Xbecause in many UNIX flavors the worst case interrupt
  442. Xlatency is rather high.
  443. XIt has to be <= 1 ms or you are in trouble.
  444. XThis problem is caused by the UNIX kernel design.
  445. X\fIFAS\fP can't do anything about it.
  446. XISC UNIX 3.0, for instance, on a 486/33 works
  447. Xfine at this speed.
  448. XOn the other hand, ISC UNIX 2.x can't handle it.
  449. XYou may want to look at the description of LOW_INT_LAT
  450. Xin section \fBTROUBLE\-SHOOTING\fP,
  451. Xsubsection \fBCharacter loss\fP.
  452. X.LP
  453. XAdditionally to having higher baud rates available,
  454. Xthis table based baud rate selection mechanism can
  455. Xbe used to support serial cards that don't use the
  456. Xstandard 1.8432 MHz oscillator frequency.
  457. XFor instance, if you have a card that is equiped with
  458. Xa 3.6864 MHz oscillator you would have the additional
  459. Xbaud rates of 57600, 76800, 96000 and 115200 available
  460. X(you shouldn't use more than 115200 because that loads
  461. Xthe CPU too much).
  462. XJust enter the baud rate base (3686400 / 16 = 230400)
  463. Xand the 15 baud rates into one of the baud rate tables
  464. Xin \fIfas_baud\fP[][] and select the respective
  465. Xtable in \fIfas_bt_select\fP[].
  466. X.LP
  467. XNote that \fIVP/ix\fP programs which use serial
  468. Xports will select wrong baud rates on ports that
  469. Xare driven by a non\-standard oscillator, unless
  470. Xthey know about the different oscillator frequency.
  471. X.LP
  472. XNote also that whatever baud rate is actually used,
  473. Xthe UNIX application programs still know only the
  474. Xstandard \fItermio\fP(7|M) baud rates.
  475. XSo don't wonder if \fIstty\fP shows you 38400 bps
  476. Xon a port that in fact runs at 115200 bps.
  477. X\fIFAS\fP hides the real baud rate from the rest of
  478. Xthe UNIX kernel and the application programs.
  479. XThat's the only way these additional baud
  480. Xrates can work at all.
  481. X.SH "CABLING"
  482. XCabling depends on the serial card and the
  483. Xdevice that you want to connect.
  484. X.SS "Connecting a modem"
  485. XThe most common case is connecting a modem to a computer.
  486. X"Dumb"\-port cards in an IBM\-AT compatible computer
  487. Xusually act as a DTE device and have a male connector
  488. Xwhile modems are DCE devices and have a female connector.
  489. XSo all you need is an extension cable with a male connector
  490. Xon one side and a female connector on the other side.
  491. X.LP
  492. XThe cable has to have wires for at least the signals
  493. X\fBTD\fP, \fBRD\fP, \fBRTS\fP, \fBCTS\fP, \fBDSR\fP,
  494. X\fBDCD\fP, \fBDTR\fP, \fBRI\fP and \fBGND\fP.
  495. XOn a D\-Sub 25 RS232C connector these are the
  496. Xpin numbers \fB2\fP, \fB3\fP, \fB4\fP, \fB5\fP, \fB6\fP,
  497. X\fB8\fP, \fB20\fP, \fB22\fP and \fB7\fP,
  498. Xrespectively, and the wireing scheme has to be
  499. X"straight through", that is, none of the wires
  500. Xare crossed.
  501. XFor the cabling of less common devices please look
  502. Xat the manuals for further details.
  503. X.LP
  504. XIn all cases, though, use shielded cables wherever
  505. Xyou can, especially with high baud rates!
  506. XShielded cables are better protected against
  507. Xelectromagnetic interferences and therefore help
  508. Xto prevent data corruption during transmission.
  509. XAlso, make the cables as short as possible.
  510. X.LP
  511. XHowever, don't leave unused input lines
  512. X(\fBCTS\fP, \fBDCD\fP, \fBDSR\fP, \fBRI\fP) open!
  513. XDue to crosstalking from other lines these input
  514. Xlines might change their logic level, resulting
  515. Xin all sorts of problems (bad throughput,
  516. Xblocked character output etc.).
  517. XTherefore, you should connect any unused input line
  518. Xto \fBGND\fP (pin \fB7\fP on the D\-Sub 25 RS232C connector).
  519. X.LP
  520. XAdditionally, you should use the proper operating
  521. Xmode (via the minor device number) for your
  522. Xapplication, for instance, if the connected
  523. Xdevice doesn't have hardware flow control,
  524. Xyou should use a mode where hardware flow
  525. Xcontrol is disabled.
  526. XThe same is true for modem control.
  527. X.SS "Connecting two UNIX systems"
  528. XIf you want to connect two UNIX systems (both using
  529. X\fIFAS\fP) via a null modem cable, and if you want
  530. Xto run a \fIgetty\fP on both ends you need to modify
  531. Xthe \fIspace.c\fP file to prevent both \fIgetty\fPs from
  532. Xchatting with each other, wasting valuable CPU time.
  533. X.LP
  534. XRemove the \fBEI_DTR\fP macro for the desired port from
  535. Xthe initializer part of the \fIfas_modem\fP[] array.
  536. XThis will cause \fBDTR\fP to be asserted only on dialout.
  537. XTherefore, the \fIgetty\fP will become alive only if
  538. Xa dialout on the other side is in progress.
  539. X.LP
  540. XAlso, replace the \fBHO_CTS_ON_DSR\fP macro in the
  541. X\fIfas_flow\fP[] array with \fBHO_CTS\fP.
  542. XThis will cause \fBCTS\fP to be used for hardware output
  543. Xflow control regardless of the state of \fBDSR\fP.
  544. X.LP
  545. XThe required null modem cable needs to cross
  546. X\fBTD\fP/\fBRD\fP, \fBRTS\fP/\fBCTS\fP and \fBDTR\fP/\fBDCD\fP.
  547. XThe following diagram shows the wireing scheme for
  548. XDTE D\-Sub 25 connectors on both sides.
  549. X.nf
  550. X.IP
  551. XD\-Sub 25   System A                System B
  552. X========   ========                ========
  553. X    2        TD  \-\-\-\-\-\-\-\-\\ /\-\-\-\-\-\-\-\- TD
  554. X                          X
  555. X    3        RD  \-\-\-\-\-\-\-\-/ \\\-\-\-\-\-\-\-\- RD
  556. X
  557. X    4        RTS \-\-\-\-\-\-\-\-\\ /\-\-\-\-\-\-\-\- RTS
  558. X                          X
  559. X    5        CTS \-\-\-\-\-\-\-\-/ \\\-\-\-\-\-\-\-\- CTS
  560. X
  561. X   20        DTR \-\-\-\-\-\-\-\-\\ /\-\-\-\-\-\-\-\- DTR
  562. X                          X
  563. X    8        DCD \-\-\-\-\-\-\-\-/ \\\-\-\-\-\-\-\-\- DCD
  564. X
  565. X    6        DSR \-\-\\             /\-\- DSR
  566. X                    >\-\\       /\-<
  567. X   22        RI  \-\-/   \\     /   \\\-\- RI
  568. X                        >\-\-\-<
  569. X    7        GND \-\-\-\-\-\-/     \\\-\-\-\-\-\- GND
  570. X.fi
  571. X.LP
  572. XNote that \fBDSR\fP and \fBRI\fP are directly connected
  573. Xto \fBGND\fP on each side so that they can't catch
  574. Xelectromagnetic interferences.
  575. X.SS "Connecting a mouse"
  576. XAnother caveat is connecting a mouse or some other
  577. Xpointer device to an \fIFAS\fP port.
  578. XThere are many mice on the market that don't handle the
  579. Xmodem and hardware flow control lines in a proper way.
  580. XTherefore, they should be connected to a port with a
  581. Xminor device number of \fB0\fP + device #.
  582. XThis disables any modem or hardware flow control and prevents
  583. Xthe device from locking up under certain circumstances.
  584. X.LP
  585. XYou may also want to refer to the section \fBUART FIFO CONTROL\fP
  586. Xif your mouse is connected to a port driven by a UART with FIFOs.
  587. X.SH "MODEM SETUP"
  588. X\fIFAS\fP has certain requirements for the
  589. Xmodem setup that must be met in order to avoid
  590. Xproblems during operation.
  591. X.LP
  592. XIf modem control should be used (carrier sensing
  593. Xwith \fBDCD\fP and hangup control with \fBDTR\fP),
  594. Xyou need to program the modem in the following way:
  595. X.RS 3
  596. X.LP
  597. X\fBDTR\fP high\->low causes the modem to drop
  598. Xthe connection (hangup) and resets the modem to
  599. Xits power\-on default setup.
  600. XAdditionally, when the modem is in answer mode (for
  601. Xdialin) it shouldn't answer calls if \fBDTR\fP is low.
  602. X.LP
  603. X\fBDCD\fP is set high when there is a carrier
  604. Xdetected or rather, to be precise, when the
  605. Xconnection procedure between the two modems is
  606. Xfinished and the modems are ready to transfer
  607. Xuser data.
  608. X\fBDCD\fP is dropped to low if the modem senses
  609. Xthat the connection to the other modem is lost
  610. X(e.g. no carrier).
  611. X.RE
  612. X.LP
  613. XIf hardware flow control should be used (\fBCTS\fP
  614. Xfor output direction and \fBRTS\fP for input
  615. Xdirection), you need this setup:
  616. X.RS 3
  617. X.LP
  618. X\fBRTS\fP signals to the modem whether the DTE
  619. X(e.g. the computer) can accept data or not.
  620. XHigh means the DTE can accept data while low
  621. Xmeans that the modem should stop sending data
  622. Xto the DTE.
  623. X.LP
  624. X\fBCTS\fP signals to the DTE whether the modem
  625. Xcan accept data or not.
  626. XHigh means the modem can accept data while low
  627. Xmeans that the DTE should stop sending data.
  628. X.LP
  629. X\fBDSR\fP is always on.
  630. XThis line acts as a gate for the \fBCTS\fP signal.
  631. X\fIFAS\fP ignores \fBCTS\fP if \fBDSR\fP is low,
  632. Xso \fBDSR\fP has to be always high to make sure that
  633. X\fIFAS\fP always pays attention to \fBCTS\fP.
  634. X.LP
  635. XNote that the behaviour of \fBRTS\fP and \fBCTS\fP
  636. X(as described above) is called bidirectional or
  637. Xfull duplex hardware flow control.
  638. XDon't select half duplex hardware flow control
  639. Xwith modern highspeed modems!
  640. X.RE
  641. X.LP
  642. XBy default, \fIFAS\fP uses both modem and hardware
  643. Xflow control so you have to make sure that in your
  644. Xmodem \fBDTR\fP, \fBDCD\fP, \fBRTS\fP, \fBCTS\fP and
  645. X\fBDSR\fP work the way described above.
  646. X.LP
  647. XIf your modem can't handle modem and/or hardware
  648. Xflow control you have to use a different minor
  649. Xdevice number for this device that disables
  650. Xthe respective feature.
  651. XOtherwise lockups and malfunctions could occure.
  652. XLook at section \fBOPERATING MODES AND MINOR DEVICE NUMBERS\fP
  653. Xfor a description of possible operating
  654. Xmodes (minor device numbers).
  655. X.LP
  656. XHere are a few additional hints for the modem setup:
  657. X.RS 3
  658. X.LP
  659. XIf you program the modem to answer calls (dialin mode)
  660. Xyou should make sure that the modem escape code character
  661. Xwhich allows online access to the modem command mode is
  662. Xdisabled.
  663. XOtherwise, the escape code sequence typed in at the
  664. Xremote side is echoed by the local computer and causes
  665. Xthe local modem to switch to command mode as well.
  666. XAt this stage, only a hangup will reactivate
  667. Xthe modem port.
  668. XModems with an AT command set disable the escape
  669. Xcode with
  670. X.nf
  671. X.IP
  672. XAT S2=128
  673. X.fi
  674. X.LP
  675. XIf you want to dial in and out on the same modem port
  676. Xthe modem's power\-on default setup should be tailored
  677. Xfor dialin mode (incl. auto answer \fBenable\fP).
  678. XWhen a dialout takes place the dialout application
  679. Xprovides the necessary modem commands to switch the
  680. Xmodem to dialout mode (incl. auto answer \fBdisable\fP)
  681. Xand then does the actual dialout.
  682. XAfter the dialout is finished \fIFAS\fP makes sure
  683. Xthat \fBDTR\fP is dropped for a second which resets
  684. Xthe modem to its power\-on defaults so that the modem
  685. Xis in dialin mode, again.
  686. X.RE
  687. X.SH "TROUBLE\-SHOOTING"
  688. XThere are a number of know problems that you might encounter
  689. Xwhen you are using \fIFAS\fP.
  690. XThey are usually caused either by a configuration error or
  691. Xby limitations of the hard\- and software environment
  692. X\fIFAS\fP has to work in.
  693. X.SS "Character loss"
  694. XA common problem with fast serial data transmission is
  695. Xthat the receiving side occasionally drops characters.
  696. XThe reason for this lies in the ancient UART
  697. Xdevices used in many 286/386 systems:
  698. Xthe \fI8250\fP (not supported by \fIFAS\fP) and
  699. Xthe \fINS16450\fP.
  700. X.LP
  701. XThey have only one receiver character buffer.
  702. XThis implies that the operating system must read
  703. Xa character from this buffer before the next one
  704. Xarrives from the UART's shift register.
  705. XFor the old IBM PC with DOS this was sufficient.
  706. XBut for UNIX and with baud rates as high as 115200
  707. Xthis is just a bad joke.
  708. X.LP
  709. XUNIX is not a real\-time operating system.
  710. XThis means that its kernel isn't optimized for
  711. Xfast interrupt response.
  712. XWith properly designed hardware that buffers data until
  713. Xthe OS has time to fetch it this is no problem.
  714. XBut since UNIX for PCs has to work with the
  715. Xstandard hardware found in 286/386 systems,
  716. Xserial driver developers have to cope with the
  717. X\fINS16450\fP UARTs which are in there simply to
  718. Xbe compatible with IBM PCs, XTs and ATs under DOS.
  719. X.LP
  720. XWith this hardware it is impossible to make it work
  721. Xat high baud rates without a major redesign of the
  722. XUSL supplied UNIX kernel.
  723. XBut then it wouldn't be UNIX SYSV any more.
  724. X.LP
  725. XFortunately, there is a pin\-to\-pin replacement
  726. Xavailable from National Semiconductors:
  727. Xthe \fINS16550A\fP.
  728. X.LP
  729. XThis device has separate 16 character FIFOs
  730. Xfor the receiver and the transmitter.
  731. XWith these FIFOs the interrupt latency of
  732. Xthe kernel can be quite high without losing
  733. Xcharacters.
  734. XAnd because with most interrupts several
  735. Xcharacters are processed at once the
  736. XCPU is loaded much less.
  737. X.LP
  738. XSo, as \fIFAS\fP supports \fINS16550A\fP UARTs, all
  739. Xyou have to do to fix the character loss problem is
  740. Xto either buy a serial card with \fINS16550A\fP chips
  741. Xon it or replace the UARTs on the card that you
  742. Xalready have.
  743. X.LP
  744. XIf for some reason you can't get the \fINS16550A\fP
  745. Xchips you could use the \fIi82510\fP
  746. Xchips from Intel.
  747. XAlthough they are much less efficient they are
  748. Xstill better than the \fINS16450\fP.
  749. X.LP
  750. XThere are, however, some conditions under which
  751. Xeven the receiver FIFO in the \fINS16550A\fP UART
  752. Xcan't prevent character loss:
  753. X.RS 3
  754. X.IP "Other kernel drivers" 3
  755. XSome kernel drivers may disable interrupts for too long.
  756. XOne culprit is the disk cache flush routine.
  757. XIf you configure your kernel with too many
  758. Xcache buffers (\fINBUF\fP parameter for USL
  759. Xderived UNIX) you may still lose characters
  760. X(at least at 38400 bps and above).
  761. X.IP "" 3
  762. XAnother candidate is \fIVP/ix\fP, or rather the
  763. Xkernel functions to support \fIVP/ix\fP.
  764. XThis may also lead to lost characters
  765. Xat very high input speeds.
  766. X.IP "Bus master controllers" 3
  767. XThere are some bus master disk controllers
  768. X(like the Adaptec 1540/1542 SCSI controller)
  769. Xon the market that slow down the CPU so much
  770. Xduring data transfer that it isn't fast
  771. Xenough to process characters coming in
  772. Xat high baud rates.
  773. X.IP "" 3
  774. XTherefore, if you can configure your disk
  775. Xcontroller, don't use values that will bring
  776. Xthe CPU down to its knees.
  777. XOtherwise, \fIFAS\fP will lose incoming
  778. Xcharacters during disk I/O.
  779. X.RE
  780. X.LP
  781. XIf your operating system has a low interrupt
  782. Xlatency you can define LOW_INT_LAT in the
  783. X\fIMakefile\fP in order to set the receiver FIFO
  784. Xtrigger level from 4 (default) to 8 characters.
  785. XThis cuts the receiver interrupt frequency in half
  786. Xand therefore saves a lot of CPU time.
  787. XThat pays off especially at very high baud rates.
  788. X.LP
  789. XIf you set this flag you should do some rigid
  790. Xtests (receiving characters at the highest baud
  791. Xrate while the system is heavily loaded with disk
  792. Xand network I/O) to make sure that there are really
  793. Xno lost characters due to interrupt latency.
  794. XISC UNIX 3.0 is known to have a low tty interrupt
  795. Xlatency, therefore LOW_INT_LAT is defined in
  796. X\fIMakefile.ISC3\fP.
  797. XOn the other hand, ISC UNIX 2.x has a rather high
  798. Xinterrupt latency and shouldn't have this flag set.
  799. XFor other UNIX flavors you have to find out yourself
  800. Xwhether this flag is applicable.
  801. X.SS "Device lockups"
  802. XThere are certain conditions under which a device
  803. Xcan lock up, that is, at least one process that
  804. Xuses this device waits for a tty I/O related event
  805. Xthat apparently doesn't occure.
  806. X.LP
  807. XThe most common case is that there are still
  808. Xcharacters in the output buffer, but the output
  809. Xis disabled for some reason.
  810. XThen the last process that closes the tty device
  811. Xhangs in the \fIclose\fP(2|S) function until the
  812. Xoutput buffer has drained.
  813. X.LP
  814. XTty output may be stopped by the software
  815. X(XON/XOFF) or hardware (\fBRTS\fP/\fBCTS\fP,
  816. Xby default) flow control.
  817. XIn this case something seems to be wrong with
  818. Xthe cabling or the connected device.
  819. XPlease check this first out before you blame \fIFAS\fP.
  820. XSometimes it helps to switch the device off and on a
  821. Xfew times to unblock the tty output.
  822. X.LP
  823. XIf this doesn't help the last resort would be to
  824. Xkill the process that hangs on the \fIFAS\fP device,
  825. Xand if it still hangs, to open the respective device
  826. Xwith the O_APPEND flag.
  827. XThis flushes the output buffers and therefore
  828. Xreleases the hanging process.
  829. XTo do that, you simply type
  830. X.nf
  831. X.IP
  832. Xecho '\\c' >> /dev/ttyF00
  833. X.fi
  834. X.LP
  835. Xif, for instance, the process is hanging on \fBttyF00\fP.
  836. XDon't omit the backslash before the \fBc\fP!
  837. X.LP
  838. XAnother reason for a blocked output could be a
  839. Xlost transmitter interrupt.
  840. XIf this isn't caused by a configuration error
  841. Xthis usually indicates a hardware problem in
  842. Xyour computer which should be fixed as
  843. Xsoon as possible.
  844. XOtherwise, you can't run this system unattended
  845. Xbecause it is too unreliable.
  846. XAll you can do after a transmitter interrupt is
  847. Xlost is to reboot the machine in order to use the
  848. Xblocked \fIFAS\fP device, again.
  849. X.LP
  850. XIf interrupts are lost on IRQ2 this might have
  851. Xto do with an EGA or VGA video card using this
  852. XIRQ line for the vertical retrace interrupt.
  853. XThis interrupt isn't used at all these days,
  854. Xneither under DOS nor UNIX.
  855. XIt's simply there for compatibility.
  856. X.LP
  857. XOn some video cards (the more expensive ones)
  858. Xthere is a jumper or dip switch to disable
  859. Xthe vertical retrace interrupt.
  860. XOn the rest you have to cut the trace to the
  861. Xbus contact B4 with a sharp knife.
  862. XThis contact is on the solder side of the
  863. Xvideo card, the fourth bus contact counted
  864. Xfrom the side where the 9 or 15 pin D\-SUB
  865. Xconnector to the monitor is located.
  866. XCutting this trace has the same effect as
  867. Xpulling the IRQ2 jumper on other cards.
  868. X.LP
  869. XNote that cutting the trace will void
  870. Xyour video card's warranty.
  871. X.LP
  872. XNow IRQ2 should be available for use with \fIFAS\fP.
  873. XLook at the \fIINSTALLATION\fP file for details on
  874. Xhow to configure \fIFAS\fP for IRQ2.
  875. XThis is operating system dependent.
  876. X.LP
  877. XAnd there is a rare case which has to do with the
  878. Xnumber of available CLIST buffers in the UNIX kernel.
  879. XThe UNIX output and input buffers are 256 bytes
  880. Xeach (by default).
  881. XIf for some reason the output of a tty device is
  882. Xstopped but a process continues to send data one
  883. Xcharacter at a time this uses up one CLIST
  884. Xbuffer for every charcacter.
  885. XIf the number of CLIST buffers in the kernel is less
  886. Xthan \fB256\fP all CLIST buffers will be busy eventually.
  887. X.LP
  888. XThe dangerous thing here is that the pool of CLIST
  889. Xbuffers is used by all tty devices of the system.
  890. XTherefore, if one single tty device manages to eat up
  891. Xall available CLIST buffers all tty in\- and output
  892. Xcomes to a halt.
  893. XIf this happens you can't access your machine any
  894. Xmore, not even from the operator console.
  895. XAlthough the system is still alive internally.
  896. X.LP
  897. XUnfortunately, many UNIX vendors have put a negligently
  898. Xlow number\-of\-CLIST\-buffers parameter into
  899. Xtheir kernel tune files.
  900. XYou should increase it to a value that makes it
  901. Ximpossible that one device alone can occupy all
  902. XCLIST buffers (it's the \fINCLIST\fP parameter
  903. Xunder USL derived UNIX SVR[34].x).
  904. XA value of \fB400\fP should be sufficient.
  905. X.SS "Background processes and \fIgetty\fP problems"
  906. XDue to the design of the SysV kernel there might
  907. Xbe problems with \fIgetty\fP when the previous
  908. Xdialup user on the respective port was using
  909. Xbackground processes.
  910. XUnfortunaley, \fIFAS\fP can't do much about it.
  911. X.LP
  912. XThe reason for these problems is that when a
  913. Xdevice is held open by some process there can be
  914. Xno \fIgetty\fP waiting for carrier on this device.
  915. XNotice that we are talking about the \fBsame\fP logical
  916. Xdevice for both the offending process and \fIgetty\fP.
  917. XThis has nothing to do with the built\-in modem line
  918. Xsharing for dialin and dialout.
  919. X.LP
  920. XThere are two problematic situations:
  921. X.RS 3
  922. X.IP "1." 3
  923. X\fIgetty\fP has already blocked in the \fIopen\fP(2|S) function
  924. Xand is waiting for the carrier.
  925. XAnother process now opens the device with O_NDELAY.
  926. XBecause the device is open after this there is no way
  927. Xfor \fIgetty\fP to remain in the carrier waiting state.
  928. XTherefore \fIgetty\fP is waked up and completes its
  929. X\fIopen\fP(2|S) call as if the carrier were present.
  930. XOf course, as the carrier isn't really there, subsequent
  931. X\fIread\fP(2|S) and \fIwrite\fP(2|S) calls will return
  932. Ximmediately with an EOF condition.
  933. X\fIgetty\fP just exits in this case.
  934. X.IP "2." 3
  935. XA background process holds the device open when
  936. X\fIgetty\fP is respawned by \fIinit\fP.
  937. X\fIgetty\fP's \fIopen\fP(2|S) call succeedes immediately
  938. Xbecause it can't block and wait for the carrier due to
  939. Xthe device already being held open by the background process.
  940. XAgain, subsequent \fIread\fP(2|S) and \fIwrite\fP(2|S) calls
  941. Xreturn EOF (provided that the carrier is missing) and
  942. X\fIgetty\fP exits.
  943. X.RE
  944. X.LP
  945. XIn both cases \fIinit\fP will immediately respawn new
  946. X\fIgetty\fPs and eventually gives up with a ``respawning
  947. Xtoo rapidly'' message on the console.
  948. XThis disables dialins on this port for at least a couple
  949. Xof minutes.
  950. X.LP
  951. XIn this state you may notice that the \fBDTR\fP line is
  952. Xlow although it should be high as the port is held open
  953. Xby the background process.
  954. XThis is caused by the \fIFAS\fP security feature that
  955. Xprevents modems from accepting calls when the port
  956. Xisn't ready for logins.
  957. XThis can save frequently calling UUCP sites a
  958. Xlot of money.
  959. XHowever, the security feature only makes the symptoms
  960. Xmore visible, but it isn't the cause of the
  961. X\fIgetty\fP problems.
  962. X.LP
  963. XWhile the first case above happens rarely (usually
  964. Xdue to a configuration error) the second case is
  965. Xmore common.
  966. XThe reason is that dialup users start background
  967. Xprocesses and then log off or drop the line.
  968. XIf the background process was started by a job
  969. Xcontrol shell it runs in its own process group
  970. Xand therefore doesn't receive the SIGHUP signal
  971. Xsent by \fIFAS\fP on carrier loss.
  972. XIt is the responsibility of the shell to notice
  973. Xeither the SIGHUP or the EOF condition and to
  974. Xthen kill its child (background) processes
  975. Xbefore exiting.
  976. XUnfortunately, not all job control shells
  977. Xdo this reliably.
  978. X.LP
  979. XAnother problem is that under some UNIX flavors
  980. Xthe \fIcsh\fP automatically disables SIGHUP
  981. Xfor all background processes it starts.
  982. XSo these processes have no chance to terminate
  983. Xwhen the carrier drops.
  984. X.LP
  985. XWhatever causes the background processes to survive
  986. Xthe logoff or carrier drop, it causes massive problems
  987. Xwith \fIgetty\fP as described above.
  988. XIf you see these effects on your machine, and it
  989. Xcan't be cured by using a better (in this respect)
  990. Xshell, your only option is to convince your dialup
  991. Xusers to either not use any background processes or
  992. Xto redirect \fBstdin\fP, \fBstdout\fP and \fBstderr\fP
  993. Xto some files so that the processes don't hold the
  994. Xdevice open.
  995. XIf you or your users can't live without background
  996. Xprocesses on dialup lines you may want to install the
  997. X\fIscreen\fP virtual tty multiplexer which allows
  998. Xseveral independent screens to run programs even while
  999. Xyou are logged off.
  1000. X\fIscreen\fP or \fIiscreen\fP should be available
  1001. Xon every GNU archive server.
  1002. X.SS "Crashes or video problems at boot time"
  1003. XSeveral vendors of video cards with the S3 chip set
  1004. X(maybe with other chip sets as well) were stupid enough
  1005. Xto use the I/O address \fB0x2e8\fP for their own purpose.
  1006. XThis address, however, has been used, at least inofficially,
  1007. Xfor the COM4 port since the days the IBM AT came out.
  1008. X.LP
  1009. XSo what happens if you have such a video card in your
  1010. Xcomputer together with an enabled COM4 port is that
  1011. X\fIFAS\fP writes to the port at boot time (in order to detect
  1012. Xit) and actually writes to the video card as well,
  1013. Xbecause of the overlayed I/O addresses.
  1014. XThis confuses the video card so that, for instance, the
  1015. Xscreen gets dark, or it even manages to crash the system.
  1016. X.LP
  1017. XThe only thing you can do in this situation is to physically
  1018. Xdisable the COM4 port (usually by some DIP switch or jumper)
  1019. Xand to tell \fIFAS\fP (via its config files) not to use COM4.
  1020. X.SH "FILES"
  1021. X.IP "\fI/dev/ttyF??\fP" 3
  1022. XDialout device with modem and hardware flow control (by default).
  1023. X.IP "\fI/dev/ttyFM??\fP" 3
  1024. XDialin device with modem and hardware flow control (by default).
  1025. X.SH "SEE ALSO"
  1026. X\fItermio\fP(7|M),
  1027. X\fIsignal\fP(2|S),
  1028. X\fIopen\fP(2|S),
  1029. X\fIclose\fP(2|S),
  1030. X\fIread\fP(2|S),
  1031. X\fIwrite\fP(2|S),
  1032. X\fIfcntl\fP(2|S),
  1033. X\fIioctl\fP(2|S),
  1034. X\fIgetty\fP(1M|M),
  1035. X\fIcu\fP(1C|C),
  1036. X\fIuucico\fP(1M|C)
  1037. X.SH "BUGS"
  1038. X\fIFAS\fP is not yet ported to SVR4 STREAMS and therefore
  1039. Xits functionality is limited under SVR4.
  1040. X.LP
  1041. XDosMerge's virtual COM ports are unsupported.
  1042. X.SH "COPYRIGHT"
  1043. XCopyright (C) 1990\-1993 Uwe Doering
  1044. X.br
  1045. XSee the file \fICOPYING\fP (distributed with the source code)
  1046. Xfor distribution rights and restrictions associated with
  1047. Xthis software.
  1048. SHAR_EOF
  1049. echo 'File fas.7 is complete' &&
  1050. true || echo 'restore of fas.7 failed'
  1051. rm -f _shar_wnt_.tmp
  1052. fi
  1053. # ============= fas.7.cat ==============
  1054. if test -f 'fas.7.cat' -a X"$1" != X"-c"; then
  1055.     echo 'x - skipping fas.7.cat (File already exists)'
  1056.     rm -f _shar_wnt_.tmp
  1057. else
  1058. > _shar_wnt_.tmp
  1059. echo 'x - extracting fas.7.cat (Text)'
  1060. sed 's/^X//' << 'SHAR_EOF' > 'fas.7.cat' &&
  1061. X
  1062. X
  1063. X
  1064. X      FAS(7)            UNIX System    V             FAS(7)
  1065. X
  1066. X
  1067. X
  1068. X      NAME
  1069. X           fas - asynchronous serial character device driver
  1070. X
  1071. X      DESCRIPTION
  1072. X           _F_A_S, which is an    acronym    for _Final _Async    _Solution, is a
  1073. X           "dumb"-port character device driver for 286/386 based UNIX
  1074. X           systems that adds several features that are often not pro-
  1075. X           vided by    vendors    drivers.
  1076. X
  1077. X           It supports
  1078. X
  1079. X          -  the _N_S_1_6_4_5_0 and _u_m_8_2_4_5_0 UART chips.
  1080. X          -  the _N_S_1_6_5_5_0_A and _i_8_2_5_1_0 UART chips    in FIFO    mode.
  1081. X          -  up    to 115200 bps with _N_S_1_6_5_5_0_A.
  1082. X          -  built-in modem line sharing for dialin and    dialout.
  1083. X          -  modem control on both dialin and dialout devices.
  1084. X          -  full and half duplex hardware flow    control.
  1085. X          -  concurrent    hardware and software (XON/XOFF) flow control.
  1086. X          -  shared interrupts.
  1087. X          -  multiplexed UART registers    (_H_U_B-_6 card etc.).
  1088. X          -  any mix of    up to 16 UARTs.
  1089. X          -  any I/O address, any IRQ.
  1090. X          -  _V_P/_i_x, the    ISC DOS    emulator.
  1091. X
  1092. X           _F_A_S was successfully tested under the following operating
  1093. X           systems:
  1094. X
  1095. X          ISC UNIX 2.0.2 and later
  1096. X          SCO UNIX 3.2.2 and later
  1097. X          SCO XENIX 286    2.3.2 and later
  1098. X          SCO XENIX 386    2.3.2 and later
  1099. X          Microport SVR3.0
  1100. X          ESIX SVR3.2 Rev. C & D
  1101. X          Bell Tech/Intel SVR3.2
  1102. X          AT&T SVR3.2 V    2.1
  1103. X          SVR4.0 (with tty compatibility drivers)
  1104. X
  1105. X           This driver should work with most of the    UNIX SVR[34].x fla-
  1106. X           vors currently available.  You can have both this and the
  1107. X           original    vendor driver in the same kernel (if you really
  1108. X           like to,    but I wouldn't know why).  Each    driver controls    its
  1109. X           own separate set    of serial ports.  The only restriction here
  1110. X           is that each interrupt vector must not be used by more than
  1111. X           one of the drivers.  The    kernel config program will complain
  1112. X           otherwise.
  1113. X
  1114. X      WHICH    SERIAL CARDS ARE SUPPORTED ?
  1115. X           _F_A_S supports and    has been tested    on many    async serial
  1116. X           "dumb"-port cards.  It can handle most combinations of
  1117. X           shared interrupts.  The current version can be used with
  1118. X           _N_S_1_6_4_5_0,    _N_S_1_6_5_5_0_A, _u_m_8_2_4_5_0 and _i_8_2_5_1_0 UARTs.  _8_2_5_0 chips    are
  1119. X           not supported due to various bugs and speed problems in
  1120. X           these parts.  They have no place    in any 286/386 or other
  1121. X
  1122. X
  1123. X      Rev. Release 2.11.0                         Page 1
  1124. X
  1125. X
  1126. X
  1127. X
  1128. X
  1129. X
  1130. X      FAS(7)            UNIX System    V             FAS(7)
  1131. X
  1132. X
  1133. X
  1134. X           high performance    system.     Replace them with one of the sup-
  1135. X           ported chips.  They are pin-to-pin compatible.
  1136. X
  1137. X           IMPORTANT: Don't    use _N_S_1_6_5_5_0 (without the trailing AAAA) or    any
  1138. X              chips    from a second source manufacturer!  They
  1139. X              have a reputation of being buggy and might not
  1140. X              work with _F_A_S.  Some aren't even recognized by
  1141. X              the FIFO auto-detect code in _F_A_S.  The quality of
  1142. X              the second source chips might    have improved
  1143. X              lately but there is no way to    know for sure.
  1144. X              Therefore, even if they are cheaper, don't buy
  1145. X              them.
  1146. X
  1147. X           Take a look at the _s_p_a_c_e-* files    for details on how to set
  1148. X           up for various devices.    Sample config files are    provided
  1149. X           for the following cards:
  1150. X
  1151. X          *-_a_s_t_4_c_1_2   _A_S_T 4-port card plus COM1    and COM2
  1152. X          *-_a_s_t_8_c_1_2   Two _A_S_T 4-port cards plus    COM1 and COM2
  1153. X          *-_c_1_2_3      COM1, COM2 and COM3
  1154. X          *-_g_e_n_8_c_1_2   Generic 8-port card plus COM1 and    COM2 (you can
  1155. X                  use these    files for the _D_i_g_i_C_h_a_n_n_e_l _P_C/_8,
  1156. X                  _A_P_T _H_S_S_0_8, _H_o_s_t_e_s_s, _B_o_c_a and _A_r_n_e_t 8-port    cards)
  1157. X          *-_h_u_b_6_c_1_2   _B_e_l_l _T_e_c_h    _H_U_B-_6 card plus    COM1 and COM2
  1158. X          *-_u_s_e_4_c_1_2   _U_S_E_N_E_T _I_I    4-port card plus COM1 and COM2
  1159. X
  1160. X           Internal    modems are also    supported.  Some of them, however,
  1161. X           use a UART emulation instead of a genuine UART chip.  These
  1162. X           types of    internal modems    usually    don't pass the UART test at
  1163. X           boot time.  Therefore, you may want to set the NNNNOOOO____TTTTEEEESSSSTTTT flag
  1164. X           in the _f_a_s__m_o_d_i_f_y[] array (_s_p_a_c_e._c) to skip the UART test.
  1165. X           On the other hand, most of the internal modems with a UART
  1166. X           emulation have a    receiver overrun protection so that charac-
  1167. X           ters can't be lost at high baud rates.  For these modems, it
  1168. X           is advisable to set the NNNNOOOO____OOOOVVVVEEEERRRRRRRRUUUUNNNN flag in the _f_a_s__m_o_d_i_f_y[]
  1169. X           array (_s_p_a_c_e._c).     If an internal    modem with overrun protec-
  1170. X           tion emulates an    _N_S_1_6_5_5_0_A UART, you should additionally use
  1171. X           the FFFFIIIIFFFFOOOO____TTTTRRRRIIIIGGGGGGGGEEEERRRR____11114444 symbol in the _f_a_s__f_i_f_o__c_t_l[]    array
  1172. X           (_s_p_a_c_e._c).  This    sets the receiver FIFO size to the highest
  1173. X           possible    trigger    level in order to reduce the interrupt fre-
  1174. X           quency.    Please refer to    the sections MMMMOOOODDDDIIIIFFFFYYYYIIIINNNNGGGG AAAA PPPPOOOORRRRTTTT''''SSSS
  1175. X           DDDDEEEEFFFFAAAAUUUULLLLTTTT BBBBEEEEHHHHAAAAVVVVIIIIOOOOUUUURRRR and UUUUAAAARRRRTTTT FFFFIIIIFFFFOOOO CCCCOOOONNNNTTTTRRRROOOOLLLL for further details.
  1176. X
  1177. X           There are serial    cards on the market that emulate an
  1178. X           _N_S_1_6_5_5_0_A    UART and have receiver overrun protection due to an
  1179. X           additional character buffer.  They look like an ordinary    COM
  1180. X           port from the software side but have their own CPU, RAM,    ROM
  1181. X           etc. on-board.  The special considerations for internal
  1182. X           modems pointed out above    apply to these serial cards as
  1183. X           well.  One example is the _Q_u_e_u_e_C_O_M-_1_1_5 card for which you
  1184. X           should set the NNNNOOOO____TTTTEEEESSSSTTTT and NNNNOOOO____OOOOVVVVEEEERRRRRRRRUUUUNNNN flags and use the
  1185. X           FFFFIIIIFFFFOOOO____TTTTRRRRIIIIGGGGGGGGEEEERRRR____11114444 symbol.
  1186. X
  1187. X
  1188. X
  1189. X      Rev. Release 2.11.0                         Page 2
  1190. X
  1191. X
  1192. X
  1193. X
  1194. X
  1195. X
  1196. X      FAS(7)            UNIX System    V             FAS(7)
  1197. X
  1198. X
  1199. X
  1200. X      BOOT TIME STATUS MESSAGE
  1201. X           At boot time you    will see a status message on the screen
  1202. X           with symbols that show the init state of    each port.  The
  1203. X           symbols are as follows:
  1204. X
  1205. X          ----    not defined in the _f_a_s__p_o_r_t[] array
  1206. X          ????    can't initialize port
  1207. X          1111-9999    error during UART test phase indicated by number
  1208. X          !!!!    configuration error (check _s_p_a_c_e._c and _f_a_s._h)
  1209. X          ****    port is    initialized (_N_S_1_6_4_5_0)
  1210. X          ++++    port is    initialized and    has FIFOs forced off
  1211. X          ffff    port is    initialized and    has FIFOs (_i_8_2_5_1_0)
  1212. X          FFFF    port is    initialized and    has FIFOs (_N_S_1_6_5_5_0_A)
  1213. X
  1214. X           This is convenient to check whether you have entered the
  1215. X           proper port base    addresses in _s_p_a_c_e._c.
  1216. X
  1217. X      SHARED INTERRUPTS
  1218. X           Many multi-port cards have jumpers or dip switches that let
  1219. X           you assign more than one    port to    the same interrupt (IRQ)
  1220. X           line.  This alone is nnnnoooo guaranty    that they really support
  1221. X           shared interrupts!  These cards may be designed for the DOS
  1222. X           world where you may want    two or more serial ports but don't
  1223. X           need to run them    concurrently, that is, no more than one    of
  1224. X           those ports assigned to the same    IRQ line is allowed to be
  1225. X           in use at a time.  For DOS this is sufficient as    DOS is no
  1226. X           multitasking operating system.  For UNIX    this won't work
  1227. X           because in the worst case all serial ports may be in use    at
  1228. X           the same    time.
  1229. X
  1230. X           The basic problem is that the PC    (and AT) I/O bus can't han-
  1231. X           dle shared interrupts itself.  This is due to a brain-dead
  1232. X           hardware    design.     Therefore, there must be some special
  1233. X           logic on    the serial card    to provide shared interrupts.  And
  1234. X           those cards are quite rare (and usually more expensive).
  1235. X
  1236. X           Therefore, you have the choice to give every port on the
  1237. X           card its    own IRQ    line or    to buy a multi-port card that
  1238. X           really has shared interrupts.  But in the latter    case you
  1239. X           better ask your vendor twice to make sure that it has this
  1240. X           functionality because from the card's manuals it    often isn't
  1241. X           obvious which type of card it is.  One well-known shared
  1242. X           interrupts card is the _A_S_T 4-port card.    There are many com-
  1243. X           patible clones available    that are usually much cheaper than
  1244. X           the original.  You can even buy _A_S_T compatible 8-port cards
  1245. X           where two _A_S_T 4-port blocks are on the same board.
  1246. X
  1247. X      DIALIN/DIALOUT ON THE    SAME PORT
  1248. X           This driver supports shared line    usage by having    two logical
  1249. X           devices sharing one physical device.  Each logical device
  1250. X           has its own name.
  1251. X
  1252. X           For example, for    the first port the names are ttttttttyyyyFFFF00000000 (minor
  1253. X
  1254. X
  1255. X      Rev. Release 2.11.0                         Page 3
  1256. X
  1257. X
  1258. X
  1259. X
  1260. X
  1261. X
  1262. X      FAS(7)            UNIX System    V             FAS(7)
  1263. X
  1264. X
  1265. X
  1266. X           device 0000) and ttttttttyyyyFFFFMMMM00000000 (minor device 111199992222).  The ttttttttyyyyFFFF00000000 device
  1267. X           is used for _c_u, _k_e_r_m_i_t, _u_u_c_i_c_o and other    programs that want
  1268. X           to dial out.  It    ignores    the modem signals and therefore
  1269. X           doesn't care about whether the modem provides the carrier
  1270. X           detect signal or    not.  The ttttttttyyyyFFFFMMMM00000000 device, on the other
  1271. X           hand, is    strictly for dialin processes, usually _g_e_t_t_y.
  1272. X
  1273. X           When _g_e_t_t_y opens    ttttttttyyyyFFFFMMMM00000000    the driver blocks the _o_p_e_n(2|S)
  1274. X           call until the modem asserts the    carrier    detect signal and
  1275. X           then lets the open complete.  If    _c_u opens ttttttttyyyyFFFF00000000    while _g_e_t_t_y
  1276. X           is waiting for its own open to complete the device is given
  1277. X           to _c_u and the _g_e_t_t_y open    must wait for _c_u to finish and will
  1278. X           then wait for the carrier, again.
  1279. X
  1280. X           If _c_u tries to open the ttttttttyyyyFFFF00000000 device while _g_e_t_t_y has
  1281. X           ttttttttyyyyFFFFMMMM00000000 open _c_u will get    an EBUSY error.     If _g_e_t_t_y tries    to
  1282. X           open ttttttttyyyyFFFFMMMM00000000 while _c_u has ttttttttyyyyFFFF00000000    open the _g_e_t_t_y open will
  1283. X           just block and wait for _c_u to close the device and will then
  1284. X           wait for    the carrier.
  1285. X
  1286. X           So in short, you    should put up a    _g_e_t_t_y on ttttttttyyyyFFFFMMMM00000000 with a
  1287. X           `-t 60' and use ttttttttyyyyFFFF00000000 for _c_u, _u_u_c_i_c_o and other dialout pro-
  1288. X           grams.
  1289. X
  1290. X           Note: In    the description    above the rrrreeeeaaaallll _g_e_t_t_y is    meant.
  1291. X             With _F_A_S you don't    need hacks like    _u_u_g_e_t_t_y    to dial    in
  1292. X             and out on    the same port.
  1293. X
  1294. X      OPERATING MODES AND MINOR DEVICE NUMBERS
  1295. X           In the example in the previous section ttttttttyyyyFFFF00000000 had a minor
  1296. X           device number of    0000 and ttttttttyyyyFFFFMMMM00000000 one of 111199992222.  But there are
  1297. X           several other possible minor device numbers for each port.
  1298. X
  1299. X           The higher four bits of the 8-bit minor device number con-
  1300. X           trol the    operating mode of the device.  A physical device
  1301. X           can't be    opened with two    or more    different minor    device
  1302. X           numbers at the same time.
  1303. X
  1304. X           Minor device numbers are    built according    to the following
  1305. X           description:
  1306. X
  1307. X          Bitmap:   _m _m    _f _f _x _x    _x _x
  1308. X
  1309. X          _m _m are the mode bits    as follows:
  1310. X
  1311. X          0 0    This is    a dialout device.  The carrier signal is
  1312. X            totally    ignored.  With carrier high->low nnnnoooo SIGHUP
  1313. X            signal is generated.  The device does nnnnooootttt block    on
  1314. X            open if    there is no carrier.
  1315. X
  1316. X          0 1    This is    a dialout device.  After an initial open,
  1317. X            the actual carrier is ignored and is assumed to    be
  1318. X            present.  However, as soon as there is a low->high
  1319. X
  1320. X
  1321. X      Rev. Release 2.11.0                         Page 4
  1322. X
  1323. X
  1324. X
  1325. X
  1326. X
  1327. X
  1328. X      FAS(7)            UNIX System    V             FAS(7)
  1329. X
  1330. X
  1331. X
  1332. X            carrier    transition, this device    switches to carrier
  1333. X            controlled behaviour until the last process has
  1334. X            closed the device.  This includes sending a SIGHUP
  1335. X            signal on carrier loss.
  1336. X
  1337. X            Note that after    a carrier loss an _i_o_c_t_l(2|S) call
  1338. X            with a TCSETA* command that sets and again clears
  1339. X            the CLOCAL flag    resets the device to ignore the
  1340. X            actual carrier again and to assume that    it is
  1341. X            present    until the next carrier low->high.  Then    the
  1342. X            device switches    to the carrier controlled mode,
  1343. X            again.    Without    this command sequence the device
  1344. X            would ignore the actual    carrier    and assume that    it
  1345. X            is missing after the first carrier loss.
  1346. X
  1347. X            Additionally, after the    carrier    loss, as long as
  1348. X            the carrier is ignored and assumed to be missing,
  1349. X            the modem enable output    is held    low to prevent the
  1350. X            modem from answering calls.  The device    does nnnnooootttt
  1351. X            block on open if there is no carrier.
  1352. X
  1353. X          1 0    This is    a dialin device.  It is    carrier    controlled
  1354. X            and blocks on open if there is no carrier.
  1355. X
  1356. X            Note that after    a carrier loss an _i_o_c_t_l(2|S) call
  1357. X            with a TCSETA* command that sets and again clears
  1358. X            the CLOCAL flag    reactivates the    device if there    is
  1359. X            a carrier present at this time.     Without this com-
  1360. X            mand sequence the device would ignore the actual
  1361. X            carrier    and assume that    it is missing after the
  1362. X            first carrier loss.
  1363. X
  1364. X            Additionally, after the    carrier    loss, as long as
  1365. X            the carrier is ignored and assumed to be missing,
  1366. X            the modem enable output    is held    low to prevent the
  1367. X            modem from answering calls.
  1368. X
  1369. X          1 1    This is    a dialin device.  Same as mode `1 0', but a
  1370. X            parallel non-blocking dialout open is possible
  1371. X            while waiting for carrier.
  1372. X
  1373. X          _f _f are the hardware flow control bits as follows:
  1374. X
  1375. X          0 0    The RTSFLOW, CTSFLOW, CRTSFL and ORTSFL    _t_e_r_m_i_o(M)
  1376. X            flags (if available) enable half duplex    (for output
  1377. X            direction, only) or full duplex    (for input and out-
  1378. X            put direction) hardware    flow control according to
  1379. X            SCO's specifications.  If these    flags are not
  1380. X            available no hardware flow control is used by this
  1381. X            device.
  1382. X
  1383. X          0 1    The device uses    full duplex hardware flow control
  1384. X            (for input and output direction).
  1385. X
  1386. X
  1387. X      Rev. Release 2.11.0                         Page 5
  1388. X
  1389. X
  1390. X
  1391. X
  1392. X
  1393. X
  1394. X      FAS(7)            UNIX System    V             FAS(7)
  1395. X
  1396. X
  1397. X
  1398. X          1 0    The device uses    half duplex hardware flow control
  1399. X            (for output direction, only).
  1400. X
  1401. X          1 1    Same as    mode `1    0', but    additionally the output
  1402. X            buffer state is    signaled to the    connected device.
  1403. X
  1404. X          Refer    to the _s_p_a_c_e._c and _f_a_s._h files to determine which
  1405. X          port signals are actually used for modem and hardware
  1406. X          flow control.
  1407. X
  1408. X          _x _x _x    _x
  1409. X            This is    the physical device number.  _F_A_S supports
  1410. X            up to 16 ports.     If you    need more, you should use
  1411. X            an "intelligent" serial    card because more than 16
  1412. X            devices    will eat up too    much CPU time with this
  1413. X            "dumb"-port approach.
  1414. X
  1415. X            In a configuration with    _n UARTs    the valid device
  1416. X            number range would be 0    to _n-1.     The device number
  1417. X            is an index into the _f_a_s__p_o_r_t[]    etc. arrays in
  1418. X            _s_p_a_c_e._c.  Trying to open an unconfigured and there-
  1419. X            fore invalid device gives an ENXIO error.
  1420. X
  1421. X           Note: If    a device is carrier controlled,    this implies the
  1422. X             generation    of a SIGHUP signal with    every carrier
  1423. X             high->low.     This is of course only    true if    the CLOCAL
  1424. X             flag is nnnnooootttt set.
  1425. X
  1426. X             On    my own system I    prefer a minor device number of
  1427. X             0000111100001111xxxxxxxxxxxxxxxx (88880000 + device #) for the non-blocking tty
  1428. X             nodes and 1111111100001111xxxxxxxxxxxxxxxx    (222200008888 + device #) for the blocking
  1429. X             tty nodes.     This gives me the SIGHUP signal on carrier
  1430. X             loss and full duplex hardware flow    control    on both
  1431. X             logical devices.  Dialout while a dialin open is wait-
  1432. X             ing for the carrier is also possible with this setup.
  1433. X             These numbers are the defaults in the _n__f_a_s-* sample
  1434. X             files.
  1435. X
  1436. X      HARDWARE FLOW    CONTROL
  1437. X           _F_A_S supports both full and half duplex hardware flow con-
  1438. X           trol, using the RS232C RRRRTTTTSSSS/CCCCTTTTSSSS control lines (by    default).
  1439. X
  1440. X           Full duplex flow    control    is a method to control character
  1441. X           flow in both input and output directions    while in half
  1442. X           duplex flow control mode    only the output    direction is con-
  1443. X           trolled.
  1444. X
  1445. X           You can select between full and half duplex flow    control    via
  1446. X           the minor device    number of the device.  In full duplex mode
  1447. X           the RRRRTTTTSSSS line controls the input direction and the CCCCTTTTSSSS line
  1448. X           is responsible for the output direction.     In half duplex
  1449. X           mode RRRRTTTTSSSS    tells the connected device whether there is data in
  1450. X           the output buffer (optional), and the CCCCTTTTSSSS line has the same
  1451. X
  1452. X
  1453. X      Rev. Release 2.11.0                         Page 6
  1454. X
  1455. X
  1456. X
  1457. X
  1458. X
  1459. X
  1460. X      FAS(7)            UNIX System    V             FAS(7)
  1461. X
  1462. X
  1463. X
  1464. X           function    as in full duplex mode.
  1465. X
  1466. X         Full duplex mode
  1467. X           As long as the _F_A_S input    buffer hasn't reached a    certain
  1468. X           threshold the RRRRTTTTSSSS line is set high to signal the    connected
  1469. X           device that it may send characters.  If the input buffer
  1470. X           level rises beyond this threshold RRRRTTTTSSSS will go low and the
  1471. X           device is supposed to stop sending characters.  As soon as
  1472. X           there is    sufficient space in the    input buffer RRRRTTTTSSSS will go
  1473. X           high again and the character flow may continue.
  1474. X
  1475. X           The CCCCTTTTSSSS line works the other way    round.    If the connected
  1476. X           device sets CCCCTTTTSSSS to high the _F_A_S character output    is enabled.
  1477. X           If CCCCTTTTSSSS is low, the output is stopped.  There is a special
  1478. X           feature for the CCCCTTTTSSSS part    of the handshake.  CCCCTTTTSSSS is only
  1479. X           looked at if the    DDDDSSSSRRRR line is high.  If DDDDSSSSRRRR is low or not
  1480. X           connected, hardware output handshake is disabled, that is,
  1481. X           _F_A_S sends characters regardless of the state of CCCCTTTTSSSS.
  1482. X
  1483. X           This has    two advantages.     At first, if you switch off a
  1484. X           serial device connected to an _F_A_S port with hardware flow
  1485. SHAR_EOF
  1486. true || echo 'restore of fas.7.cat failed'
  1487. fi
  1488. echo 'End of  part 3'
  1489. echo 'File fas.7.cat is continued in part 4'
  1490. echo 4 > _shar_seq_.tmp
  1491. exit 0
  1492.