read_serial_logs
Open a serial port, capture device logs for a set timeout, and automatically extract MCU crash dumps like backtraces to debug firmware failures.
Instructions
Open a serial port and read stdout/logs for timeout_sec seconds.
Automatically detects MCU crash dumps (e.g., ESP32 Guru Meditation Error, Brownout detector, Backtrace, HardFault) and extracts them for debugging.
Args: port: Serial port path (e.g., '/dev/ttyUSB0', '/dev/ttyACM0', 'COM3'). baudrate: Baud rate (default 115200). timeout_sec: Maximum duration in seconds to listen (default 5.0, max 60.0). max_lines: Maximum number of lines to collect before stopping. stop_on_pattern: Optional regex or substring to stop reading early when matched. stop_on_crash_dump: Whether to finish reading shortly after detecting a crash dump. reset_before_read: Pulse DTR/RTS to reset the board right after opening the port.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| baudrate | No | ||
| max_lines | No | ||
| timeout_sec | No | ||
| stop_on_pattern | No | ||
| reset_before_read | No | ||
| stop_on_crash_dump | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||