learning at command AT+CPIN

【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

 

posted @ 2019-11-01 11:25  嵌入式实操  阅读(463)  评论(0编辑  收藏  举报