macos - 更改 MAC 终端上的波特率 stty

标签 macos terminal serial-port stty

我需要使用波特率为 115200 的 USB 串行电缆。
我尝试使用 MACbook 终端应用程序中的 stty 命令设置速率,如下所示;

$stty -f /dev/tty.usbserial-A103BTIB 115200

并确认设置如下;
$stty -f /dev/tty.usbserial-A103BTIB -a

&speed 9600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
    -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
    -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -iutf8
    -ignbrk -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb crtscts -dsrflow
    -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;

看起来波特率一直到 9600。有人能告诉我如何一步一步地改变这个吗?

最佳答案

好像这是 OSX 中 stty 命令的常见问题,没有解决。

https://discussions.apple.com/thread/3798003?tstart=0

关于macos - 更改 MAC 终端上的波特率 stty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34233066/

相关文章:

java - SWT TrayItem.setImage 在 Mac 状态栏中无法正确缩放

python os.path.exists 在文件存在时报告 False

macos - XAMPP 控制面板未在 Mac 上显示

ios - 如何制作文件夹中的文件列表并通过终端将此列表中的每一行粘贴到 *.plist 中?

java - JACOB - 对 COM 接口(interface)的远程调度调用

java - 如何在 OS X 10.10.1 上安装 ibm-java-sdk-7.1-2.0-x86_64-archive.bin

python - 如何更改 Sage 集成的 R 版本?

linux - 临时 shell 变量存储在 shell session 中的什么位置?

serial-port - Arduino - 乱码串行输出

serial-port - 多点总线转rs232 转换