Before we jump into the tutorial, let us check all the items required for this is available with us and prepare our hardware.
- Raspberry Pi (Model 3B+ and 4 are recommended)
- Cellular IoT Application Shield – LTE-M & NB-IoT & eGPRS
- LTE – GNSS Dual u.FL Antenna
- 40 pin Header
- Right Angle Micro USB Cable
- SIM card
Enabling serial console
By default, the primary UART is assigned to the Linux console. If you wish to use the primary UART for other purposes, you must reconfigure Raspberry Pi OS. This can be done by using
- Start raspi-config: sudo raspi-config.
- Select option 5 - interfacing options.
- Select option P6 - serial.
- At the prompt Would you like a login shell to be accessible over serial? answer 'No'.
- At the prompt Would you like the serial port hardware to be enabled? answer 'Yes'.
- Exit raspi-config and reboot the Pi for changes to take effect.
In order to check the drivers, first press the Power Key of the HAT which will power up the module(You may confirm it when the STAT LED lits)
- Then open up a terminal and run
As an output, you should see
ttyUSB0, ttyUSB1, ttyUSB2, ttyUSB3.
If any of them is missing there is an issue with the driver.
Recent kernel update
Recent kernel update 5.4.66+ has an issue with the driver of the Quectel module.
The easiest way to solve the issue is by downgrading the kernel to 5.4.65.
You can use the following commands to get the mentioned kernel version on your Raspberry Pi.
sudo apt update
sudo rpi-update a995f0c9a9b3e5dbd2a41f69f5c4c82cdf33c7ec
Then reboot the Raspberry PI
- Download the Cellular IoT Application Shield repository.
git clone https://github.com/sixfab/Sixfab_RPi_CellularIoT_Library.git
- Goto directory Sixfab_RPi_CellularIoT_Library.
- Complete the installation.
sudo python3 setup.py install
PPP(Point-to-Point Protocol) is a data layer communication protocol that is established through the serial port of the modem. These Serial port communication could be either the UART(/dev/ttyS0) or the serial exposed to USB(/dev/ttyUSB3). This serial is also used for both modem commands (AT commands) and responses. This connection is established by dial-up (ATD*99#)
PPP is easy to establish, widely used protocol, and flexible with the devices. PPP may show a drop of the connection while using the AT command set for other functionality of modem.
The LTE radio protocol has native support of TCP/IP and IPv6, so there is no need to actually wrap TCP/IP into PPP over the radio interface. The PPP protocol is just used between the computer and the modem to make the connection look like a legacy dial-up modem-based network connection.
If you need to establish an internet connection for a short period of time and the date to be transferred is not high, you may stick to PPP.
Now we can proceed to establish an active internet connection.