set_config
Dynamically update serial port configuration without closing the connection, adjusting baud rate, parity, data bits, stop bits, flow control, and timeouts.
Instructions
修改已打开串口的配置(热更新,无需关闭重开)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | Yes | 串口路径 | |
| baudrate | No | 波特率,支持的值:[300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600] | |
| bytesize | No | 数据位,支持的值:[5, 6, 7, 8] | |
| parity | No | 校验位,支持的值:['N', 'E', 'O', 'M', 'S'] | |
| stopbits | No | 停止位,支持的值:[1.0, 1.5, 2.0] | |
| flow_control | No | 流控制,支持的值:['none', 'hardware', 'software'] | |
| read_timeout_ms | No | 读取超时(毫秒),范围 0-60000 | |
| write_timeout_ms | No | 写入超时(毫秒),范围 0-60000 |