【Purpose】

Learning how to check sim ready?

【Eevironment】

Shell terminal, base on gcom command and gcom script

【Procdeure】

opengt
set com 115200n81
set comecho off
set senddelay 0.02
waitquiet 0.2 0.2
flash 0.1 :start
send "AT+CPIN?^m"
get 1 "" $s
print $s :continue
exit 0

 result:

/etc/gcom# gcom -d /dev/ttyUSB1 -s /etc/gcom/cpin.gcom
AT+CPIN?
+CPIN: READY OK
05-11 01:27