comgt拨号

comgt用法:comgt -s script -d device

示例1。循环输入AT指令:

command内容如下

####################################################
#
# command - comgt script for command interaction
#
# Copyright (C) 2006  Paul Hardwick <paul@peck.org>
#
###################################################
print "\nType command at prompt.\n"
print "Empty input terminates.\n"
print "#################\n"
opengt
set com 115200n81
set senddelay 0.05
waitquiet 1 0.2


:loop1
    print "Command: "
    input $x
    let c=len($x)
    if c=1 goto end
    let c=c-1
    let $c=$left($x,c)
    send $x
    send "^m"
    :loop2
        print $a
        get 1 "^m" $a
        let a=len($a)
        if a > 0 goto loop2
    goto loop1
:end
print "#################\n"
运行:comgt -s command -d /dev/ttyUSB1 -v


posted on 2014-02-26 16:05  小尾巴猴子  阅读(741)  评论(0编辑  收藏  举报

导航