learning at command AT+CEREG
AT command AT+CEREG
【Purpose】
Learning how to query the network registration status
【Eevironment】
Shell terminal, base on gcom command and gcom script
【Procdeure】
gcom script :
root@IoTP:~# cat /etc/gcom/getcereg.gcom opengt set com 115200n81 set comecho off set senddelay 0.02 waitquiet 0.2 0.2 flash 0.1 :start send "AT+CEREG?^m" get 1 "^m" $s print $s get 1 "^m" $s print $s,"\n" :continue exit 0
root@IoTP:~# cat /etc/gcom/setcereg.gcom
opengt
set com 115200n81
set comecho off
set senddelay 0.02
waitquiet 0.2 0.2
flash 0.1
:start
send "AT+CEREG=2^m"
get 1 "^m" $s
print $s
get 1 "^m" $s
print $s,"\n"
:continue
exit 0
test method:
root@IOTP:/etc/gcom# gcom -d /dev/ttyUSB1 -s setcereg.gcom AT+CEREG=2 OK root@OpenWrt:/etc/gcom# gcom -d /dev/ttyUSB1 -s getcereg.gcom AT+CEREG? +CEREG: 2,1,"5140","D0","523D306",7
comparsion follow char , we can know module register in E-UTRAN network......