pio_port_diagnose
Identify why a serial port is unusable before or after a failed upload: check existence, monitor locks, competing processes, permissions, and list concrete fixes.
Instructions
Explain why a serial port is unusable before or after a failed upload: whether it exists, whether one of our monitor sessions holds it, which other process has it open (lsof/fuser on macOS and Linux), and read/write permission, plus the concrete fix. Port defaults from platformio.ini or the single detected board. Reports only; it never closes anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| port | No | ||
| project_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||