IOT

Using SIM7600 4G GSM with Arduino | AT Commands, Call, SMS

In this post, we’ll look at how to use the SIM7600 GSM GPS 4G LTE Module with Arduino and AT commands to make calls, send SMS, and connect to the internet.

Initially, we used 2G GSM modules such as SIM800/900 and A9G GSM GPS modules. As we all know, most countries and areas, such as Australia and Canada, are phasing out 2G GSM/GPRS. However, there are some applications that require GSM cellular connectivity from afar where WiFi is not available. The project, which includes remote environmental monitoring, requires Internet access in such areas. In most circumstances, considering the investment/risk, LTE 4G is still a viable option.

SIM7600 is one of the most common GSM GPS 4G LTE Modules. The LTE module of the SIM7600 series supports LTE wireless connection modes. It also has numerous built-in network protocols and incorporates multiple satellite high-accuracy location GNSS systems.

Makerfabs has produced one of the readymades customized SIM7600 & Arduino boards. The SIMCOM7600(E/A)CAT4 module is used in this Maduino Zero 4G LTE module to assist Makers in achieving a 4G connection quickly. Furthermore, this module may provide a complete 4G connection to your PC or Raspberry Pi, as well as call and SMS functionality.

SIM7600 GSM GPS 4G LTE Module

The SIM7600 series is Multi-Band LTE-TDD/LTE-FDD/HSPA+/TD-SCDMA and Dual-Band GSM/GPRS/EDGE module solution in an SMT type that supports LTE CAT4 up to 150Mbps for downlink data transfer.

SIM7600

It offers a wide range of interfaces, including UART, USB2.0, SPI, I2C, GPIO, and others. The module gives a lot of flexibility and ease of integration for customers’ applications because it supports TCP/UDP/FTP/FTPS/HTTP/HTTPS/SMTP/POP3 and MMS. 

General features

  • Quad-Band TDD-LTE B38/B39/B40/B41
  • Tri-Band FDD-LTE B1/B3/B8
  • Dual-Band TD-SCDMA B34/B39
  • Dual-Band WCDMA/HSDPA/HSPA+ B1/B8
  • GSM/GPRS/EDGE 900/1800 MHz
  • Control Via AT Commands
  • GNSS gpsOne Gen 8B; Standalone; Assisted, XTRA;
  • Data Transfer: LTE CAT4 with Uplink up to 50Mbps & Downlink up to 150Mbps
  • Interfaces: USB2.0, UART, SIM Card, SPI, I2C, GPIO, ADC, PCM, SDIO

Maduino Zero 4G LTE(SIM7600X) Board

The Maduino Zero 4G LTE integrated two types of the 4G LTE CAT4 module SIM7600A-H or SIM7600E-H.  SIM7600A-H/SIM7600E-H is an LCC-type multi-band LTE-FDD/LTE-TDD/HSPA+/UMTS/EDGE/GPRS/GSM module solution. It enables LTE CAT4 data transfer rates of up to 150Mbps downlink and 50Mbps uplink, which is more quicker and more popular than 2G/3G.

Maduino Zero 4G LTE(SIM7600X) Board

You can purchase this board from Maduino Zero 4G LTE(SIM7600X) as it is manufactured by Makerfabs.

Interface

Makerfabs Maduino Zero 4G LTE module is based on the ATSAMD21G18A microcontroller, which is Arduino compatible. As a result, the SIM7600 Module may be controlled and programmed using the Arduino IDE. The board’s front and rear sides appear similar to this.

SIM7600 Board Interfaces

A 3.7V Lithium-Ion Battery can be connected to the battery connector on the front side. The switch can be used to turn the module on and off. One USB TypeC port is for the microcontroller, while the other is for LTE. MCU and LTE reset are controlled by two pushbuttons. The network connectivity status is indicated by the stat LED. The primary antenna, an auxiliary antenna, and a GPS antenna can all be connected to the board. A microphone or earphones can be connected via a 3.5mm jack, while speakers can be connected via an audio jack.

A micro-sim slot for a 4G SIM card is located on the backside. There are two SD card slots on the board, one for the Microcontroller and the other for the SIM7600.

When the device is turned on, do not plug or unplug the antenna, SIM cards, or SD card. It may cause short-circuiting, which could cause the IC to burn out.

Features

  • Supports dial-up, phone, SMS, TCP, UDP, DTMF, HTTP, FTP, and so on
  • Dual USB Type C port
  • Control Via AT Commands
  • Board USB supply voltage range: 4.8~5.5V, 5.0V Typical
  • Board Battery supply voltage range: 3.4~4.2V, 3.7V Typical
  • 3GPP E-UTRA Release 11
  • Onboard charger, up to 1A charge current
  • Overcharge protection(OCP), 4.3V
  • Over-discharge protection(ODP), 2.5V
  • Power Manager, the board can be supplied by USB or battery.
  • IPEX Antenna, GSM/UMTS/LTE main antenna. UMTS/LTE auxiliary antenna. GNSS antenna
  • SMS support
  • Audio support
  • On boarder controller: ATSAMD21G18A
  • Audio Codec: NAU8810
  • Level Shifter: TXS0108E
  • Windows and Raspberry Pi support
  • Qualcomm MDM9x07 Chipset

Using SIM7600 GSM GPS 4G LTE with Arduino

Let’s look at how we can use AT Commands for Call and SMS functions with the SIM7600 GSM GPS 4G LTE and Arduino.

SIM7600 GSM GPS 4G LTE with Arduino

1. Plug the SIM card into the board.

2. Plug the GPS antenna into the interface.

3. Plug two 4G-GSM antennas into the main antenna interface and auxiliary one.

4. Plug the headphone with the microphone.

5. Plug the SD card into the SD card slot for SIM7600.

When powering the board and the SIM7600 module working, the onboard STA LED(blue) will turn on.

Setting up Arduino IDE

The Arduino IDE does not have the ATSAMD21G18A board pre-installed. As a result, we’ll need to use the Board Manager to install the “Arduino Zero Board.”

Manager, open the Boards To launch the Boards Manager dialogue box, select Tools-> Board-> Boards Manager… from the top Arduino IDE menu. Then connect the Arduino SAMD Boards (32-bit ARM Cortex-M0+) to the computer.

After you’ve finished installing everything, you can choose the Arduino Zero board as seen in the image below. You’ll need a USB TypeC Data Cable to program this board.

Source Code/Program

Now open the Arduino IDE and paste the following sketches below.Verify the code and upload.

#include <stdio.h>
#include <string.h>

#define DEBUG true
#define MODE_1A

#define DTR_PIN 9
#define RI_PIN 8

#define LTE_PWRKEY_PIN 5
#define LTE_RESET_PIN 6
#define LTE_FLIGHT_PIN 7

String from_usb = “”;

void setup()
{
SerialUSB.begin(115200);
//while (!SerialUSB)
{
; // wait for Arduino serial Monitor port to connect
}

delay(100);

Serial1.begin(115200);

//Serial1.begin(UART_BAUD, SERIAL_8N1, MODEM_RXD, MODEM_TXD);

pinMode(LTE_RESET_PIN, OUTPUT);
digitalWrite(LTE_RESET_PIN, LOW);

pinMode(LTE_PWRKEY_PIN, OUTPUT);
digitalWrite(LTE_RESET_PIN, LOW);
delay(100);
digitalWrite(LTE_PWRKEY_PIN, HIGH);
delay(2000);
digitalWrite(LTE_PWRKEY_PIN, LOW);

pinMode(LTE_FLIGHT_PIN, OUTPUT);
digitalWrite(LTE_FLIGHT_PIN, LOW); //Normal Mode
// digitalWrite(LTE_FLIGHT_PIN, HIGH);//Flight Mode

SerialUSB.println(“Maduino Zero 4G Test Start!”);

sendData(“AT+CGMM”, 3000, DEBUG);
}

void loop()
{
while (Serial1.available() > 0)
{
SerialUSB.write(Serial1.read());
yield();
}
while (SerialUSB.available() > 0)
{
#ifdef MODE_1A
int c = -1;
c = SerialUSB.read();
if (c != ‘\n’ && c != ‘\r’)
{
from_usb += (char)c;
}
else
{
if (!from_usb.equals(“”))
{
sendData(from_usb, 0, DEBUG);
from_usb = “”;
}
}
#else
Serial1.write(SerialUSB.read());
yield();
#endif
}
}

bool moduleStateCheck()
{
int i = 0;
bool moduleState = false;
for (i = 0; i < 5; i++)
{
String msg = String(“”);
msg = sendData(“AT”, 1000, DEBUG);
if (msg.indexOf(“OK”) >= 0)
{
SerialUSB.println(“SIM7600 Module had turned on.”);
moduleState = true;
return moduleState;
}
delay(1000);
}
return moduleState;
}

String sendData(String command, const int timeout, boolean debug)
{
String response = “”;
if (command.equals(“1A”) || command.equals(“1a”))
{
SerialUSB.println();
SerialUSB.println(“Get a 1A, input a 0x1A”);

//Serial1.write(0x1A);
Serial1.write(26);
Serial1.println();
return “”;
}
else
{
Serial1.println(command);
}

long int time = millis();
while ((time + timeout) > millis())
{
while (Serial1.available())
{
char c = Serial1.read();
response += c;
}
}
if (debug)
{
SerialUSB.print(response);
}
return response;
}

After uploading the code, open the serial monitor. You can now send the AT command to the board, and it will print the module response. There are some demos that show how to use the AT commands.

SIM7600 AT Commands Test

These are some basic functions to test AT Commands.

AT+CGMI // Request manufacturer identification
AT+CGMM // Request model identification
AT+CGSN // Request product serial number identification
AT+CSUB // Request the module version and chip
AT+CPIN? // Request the state of the SIM card
AT+CICCID // Read ICCID from SIM card
AT+CNUM // Request the subscriber number
AT+CNMP? // Preferred mode selection
AT+COPS? // Check the current network operator
AT+IPREX? // Check local baud rate
AT+CRESET // Reset the module

Get the GNSS location

To get the GNSS Location from SIM7600, use the following AT Commands.

AT+CGPS=1 // Start GPS session
AT+CGPSINFO // Get GPS fixed position information
AT+CGPS=0 // Stop GPS session

Send and receive SMS

With the SIM7600 and Arduino, we can send SMS. For this demonstration, it is advised that you utilize a serial monitor other than the Arduino IDE to transmit the AT command.

AT+CSCA=”XXXXXX” // Set the SMS service centre address
AT+CMGF=1 // Select SMS message format
AT+CMGS=”xxxxxx” // Send message to “xxxxxx”(the receiver number)

It will display “>” when you submit the above AT commands, and you can then send your message. When you’ve finished your message, send “1A” followed by the hexadecimal for confirmation or “1B” followed by the hexadecimal for cancellation. As a result, it is suggested that you utilize a different serial monitor.

AT+CMGR=3 // Read message
AT+CMGD=3 // Delete message

Make a call

You can make or receive a call with SIM7600 using the following AT Command

AT+CSDVC // Switch voice channel device
AT+CSDVC=1 // 1-Handset, 3-Speaker phone
AT+CLVL=2 // Set loudspeaker volume level to 2, the level range is 0 to 5
ATDxxxxx; // Call to xxxxx
AT+CHUP // Hang up the call
AT+CLIP=1 // Calling line identification presentation
ATA // Call answer

HTTP test

You can test the SIM7600 LTE HTTP request using the following commands.

AT+HTTPINIT // Initialize and start the HTTP
AT+HTTPPARA=”URL”,”http://www.makerfabs.com” // Set the URL
AT+HTTPACTION=0 // Connect the HTTP. (0-get, 1-post, 2-head)
AT+HTTPHEAD // Read the response’s header.
AT+HTTPREAD=0,3 // Read the content (“3” means the number of the reading data)

Test the SD card for SIM7600

When you plug an SD card into the SD card slot for SIM7600, You can use the following commands to check it.

AT+FSCD=D: // Select SD card directory as current directory
AT+FSLS // List directories/files in current directory
AT+CFTRANRX=”D: TEST.txt”,10 // Transfer a file to EFS
AT+CFTRANTX=”D: TEST.txt” // Transfer a file from EFS to host

Surfing the Internet using SIM7600

The SIM7600 Arduino Modem can be used as a wireless networking device to support internet surfing on a PC or Raspberry Pi. Connect the board (USB-LTE) to the PC using a Type-C USB cable.

Surfing the Internet using SIM7600

For surfing the internet you need to install the SIM7600 driver to the PC. The driver is available on resources.

Open Device Manager –> Other equipment –>“SimTech,Incorporated”- > Update the driver –> Browse my computer to find driver files –> Select a path for saving the driver file based on the system- >The installation is complete.

Install all the drivers that show as the yellow exclamation marks.

If the PC is unable to connect to the internet using this device, open the serial monitor and provide the AT command to begin networking.

AT$QCRMCALL=1,1

The network icon will then appear as a cellular network.

Surfing the Internet using SIM7600

If you still can’t connect to the internet, try using a PPP dial-up connection to get started networking. You can find more information on GitHub.

Conclusion:

I hope all of you had understand how to use SIM7600 4G GSM with Arduino | AT Commands, Call, SMS. We MATHA ELECTRONICS will be back soon with more informative blogs.

Leave a Reply

Your email address will not be published.