summaryrefslogtreecommitdiffstats
path: root/package/query3g/files/usr/share/3gmodem/model.gcom
diff options
context:
space:
mode:
Diffstat (limited to 'package/query3g/files/usr/share/3gmodem/model.gcom')
-rw-r--r--package/query3g/files/usr/share/3gmodem/model.gcom70
1 files changed, 0 insertions, 70 deletions
diff --git a/package/query3g/files/usr/share/3gmodem/model.gcom b/package/query3g/files/usr/share/3gmodem/model.gcom
deleted file mode 100644
index 40dcc4096..000000000
--- a/package/query3g/files/usr/share/3gmodem/model.gcom
+++ /dev/null
@@ -1,70 +0,0 @@
-opengt
- set com 115200n81
- set comecho off
- set senddelay 0.02
- waitquiet 0.2 0.2
-
- send "AT^m"
- waitfor 1 "OK","ERROR"
-
- let $c="AT+CGMI^m"
- gosub readatcmdnr
- let $v=$s
-
- let $c="AT+CGSN^m"
- gosub readatcmdnr
- let $n=$s
-
- let $c="AT+CGMM^m"
- gosub readatcmdnr
- print $v,",",$s,",",$n,"\n"
-
- exit 0
-
-
-:readatcmd
- let i=5
- send $c
-:loop
- get 1 "^m" $s
- let l=len($r)
- if len($s) < l goto loop1
- if $mid($s,1,l) <> $r goto loop1
- print $s
- return
-
-:loop1
- if len($s) < 2 goto loop2
- if $mid($s,1,2) = "ER" return
- if $mid($s,1,2) = "CO" return
-:loop2
- if i = 0 return
- let i=i-1
- sleep 0.25
- goto loop
-
-:readatcmdnr
- let i=10
- send $c
-:loop3
- get 1 "^m" $s
- if len($s) < 2 goto loop5
- if $mid($s,1,2) = "ER" goto loop4
- if $mid($s,1,2) = "OK" goto loop5
- if $mid($s,1,2) = "AT" goto loop5
- if $mid($s,1,2) = "TE" goto loop5
- if $mid($s,1,1) = "+" goto loop5
- if $mid($s,1,1) = "\^" goto loop5
- let l=len($s)
- let $s=$mid($s,1,l)
- return
-
-:loop4
- let $s=""
- return
-
-:loop5
- if i = 0 return
- let i=i-1
- sleep 0.25
- goto loop3