SIM7020 AT

From ElectroDragon Wiki

AT Commands

Testing Record for Reference

Basic

  • AT+CPIN? // check if sim card avaialble
  • AT+CSQ // +CSQ: 5,0 // correct in 0-98, incorrect 99
  • AT+CREG? //+CREG: 0,6 // 6 indicate the stats registered, please refer to datasheet
  • AT+COPS? // +COPS: 0,2,"46000",9 // last word 9 indicate nbiot network registered
<netact> 
0 User-specified GSM access technology
8 User-specified LTE M1 A GB access technology
9 User-specified LTE NB S1 access technology
  • AT+CGATT? // +CGATT: 1 // network attached status
Basic Test: e.g. AT+IPR=? Read, e.g. AT+IPR? Write, e.g. AT+IPR=9600
Baudrate - AT+IPR -
  • +IPR: 9600
  • OK
-
AT+CBAND
  • +CBAND: (1,3,5,8,20,28)
  • OK
- -
AT+CENG
  • +CENG: (0-1)
  • OK
  • +CENG: 3738,2,402,"0D1C1E41",-75,-5,-70,14,8,"1D26",0,
  • +CENG: 3738,2,146,-89
  • +CENG: 3738,2,1,-88
  • OK
-
AT+GSV
* SIMCOM_Ltd
*  SIM7020E
*  Revision:1752B03SIM7020E
*  OK

Ping, DNS

Commands Feedback
AT+CIPPING="192.168.1.1", 4, 32, 100
* OK
*  +CIPPING: 1,192.168.1.1,7,250
*  +CIPPING: 2,192.168.1.1,8,250
*  +CIPPING: 3,192.168.1.1,3,250
*  +CIPPING: 4,192.168.1.1,3,250
AT+CDNSGIP=www.baidu.com
  • +CDNSGIP: 111.13.100.92
  • OK
AT+CIPPING="111.13.100.92",4,32,100
  • OK
  • +CIPPING: 1,111.13.100.92,4,54
  • +CIPPING: 2,111.13.100.92,3,54
  • +CIPPING: 3,111.13.100.92,3,54
  • +CIPPING: 4,111.13.100.92,3,54

TCPIP

  • AT+CSOC=1,1,1
  • +CSOC: 0
  • OK
  • AT+CGACT?
+CGACT: 1,1
  • AT+CGACT=?
  • +CGACT: (0-1)
  • OK
  • AT+CGACT?
  • +CGACT: 1,1
  • +CGACT: 2,0
  • OK
  • AT+CSGACT=1,1,"3GNET"
  • OK
  • +CSGACT: 2,0



MQTT

Commands List Return Note
AT+CMQNEW?
  • +CMQNEW: 0,0,null
  • +CMQNEW: 1,0,null
  • +CMQNEW: 2,0,null
  • +CMQNEW: 3,0,null
  • +CMQNEW: 4,0,null
  • OK
Check connections
AT+CMQNEW="167.88.114.101","1883",6000,32,1
  • +CMQNEW: 0
  • OK
make connection, our server iot.electrodragon.com
AT+CMQCON=0,3,"client_id",10,0,0 OK connect to "client_id"?
AT+CMQSUB=0,"client_id",0 OK subscribe to "client_id"
AT+CMQPUB=0,"client_id",0,0,0,5,"HE" ERROR publish to "client_id" but 5 is error length for "HE" data buff
AT+CMQPUB=0,"client_id",0,0,0,2,"HE"
  • OK
  • +CMQPUB: 0, "client_id?�����鵋�� €
  • �滃��", 0, 0, 0, 0, ""
seems sent properly
AT+CMQNEW?
  • +CMQNEW: 0,1,167.88.114.101
  • +CMQNEW: 1,0,null
  • +CMQNEW: 2,0,null
  • +CMQNEW: 3,0,null
  • +CMQNEW: 4,0,null
  • OK
check connections