Getting Started with ECM Mode
This section will lead you step by step to create a cellular connection with the Raspberry Pi 4G/LTE Cellular Modem Kit
For NVIDIA Jetson Nano 4G/LTE Cellular Modem Kit Users
If you are looking for the Getting Started Guide to set up your NVIDIA Jetson Nano 4G/LTE Cellular Modem Kit, please visit the dedicated page by clicking the link below:
➡️ Go to Getting Started with NVIDIA Jetson Nano 4G/LTE Cellular Modem Kit
This guide will walk you through the process of creating a reliable cellular connection with your Raspberry Pi using the Raspberry Pi 4G/LTE Cellular Modem Kit. By following the steps outlined below, you will be able to set up the hardware, establish a cellular connection using ECM mode, and explore remote terminal access via Raspberry Pi Connect.
Box Contents
System Requirements
To getting started with the Raspberry Pi 4G/LTE Cellular Modem Kit, first check the following requirements.
Hardware Requirements | Software Requirements |
---|---|
Raspberry Pi 3, 3B+, 4 or 5 | Raspberry Pi OS |
Header Options
All steps are shown with Raspberry Pi 4. The only assembly difference between Raspberry Pi 5 and Raspberry Pi 4 is the spacers and headers used.
Choose the Long or the Short 40-pin GPIO based on your project size and requirements.
The Long Header | The Short Header |
---|---|
Allows stacking with full access to all GPIO pins on the Raspberry Pi. | More compact and space-saving for smaller projects. |
Ideal for broad applications or prototyping purposes. | Ideal for embedded systems or productized projects where access to all GPIO pins may not be necessary. |
Step 1: Assembly
1. Attach the mini PCIe module to the HAT
2. Attach the antenna to the mini PCIe module
Make sure the right antenna is connected to the right port. Attach LTE full band PCB antenna/LTE connector of the LTE-GNSS dual antenna to the main Antenna interface/diversity antenna interface & GPS Antenna portion goes to the GNSS antenna interface.
3. Attach the header under the board
4. Attach the micro SIM as shown
5. Attach the Base HAT to the Raspberry Pi and stack it with the plastic spacer kit
6. Plug the USB cable
7. Connect the power supply to your Raspberry Pi
Step 2: Sixfab SIM Activation
Log in to connect.sixfab.com to register and activate your Sixfab SIM.
Navigate to the "Assets" section and select "+ Register Asset"
Enter ICCID (SIM Card ID) and Asset name (optional), then click the "Register" button.
After completing the registration, go to the asset details and verify that the "Status" is active.
Step 3: Uninstall Modem Manager
The Modem Manager service is installed by default on the Raspberry Pi OS (Bookworm). For a smooth ECM connection, this service must be uninstalled. To uninstall it, run the following command. If it is not installed, skip this step.
sudo apt purge modemmanager -y
If it is not installed, skip this step.
Step 4: Cellular Internet Connection in ECM Mode
This step will guide you through setting up a cellular internet connection in ECM mode using the 4G/LTE Cellular Modem Kit. Depending on your chosen module —Telit or Quectel— the instructions will vary slightly. Please follow the steps specific to your module to ensure a successful connection.
Configuration
First, let's ensure that the Telit cellular module is correctly loaded in Raspberry Pi OS. Telit modules are most often automatically detected in recent Linux kernels, this can be verified in different ways by the commands below.
The lsusb command is used to display the information about USB buses and the devices connected to them.
lsusb
It can look e.g. like this:
The lsusb -t command shows the USB endpoints of detected USB devices and related drivers.
We can start communicating with the cellular module over AT commands. There are different implementations on Linux that enable communication with serial interfaces. You can check out the Sending AT Commands tutorial.
Configure APN
APN is super if you are using Sixfab SIM. In this case, the command should be:
AT+CGDCONT=1,"IPV4V6","super"
Configure Module
Now, we can start to configure the modem for ECM mode. Execute the following command for the LE910Cx series module.
AT#USBCFG=4
The modem may reboot after the execution of the command.
Reboot the Module
Then reboot the modem using the following command.
AT#REBOOT
Wait for the modem to boot again. It may take 30 seconds. After the reboot, open a new Linux terminal and check for usbX in the network interface using ifconfig or ipaddr commands.
Internet Connection
Then start the internet connection using the following command. If you get ERROR please try the same command again.
AT#ECM=1,0
Test Internet Connection
Once the internet is active you should see wwan0 in your internet interface. You can use route -n or ip addr and look for wwan0 interface. Now check the assigned IP address and test the connection.
Troubleshooting
If the wwan0 interface is not visible reboot your whole system, check your SIM, antenna, module and USB.
Check the configuration of the module.
AT#USBCFG? # Should return 3 or 4
Check the TCP context is activated.
AT#ECM? # Should return 0,1. If return is 0,0 run the AT#ECM=1,0,"","",0 command in minicom.
Check the SIM is detected by the module.
AT+CPIN? # Should return READY
Check if the module is registered to the network.
AT+CREG? # Should return 0,1 or 0,5
Check the APN is right and have an IP.
AT+CGDCONT? # Should return the APN details and IP address
Configuration
First, let's ensure that the Quectel cellular module is correctly loaded in Raspberry Pi OS. Quectel modules are most often automatically detected in recent Linux kernels, this can be verified in different ways by the commands below:
The lsusb command is used to display the information about USB buses and the devices connected to them.
lsusb
It can look e.g. like this:
The lsusb -t command shows the USB endpoints of detected USB devices and related drivers.
We can start communicating with the cellular module over AT commands. There are different implementations on Linux that enable communication with serial interfaces. You can check out the Sending AT Commands tutorial.
Configure APN
APN is super if you are using Sixfab SIM. In this case, the command should be:
AT+CGDCONT=1,"IPV4V6","super"
Configure Module
Now, we can start to configure the modem for ECM mode.
AT+QCFG="usbnet",1
The modem may reboot after the execution of the command.
Reboot the Module
Then reboot the modem using the following command.
AT+CFUN=1,1
Wait for the modem to boot again. It may take 30 seconds. After the reboot, open a new Linux terminal and check for usbX in the network interface using ifconfig or ipaddr commands.
Test Internet Connection
Once the internet is active you should see usbX in your internet interface. You can use ifconfig or ipaddr and look for usbX interface. Now check the assigned IP address and test the connection.
Troubleshooting
If usbX interface is not visible reboot your whole system, check your SIM, antenna, module and USB.
Check the configuration of the module.
AT+QCFG="usbnet" # Should return 1
Check the SIM is detected by the module.
AT+CPIN? # Should return READY
Check if the module is registered to the network.
AT+CREG? # Should return 0,1 or 0,5
Check the APN is right and have an IP.
AT+CGCONTRDP # Should return the APN details and IP address.
Raspberry Pi Connect for Remote Access
Once your cellular connection is established, you can manage your Raspberry Pi remotely using Raspberry Pi Connect. This service allows you to access a terminal from anywhere, making it easy to monitor and control your Raspberry Pi over the internet without physical access.
Raspberry Pi Connect simplifies the process by providing a browser-based terminal, file access, and management tools. It can be used as an alternative to setting up remote SSH, and it's particularly useful when working with remote cellular connections.
For more information on using Raspberry Pi Connect, refer to the official documentation: Raspberry Pi Connect
Updated 3 days ago