(Practical introduction) Common instructions for NB-IOT module SIM7020

Full information download link: https://pan.baidu.com/s/1rs8uAZQZePBV1tffaNqhjA Extraction code: xqsg

There are many AT command sets of NB-IOT module, which are mostly consistent with those of 4G module. For general users, the commonly used commands are mainly as follows:

AT command notes 1. The baud rate is 115200 by default.
2. A carriage return and line feed should be added at the end to indicate the end of the sentence
 
 
The role of instructions Send instructions to the module Module output
Cancel echo ATE0 OK

Cancel PSM mode.

PSM is POWER SAVE MODE, power saving mode. Canceling the power saving mode can prevent the module from entering a low-power sleep state.

AT+CPSMS=0  

Cancel eDRX mode.

eDRX (Ex te ndedDRX, extended discontinuous reception mode) means to open the network for a while and then stop it for a while. Data can be received when it is turned on, but not when it is stopped. The stopping time can be configured from tens of seconds to several hours.

AT+CEDRXS=0  
Query card number AT+CCID

+ CCID: XXXXXXXXXXXXX

General IoT card numbers are 13 digits

Check the signal quality. AT+CSQ

+CSQ: 28,XXXX

The higher the first number 28 (usually between 0-31), the better the signal

Once the traffic is not enough or the SIM card is in arrears, the signal will become worse, and text messages and data cannot be sent; however, text messages can be received. So when there is abnormal communication, please first check whether the SIM card is in good contact and whether the payment is in arrears.

Check whether the network registration is successful. AT+CGREG?

+ BACKGROUND: 0,1

The second number is 1, indicating that the registration is successful.

If the second number is 0, the registration has failed. Need to wait for the network registration to succeed, or change a location to test.

Network calibration time

This is also the process of mobile phone network calibration time

Step 1: Connect to the server

AT+CSNTPSTART="ntp1.aliyun.com",”+32”

(This is provided by Alibaba Cloud server and is relatively stable)

OK

Step 2: Turn on network synchronization

AT+CNTP

OK

Step 3: Get the current time

AT+CCLK?

+CCLK: "19/04/15,12:48:08+32"

只要拆分提炼出年月日时分秒就可以

 

启动TCP通信

第一步:连接域名(或者IP地址)和端口号

AT+CIPSTART="TCP",“148.70.130.75”,”8000”

 

第三步:说明要发送的字节数

AT+CIPSEND=0,7

(7表示后面的字节数是7)

正常情况下,模块会回复 >

最后一步:输入要发送的内容。当字节数达到预定值时,数据就会经过SIM7020模块发送到服务器端。

 

Guess you like

Origin blog.csdn.net/weixin_42172577/article/details/113059076