openwrt_archive/package/comgt/files/getcnum.gcom
John Crispin 004f40d5b7 comgt: Add scripts to comgt to retrieve the IMSI and CNUM to identify the SIM card.
Signed-off-by: Daniel Golle <dgolle@allnet.de>

SVN-Revision: 29365
2011-11-30 14:16:44 +00:00

21 lines
275 B
Plaintext

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