QMI Interface with 3G-4G/LTE Base Shield v2

QMI interface has been mostly asked tutorial Quectel UC20 / Quectel EC25 with our Sixfab 3G-4G/LTE Base Shield v2.

In this tutorial we will be demonstrating you the process step by step. Without further ado, lets get started.

Hardware Setup

  1. Plug Quectel EC25 Mini PCIe module to the Sixfab 3G-4G/LTE Base Shield v2.
  2. Connect required antennas to EC25 module. (Antenna Connecting Guide will be Available soon!)
  3. Attach the Shield on top of your Raspberry Pi and connect the micro-USB cable that comes with the Shield.
Note:

Make sure you are using original Raspberry Adapter as your power source.

Software Setup

  1. First run update
    sudo apt-get update
  2. Install Raspberry Pi kernel headers.

    sudo apt-get install raspberrypi-kernel-headers

  3. Check installed kernel headers packet version ls /usr/src
    In our case, it is 4.14.79

  4. Now open your browser and go to rpi-firmware github repository commits

  5. Here, find out your version and click on <> button to browse the repository at that point in the history.


  6. From the link copy the hash as shown in the image below.


  7. Now go back your terminal and update rpi in following format. Replace the term <hash> with your hash as shown in the image.
    sudo rpi-update <hash>


  8. Reboot your Raspberry Pi in order to activate the new firmware.
  9. After rebooting, download qmi_installer.sh script.
    wget https://gist.githubusercontent.com/saeedjohar/0fa8c8d1f1c1ae286a9cfd22db5bfc87/raw/7c15a2f89efcf38168d2e7bae10a24957bc7eede/qmi_install.sh


  10. Change the permission of the script.
    sudo chmod +x qmi_install.sh


  11. Run the installer script
    sudo ./qmi_install.sh


  12. At the end of installation enter any key to reboot your Raspberry Pi.
  13. |Open and change your directory to files/quectel-CM
    cd /files/quectel-CM


  14. Now run the following command to connect to the Internet
    sudo ./quectel-CM -s internet
    Here internet is the APN for the network provider.
    Don’t forget to replace it with your APN.


  1. Now you can check you IP using
    ifconfig wwan0


PPP installer for Sixfab Shield

Sixfab offers Shields for Raspberry Pi which provides cellular Internet connection anywhere with the availability of mobile network coverage. These shields are:

  1. Raspberry Pi GSM/GPRS Shield
  2. Raspberry Pi 3G-4G/LTE Base Shield V2
  3. Raspberry Pi Cellular IoT Application Shield

Each of these shield can be connected to Internet via PPP(Point to Point Protocol). For this tutorial we have written an script to install and perform required steps.

Without further ado let us jump into the installation process:

  1. Get the script by the following command

    wget https://raw.githubusercontent.com/sixfab/rpiShields/master/ppp_installer/install.sh

  2. Now change the permission of the downloaded script.

    chmod +x install.sh

  3. Now install the script

    sudo ./install.sh

    It will ask several questions, just answer them accordingly to complete the installation process. The questions are:

    • Please choose your Sixfab Shield

      You will be offered to choose among the mentioned three shields. Then it will fetch required scripts for you.

      install.sh01

    • Do you have updated kernel

      It asks if your kernel is up-to-date. If no[N] it updates the kernel else it skips the update. Then it installs ppp.

      install.sh02

    • What is your carrier APN?

      Here, it asks for your carrier’s APN. For me it is hologram.

      install.sh03

    • Enter your PORT name

      In this step you will enter your PORT. For 3G, 4G/LTE Base Shield it will be ttyUSB3.

      install.sh04

    • Do you want to activate auto connect/reconnect service at R.Pi boot up?

      This option allows you to connect to Internet via your shield automatically when your Raspberry Pi Starts. If you want to connect to Internet automatically type y else N. If you have selected N then you will need to run sudo pon to connect to internet and sudo poff to stop it.

      intall.sh05

Enjoy your Internet connection.

EXTRA

Route: One of the possible errors you may get is routing error. In this case, run the following commands

sudo route del default

sudo route add default ppp0

Credential: If your carrier asks for username and password;
Remove noauth from /etc/ppp/peers/provider and add following lines
user “YOUR USERNAME”
password “YOURPASSWORD”

Sensor Test Tutorial for Sixfab Arduino Cellular IoT Application Shield

Sixfab has came up with Arduino Cellular IoT shield that have combined LTE technilogies Cat.M1, Cat.NB1(NB-IoT) and eGPRS, which is based on Quectel BG96 module. It also have built-it sensors, LED and relay. Sixfab also has a RPi Cellular IoT Application HAT.

Sixfab is also providing library to use the shield. To keep the it easy we will be showing how to install the library and access the sensor data in our first tutorial.  Read More