Home
> Commands A-M
> Commands M
MODE (Configure Serial Port)
Description
| Syntax
| Parameters
| Switches
| Related
| Notes
| Examples
| Errorlevels
| Availability
Configures a serial communications port.
This version of the MODE command sets the parameters for a
serial port (COM1, COM2, COM3, or COM4).
Syntax
MODE
/?
MODE
COMn[:]
[b[,p[,d[,s[,r]]]]]
MODE
COMn[:]
[BAUD=b]
[PARITY=p]
[DATA=d]
[STOP=s]
[RETRY=r]
[dtr=ON | OFF | HS]
[idsr=ON | OFF]
[octs=ON | OFF]
[odsr=ON | OFF]
[rts=ON | OFF | HS | TG]
[to=ON | OFF]
[xon=ON | OFF]
Parameters
- b
(v1.1)
- BAUD=b
(v4.0
Win95
NT3.1)
- Specifies the first two digits of the transmission rate in bits
per second. The list shows each valid value for b and
its related rate:
- 11 110
- 15 150
- 30 300
- 60 600
- 12 1200
- 24 2400
- 48 4800
- 96 9600
- 19 19,200
The b value of 19 is not supported on all computers (check
your hardware manual). You can abbreviate this parameter by
omitting BAUD= and specifying a value for b.
- COMn[:]
(v1.1
Win95
NT3.1)
- Specifies the number of the serial (COM) port.
Valid values for m are in the range 1 through 4.
- If you omit any of the five parameters, MODE uses
the most recent setting for the omitted parameter. If you are
using the shorter form of the syntax (without the words BAUD=,
PARITY=, DATA=, and so on), the MODE command "recognizes" the
parameters by their positions. Thus, if you do not specify a
value for a parameter, you must still type the comma that
precedes the next parameter.
- d
(v1.1)
- DATA=d
(v4.0
Win95
NT3.1)
- Specifies the number of data bits in a character.
- 5 (not supported by all computers)
- 6 (not supported by all computers)
- 7 default
- 8
You can abbreviate this parameter by omitting DATA= and
specifying a value for d.
- dtr=ON | OFF | HS
(NT3.1)
- Specifies whether the Data Terminal Ready (DTR) circuit
is on or off, or set to handshake.
- dtr=ON | OFF | HS
(NT3.5)
- Specifies whether the Data Terminal Ready (DTR) circuit
is on or off.
- idsr=ON | OFF
(NT3.1)
- Specifies whether the DSR circuit sensitivity is on or off.
- octs=ON | OFF
(NT3.1)
- Specifies whether output handshaking that uses the
Clear To Send (CTS) circuit is on or off.
- odsr=ON | OFF
(NT3.1)
- Specifies whether output handshaking that uses the
Data Set Ready (DSR) circuit is on or off.
- p
(v1.1)
- PARITY=p
(v4.0
Win95
NT3.1)
- Specifies how the system uses the parity bit to check for
transmission errors. The p value can be one of:
- N (none)
- E (even), default
- O (odd)
- M (mark), not supported by all computers
- S (space), not supported by all computers
You can abbreviate this parameter by omitting PARITY= and
specifying a value for p.
- r
(v1.1)
- RETRY=r
(v4.0
Win95)
- Specifies the retry action to take if a time-out error occurs
when MODE attempts to send output to a serial printer. This
parameter causes part of MODE to remain resident in memory. The
list shows each valid value for r and a brief
description of its meaning:
- B Return "busy" from a status check of a busy port. The RETRY=B setting provides the same support as the P parameter did in previous versions of DOS
- E Return an error from a status check of a busy port
- N Take no retry action (default value). You can also specify none for this value
- P Continue retrying until printer accepts output
- R Return "ready" from a status check of a busy port
If you are using the MODE command over a network, do not use
any of the r values. You can abbreviate this parameter by
simply omitting RETRY= and specifying a value for r.
- rts=ON | OFF | HS | TG
(NT3.1)
- Specifies whether the Request To Send (RTS) circuit
is set to on, off, handshake, or toggle.
- s
(v1.1)
- STOP=s
(v4.0
Win95
NT3.1)
- Specifies the number of stop bits that define the end of a
character:
- 1 default, when NOT 110 baud
- 1.5 (not supported by all computers)
- 2 default, when 110 baud
You can abbreviate this parameter by omitting STOP= and
specifying a value for s.
- to=ON | OFF
(NT3.1)
- Specifies whether infinite time-out processing is
on or off. The default is off.
- xon=ON | OFF
(NT3.1)
- Specifies whether the xon or xoff protocol for
data-flow control is on or off.
Switches
- /?
(NTXP)
- Displays help.
Related
MODE - Configure Printer.
MODE - Display Device Status.
MODE - Redirect Printing.
MODE - Set Device Code Pages.
MODE - Set Display Mode.
MODE - Set Typematic Rate.
Notes
none.
Examples
none.
Errorlevels
none.
Availability
- External
-
- DOS
-
v1.0
v1.05
v1.1
v1.11
v1.24
v1.25
v1.85
v2.0
v2.01
v2.05
v2.10
v2.11
v2.11R
v2.12
v2.2
v2.25
v3.0
v3.20
v3.05
v3.1
v3.21
v3.25
v3.30
v3.3A
v3.3R
v3.3T
v3.31
v3.40
v4.0
v4.01
v4.01A
v5.0
v5.0A
v5.00.02
v5.001A
v5.01
v5.02
v6.0
v6.10
v6.2
v6.21
v6.22
v6.23
v7.00
v7.0R1
v7.10
v8.00
- Windows
-
Win95
Win98
WinME
- Windows NT
-
NT3.1
NT3.5
NT3.51
NT4
NT2000
NTXP
NT2003
Last Updated: 2006/12/01
Direct corrections or suggestions to:
Rick Lively