comgt: Add scripts to comgt to retrieve the IMSI and CNUM to identify the SIM card.
[openwrt/svn-archive/archive.git] / package / comgt / files / getimsi.gcom
1 opengt
2 set com 115200n81
3 set comecho off
4 set senddelay 0.02
5 waitquiet 0.2 0.2
6 flash 0.1
7
8 :start
9 send "AT+CIMI^m"
10 get 1 "^m" $s
11 get 1 "^m" $s
12 let x = len($s)
13 if x<2 goto continue
14 let $s = $right($s, x-1)
15 print $s
16 :continue
17 exit 0