Add scripts to comgt to retrieve the IMSI and CNUM to identify the SIM card.
Signed-off-by: Daniel Golle <[email protected]> Index: package/comgt/files/getimsi.gcom =================================================================== --- package/comgt/files/getimsi.gcom (revision 0) +++ package/comgt/files/getimsi.gcom (revision 0) @@ -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 Index: package/comgt/files/getcnum.gcom =================================================================== --- package/comgt/files/getcnum.gcom (revision 0) +++ package/comgt/files/getcnum.gcom (revision 0) @@ -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
signature.asc
Description: Digital signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
