我需要使用波特率为 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/