create_serial_session
Open a serial port session for device communication over /dev/tty or /dev/cu paths, with configurable baud rate and optional log file output.
Instructions
Open a serial port session. Device path must start with /dev/tty or /dev/cu. (e.g. /dev/ttyUSB0, /dev/cu.usbserial-XXXX)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | Serial device path (must start with /dev/tty or /dev/cu.) | |
| log_file | No | File path to append all session output. File is created if it doesn't exist. | |
| baud_rate | No | Baud rate (default: 9600) | |
| log_max_size | No | Max log file size in MB before rotation (0 = no rotation, default: 0) | |
| log_max_files | No | Max number of rotated log files to keep (default: 3) |