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