summaryrefslogtreecommitdiff
path: root/openwrt/package/gcom/files/setmode.gcom
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-17 01:37:51 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-17 01:37:51 +0000
commit151ad3e39835a2a6cca78f3181d23fe2226be60e (patch)
tree5ea2babbf47bb8ab0f27f9b97060b42ac2c8993c /openwrt/package/gcom/files/setmode.gcom
parent33ac34cace5948dc553ee9a231216d0bc962e3f1 (diff)
add gcom to trunk too (closes: #333).
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3792 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/gcom/files/setmode.gcom')
-rw-r--r--openwrt/package/gcom/files/setmode.gcom26
1 files changed, 26 insertions, 0 deletions
diff --git a/openwrt/package/gcom/files/setmode.gcom b/openwrt/package/gcom/files/setmode.gcom
new file mode 100644
index 0000000000..4ce0b5fa78
--- /dev/null
+++ b/openwrt/package/gcom/files/setmode.gcom
@@ -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