setup_connection
Add a serial, TCP, or UDP connection. Provide host, port, or path to connect and begin device scanning.
Instructions
添加通讯连接。用户通过对话告知通讯方式后调用此工具。支持三种类型:serial(串口,需提供 path 如 COM3)、tcp(TCP透传,需提供 host 和 port)、udp(UDP透传,需提供 host 和 port)。添加后自动连接,可用于后续设备扫描。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | 设备/网关 IP 地址(仅 type=tcp/udp 时需要),如 192.168.1.100 | |
| path | No | 串口路径(仅 type=serial 时需要),如 COM3、COM4、/dev/ttyUSB0 | |
| port | No | 设备/网关端口号(仅 type=tcp/udp 时需要),如 8080 | |
| type | Yes | 通讯方式:serial=串口/UART, tcp=TCP透传, udp=UDP透传 | |
| baudRate | No | 波特率(仅 type=serial),默认 9600 |