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.5)
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: 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.5)
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.5)
Specifies the number of data bits in a character. You can abbreviate this parameter by omitting DATA= and specifying a value for d.
dtr=ON | OFF | HS (NT3.5)
Specifies whether the Data Terminal Ready (DTR) circuit is on or off, or set to handshake.
idsr=ON | OFF (NT3.5)
Specifies whether the DSR circuit sensitivity is on or off.
octs=ON | OFF (NT3.5)
Specifies whether output handshaking that uses the Clear To Send (CTS) circuit is on or off.
odsr=ON | OFF (NT3.5)
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.5)
Specifies how the system uses the parity bit to check for transmission errors. The p value can be one of: 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: 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.5)
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.5)
Specifies the number of stop bits that define the end of a character: You can abbreviate this parameter by omitting STOP= and specifying a value for s.
to=ON | OFF (NT3.5)
Specifies whether infinite time-out processing is on or off. The default is off.
xon=ON | OFF (NT3.5)
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.5 NT4 NT2000 NTXP NT2003