aboutsummaryrefslogtreecommitdiffstats
path: root/package/comgt/files/getimsi.gcom
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2011-11-30 14:16:44 +0000
committerJohn Crispin <blogic@openwrt.org>2011-11-30 14:16:44 +0000
commit3ae3351ffd71d8bc47e5eb237fa2b551bb18280d (patch)
tree349116f7666040b4acdfec8c1c99057e98f8a089 /package/comgt/files/getimsi.gcom
parent69a2e2ef353e364d88af5fa9f669b8c78a195ca3 (diff)
downloadupstream-3ae3351ffd71d8bc47e5eb237fa2b551bb18280d.tar.gz
upstream-3ae3351ffd71d8bc47e5eb237fa2b551bb18280d.tar.bz2
upstream-3ae3351ffd71d8bc47e5eb237fa2b551bb18280d.zip
comgt: Add scripts to comgt to retrieve the IMSI and CNUM to identify the SIM card.
Signed-off-by: Daniel Golle <dgolle@allnet.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29365 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/comgt/files/getimsi.gcom')
-rw-r--r--package/comgt/files/getimsi.gcom17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/comgt/files/getimsi.gcom b/package/comgt/files/getimsi.gcom
new file mode 100644
index 0000000000..04854561b1
--- /dev/null
+++ b/package/comgt/files/getimsi.gcom
@@ -0,0 +1,17 @@
+opengt
+ set com 115200n81
+ set comecho off
+ set senddelay 0.02
+ waitquiet 0.2 0.2
+ flash 0.1
+
+:start
+ send "AT+CIMI^m"
+ get 1 "^m" $s
+ get 1 "^m" $s
+ let x = len($s)
+ if x<2 goto continue
+ let $s = $right($s, x-1)
+ print $s
+:continue
+ exit 0