In compliance with high industry standards

Browse our Blog. You will find multiple applications, solutions, code examples. Navigate using the tag cloud or search using specific criteria

How to send and receive SMS between GSM module and mobile phone

Working with SIM7600E 4G HAT module and a Raspberry Pi Board

SIM7600E-H 4G HAT for Raspberry Pi

INTRODUCTION


In this blog we are going to introduce the SIM7600E-H 4G HAT for Raspberry Pi, LTE Cat-4 4G / 3G / 2G, GNSS, for Europe, Southeast Asia, West Asia and Africa, and we are going to test it.

For the testing, we are going to send SMS from our Toucherry Pi 10" with the  SIM7600E 4G Hat module, to our mobile phone. 

 


RELATED LINKS

How to connect 

Raspberry PLC to Wi-Fi



Read >>

 

Basics about Raspberry Pi PLC

analog outputs



Read >>


How to find your

perfect industrial PLC



Read >>

How to program Raspberry PLC

interrupt inputs with Python



Read >>

Raspberry PLC

family products



Read >>

TouchBerry Pi

family products



Read >>


CONNECTIONS

In this case, we have a Raspberry Pi 4 connected to the SIM7600E-H 4G Hat module through the USB port as shown:

Raspberry Pi 4 connected to the SIM7600E-H 4G Hat module

SIM7600E-H 4G HAT

GPRS (General Packet Radio Service) is an extension of GSM based on packet transmission that offers a more efficient service for data communications, especially in the case of Internet access.


GSM
 (Global System for global Communications) is the communication system most widely used in mobile phones, and its first functionality is the voice transmission. However, it also allows data transmission like SMS or internet, at a very low speed.



The SIM7600E-H 4G HAT is multi-band LTE-TDD/LTE-FDD/HSPA+ and GSM/GPRS/EDGE module solution in a SMT type which supports LTE CAT1 up to 10Mbps for downlink data transfer. It has strong extension capability with rich interfaces including UART, USB2.0, I2C, GPIO etc. With abundant application capability like TCP/UDP/FTP/FTPS/HTTP/HTTPS/DNS, the module provides much flexibility and ease of integration for customer's application, such as open source projects.



SEND SMS

The AT+CMGF command is used to instruct the GSM / GPRS modem to operate in SMS text mode. So, insert your SIM Card and to the SIM7600X board and let's start!

First, ensure that the hardware is right connected. So, connect open up a terminal window and type "sudo raspi-config" > Go to Interface Options > Serial Port > Reject the login shell to be accessible over serial > Accept the serial port hardware to be enabled.

Now, open the Serial Port by installing the screen tool:

sudo apt update
sudo apt install screen

screen /dev/ttyUSB2 115200 (you can use USB0, USB1 or USB2)

Once in the Serial Port, let's send some AT commands:

AT                              The device recognizes the SIM7600E module
OK                              Response  
AT+CFUN=1             Set phone functionality
OK                              Response  
AT+CMGF=1            Set the GSM modem in SMS Text Mode
OK                             Response  
AT+CMGS="+34666XXXX66"               <-- Add a phone number
> Type here your text message               <-- (Don't finish it with an Enter, but with Ctrl + Z)
OK                             Response
  

Know more about AT commands: 
https://simcom.ee/documents/SIM7600C/SIM7500_SIM7600%20Series_AT%20Command%20Manual_V1.01.pdf


RECEIVE SMS

The AT + CMGL command lists messages received on the GSM / GPRS modem. It can be used to get all received messages, all unread messages or all read messages.

Finally, let's set the GSM modem to Text Mode SMS and read all received messaged:

AT+CMGF=1                    Set the GSM modem in SMS Text Mode
OK                                     Response  
AT+CMGL="ALL"           <-- List all received messages
+ CMGL: 0, "REC READ", "+346XXXXXXX6", "", "21/05/21,12:32:09+08"
HIGH Temperature
OK                                     Response



Know more and learn how to work with the GPRS on Raspberry Pi:

https://www.industrialshields.com/es_ES/blog/blog-industrial-open-source-1/post/como-trabajar-con-el-modulo-gprs-de-raspberry-pi-272


Looking for your ideal PLC?

Take a look at this product comparison with other industrial controllers Arduino.

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC controller comparison >>

Do you want more information?

Just fill the form!

Tell me more!