busybox microcom


/*************************************************************************
 *                       busybox microcom
 * 說明:
 *     有時候我們可能僅僅是在嵌入系統里使用一下串口,看是否有數據存在,
 * 而這種情況下,沒有必要花大把的時間去自己搞一個命令行的串口工具,於是
 * busybox 提供的microcom就是一個很好的工具。
 *
 *                                        2016-2-2 深圳 南山平山村 曾劍鋒
 ************************************************************************/

一、參考文章:
    1. Linux Busybox Minicom簡單用法
        http://blog.sina.com.cn/s/blog_67c9a89901019z3c.html
    2. 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 (2011-11-25 17:55:55 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 5000 -s 9600 /dev/ttymxc1
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPGSV,3,1,12,01,00,000,,02,00,000,,03,00,000,,04,00,000,*7C
    $GPGSV,3,2,12,05,00,000,,06,00,000,,07,00,000,,08,00,000,*77
    $GPGSV,3,3,12,09,00,000,,10,00,000,,11,00,000,,12,00,000,*71
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPGSV,3,1,12,01,00,000,,02,00,000,,03,00,000,,04,00,000,*7C
    $GPGSV,3,2,12,05,00,000,,06,00,000,,07,00,000,,08,00,000,*77
    $GPGSV,3,3,12,09,00,000,,10,00,000,,11,00,000,,12,00,000,*71
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E
    $GPRMC,,V,,,,,,,,,,N*53
    $GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
    $GPGSA,A,1,,,,,,,,,,,,,,,*1E

四、exit(quit) microcom:
    Ctrl-x to exit. 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM