send_command
Send a command to a serial device and capture its reply, allowing control of firmware command shells over UART.
Instructions
Send command to the device and capture its reply.
Writes the command (plus a line ending) to the port, then listens for the
response for reply_seconds. Use this to drive a firmware's command shell
(CLI over UART) — e.g. send "status" and read what comes back.
Args: port: Serial port name. command: The text to send (line ending added automatically). baudrate: Bits per second (default 115200). reply_seconds: How long to wait for the reply. Capped at 30s. line_ending: Appended to the command. "\n", "\r\n" or "" .
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| command | Yes | ||
| baudrate | No | ||
| line_ending | No | ||
| reply_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||