diff options
Diffstat (limited to 'package/comgt/files')
-rw-r--r-- | package/comgt/files/hsoauth.comgt | 34 | ||||
-rw-r--r-- | package/comgt/files/hsoconnect.comgt | 19 | ||||
-rw-r--r-- | package/comgt/files/hsodata.comgt | 27 | ||||
-rw-r--r-- | package/comgt/files/hsodisconnect.comgt | 19 | ||||
-rw-r--r-- | package/comgt/files/hsostatus.comgt | 14 | ||||
-rw-r--r-- | package/comgt/files/waitready.comgt | 34 |
6 files changed, 147 insertions, 0 deletions
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 |