open_port
Open a serial port with custom settings (baud rate, parity, flow control) and obtain a port ID for subsequent read/write operations.
Instructions
Open a serial port with the specified configuration.
Returns a port_id that must be used for all subsequent operations on this port.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | Serial port path (e.g., /dev/ttyUSB0, COM3) | |
| baud_rate | No | Communication speed | |
| data_bits | No | Data bits per byte (5, 6, 7, or 8) | |
| parity | No | Parity checking: none, even, odd, mark, or space | none |
| stop_bits | No | Stop bits: 1, 1.5, or 2 | |
| timeout | No | Read timeout in seconds | |
| rtscts | No | Enable hardware RTS/CTS flow control | |
| xonxoff | No | Enable software XON/XOFF flow control |