ECM (Ethernet Control Model) is the easiest method in order to provide an internet connection to your single-board computer such as Raspberry Pi. This tutorial describes how to configure your cellular module for the ECM mode.
Compatible Modules
The ECM mode successfully works on LE910Cx - NF, EU, AP and ME910C1-WW.
Prepare Hardware
It is important to properly setup your hardware before you get started. To setup the hardware please follow:
Uninstall Modem Manager Service
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
Configuration
First, let's ensure that the Telit cellular module is correctly loaded in Linux. 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. If you do not know your APN, contact your SIM provider.
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
For the ME910C1-WW module, do the following.
AT#USBCFG=3
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
Compatible Modules
The ECM mode successfully works on EC25-A, EC25-E, EC25-AU, EG25-G variants. The EC25-AF does not support it. The rest of the variants are not tested.
Prepare Hardware
It is important to properly setup your hardware before you get started. To setup the hardware please follow:
Uninstall Modem Manager Service
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
Configuration
First, let's ensure that the Quectel cellular module is correctly loaded in Linux. 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. If you do not know your APN, contact your SIM provider.
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.