Busybox下的microcom用法
在嵌入式平台下,集成有minicom软件,可以实现串口调试功能,但是有的不会集成minicom软件。如果你使用的是busybox的文件系统,有一个更加简单的串口工具microcom,用法如下:
/ # busybox microcom -h
microcom: invalid option -- 'h'
BusyBox v1.29.0 (2020-12-23 13:09:27 CST) multi-call binary.
Usage: microcom [-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY
Copy bytes for stdin to TTY and from TTY to stdout
-d Wait up to DELAY ms for TTY output before sending every
next byte to it
-t Exit if both stdin and TTY are silent for TIMEOUT ms
-s Set serial line to SPEED
-X Disable special meaning of NUL and Ctrl-X from stdin
-t 单位毫秒,无操作自动退出时间。
-s 单位bps,串口波特率。
另外两个没多大用
举例说明,设置5s内无操作退出,且波特率为115200的ttyUSB1
命令测试:
/ # busybox microcom -t 5000 -s 115200 /dev/ttyUSB1
ati;+cpin?;+csq;+cops?;+cgreg?
Quectel
EC200S
Revision: EC200SCNAAR01A09M16
+CSQ: 23,99
+CGREG: 0,0
+CME ERROR: 10
/ #
本文介绍了在Busybox环境下如何使用microcom这一轻量级串口工具进行串口调试。通过示例展示了如何设置无操作退出时间和波特率,以及其基本命令格式。适合嵌入式系统的开发者参考。

3381

被折叠的 条评论
为什么被折叠?



