summaryrefslogtreecommitdiff
path: root/package/comgt/files
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/comgt/files
Initial import
Diffstat (limited to 'package/comgt/files')
-rw-r--r--package/comgt/files/dial.comgt26
-rw-r--r--package/comgt/files/setmode.comgt26
2 files changed, 52 insertions, 0 deletions
diff --git a/package/comgt/files/dial.comgt b/package/comgt/files/dial.comgt
new file mode 100644
index 000000000..de3327331
--- /dev/null
+++ b/package/comgt/files/dial.comgt
@@ -0,0 +1,26 @@
+# dial given number
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ print "Dialing '"+$env("NUMBER")+"'\n"
+ send "ATDT"+$env("NUMBER")+"^m"
+
+ waitfor 15 "CONNECT" "OK","ERR","ERROR"
+ if % = 0 goto continue
+ if % = 1 goto continue
+ if % = 2 goto senderror
+ if % = 3 goto senderror
+
+ print "Timeout dialing '"+$env("NUMBER")+"'\n"
+ exit 1
+
+:senderror
+ print "Error dialing '"+$env("NUMBER")+"'\n"
+ exit 1
+
+:continue
+ exit 0
diff --git a/package/comgt/files/setmode.comgt b/package/comgt/files/setmode.comgt
new file mode 100644
index 000000000..4ce0b5fa7
--- /dev/null
+++ b/package/comgt/files/setmode.comgt
@@ -0,0 +1,26 @@
+# set wwan mode from environment
+opengt
+ set com 115200n81
+ set senddelay 0.02
+ waitquiet 1 0.2
+ flash 0.1
+
+:start
+ print "Trying to set mode\n"
+ send $env("MODE")
+ send "^m"
+
+ waitfor 15 "OK","ERR","ERROR"
+ if % = 0 goto continue
+ if % = 1 goto modeerror
+ if % = 2 goto modeerror
+
+ print "Timeout setting WWAN mode!\n"
+ exit 1
+
+:modeerror
+ print "Error setting WWAN mode!\n"
+ exit 1
+
+:continue
+ exit 0