Skip to content

Releases: woooooooooolf/ser2mcp

ser2mcp V0.3.0

Choose a tag to compare

@github-actions github-actions released this 04 Aug 11:43
2e136b3

Added

  • 事件驱动/非阻塞读线程 src/reader.rs(平台适配层):Unix(Linux/macOS)基于 poll(2) 与自建管道实现事件驱动,停止时可即时唤醒;Windows 采用 1ms 轮询 + bytes_to_read() 门控 + timeBeginPeriod(1),仅在数据就绪时执行 read()。读写延迟不再受读超时参数影响

Changed

  • 默认 read_timeout_ms 由 10ms 调整为 500ms:新读线程模型下该参数仅作为 read() 的安全上限(用于检测异常超时),不影响读写延迟,可兼容板端命令执行时间较长的场景
  • uart_close 延迟由 ~116ms 降至 ~1.4ms(事件等待可被停止令牌中断);uart_write 净开销中位降至 ~0.4ms

Fixed

  • 修复 Windows USB 转串口驱动按读超时边界成批交付数据导致的延迟尖峰(该现象基于 CH340 与 CP210x 两款芯片实测确认,其他芯片未逐一验证):read_timeout_ms=1000 时读写往返不再呈 ~1s 整数倍,COM9 回环中位延迟 59ms,与默认配置一致(优化前为 2966ms)

ser2mcp V0.2.2

Choose a tag to compare

@github-actions github-actions released this 04 Aug 10:07

Changed

  • 默认 read_timeout_ms 由 100ms 调整为 10ms。实测表明(样本:CH340 与 CP210x 两款芯片,其他芯片未逐一验证),Windows 下此类 USB 转串口驱动对阻塞读按超时边界成批交付数据,调小该值可显著降低 uart_read / uart_exchange 延迟:1000ms 时延迟呈 ~1s 整数倍,10ms 时与直连串口相当

Added

  • 延迟探针示例 examples/latency_probe.rs:通过真实 MCP 协议测量各工具延迟,支持 bench(读写往返压测)与 benchw(纯写入路径),便于复测与参数对比

Docs

  • README 补充 Windows USB 转串口延迟说明与调优指引(read_timeout_ms / idle_ms),提醒 AI 工具在实际使用中按需调整

ser2mcp V0.2.1

Choose a tag to compare

@github-actions github-actions released this 04 Aug 07:55

[0.2.1] - 2026-08-04

Fixed

  • 读线程改用独立串口句柄(try_clone),修复部分 USB 转串口驱动(如 CH340)偶发读阻塞导致 write / 工具调用长时间无响应的问题(真实硬件稳定性测试发现)

ser2mcp V0.2.0

Choose a tag to compare

@github-actions github-actions released this 04 Aug 07:17

Added

  • 多端口支持:可同时打开多个串口,端口名即句柄;除 uart_list_ports 外每个工具都需要传 port 参数
  • CLI:ser2mcp --list-ports / --version / --help
  • Linux 串口权限辅助脚本 scripts/linux-serial-permissions.sh
  • README 新增命令行用法、多端口/透传说明与常见问题(Troubleshooting)

Changed

  • 破坏性 API 变更:uart_configure / uart_write / uart_read / uart_exchange / uart_available / uart_clear / uart_close 新增必填 port 参数
  • 定位明确为原样透传:不解析、不匹配、不过滤串口字节流内容

ser2mcp V0.1.0

Choose a tag to compare

@github-actions github-actions released this 04 Aug 04:46

Added

  • 9 个 MCP 工具:uart_list_ports / uart_open / uart_configure / uart_write / uart_read / uart_exchange / uart_available / uart_clear / uart_close
  • 后台读线程 + 有界环形缓冲:上行数据不丢不堵,溢出计数可检测数据缺口
  • 完整串口参数控制:波特率 / 数据位 / 校验位 / 停止位 / 流控 / 读写超时
  • hex / text 双模式传输,二进制安全
  • 可配置内部参数:buffer_size / idle_ms / max_bytes / timeout_ms
  • 回环自测示例 examples/loopback.rs
  • 双语 README(简体中文 / English)
  • GitHub Actions CI:fmt / clippy / test / doc / 跨平台 release 构建
  • 自动化 Release:Windows / Linux / macOS 预编译二进制 + sha256 校验和 + Rust 文档