<div class="meta" robots="noindex">

</div>

Class

# SerialPort

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `SerialDevice</api/hardware/serialdevice>` as a replacement.

</div>

## Description

Used to get the properties of any serial port.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                            | Type                               | Read-Only | Shared |
|-------------------------------------------------|------------------------------------|-----------|--------|
| `InputDriverName<serialport.inputdrivername>`   | `String</api/data_types/string>`   | ✓         |        |
| `MaximumSpeed<serialport.maximumspeed>`         | `Integer</api/data_types/integer>` | ✓         |        |
| `Name<serialport.name>`                         | `String</api/data_types/string>`   | ✓         |        |
| `OutputDriverName<serialport.outputdrivername>` | `String</api/data_types/string>`   | ✓         |        |
| `RatedSpeed<serialport.ratedspeed>`             | `Integer</api/data_types/integer>` | ✓         |        |

## Property descriptions

<div id="serialport.inputdrivername">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

SerialPort.InputDriverName

**InputDriverName** As `String</api/data_types/string>`

The name of the input driver.

This property is read-only.

This example gets the name of serial device 0.

``` xojo
TextField1.Text = System.SerialPort(0).InputDriverName
```

<div id="serialport.maximumspeed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

SerialPort.MaximumSpeed

**MaximumSpeed** As `Integer</api/data_types/integer>`

The maximum speed (baud).

This property is read-only.

This example reads the maximum speed of the serial device at port 0.

``` xojo
TextArea1.Text = Str(System.SerialPort(0).MaximumSpeed)
```

<div id="serialport.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

SerialPort.Name

**Name** As `String</api/data_types/string>`

The name of the serial port.

This property is read-only.

This example gets the name of serial device 0.

``` xojo
TextArea1.Text = System.SerialPort(0).Name
```

<div id="serialport.outputdrivername">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

SerialPort.OutputDriverName

**OutputDriverName** As `String</api/data_types/string>`

The name of the output driver.

This property is read-only.

This example gets the name of the output drive for serial device 0.

``` xojo
TextArea1.Text = System.SerialPort(0).OutputDriverName
```

<div id="serialport.ratedspeed">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

SerialPort.RatedSpeed

**RatedSpeed** As `Integer</api/data_types/integer>`

The rated speed (baud).

This property is read-only.

This example reads the rated speed of serial device 0.

``` xojo
TextArea1.Text = Str(System.SerialPort(0).RatedSpeed)
```

## Sample code

See the example for the `System</api/os/system>` module. You get the values of <span class="title-ref">SerialPort</span> properties by accessing the properties of the `System</api/os/system>` module. For example,

``` xojo
TextField1.Text = System.SerialPort(0).InputDriverName
```

## Compatibility

All project types on all supported operating systems.

## See also

`Object</api/data_types/additional_types/object>` parent class; `SerialConnection</api/hardware/serialconnection>` class; `System</api/os/system>` module, `Connecting to a Serial Device</getting_started/tutorials/connecting_to_a_serial_device>`
