【发布时间】:2020-12-09 00:01:03
【问题描述】:
我在 /dev/ttyUSB0 有一个 FTDI USB/串行设备。我设置了我的频道
% set channel [open /dev/ttyUSB0 r+]
file3
% chan configure $channel -mode "76800,n,8,1" -buffering none -blocking 0 -translation auto
这对 Windows 上的 Tcl 工作得很好。在 Linux 上,显示波特率查询
% puts [chan configure $channel -mode]
57600,n,8,1
我得到了你期望以错误的波特率进行通信的所有垃圾。我看到了这个以前的帖子: fconfigure refuses to set baud rate to 921600 ...在 Tcl 源中引用一组固定的波特率。有没有办法让我添加我的非标准波特率以使通信在 Windows 和 Linux 下都能正常工作?
【问题讨论】:
标签: linux serial-port tcl