read_for_duration
Read all incoming serial data for a set duration, collecting bytes with optional encoding. Specify port, time, and max bytes to capture.
Instructions
Read all data from serial port for a specified duration.
Continuously reads data for the specified time period, collecting all received bytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port_id | Yes | The port identifier | |
| duration | Yes | Time to read in seconds | |
| max_bytes | No | Maximum bytes to collect | |
| encoding | No | Encoding for output (or 'raw' for hex only) | utf-8 |