open_port
Configure and open a serial port for RS232 communication with adjustable baud rate, parity, stop bits, data bits, and timeout.
Instructions
Open a serial port connection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | The name of the port (e.g., "COM1", "/dev/ttyUSB0"). | |
| baud_rate | No | The baud rate for communication (default: 9600). | |
| parity | No | Parity mode - "none", "even", "odd", "mark", "space" (default: "none"). | none |
| stop_bits | No | Number of stop bits - 1, 1.5, or 2 (default: 1). | |
| data_bits | No | Number of data bits - 5, 6, 7, or 8 (default: 8). | |
| timeout | No | Read timeout in seconds (default: 1.0). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |