
/*************************************************************************
* busybox microcom
* 说明:
* 有时候我们可能仅仅是在嵌入系统里使用一下串口,看是否有数据存在,
* 而这种情况下,没有必要花大把的时间去自己搞一个命令行的串口工具,于是
* busybox 提供的microcom就是一个很好的工具。
*
* 2016-2-2 深圳 南山平山村 曾剑锋
************************************************************************/ 一、参考文章:
. Linux Busybox Minicom简单用法
http://blog.sina.com.cn/s/blog_67c9a89901019z3c.html
. Busybox microcom
https://lnguin.wordpress.com/2013/05/06/busybox-microcom/ 二、busybox microcom help:
root@android:/ # busybox microcom -h
microcom: invalid option -- 'h'
BusyBox v1.15.3 (-- :: 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 Options:
-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 root@android:/ # 三、android下GPS模块测试:
root@android:/ # busybox microcom -t -s /dev/ttymxc1
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPGSV,,,,,,,,,,,,,,,,,,,*7C
$GPGSV,,,,,,,,,,,,,,,,,,,*
$GPGSV,,,,,,,,,,,,,,,,,,,*
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPGSV,,,,,,,,,,,,,,,,,,,*7C
$GPGSV,,,,,,,,,,,,,,,,,,,*
$GPGSV,,,,,,,,,,,,,,,,,,,*
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E
$GPRMC,,V,,,,,,,,,,N*
$GPGGA,,,,,,,,,,M,0.0,M,,*
$GPGSA,A,,,,,,,,,,,,,,,,*1E 四、exit(quit) microcom:
Ctrl-x to exit.