serial_exchange
Execute a command on an embedded board via serial: temporarily lease it, send the request, wait for the expected prompt or silence, strip the echo, and restore the previous lease state.
Instructions
Atomic composite command execution:
Acquires lease temporarily if not already held.
Transmits command with newline.
Waits for expected prompt or output silence.
Automatically strips echo.
Cleanly restores previous lease state.
Args: board_id: The identifier of the board (e.g. 'board_a') request: Command to execute (e.g. 'help' or 'status') timeout_ms: Maximum duration in milliseconds to wait for reply (default: 1000) expected_prompt: Optional prompt to wait for (e.g. '> ' or 'shell#')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | ||
| board_id | Yes | ||
| timeout_ms | No | ||
| expected_prompt | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |