baudrate_autodetect
Detect a serial port's baud rate by sampling candidates, scoring output for readable logs, and recommending a likely setting; use log_text for offline scoring.
Instructions
自动探测波特率:逐档打开串口采样,按"最像正常日志"评分排序并给推荐。 log_text 提供现成日志样本时走离线评分(不占串口)。设备静默时会提示先复位再扫。
★USB CDC 口(ESP32-S3 原生 USB、RP2040 等)上波特率不参与数据路径,本工具会 直接短路说明,不给排序——在那种口上"各档评分"只是同一批字节被反复读。 确需强行扫(例如怀疑枚举成 CDC 但实际是 UART 桥)时显式传 candidates, 如 candidates=[115200, 9600]。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | ||
| log_text | No | ||
| sample_s | No | ||
| candidates | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |