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