小编san*_*alk的帖子

更改 MAC 终端上的波特率 stty

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

$stty -f /dev/tty.usbserial-A103BTIB 115200
Run Code Online (Sandbox Code Playgroud)

并确认设置如下;

$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; …
Run Code Online (Sandbox Code Playgroud)

macos terminal serial-port stty

5
推荐指数
1
解决办法
8565
查看次数

标签 统计

macos ×1

serial-port ×1

stty ×1

terminal ×1