summaryrefslogtreecommitdiff
path: root/package/comgt
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-07-14 19:58:43 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2010-07-14 19:58:43 +0200
commit4cfceb141c0770aa37123fde6fc26c28283314ad (patch)
tree8973da1d99561d6ede8c4c69253d528a70e197f8 /package/comgt
parent3b76e79f14e279a6526809e630e45e4f760d77de (diff)
parentba4b6056da30ddb19809b72309a009a1c84a7656 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/comgt')
-rw-r--r--package/comgt/Makefile7
-rw-r--r--package/comgt/files/hsoauth.comgt34
-rw-r--r--package/comgt/files/hsoconnect.comgt19
-rw-r--r--package/comgt/files/hsodata.comgt27
-rw-r--r--package/comgt/files/hsodisconnect.comgt19
-rw-r--r--package/comgt/files/hsostatus.comgt14
-rw-r--r--package/comgt/files/waitready.comgt34
7 files changed, 150 insertions, 4 deletions
diff --git a/package/comgt/Makefile b/package/comgt/Makefile
index 50816d485..2a9af5a95 100644
--- a/package/comgt/Makefile
+++ b/package/comgt/Makefile
@@ -5,10 +5,10 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= comgt
PKG_VERSION:= 0.32
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= db2452680c3d953631299e331daf49ef
PKG_DESCR:= 3G/GPRS datacard control tool
-PKG_SECTION:= console
+PKG_SECTION:= utils
PKG_URL:= http://sourceforge.net/projects/comgt
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=comgt/}
@@ -21,12 +21,11 @@ $(eval $(call PKG_template,COMGT,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG
CONFIG_STYLE:= manual
INSTALL_STYLE:= manual
-
ALL_TARGET= comgt
do-install:
${INSTALL_DIR} ${IDIR_COMGT}/usr/bin ${IDIR_COMGT}/etc/comgt
${INSTALL_BIN} ${WRKBUILD}/comgt ${IDIR_COMGT}/usr/bin/comgt
- ${INSTALL_DATA} ./files/dial.comgt ${IDIR_COMGT}/etc/comgt/dial.comgt
+ ${INSTALL_DATA} ./files/*.comgt ${IDIR_COMGT}/etc/comgt/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/comgt/files/hsoauth.comgt b/package/comgt/files/hsoauth.comgt
new file mode 100644
index 000000000..ea81ee3ca
--- /dev/null
+++ b/package/comgt/files/hsoauth.comgt
@@ -0,0 +1,34 @@
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+
+:start
+ flash 0.1
+
+:getuser
+ let $u=$env("USER")
+ let a=len($u)
+ if a=0 goto continue
+
+:getpass
+ let $p=$env("PASS")
+
+:auth
+ print "User: ",$u,"\n"
+ print "Pass: ",$p,"\n"
+ send "AT$QCPDPP=1,1,\""
+ send $p
+ send "\",\""
+ send $u
+ send "\"^m"
+ waitfor 2 "OK"
+ if % = -1 goto error
+ if % = 0 goto continue
+
+:error
+ exit 1
+
+:continue
+ exit 0
+
diff --git a/package/comgt/files/hsoconnect.comgt b/package/comgt/files/hsoconnect.comgt
new file mode 100644
index 000000000..721a86c68
--- /dev/null
+++ b/package/comgt/files/hsoconnect.comgt
@@ -0,0 +1,19 @@
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ send "AT_OWANCALL=1,1,0^m"
+ waitfor 2 "OK"
+ if % = -1 goto error
+ if % = 0 goto continue
+
+
+:error
+ exit 1
+
+:continue
+ exit 0
+
diff --git a/package/comgt/files/hsodata.comgt b/package/comgt/files/hsodata.comgt
new file mode 100644
index 000000000..92d2d8e3a
--- /dev/null
+++ b/package/comgt/files/hsodata.comgt
@@ -0,0 +1,27 @@
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+ let c=1
+:start
+ send "AT_OWANDATA=1^m"
+ waitfor 2 "ERROR"
+ if % = 0 goto repeat
+ send "AT_OWANDATA=1^m"
+ get 2 "^m" $s
+ get 2 "^m" $s
+ print $s
+ print "\n"
+ exit 0
+
+:repeat
+ sleep 3
+ inc c
+ if c > 15 goto error
+ goto start
+
+:error
+ exit 1
+
diff --git a/package/comgt/files/hsodisconnect.comgt b/package/comgt/files/hsodisconnect.comgt
new file mode 100644
index 000000000..755a0a318
--- /dev/null
+++ b/package/comgt/files/hsodisconnect.comgt
@@ -0,0 +1,19 @@
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ send "AT_OWANCALL=1,0,0^m"
+ waitfor 2 "OK"
+ if % = -1 goto error
+ if % = 0 goto continue
+
+
+:error
+ exit 1
+
+:continue
+ exit 0
+
diff --git a/package/comgt/files/hsostatus.comgt b/package/comgt/files/hsostatus.comgt
new file mode 100644
index 000000000..83f13f0a8
--- /dev/null
+++ b/package/comgt/files/hsostatus.comgt
@@ -0,0 +1,14 @@
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ send "AT_OWANCALL?^m"
+ get 2 "^m" $s
+ get 2 "^m" $s
+ print $s
+ print "\n"
+ exit 0
+
diff --git a/package/comgt/files/waitready.comgt b/package/comgt/files/waitready.comgt
new file mode 100644
index 000000000..0de4df5d4
--- /dev/null
+++ b/package/comgt/files/waitready.comgt
@@ -0,0 +1,34 @@
+# wait till the sim is ready
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+:start
+ print "Waiting for SIM..."
+ let c=0
+:waitready
+ send "AT+CPIN?^m"
+ waitfor 2 "SIM PUK","SIM PIN","READY","ERROR","ERR"
+ if % = -1 goto tryagain
+ if % = 0 goto simready
+ if % = 1 goto simready
+ if % = 2 goto simready
+ if % = 3 goto tryagain
+ if % = 4 goto tryagain
+
+:tryagain
+ if c > 120 goto waittimeout
+ let c=c+2
+ print "."
+ goto waitready
+
+:waittimeout
+ print " Timeout
+"
+ exit 1
+
+:simready
+ print " OK
+"
+ exit 0