SIM7600CE-T/E-H/A-H/G-H 4G Modules

From ingcool
Revision as of 14:21, 22 June 2020 by INKU-admin123 (talk | contribs) (Created page with "==Introduction== The SIM7600X 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer. it is pretty lo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The SIM7600X 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer. it is pretty low power consumption.

You can connect this 4G module with a computer to surf the Internet or attach it onto Raspberry Pi to enable functions like 4G high-speed connection, wireless communication, making telephone calls, sending SMS, global positioning, etc.

User Guide

Testing

Hardware setting

  • This module comes with GSM antenna, LTE antenna and micro USB cable. Besides these you should prepare:
    • A 4G sim card
    • A microphone cable
    • A Micro SD card (Optional)
  • Insert the SIM card to the card slot, Insert the headphone cable and connect the LTE antenna.
  • back side
  • front size
  • Connect the USB interface of SIM7600E-H 4G HAT to PC with a micro USB cable. Then the PWR indicator will keep bright.
  • Press the PWRKEY button and hold for 1s, the NET indicator will blink 1 time per second.
  • Open Device Manager to check the COM ports
    Sim7600x-4G-HAT-wiki-1.jpg
  • Install SIM7600 driver(driver)

【Note】The default hardware of SIM7600CE 4G HAT needs to be turned on by button. If the hardware needs to be turned on automatically, you can use a connection line to connect the PWR and GND pins on the module pin, so that it can automatically turn on, as shown in the figure below
SIM7600X 4G HAT (3).png

Testing it with AT commands

General AT commands


Sim7600x-4G-HAT-wiki-3.jpg


Command Description Return
AT AT test command OK
ATE ATE1: Enable echo
ATE0: Disable echo
OK
AT+CGMI Module manufacturers OK
AT+CGMM Module model OK
AT+CGSN Serial number OK
AT+CSUB Module revision OK
AT+CGMR Firmware revision OK
AT+IPREX Set baud rate +IPREX:
OK
AT+CRESET Reset module OK
AT+CSQ Check signal quality +CSQ: 17,99
OK
AT+CPIN? SIM Card Status +CPIN: READY
AT+COPS? Operator selection +COPS:
OK
AT+CREG? Network registration +CREG:
OK
AT+CPSI? UE system infor
AT+CNMP Mode selection:
2:Automatic
13:GSM only
38:LTE only
48 : Any modes but LTE
... ....
OK

For more details, please refer to the documentation: SIM7500_SIM7600 Series_AT Command Manual_V1.07

Raspberry Pi use 4G

  • Insert the module to 40PIN GPIO of Raspberry Pi, connect the USB interface of 4G module to USB port of Pi, and start it.:

Hardware connection

route add -net 0.0.0.0 ppp0

Test GPS

  • Connecting the GPS antenna, and place the receiver on open area outdoor
  • AT Commands used
AT+CGPS=1	    //Enable GPS
AT+CGPSINFO       //Print GPS information to serial port
AT+CGPS=0       //Disable GPS

Sim7600x-4G-HAT-wiki-7.jpg

TCP/IP Connection

Please make sure that your SIM card supports GPRS services.

  1. Assemble the SIM card, connect all the antenna, and connect the module to PC by USB cable.
  2. Press the PWR button to power on the module and wait for a dozen seconds.
  3. Mkae sure that all the indicator light normally.

Set the local virtual servers settings

Virtual servers define the mapping between service ports of WAN and web servers of LAN. All requests from the Internet to service ports of WAN will be redirected to the computer (webservers of LAN) specified by the server IP. (see your router’s guide manual))

  1. Log in Management Console of your router with a browser (read your router’s guide manual for specific address)
  2. Set Port::2317(The Port can’t conflict to others. Here we set2317)
  3. Set LAN IP address of your computer (you can run CMD on your computer, and execute commands config to inquiry the address of IPv4), 192.168.1.168 as examples

Get WAN IP

You can search “IP” on the browser to get your WAN IP address
Sim7600x-4G-HAT-wiki-8.jpg

Set GPRS

AT+CGDCONT=1,"IP","CMNET"     //Set APN
AT+CSQ       //Check the quality of the signal, bigger the value, stronger the signal.
AT+CREG?         //GPRS network status
AT+CIPMODE=1        //TCP/IP mode
AT+CSOCKSETPN=1          //PDP profile number
AT+CIPMODE=0          //Choose TCP/IP mode
AT+NETOPEN         //Open socket
AT+CIPOPEN=0,"TCP","113.81.233.65",2317         //establish connection
AT+CIPSEND=0,9,         //Send data of a specific size
1A                     //(HEX format) Tell module to send data
AT+CIPCLOSE=0,         //close connection
AT+NETCLOSE,         //Close socket

Test TF card

1. Plug the SIM card, connect the LTE antenna, and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to power on

SIM7600X 4G HAT (5).png

2. User command to use TF card

AT+FSCD=D:				//Choose the path of TF card 
+FSCD: D:/
OK
AT+FSLS					//Check subdirecotry
+FSLS: SUBDIRECTORIES: 
overlays
MyDir
System Volume Information
...
...
OK

Sim7600x-4G-HAT-wiki-9.jpg</ br> 3. Create file and write data to TF card Create MyDir folder in the root directory and create tx.txt in the folder, write data test content to the file by the following commands

AT+CFTRANRX="D:/MyDir/t1.txt",12				//file name
>test content								//data
OK

Sim7600x-4G-HAT-wiki-10.jpg

4. Open file of TF card

AT+CFTRANTX="D:/MyDir/t1.txt"
+CFTRANTX: DATA,012
test content
+CFTRANTX: 0
OK

Sim7600x-4G-HAT-wiki-11.jpg</ br> Sim7600x-4G-HAT-wiki-12.jpg

For more information about the commands, please refer to SIM7500_SIM7600 Series_AT Command Manual_V1.07 P256~P268

Take calls

  • Connect the hardware and power on the SIM7600X module.
  • Commands for taking calls:
AT+CNUM Phone number (Not all SIM cards Support) +CNUM
OK
AT+CSDVC AT+CSDVC=1:Handset output
AT+CSDVC=3:Speaker output
OK
AT+CLVL=? check volume level OK
AT+CLVL=2 volume level set to 2 OK
ATD<phone_number>; Make calls OK
AT+CHUP Hang up call OK
AT+CLIP=1 Phone ring OK
ATA Answer call OK

Take call

【Note】: You need to check "new line" when using SSCOM to test

Send/Receive SMS

  1. Plug the SIM card, connect the LTE antenna and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to
  2. Check whether the indicators blink correctly (PWR’s and NET’s flashes).
  3. Use commands below to send SMS
Comamnd Description Return
AT+CMGF=1 select message format OK
AT+CSCS="GSM" Select TE character set: GSM OK
AT+CSMP set text mode para OK
AT+CMGS="<phonenumber>" Send message OK
AT+CNMI=2,1 message indications OK
AT+CMGR=1 Read message 1 OK

Send SMS

Receive SMS

Working with Raspberry Pi

Hardware connection

The relationship between SIM7600 control pins and Raspberry Pi IOs is shown in Table:

SIM7600X 4G HAT Raspberry Pi
5V 5V
GND GND
RXD TXD (BCM: 14)
TXD RXD (BCM: 15)
PWR P22 (BCM: P6)
FLIGHTMODE P7 (BCM: P4), high active

Initialize Raspberry Pi

You need to set the SIM7600 module to the working mode first.

  • Download demo codesdemo codes,unzip it and recommend the folder Rspberry Pi/c as SIM7600X,and sopy it to /home/pi directory of Raspberry Pi
  • Go to /home/pi/SIM7600X directory and run the following command.
chmod 777 sim7600_4G_hat_init
  • Set auto-run when booting:
sudo nano /etc/rc.local
  • Add the line below in the from of exit 0:
sh /home/pi/SIM7600X/sim7600_4G_hat_init

Sim7600x-4G-HAT-wiki-19.jpg

Enable serial port

For proper use, you need to disable the login shell and enable the hardware serial.

sudo raspi-config

Choose Interfacing Options ->Serial ->no -> yes,

Networking via wwan0 Interface

1、Connect the USB interface of SIM7600 module to Rasberry Pi by USB cable

2、Use ifconfig command to check wwan0 interface.

3、Install libqmi and udhcpc

sudo apt-get install libqmi-utils udhcpc -y

3、Check the status of wwan0 interface:

sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode
If the status is not online, you need to run the following command to configure it and test again.
sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'

4、Set wwan0 network

sudo qmicli -d /dev/cdc-wdm0 -w	
sudo ip link set wwan0 down	
sudo echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip
sudo ip link set wwan0 up

5、 Set APN and connect to network.

sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='YOUR_APN',username='YOUR_USERNAME',password='YOUR_PASSWORD',ip-type=4" --client-no-release-cid
Note: the apn, username, password and other parameters should be modified according to the actual situation.
The user name of APN can be ignore sometimes. For examples:
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='CMNET',ip-type=4" --client-no-release-cid

6、User udhcpc to set router and IP

 sudo udhcpc -i wwan0

7、Now you can disconnect the RJ45, turn off the WiFi and test the 4G network.

Minicom test

1、Connect the SIM7600 module and power on Raspberry Pi
2、Install minicom

sudo apt-get install minicom

3、Use the command minicom -D /dev/ttyS0 for testing
Default baud rate: 115200
If you use Pi2B/zero, the serial port should be ttyAMA0
4、Send commands:

Sim7600x-4G-HAT-wiki-20.jpg

Demo codes

1、Connect the SIM7600 module and power on Raspberry Pi
2、Dwonalod demo codes and copy it to /home/pi/ directory;

wget http://www.ingcool.com/w/images/2/29/SIM7600X-4G-HAT-Demo.7z
sudo apt-get install p7zip-full
7z x SIM7600X-4G-HAT-Demo.7z   -r -o/home/pi
sudo chmod 777 -R /home/pi/SIM7600X-4G-HAT-Demo

3、Enter the folder of bcm2835 compile and install BCM2835 libraries:

chmod +x configure && ./configure && sudo make && sudo make install

4、Enter the examples folder and run the codes as below:

sudo make clean      //Clean
sudo make        //compile 
sudo ./PhoneCall       //run the codes

You can also combine the commands:

sudo make clean && sudo make && sudo ./PhoneCall

PHONECALL example

Sim7600x-4G-HAT-wiki-21.jpg

SMS example

Sim7600x-4G-HAT-wiki-22.jpg

GPS example

Sim7600x-4G-HAT-wiki-23.jpg

TCP example

Sim7600x-4G-HAT-wiki-24.jpg

FTP example

Sim7600x-4G-HAT-wiki-25.jpg

Arduino example

Hardware connection

Connect the SIM7600 module to UNO PLUS / Arduino UNO:

SIM7600X 4G HAT UNO PLUS / Arduino UNO
5V 5V
GND GND
TXD 0 (RX)
RXD 1 (TX)
PWR 2

Install Arduino Libraries

Downloaad the demo codes and unzip it
Copy folder Waveshare_SIM7600X_Arduino_Library to libraries folder under the installation directory of Arduino IDE
Open Arduino IDE --> File -->Examples -->Waveshare SIM7600X,and run the examples:
Sim7600x-4G-HAT-wiki-26.jpg

Examples

PHONECALL example

Sim7600x-4G-HAT-wiki-27.jpg

SMS example

Sim7600x-4G-HAT-wiki-28.jpg

GPS example

Sim7600x-4G-HAT-wiki-29.jpg

TCP example

Sim7600x-4G-HAT-wiki-30.jpg

FTP example

Sim7600x-4G-HAT-wiki-31.jpg

Jetson Nano Examples

Hardware connection

Jetson Nano has the same 40PIN header as Raspberry Pi.

connection
SIM7600X 4G HAT Jetson Nano
5V 5V
GND GND
TXD 10 (Board)
RXD 8 (Board)
PWR 31(Board)

Jetson Nano minicom test

1、Connect SIM7600X 4G HAT to Jetson Nano and power on it by pressing the PWRKERY key for 3s.将SIM7600X 4G HAT接入Jetson Nano中,按下PWRKER键三秒后开机
2、Access Jetson nano
3、Open a terminal and install minicom:

sudo apt-get install minicom

3、use the command to test module

sudo minicom -D /dev/ttyTHS1 -b 115200

4、 Send commands:
Sim7600x-4G-HAT-wiki-32.png

Python Examples

Install libraries

sudo apt-get python3-pip
sudo pip3 install pyserial
sudo apt-get install p7zip

Download the demo codes

mkdir -p ~/Documents/SIM7600X_4G_HAT
wget -P ~/Documents/SIM7600X_4G_HAT/ http://www.ingcool.com/w/images/2/29/SIM7600X-4G-HAT-Demo.7z

Sim7600x-4G-HAT-wiki-33.png
Ener the folder of demo codes and unzip it

cd ~/Documents/SIM7600X_4G_HAT/
sudo p7zip --uncompress SIM7600X-4G-HAT-Demo.7z

AT

Connect the SIM7600X_4G_HAT to Jetson Nano.</ br> Enter the directoryJetson Nano/AT:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/AT/
sudo python3 AT.py

Sim7600x-4G-HAT-wiki-34.png

GPS

Connect the SIM7600X_4G_HAT to Jetson Nano.</ br> Enter the directory Jetson Nano/GPS:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/GPS/
sudo python3 GPS.py

Sim7600x-4G-HAT-wiki-35.png

PhoneCall

Connect the SIM7600X_4G_HAT to Jetson Nano.</ br> Enter the direcoryJetson Nano/PhoneCall:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/PhoneCall/
sudo python3 PhoneCall.py
Note: You need to modify the number by modify the codes.

Sim7600x-4G-HAT-wiki-36.png

SMS

Connect the SIM7600X_4G_HAT to Jetson Nano.</ br>
Enter the directory Jetson Nano/SMS:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/SMS/
sudo python3 SMS.py
Note: You need to change the phone number by modify the codes

Sim7600x-4G-HAT-wiki-37.png

TCP

Connect the SIM7600X_4G_HAT to Jetson Nano.</ br>。
Enter the directory Jetson Nano/TCP:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/TCP/
sudo python3 TCP.py
Note: you need to modify the address to the actual one.

Sim7600x-4G-HAT-wiki-38.png

Resources

Documents

Demo codes

Firmware

Software