summaryrefslogtreecommitdiff
path: root/package/comgt/files/getcnum.gcom
diff options
context:
space:
mode:
Diffstat (limited to 'package/comgt/files/getcnum.gcom')
-rw-r--r--package/comgt/files/getcnum.gcom20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/comgt/files/getcnum.gcom b/package/comgt/files/getcnum.gcom
new file mode 100644
index 0000000..450cf8c
--- /dev/null
+++ b/package/comgt/files/getcnum.gcom
@@ -0,0 +1,20 @@
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CNUM^m"
+ get 1 "^m" $n
+ get 1 ":" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ get 1 "\"" $n
+ let n = len($n)
+ if n<1 goto continue
+ print $n
+:continue
+ exit 0