Previously we have used GPRS shield to establish internet connection. Now we will use 3G, 4G/LTE shield for PPP internet connection. In order to make a 3G and 4G connection we will need to use Quectel UC20 and Quectel EC25 modules respectively.
As this tutorial is for 3G-4G/LTE PPP Internet connection, we will use Quectel UC20 3G module or Quectel EC25 4G/LTE module, which are series of powerful function UMTS/HSPA+ module and series of LTE category 4 module optimized specially for M2M, IoT and multimedia applications respectively. Due to rich set of protocols, industry-standard interfaces and abundant functionalities extend the applicability of the module ti a wide range of M2M and IoT applications such as industrial router, industrial PDA, rugged tablet PC, video surveillance and digital signage.
Since we are demonstrating this tutorial with Quectel EC25 4G/LTE module, the features of the module are as follows.
#Note: We also have a script PPP installer, which connects to internet with fewer step. LINK to new tutorial
- Backward compatible with existing EDGE and GSM/GPRS networks.
- Data rates: 150Mbps downlink and 50Mbps uplink
- Simple migration from 3G to 4G
- Operates with power from Raspberry Pi. Externally, 9V power can be supplied.
- Operation Temperature -40°C ~ +85°C
Lets have a look on the pin assignment of the shield. GPIO23 disables wireless communications and GPIO24 is used for force hardware reset.
Sixfab 3G,4G/LTE shield pin assignment
We will need to follow the following steps:
# The tutorial is covered using Raspberry Pi 3
1. Connect EC25 module to the shield.
Sixfab 3G,4G/LTE shield and EC25 module
EC25 module connected to shield
2. Insert SIM into the shield.
Inserting Sim to Shield
3. Attach the shield to the raspberry pi. Connect USB to Raspberry Pi
Shield Attached to Raspberry Pi 3
4. Connect Raspberry Pi to Internet via WiFi or Ethernet.
Open the terminal(if you are using desktop or laptop you may connect raspberry pi with SSH. Also enable ssh from the Menu > Preferences > Raspberry Pi Configuration as shown in the figure below)
Raspberry Pi Configuration
5. Once Raspberry Pi is connected, update Raspberry Pi by following command
sudo apt-get update
Update command in Terminal
6. Quectel Module support is to be added to the kernel, since Raspbian Jessie Kernel doesn’t support Quectel EC25/ UC20 modules.
6a. Install rpi-update
sudo apt-get install rpi-update
6b. Update Raspberry Pi Kernel using following command
6c. Once updated Reboot the device
6d. Connect USB Cable to sheild from Raspberry Pi.
and check if ttyUSB3 is available.
Looking for ttyUSB3
7. Now ppp-creator.sh script is to be downloaded.
chmod +x ./ppp-creator.sh
sudo ./ppp-creator.sh HOLOGRAM ttyUSB3
*HOLOGRAM is the APN. As for example, APN for Boost Mobile is Boost_Mobile, for Verizon is vzwinternet, for Virgin Mobile is Sprint etc. ttyUSB3 is the connection.
If you are using UART of Raspberry Pi 3 then use ttyS0 instead of ttyUSB3 or for other versions of Raspberry Pi use ttyAMA0.
change mode command
8. Disconnect Raspberry Pi from WiFi or Ethernet.
sudo pppd call gprs
sudo pppd call gprs&;
Here & sign allows to run the command in background.
Connecting to Internet
The SIGNAL LED indicates the connectivity, HIGH indicates Network is connected.
(Open a browser and check a website)
9. Just to check the status of shield and ip, type
Checking IP and status