serial_read
Read buffered data from a serial port session, returning all received data since the last read. Waits up to a specified timeout if no new data is available.
Instructions
Read all buffered data from the serial port.
Returns everything received since the last read, then advances the cursor. If no new data is available, waits up to timeout seconds for data to arrive.
For most interactions, prefer serial_command() which writes and reads in one step. Use serial_read() when passively monitoring or after a manual serial_write().
Args: session_id: Port name of the session to read from. Optional if only one session is open. timeout: Seconds to wait for data if buffer is empty encoding: Character encoding for decoding the data
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| encoding | No | utf-8 | |
| session_id | No |