ECM (Ethernet Control Model) is one of the easiest method for enabling internet connection to your single-board computer such as Raspberry Pi. It allows the cellular module to present itself as a standard USB Ethernet device, supported natively by the Linux kernel without requiring additional driver installation.
This tutorial walks through the steps to configure cellular modules to operate in ECM mode and establish a stable internet connection.
This tutorial is divided into two sections—Telit and Quectel—to reflect the specific setup instructions for each module type. Users should follow the tab corresponding to their module brand to ensure proper configuration and optimal results.
Compatible Modules
The ECM mode has been successfully tested and confirmed to work with the following Telit modules:
- LE910C4-NF
- LE910C4-EU
- LE910C4-AP
- ME910C1-WW
These modules support ECM functionality out-of-the-box or with minimal AT command configuration, allowing them to expose a virtual Ethernet interface wwan0 to the host system(Raspberry Pi OS).
Prepare Hardware
It is important to properly setup the hardware before getting started. To setup the hardware the following guide should be followed:
Disabling ModemManager Service (if installed)
On Raspberry Pi OS (Bookworm and later), the ModemManager service is typically installed by default. While useful for managing cellular modems, it can interfere with ECM mode by attempting to take control of the modem ports.
To ensure a smooth ECM connection, it is recommended to stop and disable ModemManager service:
sudo systemctl stop ModemManager.service
sudo systemctl disable ModemManager.service
Alternatively, if one prefers to completely remove it, the service can be uninstalled instead:
sudo apt purge modemmanager -y
If ModemManager is not installed on the system, this step can be safely skipped.
Configuration
First, ensure that the Telit cellular module is correctly detected 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:
Verify that the LE910C4-XX module is detected. The lsusb command should show the Telit module with vendor ID 1bc7 and product ID 1201, which operates in RMNet (QMI) mode by default before ECM configuration:
The lsusb -t command shows the USB endpoints with the current driver configuration. Note that in this output, the module shows multiple interfaces with option driver on If 0 and If 3-6, while If 2 uses qmi_wwan driver, which indicates the module is detected:
Communication with the cellular module over AT commands can now be started. There are different implementations on Linux that enable communication with serial interfaces. The Sending AT Commands tutorial can be checked for reference.
Configure APN
In this case, the command should be:
AT+CGDCONT=1,"IPV4V6","super"
Configure Module for ECM Mode
The modem can now be configured for ECM mode. Execute the following command for the LE910Cx series module:
AT#USBCFG=4
The modem will automatically reboot after the execution of the command.
Reboot the Module (Optional - Only if the module does not reboot automatically)
Then reboot the modem using the following command.
AT#REBOOT
Wait for the modem to boot again. It may take 30 seconds.
Verify Network Status
Use the following commands to verify the network status and configuration:
Command | Description | Expected Response |
---|---|---|
AT+CPIN? |
Check SIM card status | +CPIN: READY |
AT+CSQ |
Check signal quality | +CSQ: 25,99 |
AT+COPS? |
Check network operator | +COPS: 0,0,"T-Mobile" |
AT+CREG? |
Verify network registration | +CREG: 0,1 or +CREG: 0,5 |
AT+CGDCONT? |
Check APN details | +CGDCONT: 1,IPV4V6,super,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 2,IPV4V6,ims,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 3,IPV4V6,SOS,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,1 |
Verify ECM Mode
After the reboot, verify that the ECM drivers are properly loaded. Check the USB device detection to confirm successful ECM configuration.
The lsusb command should show the module with the updated product ID (1206), indicating ECM mode activation:
The lsusb -t command shows the USB endpoints with ECM drivers properly loaded. Verify that the cdc_ether driver is now active on interfaces If 2 and If 3, indicating successful ECM activation:
Establish Internet Connection
Once ECM drivers are active, start the internet connection using the following command:
AT#ECM=1,0
Note: When the system reboots or the internet connection is lost, only the AT#ECM=1,0 command needs to be repeated. All previous configuration steps (Configure APN, Configure Module & Verify Network Status) are one-time setup procedures.
Enable Network Interface
After successful ECM activation, the network interface must be configured. If the wwan0 interface appears in ip addr but not in ifconfig, run:
sudo dhclient -v wwan0
If required, add a DNS server to /etc/resolv.conf:
echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
Test Internet Connection
To verify that the connection is working correctly, users can check the network interface status, routing table, and test connectivity:
Troubleshooting
If the wwan0 interface is not visible, reboot the whole system and check the 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
The output below shows the ME910C1-WW module detected as a USB device before ECM configuration. The module appears with vendor ID 1bc7 and product ID 0036 (Telit Wireless Solutions), which operates in RMNet (QMI) mode by default before ECM configuration:
The lsusb -t command shows the USB endpoints of detected USB devices and related drivers. Below, the ME910C1-WW module shows multiple interfaces with option driver on If 0, If 3-6, and qmi_wwan driver on If 2, indicating the module is detected but needs ECM activation:
Communication with the cellular module over AT commands can now be started. There are different implementations on Linux that enable communication with serial interfaces. The Sending AT Commands tutorial can be checked for reference.
Configure APN
In this case, the command should be:
AT+CGDCONT=1,"IPV4V6","super"
Configure Module
For the ME910C1-WW module, the following should be done:
AT#USBCFG=3
The modem will automatically reboot after the execution of the command.
Reboot the Module (Optional - Only if the module does not reboot automatically)
Then reboot the modem using the following command.
AT#REBOOT
Wait for the modem to boot again. It may take 30 seconds.
Verify Network Status
Use the following commands to verify the network status and configuration:
Command | Description | Expected Response |
---|---|---|
AT+CPIN? |
Check SIM card status | +CPIN: READY |
AT+CSQ |
Check signal quality | +CSQ: 25,99 |
AT+COPS? |
Check network operator | +COPS: 0,0,"T-Mobile" |
AT+CREG? |
Verify network registration | +CREG: 0,1 or +CREG: 0,5 |
AT+CGDCONT? |
Check APN details | +CGDCONT: 1,IPV4V6,super,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 2,IPV4V6,ims,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 3,IPV4V6,SOS,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,1 |
After the configuration and reboot, the USB output should show the ECM driver properly loaded:
Verify the ME910C1-WW module is detected after ECM configuration. The lsusb command should show the Telit module with vendor ID 1bc7 and product ID 1102:
The lsusb -t command shows the USB endpoints with ECM drivers properly loaded. Verify that the cdc_ether driver is now active on interfaces If 2 and If 3, indicating successful ECM activation:
Internet Connection
Then start the internet connection using the following command. If an ERROR is received, the same command should be tried again.
AT#ECM=1,0
Note: When the system reboots or the internet connection is lost, only the AT#ECM=1,0 command needs to be repeated. All previous configuration steps (Configure APN, Configure Module & Verify Network Status) are one-time setup procedures.
Test Internet Connection
To verify that the connection is working correctly, users can check the network interface status, routing table, and test connectivity:
Troubleshooting
If the wwan0 interface is not visible, reboot the whole system and check the 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 has been successfully tested and confirmed to work with the following Quectel modules:
- EC25-A
- EC25-E
- EC25-AU
- EG25-G
Note: The EC25-AF variant does not support ECM mode. Other variants have not been tested.
Prepare Hardware
It is important to properly setup the hardware before getting started. To setup the hardware the following guide should be followed:
Disabling ModemManager Service (if installed)
On Raspberry Pi OS (Bookworm and later), the ModemManager service is typically installed by default. While useful for managing cellular modems, it can interfere with ECM mode by attempting to take control of the modem ports.
To ensure a smooth ECM connection, it is recommended to stop and disable ModemManager service:
sudo systemctl stop ModemManager.service
sudo systemctl disable ModemManager.service
Alternatively, if one prefers to completely remove it, the service can be uninstalled instead:
sudo apt purge modemmanager -y
If ModemManager is not installed on the system, this step can be safely skipped.
Configuration
First, 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 output below shows the Quectel EC25 module detected as a USB device. The module appears with vendor ID 2c7c and product ID 0125 (Quectel Wireless Solutions Co., Ltd.) and is assigned to Bus 001 Device 002.
The lsusb -t command shows the USB endpoints of detected USB devices and related drivers. The EC25 module shows multiple interfaces with option driver on If 0-3 for serial communication, and cdc_ether driver on interfaces If 4 and If 5 for ECM functionality:
Communication with the cellular module over AT commands can now be started. There are different implementations on Linux that enable communication with serial interfaces. The Sending AT Commands tutorial can be checked for reference.
Configure APN
In this case, the command should be:
AT+CGDCONT=1,"IPV4V6","super"
Configure Module for ECM Mode
The modem can now be configured for ECM mode.
AT+QCFG="usbnet",1
The modem will automatically reboot after the execution of the command.
Reboot the Module (Optional - Only if the module does not reboot automatically)
Then reboot the modem using the following command.
AT+CFUN=1,1
Wait for the modem to boot again. It may take 30 seconds.
Verify Network Status
Use the following commands to verify the network status and configuration:
Command | Description | Expected Response |
---|---|---|
AT+CPIN? |
Check SIM card status | +CPIN: READY |
AT+CSQ |
Check signal quality | +CSQ: 25,99 |
AT+COPS? |
Check network operator | +COPS: 0,0,"T-Mobile" |
AT+CREG? |
Verify network registration | +CREG: 0,1 or +CREG: 0,5 |
AT+CGDCONT? |
Check APN details | +CGDCONT: 1,IPV4V6,super,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 2,IPV4V6,ims,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,0 +CGDCONT: 3,IPV4V6,SOS,0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0,0,0,0,1 |
Test Internet Connection
To verify that the connection is working correctly, users can check the network interface status, routing table, and test connectivity:
Troubleshooting
If usbX interface is not visible, reboot the whole system and check the 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.