PPP, which stands for Point-to-Point Protocol, is a communication protocol used for establishing a direct connection between a device and an internet service provider (ISP) over a serial link. PPP is commonly used in situations where a device needs to connect to the internet but cannot use traditional wired connections, such as in remote locations or on mobile devices.
In the case of cellular connectivity, PPP is used to establish a connection between a device and a cellular modem. PPP plays a critical role in the connection between a device and a cellular modem by providing a secure and reliable connection. It enables the device to authenticate with the cellular modem and establish a connection to the internet service provider. The PPP protocol also provides encryption capabilities to ensure that the data transferred between the device and the internet service provider is secure and protected from unauthorized access.
PPP is easy to establish, widely used protocol, and it is flexible with the devices. PPP may show a drop of the connection while using the AT command set for other functionality of modem. 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.
CAT-M1
CAT-M1 cellular connectivity is a type of communication protocol that uses a cellular network to connect devices to the internet. It is specifically designed for IoT (Internet of Things) devices, which require a low-power, wide-area network connection. PPP (Point-to-Point Protocol) is used to establish a direct connection between the device and the cellular modem, which enables the device to connect to the internet.
The CAT-M1 technology is ideal for IoT devices because it provides low-latency connectivity with a longer battery life, which means that devices can remain connected for extended periods without requiring frequent battery changes. PPP plays a crucial role in ensuring that the CAT-M1 technology provides a secure and reliable connection between the device and the internet service provider.
Here are some best practices for using CAT-M1 in IoT devices:
Optimize data transmission: Since CAT-M1 operates on LTE networks, it provides higher data rates than other LPWA technologies like NB-IoT. However, it's important to optimize data transmission to conserve power and reduce costs. You can do this by using efficient data formats, compressing data, and minimizing the number of transmissions.
Ensure network coverage: CAT-M1 provides extended coverage, but it's still important to ensure that your IoT devices are within range of a cellular tower. You can use network coverage maps to determine the strength of the cellular signal in your area
In this tutorial, we will explain step by step the PPP connection process with the Telit ME910C1 module in the Raspberry Pi Cellular IoT Kit (LTE-M).
Hardware Setup
It is important to properly setup your hardware before you get started. To setup the hardware please follow:
Cellular Connection
Before starting the cellular connection setup, the following module should be configured.
Before running the PPP make sure the module is configured to the right settings.
AT#USBCFG? should return 0, otherwise,send AT#USBCFG=0 then reboot the module after 10 seconds with AT#REBOOT
For sending AT commands, you may check the Sending AT Commands tutorial.
We will propose two options for cellular connectivity, either of which can be preferred.
1. Telit ME910C1 Quick Start Guide Provided by Module OEM
The scope of this document is to provide a general overview and basic instructions on how to get started with the Telit ME910C1 module. This guide includes the following topics.
- ME910C1 Main Features
- USB/UART Port Configuration
- Application Main Flow
- Network Registration
- CAT-M1 / NB-IoT Registration AT Script Example
- 2G Registration AT Script Example
- Access Technology Selection
- Speed Up Registration
- Check / Set Data Service
- TCP/UDP Script
- and more
If you want, you can follow the AT script examples for cellular connectivity here. We do not provide any support or troubleshooting steps for these scripts. Alternatively, you can follow the method we have prepared for you below.
2. Sixfab PPP Installer
This installer facilitates your cellular connection and establishes it in quite effortless manner.
Clone the repository, change it into the directory, and change the permission of the installation script. Then install it.
git clone https://github.com/sixfab/Sixfab_PPP_Installer.git
cd Sixfab_PPP_Installer
chmod +x ppp_install.sh
sudo ./ppp_install.sh
During the installation, the user will need to answer several questions, in order to complete the installation process. The questions are:
Please choose your Sixfab Shields/HATs
Type "6" and press ENTER.
What is your carrier APN?
Type your APN and then press ENTER. For Sixfab SIM, it is super.
Does your carrier need username and password?
Type "n" and press ENTER. You don't need this for the Sixfab SIM.
What is your device communication PORT?
Type "ttyUSB2" and press ENTER.
Do you want to activate auto-connect/reconnect service at Raspberry Pi boot up?
This option allows you to connect to the Internet via your HAT automatically when your Raspberry Pi starts. Since this option is not supported in Raspberry Pi Cellular IoT Kit, you need to type "n" and proceed.
Press ENTER key to reboot.
Connect the USB cable from the Base HAT to the Raspberry Pi.
Connection Usage
The steps for installing PPP have been completed, and now there is only one final step left for the cellular connection.
- For PPP connection, execute the sudo pon command from the terminal. If everything goes smoothly, an IP address will be assigned to your ppp0 interface and connection will be established through this interface.
- If you want to terminate the cellular connection, run the sudo poff command.
These two commands can be used for managing cellular connections. The cellular connection can be started/stopped according to your needs at any time.
Checking The Connection
Check if your connection is working by sending a ping to any address.
APN or device port
You can change APN and PORT from /etc/ppp/peers/provider.
To understand PPP further you can check PPP documentation.