设置 DTR/RTS 控制线
set_dtr_rtsSets serial DTR/RTS control-line levels and can pulse a line for Arduino reset or step ESP32 download-mode timing, leaving unspecified lines unchanged.
Instructions
设置串口 DTR/RTS 调制解调控制线电平。未传的线保持不动。pulse_ms>0 时先设为给定值、保持该时长后自动反转(一次完成"拉低→放高"之类的复位时序,如 Arduino 自动复位)。需要多拍精确时序(如 ESP32 进下载模式)时,可分多次调用本工具逐拍设置。返回最终 dtr/rts 电平。
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": {
"connection_id": "<connection_id>"
},
"name": "set_dtr_rts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dtr | No | DTR 电平,true=assert;省略则不动 | |
| rts | No | RTS 电平,true=assert;省略则不动 | |
| pulse_ms | No | 设置后保持的毫秒数,届时反转(复位时序) | |
| connection_id | Yes | 连接 ID(由 open 返回) |