send_text
Send ASCII commands to a serial device, optionally clearing buffered input for a clean next read. Use this to control network gear, radios, or microcontrollers via serial console.
Instructions
Send an ASCII command to the device. Writes to TX only; does NOT read.
On an interactive console the device will ECHO this text back and then print
its output; call read_until_prompt (or read_available) afterward to see it.
Use clear_buffer_first=True to discard any stale/unsolicited output so the
next read starts clean.
Args: data: The command text, e.g. "show version", "FA014250000", or "ID". Non-ASCII characters are sent as "?"; use send_hex for raw bytes. line_ending: What to append — "CR" (\r, most rigs), "CRLF" (\r\n), "LF" (\n, most Unix-style consoles), or "NONE". Default: the connection's line ending (from connect or its preset). clear_buffer_first: Discard buffered RX before sending. connection: Which open connection (name). Default: the current one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| connection | No | ||
| line_ending | No | ||
| clear_buffer_first | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |