diff options
author | James <> | 2015-11-04 11:49:21 +0000 |
---|---|---|
committer | James <> | 2015-11-04 11:49:21 +0000 |
commit | 716ca530e1c4515d8683c9d5be3d56b301758b66 (patch) | |
tree | 700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/network/utils/comgt/files/setmode.gcom | |
download | trunk-47381-master.tar.gz trunk-47381-master.tar.bz2 trunk-47381-master.zip |
Diffstat (limited to 'package/network/utils/comgt/files/setmode.gcom')
-rw-r--r-- | package/network/utils/comgt/files/setmode.gcom | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/package/network/utils/comgt/files/setmode.gcom b/package/network/utils/comgt/files/setmode.gcom new file mode 100644 index 0000000..4ce0b5f --- /dev/null +++ b/package/network/utils/comgt/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 |