sermode

Syntax

sermode[handle[baudrate parity databits stopbits]]

Description

Sets serial port attributes.

Options

handle

Specifies a device handle for a serial port in hexadecimal format. To retrieve this information, use the dh command.

baudrate

Specifies a baud rate. Valid values are 50, 75, 110, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600 (default), 19200, 38400, 57600, 115200, 230400, and 460800. All other values will be converted to the next highest setting.

parity

Sets parity bit settings for specified serial port.

  • d—Default parity

  • n—No parity

  • e—Even parity

  • o—Odd parity

  • m—Mark parity

  • s—Space parity

databits

Specifies the number of data bits. Valid values are 4. 7, and 8 (default).

stopbits

Specifies the number of stop bits. Valid values are 0 (0 stop bits - default setting); 1 (1 stop bit); 2 (2 stop bits; and 15 (1.5 stop bits).

Examples

To display the settings for all serial port devices:

 Shell> sermode
      

To display the settings for the serial port device with the handle 0x6B:

Shell> sermode 6B
      

To configure the serial port settings for handle 0x6B to 9600bps, even parity, 8 data bits, and 1 stop bit:

Shell> sermode 6B 9600 e 8 1