home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / fas-2.12.0 / part03 < prev    next >
Text File  |  1994-01-25  |  61KB  |  1,491 lines

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