Serial Open
serial_openOpen a PlatformIO device monitor session on a serial port to capture device output; returns a session ID for reads and closing, and holds the port until closed.
Instructions
Open a pio device monitor session reading from port.
Needs PlatformIO and MESHTASTIC_FIRMWARE_ROOT. The session holds the port until
serial_close, so the admin tools cannot use it meanwhile. Returns {session_id, resolved_baud, resolved_filters, env}: the session_id for serial_read /
serial_close, plus the baud and filters pio resolved.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"port": "<port>"
},
"name": "serial_open"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | A PlatformIO env whose `monitor_speed` and `monitor_filters` pio takes from platformio.ini, which turns on the ESP32 exception decoders for firmware debugging. | |
| baud | No | Line speed, used without `env`. | |
| port | Yes | The serial port to read. | |
| filters | No | Monitor filters, used without `env`: default ["direct"]; others are time, hexlify, esp32_exception_decoder, esp32_c3_exception_decoder, log2file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||