SKU_TEL0182_Global_Version_SIM7070G_NB-IoT_Module WIKI

Introduction

The SIM7070G is a globally compatible NBIoT communication module. It not only supports CAT-M, NBIoT, GSM, GPRS, EDGE communication and GNSS satellite positioning, but also features low power consumption with a total device power consumption of only 14mA in sleep mode and 40mA in idle mode.

This ultra-low power consumption characteristic, along with the support for CAT-M and GNSS satellite positioning, makes this product ideal for communication in scenarios such as smart logistics, asset tracking, smart cities, agriculture, forestry, etc.

Furthermore, the Gravity communication module based on SIM7070G supports the UART Gravity PH2.0-4P communication interface and USB2.0 interface. This facilitates the use of the module for communication between MCUs, PCs, industrial computers, development boards, etc.

The SIM7070G is equipped with a rich set of built-in AT commands and provides detailed user manuals and application documents, including usage methods for network communication protocols such as HTTP, MQTT, FTP, CoAP, NIDD, PING, etc. There is no need to learn and develop complex underlying network protocols, it is ready to use out of the box.

Every country or region has strict control over wireless communication devices, and products must have relevant certifications. The SIM7070G has obtained relevant certifications in most countries or regions worldwide, specifically:

With the testing and certification from the above-mentioned agencies, the SIM7070G can be confidently used in products or projects without worrying about compliance issues.

Features

Application

Specification

Power Supply

Data Transfer

Communication Interface

Supported Bands

Product Size: 49mm×42mm

Functional Diagram

Interface Description
NB_RF Connects to NB antenna
GNSS Connects to GPS positioning antenna
UART UART interface (interface level 3.3V-5V)
USB-Type C USB device interface, used for communication tests or parameter settings with a computer
Power IN External 5-12V power supply is needed in case of insufficient power
SIM Card Insert SIM card

Precautions:

  1. It is suggested to connect an external power supply of 5V-12V when the module communicates using PH2.0 seat.

  2. The module powers on upon electrification. After inserting the NB card for the first time, it is necessary to power it and wait 1-2 minutes for network registration.

  3. Net—Network signal indicator light

    • Blue light on for 0.06 seconds, off for 0.8 seconds: Not registered on the network
    • Blue light on for 0.06 seconds, off for 3 seconds: Registered on the network
    • Blue light on for 0.06 seconds, off for 0.3 seconds: Data transmission state (PPP dial-up state and when using internal TCP/FTP/HTTP data services)
    • Extinguished: Shutdown or PSM sleep mode
  4. To prevent damage to the internal flash of the SIM7070G module, use the "AT+CPOWD=1" command for safe shutdown instead of directly cutting off the power.

Dimensional Diagram

Common AT Commands

Command Meaning Return Value
AT AT test command OK
ATE ATE1 sets echo, ATE0 turns off echo OK
AT+CGMI Query module manufacturer OK
AT+CGMM Query module model identifier OK
AT+CGSN Query product serial number OK
AT+CGMR Query software version serial number OK
AT+IPR=9600 Set module temporary hardware serial port baud rate to 9600 OK
AT+IPR? Query current hardware serial port baud rate OK
AT+CPIN? Query SIM card status, return READY, indicating that the SIM card can be recognized normally OK
AT+CSQ Network signal quality query, return signal value OK
AT+CGREG? Check network registration OK
AT+CMEE=1 Report mobile device error OK
AT+CGNAPN Get network APN in CAT-M or NB-IOT OK
AT+CPSI? Query UE system information OK
AT+CNACT=0,1 Activate application network OK
AT+CNACT? Query network IP OK
AT+CNACT=0,0 Close application network OK
AT+CNMP=38 Select LTE mode OK
AT+CMNB=2 Select NB network OK
AT+CPOWD=1 Shutdown NORMAL POWER DOWN

Note: Please refer to the AT instruction set for more test commands

Sample Application

Hardware Preparation

Software Preparation

Install drivers:

Download driver file and decompress on the desktop. In the "Other devices" of Device Manager, a SIM port will appear. Right-click to update the driver software.

After the update, you can see several ports in "Other devices". Similarly, right-click to update the driver software for these SIM ports.

After installation, it should look as follows:

*Note: *This is an NB module, which only supports NB SIM cards in China.

MQTT Connection

Command Meaning Return Value
AT+CNACT=0,1 Activate application network OK
AT+CNACT? Query network IP OK
AT+SMCONF Set MQTT parameters OK
AT+SMCONN Start MQTT connection OK
AT+SMPUB Push topic message OK
AT+SMSUB Subscribe to topic OK
AT+SMUNSUB Unsubscribe from topic OK
AT+SMSTATE Query MQTT connection status OK
AT+SMPUBHEX Push HEX type topic message OK
AT+SMDISC Disconnect MQTT connection OK
AT+CNACT=0,0 Disconnect application connection OK

This example sends a set message to the Easy IoT platform by operating SIM7070G through AT instructions.

Enter Easy IoT. If you don't have an account, you can register one first.

After successful login, open the workspace, get your account (user) and password, add a new device (Topic), and record the three important parameters. The specific steps are as follows:

AT+CNACT=0,1

//Activate wireless connection, the first parameter '0' represents PDP Index, the second parameter '1' represents activation

AT+CNACT?

//Get local IP address

AT+SMCONF="URL","iot.dfrobot.com",1883

//Set MQTT server address and port, iot.dfrobot.com is the server address, 1883 is the default port of MQTT

AT+SMCONF="USERNAME","user"

//Set MQTT username, enter the account obtained on the Easy IoT platform in "user"

AT+SMCONF="PASSWORD","password"

//Set MQTT password, enter the password obtained on the Easy IoT platform in "password"

AT+SMCONF="CLIENTID","Topic"

//Set MQTT client ID, enter the device obtained on the Easy IoT platform in "Topic"

AT+SMCONF="CLEANSS",1

//Set to clear session, 1 means clear session

AT+SMCONF="KEEPTIME",60

//Set keep connection time, 60 means 60 seconds

AT+SMCONF="QOS",1

//Set message quality level, 1 means at least once

AT+SMCONF="RETAIN",1

//Set retain flag, 1 means message and its qos will be saved

AT+SMCONF="TOPIC","Topic"

//Set publish topic name, enter the device obtained on the Easy IoT platform in "Topic"

AT+SMCONF="MESSAGE","DFROBOT"

//Set publish message details, "DFROBOT" is the message content

AT+SMCONN

//Connect to MQTT server

AT+SMPUB="Topic",7,1,1

//Publish message, enter the device obtained on the Easy IoT platform in "Topic", 7 is the message length, 1 means retain message, 1 means message quality is 1, note: when publishing message, you need to check "return carriage"

//Then uncheck "return carriage" and send message content "DFROBOT"

AT+SMDISC

//Disconnect from MQTT server

AT+CNACT=0,0

//Disconnect wireless connection, the first parameter '0' represents PDP Index, the second parameter '0' represents disconnect.

Note: Carriage return is also needed when publishing a message. When sending message content, cancel the carriage return.

Read GNSS Positioning Information

When using GNSS positioning, first plug in the GPS antenna, and place the module outdoors. After turning on the GNSS power, you can choose the way suitable for your project to start GNSS positioning.

Command Meaning Return Value
AT+CGNSPWR GNSS power control OK
AT+CGNSINF GNSS navigation information parsed from NMEA sentence OK
AT+CGNSCOLD GNSS cold start OK
AT+CGNSWARM GNSS warm start OK
AT+CGNSHOT GNSS hot start OK
AT+CGNSMOD GNSS working mode setting OK
AT+CGNSXTRA Open GNSS XTRA OK
AT+CGNSCPY Copy GNSS XTRA file OK
AT+SGNSCFG GNSS NMEA output configuration OK
AT+SGNSCMD AT serial port output GNSS NMEA data OK

Note: There are three ways to start GNSS: cold start, warm start, and hot start.

  1. Cold start: When GNSS starts in a brand new environment and needs to re-acquire all satellite information. It is usually used for first use, battery exhaustion, or large device movement. In this case, the startup time is longer.
  2. Warm start: This is when GNSS starts again more than 2 hours after the last positioning. At this time, some satellite information has changed and needs to be updated. The startup time is between cold start and hot start, suitable for restarting after temporary shutdown of the device.
  3. Hot start: This is when GNSS starts again within a short time (within 2 hours). The device's position has not changed much, most of the satellite information is still valid, the startup time is the shortest, suitable for frequent startups within a short time.

This example is GNSS positioning through AT instructions.

AT+CGNSPWR=1

//Turn on GNSS power (UART or USB AT port)

AT+CGNSINF

//Read GNSS navigation information

Assume that the positioning data printed by the serial port is: 1,1,20191024051848.000,12.345678,123.456789,123.123,0.00,-1.8,0,,1.4,1.7,0.9,,6,,12.4,12.0

The following is the specific meaning of the GNSS navigation information read by the SIM7070G module:

  1. GNSS running status: the value 1 indicates that GNSS is running
  2. Positioning status: the value 1 indicates successful positioning
  3. UTC date and time: 20191024051848.000, the format is year, month, day, hour, minute, second. Milliseconds
  4. Latitude: 12.345678 degrees
  5. Longitude: 123.456789 degrees
  6. MSL altitude: 123.123 meters
  7. Ground speed: -1.8 kilometers per hour
  8. Ground direction: speed is 0
  9. Positioning mode: value 0 indicates automatic selection to use GPS and GLONASS
  10. Reserved1: Reserved field, data missing
  11. HDOP: Horizontal accuracy factor, value 1.4
  12. PDOP: Position accuracy factor, value 1.7
  13. VDOP: Vertical accuracy factor, value 0.9
  14. Reserved2: Reserved field, data missing
  15. GNSS Satellites in View: Number of visible satellites, value 6
  16. Reserved3: Reserved field, data missing
  17. HPA: Horizontal protection limit, value 12.4 meters
  18. VPA: Vertical protection limit, value 12.0 meters

Note: You cannot connect to the cellular network and GPS positioning at the same time.

HTTP(S) Routine

Command Meaning Return Value
AT+CSSLCFG Configure SSL parameters for context identifier OK
AT+SHCONF Set HTTP(S) parameters OK
AT+SHSSL Select SSL configuration OK
AT+SHCONN HTTP(S) connection OK
AT+SHBOD Set Body OK
AT+SHAHEAD Add Head OK
AT+SHPARA Set HTTP(S) Para OK
AT+SHCPARA Clear HTTP(S) Para OK
AT+SHCHEAD Clear Head OK
AT+SHSTATE Query HTTP(S) connection status OK
AT+SHREQ Set request type OK
AT+SHREAD Read response value OK
AT+SHDISC Disconnect HTTP(S) OK
AT+HTTPTOFS Download file to ap file system OK
AT+HTTPTOFSRL Status of downloading file to ap file system OK

This example establishes an HTTP connection and sends a GET request.

AT+CNACT=0,1

//Activate wireless connection, the first parameter '0' represents PDP Index, the second parameter '1' represents activation.

AT+CNACT?

//Get local IP address

AT+SHCONF="URL","http://www.baidu.com" 

//Set server URL

AT+SHCONF="BODYLEN",1024

//Set HTTP body length, for the range of maximum body length

AT+SHCONF="HEADERLEN",350

//Set HTTP header length, for the range of maximum header length

AT+SHCONN

//Establish HTTP connection

AT+SHSTATE?

//Get HTTP status

//"+SHSTATE: 1": Connected //"+SHSTATE: 0": Disconnected

AT+SHCHEAD

//Clear HTTP header, because the HTTP header is appended

AT+SHAHEAD="User-Agent","Mozilla/5.0" 

//Add header content

AT+SHAHEAD="Cache-control","no-cache"

//Add header content

AT+SHAHEAD="Connection","keep-alive"

//Add header content

AT+SHAHEAD="Accept","*/*"

//Add header content

AT+SHREQ="/search?q=SIM7070G", 1

//Set request type to GET //The response will depend on the actual size of the data returned by the server //For example, the size of the data returned here is 247

AT+SHREAD=0,247

//Read data length is 247 //Data content follows "+SHREAD: 247"

AT+SHDISC

//Disconnect HTTP connection

AT+CNACT=0,0

//Close wireless connection, the first parameter '0' represents PDP Index, the second parameter '0' represents disconnect.

Note: The default time to keep a request is 60 seconds, you can also choose the setting range of 30-1800

Function Mode

Command Meaning Return Value
AT+CFUN=0 Minimum function mode OK
AT+CFUN=1 Full function mode (default) OK
AT+CFUN=4 Flight mode OK

Note:

  1. After setting "AT+CFUN=0", the module enters the minimum function mode, turns off the radio frequency function and SIM card function. In this case, the serial port and USB can still be used, but the functions related to radio frequency and SIM card and some AT commands cannot be used.

  2. After setting "AT+CFUN=4", the module enters flight mode and turns off the radio frequency function. In this case, the module's serial port and USB can still be used, but the functions related to radio frequency and some AT commands cannot be used.

  3. When the module enters the minimum function mode or enters the flight mode, it can return to the full function mode by the command "AT+CFUN=1".

More Resources Download

Frequently Asked Questions

Q: Why does SIM7070G have no signal?

A: Setting NB-IOT or CAT-M is easier to get signal

AT+CMNB=2      //Set NB-IOT mode
AT+CMNB=1      //Set CAT-M mode
AT+CMNB=3      //Set CAT-M and NB-IOT combination mode

A: Fixed LTE mode can register to the network faster

AT+CNMP=38

Q: Can SIM7070G use communication and GNSS positioning at the same time?

A: SIM7070G cannot use communication and GNSS positioning functions at the same time.