Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sbin / i386 / cxconfig / cxconfig.8
1 .\" $FreeBSD: src/sbin/i386/cxconfig/cxconfig.8,v 1.5.2.4 2001/08/16 11:35:43 ru Exp $
2 .Dd December 2, 1994
3 .Dt CXCONFIG 8
4 .Os
5 .Sh NAME
6 .Nm cxconfig
7 .Nd channel options management utility for Cronyx-Sigma adapter
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl a
11 .Op Ar <channel> Op Ar <option>...
12 .Sh DESCRIPTION
13 The
14 .Nm
15 utility is used for configuring the channel options of
16 the Cronyx-Sigma adapter.
17 .Pp
18 To change channel options the channel should be free: the corresponding
19 network interface in ``down'' state, the asynchronous terminal device
20 .Pa /dev/tty*
21 closed.
22 Generally, the channel options are set up during the operating
23 system startup, for example from the
24 .Pa /etc/rc
25 file.
26 .Pp
27 Note, that not all options have a sense for every particular
28 case, and an attempt to set some of them can hang up the channel or
29 the whole adapter.
30 .Pp
31 The following option is available:
32 .Bl -tag -width indent
33 .It Fl a
34 Display full information.
35 .El
36 .Sh "Channel options"
37 .Bl -tag -width 10n
38 .It ispeed=#
39 Set the receiver baud rate to the number given.
40 The maximal value is 256000 bits/sec.
41 In the synchronous mode the receiver baud rate is significant
42 only when DPLL mode is used.
43 .It ospeed=#
44 Set the transmitter baud rate to the number given.
45 The maximal value is 256000 bits/sec.
46 In the synchronous mode the transmitter baud rate is significant
47 only in the case of the internal clock source.
48 If receiver and transmitter have equal data rate, then it could
49 be set by specifying only the numerical argument.
50 .It async
51 Set the asynchronous channel mode.
52 .It "hdlc, bisync, bsc, x.21, x21
53 Set the synchronous channel mode: HDLC, Bisync (BSC) or X.21.
54 .It ppp
55 Set the link-level protocol: PpP/HDLC.  The built-in simplified synchronous PPP
56 implementation is used (see RFC-1548, RFC-1549).
57 .It cisco
58 Set the link-level protocol: Cisco/HDLC (see RFC-1547).
59 This protocol is intended for compatibility with old models of Cisco routers,
60 and with early versions of
61 .Tn BSD/386
62 drivers.
63 The extensive usage of this protocol is not recommended.
64 .It ext
65 Use the external link-level protocol suite (for
66 .Tn BSD/386
67 only).
68 .It "+keepalive, -keepalive"
69 Enable the automatic line state control sub-protocol.
70 This setting is not significant when the external link-level protocol is used.
71 .It "+autorts, -autorts"
72 Enable the automatic RTS signal control.
73 When enabled, the RTS signal goes up only when both halves of
74 the receiver ring buffer are free and ready for receive,
75 and goes down when one or both buffers are busy.
76 .It "port=rs232, port=rs449, port=v35
77 Set the zero channel hardware interface type.
78 .El
79 .Sh "Common options"
80 .Bl -tag -width 10n
81 .It "nrz, nrzi, manchester"
82 Set the data line signal encoding.
83 In the case of
84 .Em NRZ
85 encoding the zero bit is transmitted by the zero signal
86 level, the one bit - by the positive signal level.
87 In the case of
88 .Em NRZI
89 encoding the zero bit is transmitted by the change of
90 the signal level, the one bit - by the constant signal level.
91 In the case of
92 .Em Manchester
93 encoding the zero bit is encoded as 01 value,
94 the one bit - as 10 value.
95 .It "+dpll, -dpll"
96 Enable the digital phase locked loop mode (DPLL).
97 When enabled, the receiver timing clock signal
98 is derived from the received data.
99 .It "+lloop, -lloop"
100 Set the local loopback mode.
101 .It "+extclock, -extclock"
102 Set the timing clock source of synchronous channels.  There are
103 two possible variants:
104 .Em "external clock"
105 source or
106 .Em "internal clock"
107 generation.
108 .Pp
109 .Em "External clock"
110 mode is the most common method for connecting
111 external modem hardware.  In this mode the external timing
112 signal is received on TXCIN pin of the connector, and it is
113 used as a synchronization clock for transmitting data (TXD).
114 .Pp
115 In the case of
116 .Em "internal clock"
117 mode the transmitted data (TXD)
118 are synchronized using the internal on-board timing generator,
119 the internally generated timing signal is driven on the TXCOUT
120 pin, and the signal on the TXCIN pin is ignored.  This mode
121 is used for direct terminal-to-terminal communication,
122 e.g. for connecting two computers together in a synchronous mode
123 via relatively short cable.  This method should also be used
124 for testing channels with an external loopback connector.
125 .It fifo=#
126 FIFO threshold level setup for receiver and transmitter.
127 .It rfifo=#
128 Hardware RTS/CTS flow control FIFO threshold setup.
129 .It "+ctsup, -ctsup"
130 Enable/disable interrupts on CTS (Clear To Send) signal setup (0 to 1 transition).
131 .It "+ctsdown, -ctsdown"
132 Enable/disable interrupts on CTS (Clear To Send) signal clear (1 to 0 transition).
133 .It "+cdup, -cdup"
134 Enable/disable interrupts on CD (Carrier Detect) signal setup (0 to 1 transition).
135 .It "+cddown, -cddown"
136 Enable/disable interrupts on CD (Carrier Detect) signal clear (1 to 0 transition).
137 .It "+dsrup, -dsrup"
138 Enable/disable interrupts on DSR (Data Set Ready) signal setup (0 to 1 transition).
139 .It "+dsrdown, -dsrdown"
140 Enable/disable interrupts on DSR (Data Set Ready) signal clear (1 to 0 transition).
141 .El
142 .Sh "Asynchronous mode options"
143 .Bl -tag -width 10n
144 .It cs#
145 Select character size: 5, 6, 7 or 8 bits.
146 .It "parodd, pareven
147 Parity mode: odd or even.
148 .It "+ignpar, -ignpar
149 Disable/enable parity detection.
150 .It nopar
151 Disable parity bit generation.
152 .It forcepar
153 Force parity: even - 0, odd - 1.
154 .It "stopb1, stopb1.5, stopb2
155 Use 1 or 1.5 or 2 stop bits per character.
156 .It "+dsr, -dsr"
157 Use the DSR input signal as receiver enable/disable.
158 .It "+cts, -cts"
159 Use the CTS input signal as transmitter enable/disable.
160 .It "+rts, -rts"
161 Drive the RTS output signal as transmitter ready.
162 .It "+rloop, -rloop"
163 Set the remote loopback mode.
164 .It "+etc, -etc"
165 Enable the embedded transmit commands mode.
166 .It "+ixon, -ixon"
167 Enable the hardware XON/XOFF flow control support.
168 .It "+ixany, -ixany"
169 Use the hardware IXANY mode support.
170 .It "+sdt, -sdt"
171 Detect the spec. characters SCHR1 and SCHR2 in the receive data.
172 .It "+flowct, -flowct"
173 Receive the flow control spec. characters as data.
174 .It "+rdt, -rdt"
175 Detect the spec. characters in range SCRL..SCRH in the receive data.
176 .It "+exdt, -exdt"
177 Detect the spec. characters SCHR3 and SCHR4 in the receive data.
178 .It "parintr, parnull, parign, pardisc, parffnull
179 Action on parity errors:
180 .Pp
181 .Bl -tag -width parffnullxxx -compact
182 .It Mode
183 Action
184 .It parintr
185 Generate the receiver error interrupt
186 .It parnull
187 Input the NUL character
188 .It parign
189 Ignore the error, receive as good data
190 .It pardisc
191 Ignore the character
192 .It parffnull
193 Input the sequence <0xFF, NUL, character>
194 .El
195 .It "brkintr, brknull, brkdisc
196 Line break state action:
197 .Pp
198 .Bl -tag -width parffnullxxx -compact
199 .It Mode
200 Action
201 .It brkintr
202 Generate the receiver error interrupt
203 .It brknull
204 Input the NUL character
205 .It brkdisc
206 Ignore the line break state
207 .El
208 .It "+inlcr, -inlcr"
209 Translate received NL characters to CR.
210 .It "+icrnl, -icrnl"
211 Translate received CR characters to NL.
212 .It "+igncr, -igncr"
213 Ignore received CR characters.
214 .It "+ocrnl, -ocrnl"
215 Translate transmitted CR characters to NL.
216 .It "+onlcr, -onlcr"
217 Translate transmitted NL characters to CR.
218 .It "+fcerr, -fcerr"
219 Process (don't process) the characters, received with errors,
220 for special character/flow control matching.
221 .It "+lnext, -lnext"
222 Enable the LNEXT character option: the character following
223 the LNEXT character is not processed for special character/flow
224 control matching.
225 .It "+istrip, -istrip"
226 Strip input characters to seven bits.
227 .It schr1=#
228 The XON flow control character value.
229 .It schr2=#
230 The XOFF flow control character value.
231 .It schr3=#
232 The SCHR3 spec. character value.
233 .It schr4=#
234 The SCHR4 spec. character value.
235 .It "scrl=#, scrh=#
236 The spec. character range (inclusive).
237 .It lnext=#
238 The LNEXT spec. character value.
239 .El
240 .Sh "HDLC mode options"
241 .Bl -tag -width 10n
242 .It if#
243 The minimum number of flags transmitted before a frame is started.
244 .It noaddr
245 No frame address recognition.
246 .It "addrlen1, addrlen2"
247 Address field length: 1 or 2 bytes.
248 .It "addr1, addr2"
249 Addressing mode: 4x1 bytes or 2x2 bytes.
250 Registers RFAR1..RFAR4 should contain the address to be matched.
251 .It "+clrdet, -clrdet"
252 Enable/disable clear detect for X.21 protocol support.
253 .It "+dsr, -dsr"
254 Use the DSR input signal as receiver enable/disable.
255 .It "+cts, -cts"
256 Use the CTS input signal as transmitter enable/disable.
257 .It "+rts, -rts"
258 Drive the RTS output signal as transmitter ready.
259 .It "+fcs, -fcs"
260 Enable/disable the frame checksum generation and checking.
261 .It "crc-16, crc-v.41
262 Select the CRC polynomial: CRC-16 (x^16+x^15+x^2+1)
263 or CRC V.41 (x^16+x^12+x^5+1).
264 .It "fcs-crc-16, fcs-v.41
265 Frame checksum preset: all zeros (CRC-16) or all ones (CRC V.41).
266 .It "+crcinv, -crcinv"
267 Invert (ie. CRC V.41) or don't invert (ie. CRC-16) the transmitted frame checksum.
268 .It "+fcsapd, -fcsapd"
269 Pass the received CRC to the host at the end of receiver data buffer.
270 .It "idlemark, idleflag
271 Idle mode: idle in mark (transmit all ones) or idle in flag (transmit flag).
272 .It "+syn, -syn"
273 Enable/disable sending pad characters before sending flag when coming out
274 of the idle mode.
275 .It pad#
276 The number of synchronous characters sent (0..4).
277 .It "syn=0xaa, syn=0x00
278 Send sync pattern.
279 .It "rfar1=#, rfar2=#, rfar3=#, rfar4=#
280 Frame address registers for address recognition.
281 .El
282 .Sh EXAMPLES
283 Set up the channel 7 of the adapter Sigma-400 under
284 .Fx .
285 Physical 4-wire leased line with Zelax+ M115 short-range modems.
286 Synchronous mode, 128000 bits/sec, interface RS-232,
287 protocol PpP/HDLC without keepalive support, NRZI encoding,
288 DPLL mode, no flow control:
289 .Bd -literal
290 cxconfig cx7 128000 hdlc ppp -keepalive nrzi -cts +dpll -extclock
291 ifconfig cx7 158.250.244.2 158.250.244.1 up
292 .Ed
293 .Pp
294 Set up the channel 0 of the adapter Sigma-100 under
295 .Fx .
296 Attachment to the near computer by short cable, internal clock source.
297 Synchronous mode, 256000 bits/sec, interface RS-232,
298 protocol Cisco/HDLC with keepalive support:
299 .Bd -literal
300 cxconfig cx0 hdlc 256000 cisco +keepalive -extclock
301 ifconfig cx0 200.1.1.1 200.1.1.2 up
302 .Ed
303 .Pp
304 Set up the channel 1 of the adapter Sigma-840 under
305 .Tn BSD/386 .
306 Synchronous 64 kbit/sec leased line, external clock source.
307 Synchronous mode, interface V.35, external protocol suite:
308 .Bd -literal
309 cxconfig cx1 hdlc ext
310 ifconfig cx1 193.124.254.50 193.124.254.49 multicast up
311 .Ed
312 .Pp
313 Set up the channel 0 of the adapter Sigma-840 under
314 .Fx .
315 Attachment to the Cisco-4000 router by null-modem cable, internal clock source.
316 Synchronous mode, 64000 bits/sec, interface RS-232,
317 protocol PpP/HDLC with keepalive support and flow control,
318 LCP and IPCP protocols (see RFC-1548 and RFC-1332) debug tracing enabled:
319 .Bd -literal
320 cxconfig cx0 hdlc 64000 port=rs232 ppp +keepalive -extclock +cts
321 ifconfig cx0 100.0.0.2 100.0.0.1 debug up
322 .Ed
323 .Sh FILES
324 .Bl -tag -width /dev/cronyx -compact
325 .It Pa /dev/cronyx
326 the special device file for adapter options management
327 .El
328 .Sh SEE ALSO
329 .Xr cx 4