The Telit LM940A11 LTE CAT-11, GPS, miniPCIe data-card deliver High speed data rates on Advanced LTE and offer a cellular connection for future products in Router and gateway environment. miniPCIe form factor data-card is particularly well-suited for products with very high throughput requirements such as routers mobile gateways and access points, to provide the most advanced 4G LTE connectivity, ensuring seamless connectivity to the end users.
The LM940A11 mCPIe module achieves download rates up to 600 Mbps through support of 3GPP release 11 LTE Carrier Aggregation. LM940A11 mPCie data card supports the various RF frequency bands and band combinations deployed worldwide with MIMO capabilities and latest generation carrier aggregation support.
Key Benefits:
- Standard Mini PCIe Data-card form factor.
- Take advantage of Advanced LTE technology networks delivering LTE Cat 11 throughput up to 600 Mbps in DLand 75 Mbps in UL.
- Full GNSS support –GPS, GLONASS, Galileo, Beidou.
- Increased connectivity performance with Carrier Aggregarion 3CA, MIMO and 256 QAM.
Telit LM940A11 is also available with a different mPCIe socket pin-out, 12147, Telit LM940A11, HW Rev. 2.
Please refer to the Telit LM940 Hardware Guide for complete details about the pin location differences in miniPCIe socket between hardware revision 1 and 2.
SIM Integration Design Guide Application Note for Telit modules, R17.
Application note on the network registration process for Telit 2G/3G/4G cellular modules.
This archive contains the Windows 11 WHQL certified Telit module drivers for x64 system platforms.
Microsoft Windows 11
WHQL certified
This archive contains the Windows 10 WHQL certified Telit module drivers for both x86 and x64 system platforms.
Microsoft Windows 10
WHQL certified
Update archive for the Telit LM940 module containing Windows TFI updater application as well as Telit XFP update binaries.
Microsoft Windows Systems:
Telit Windows drivers installed
Linux & other:
Drivers implemented according to Telit documentation
UXFP firmware download tool
PCN-0545-22-0041 for Telit LM940 series modules EOL notification
How to configure and save a "User Profile" using AT-commands on selected Telit modems.
Sometimes you might want to store some settings to be automatically loaded on startup, without having to configure your modem or make a script.
Fortunately Telit has made it easy to do this, by creating a "User Profile", and this FAQ will guide you through on how to set this up.
For this example, we'll make some configurations to the GPS settings of the module, but you can choose whichever settings you like.
First, send the AT command:
AT&V0?
You will get a long list with info, but the one I want you to check is the last one:
DEFAULT PROFILE : &Y0=user profile 1
Make note of the "Y0" - This might be different on your setup, but don't worry, we'll change this in the next step.
Send the following AT command:
AT&P0
This sets the modem to a custom user profile. (There are 2 user profiles available, "0" and "1". We are using "0" here.)
Now check that we have updated the profile with the AT command:
AT&V0?
And now it should say at the bottom:
DEFAULT PROFILE : &P0=user profile 1
Great! Now we're editing our user profile, so go ahead and type your settings:
AT$GPSP=1
AT$GPSANTPORT=3
AT$GPSACP
AT$GPSNMUN=1
AT$GPSNMUN=1,1,1,1,1,1,1
AT$GPSSAV
To save these settings, it's not enough to only type "AT$GPSSAV", we need to save some of the settings to our profile!
Type the following AT command to do a "save profile":
AT&W
Now do a reboot with:
AT#REBOOT
And when it's up and running again type:
AT$GPSNMUN?
And it should say:
$GPSNMUN: 1,1,1,1,1,1,1
More info regarding the different modes and settings can be found in the AT Command Guide here.
Which antenna ports should I connect antennas to on the LTE or 5G module?
It is important to understand the functionality of the different antenna ports on the cellular module when deciding which ports to use. There is a risk of underutilizing the module by not connecting antennas to the right ports. This guide aims to explain some general terms and abbreviations used to label and describe antenna ports and their different functionalities.
Some antenna port labels that are commonly used on cellular modules are listed below:
MAIN – Primary transmit and receive antenna port. Required for basic functionality.
DIV – Diversity receive port. This port is used to receive the same signal as the primary port, but at a different spatial point. By receiving the same signal at two different spatial points, the module can mitigate destructive effects that might be present on one of the different spatial points. The diversity receive functionality is especially useful in urban environments where the interference environments may be radically different between two spatial points. It is always recommended to use the diversity receive port as this functionality improves the quality and reliability of the overall link.
GNSS – GNSS receive port. GNSS stands for Global Navigation Satellite System, examples of such systems are GPS, Galileo, GLONASS and BeiDou. The available systems may differ between different modules. To see what systems are available for a specific module, please consult the modules hardware documentation. As this antenna port is used for positioning applications, a suitable GNSS antenna needs to be connected to this port in order to utilize this functionality.
MIMO – MIMO port. MIMO stands for Multiple Input Multiple Output and refers to the amount of antennas used at each side of the link. For example, 4x4 DL MIMO means that the base station and the module each use 4 antennas for the modules downlink. Usually, the MIMO label is used to denote antenna ports that are used for spatial multiplexing which is a technique used for increasing the bitrate. This is achieved by splitting the signal into different streams that are transmitted and received on spatially separated antennas on each side of the link. For the majority of cellular modules, spatial multiplexing is only available for the module's downlink.
AUX – Auxiliary antenna port. The available functions on this port may differ between modules. Examples of functionalities that can be present on this port are diversity receive, DL-MIMO and GNSS. Please consult the module's hardware documentation to see which functionalities are present on this port.
Some cellular modules have numeric, non-descriptive labels on their antenna ports. These modules can have different functionalities for different frequency intervals/bands, on one single antenna port. For these modules, consult the hardware documentation to find what functionalities are present for which frequency intervals/bands one the different antenna ports. Please note that antenna ports with transmit functionality for certain frequency bands need to have a antenna connected in order to utilize these frequency bands.
If you have further inquiries regarding antenna ports on cellular modules, please create a Support Ticket by visiting the following link: https://techship.com/support/new/
How to step by step set up a data connection over QMI interface using qmicli and in-kernel driver qmi_wwan in Linux?
Several cellular modules based on Qualcomm chipsets implements the Qualcomm Qualcomm MSM (QMI) Interface.
There is a open source Linux in-kernel driver supporting this interface and it is called qmi_wwan. This driver can be used together with ModemManager and NetworkManager to automate connection establishment and as a connection manager.
The library libqmi which ModemManager uses can also be used to communicate in a more direct way with the cellular devices over the QMI interface and to step by step do necessary configurations and trigger the data connection over the cellular network.
A selection of cellular modules can be supported:
Using RAW IP kernel configuration:
Sierra Wireless MC74 series, EM74 series, EM75** series
Telit LM940, LM960
Telit LN94x series (requires USB mode switch)
Simcom SIM7500 series, SIM7600 series, SIM7600 -H series
(can be supported in qmi_wwan driver from kernel 4.18 or by applying the following one line qmi_wwan source code patch on previous kernel builds: qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID)
Using 802.3 IP framing kernel configuration:
Simcom SIM7100 series
Sierra Wireless MC73**/EM73** series
ModemManager combined with NetworkManager will detect the cellular modules automatically in most cases, please refer to their respective documentations on how to establish a data connection using them.
Example on how to set up the data connection step by step manually with libqmi:
First install the libqmi Linux library e.g. by using your system package manager like apt or preferably latest version from source on the Freedesktop pages for libqmi project: https://www.freedesktop.org/wiki/Software/libqmi/
Verify that you have the Linux in-kernel qmi_wwan driver installed and attached for the cellular modules QMI interface over USB:
lsusb -t
Can look e.g. like this:
...
|__ Port 1: Dev 3, If 2, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
...
If the driver is not correctly loaded, please verify that the module is set to expose the correct USB endpoints configuration toward the host system and that you have followed the provided guides from the cellular module vendors, regarding how to implement the module in Linux.
Libqmi expose a command line interface that can be used to communication with the module over QMI interface.
The qmicli help will output information about all commands available:
qmicli --help-all
The cellular modules QMI control interface are usually named cdc-wdm* e.g.:
qmicli --device=/dev/cdc-wdm0
In order to allow parallel commands to be execute on the module over QMI interface, it is recommended to use the libqmi proxy function. This can be done by including the attribute -p or --device-open-proxy in every qmicli command.
If a SIM pin is required for the SIM card, use command bellow:
qmicli --device=/dev/cdc-wdm0 -p --dms-uim-verify-pin=PIN,1234
The name of the related network interface to QMI control channel can be acquired with the command:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --get-wwan-iface
The most recent Qualcomm based cellular modules only expose QMI interfaces that can support Raw-IP mode. Sierra Wireless EM/MC74 and EM75 series modules, Telit LM940 and LN940 series for example require this.
Check what IP-mode the host system is configured for:
qmicli --device=/dev/cdc-wdm0 --get-expected-data-format
Check what IP-mode the cellular module require:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wda-get-data-format
to change qmi_wwan driver to use Raw-IP.
Disable the network interfaces exposed by the cellular module:
ip link set dev wwan0 down
Trigger the Raw-IP support:
echo Y > /sys/class/net/wwan0/qmi/raw_ip
Enable the network interfaces again:
ip link set dev wwan0 up
Now the data connection in the cellular module can be activated e.g. with a IPv4 type configuration on the specified APN:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-start-network="ip-type=4,apn=data.tre.se" --client-no-release-cid
Once "Network started" is displayed, you can send a DHCP request on the network interface.
Please note that not all DHCP clients in Linux can support Raw-IP format, udhcpc however support this for IPv4 over Raw-IP.
udhcpc -q -f -n -i wwan0
Disconnect the data bearer and data connection over QMI by command bellow and providing the network handle and CID returned at connection activation:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-stop-network=NETWORK_HANDLE --client-cid=CID
Additional useful commands:
Request module manufacturer:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-manufacturer
Get module model:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-model
Get firmware version:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
Get module IDs (IMEI etc.):
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-ids
Get SIM card status:
qmicli --device=/dev/cdc-wdm0 --device-open-proxy --uim-get-card-status
Recent cellular modules like Sierra Wireless EM7565 require at least libqmi V1.20. Check version with command:
qmicli --version
If the connection was successfully set up established, you now have data connectivity. A ping to a remote server using the cellular network interface can for example prove this:
ping -I wwan0 8.8.8.8
The ifconfig Linux tool can show the current details for the network interface:
ifconfig wwan0
libqmi is well integrated and supported in ModemManager tool for Linux. ModemManager again is well integrated and supported when using NetworkManager tool in Linux. Please note however that these two tools expect the cellular module interfaces to only be used by them so if you manually want to use the libqmi library or AT commands interfaces, please turn off/disable ModemManager and NetworkManager first.
The libqmi is a generic open source library for Linux systems and QMI protocol from Qualcomm, therefor there are commands only working on selected devices and not necessarily supported on the device you use, resulting in an error message.
What Linux kernel modules and configs are commonly used for communicating with cellular modules over their USB interface?
Most cellular modules can be supported in Linux by using som of the in-kernel drivers. The physical data interface to the host Linux system is usually done over USB which enumerates a set of different endpoints/interfaces. A set of serial interfaces for Modem/PPP, AT commands, NMEA location data and chipset debug information are almost always available in all configurations.
In addition some type of network endpoint/interface are also available and exposed. This can vary between manufacturers and chipset vendors and can also commonly be configurable by using USB configuration mode switching or through vendor specific AT commands.
Recommended kernel configurations to enable are listed bellow. Many cellular modules base their Linux support on these modules and drivers. Once included in the kernel build, the USB interfaces will be detected and bound correctly out-of-the-box or after applying source code patches to the driver modules.
Configs for USB serial drivers:
CONFIG_USB_SERIAL
CONFIG_USB_SERIAL_GENERIC
CONFIG_USB_SERIAL_WWAN
CONFIG_USB_SERIAL_OPTION
CONFIG_USB_SERIAL_QUALCOMM
CONFIG_USB_ACM
Configs for Modem/PPP support:
CONFIG_PPP
CONFIG_PPP_BSDCOMP
CONFIG_PPP_DEFLATE
CONFIG_PPP_FILTER
CONFIG_PPP_MPPE
CONFIG_PPP_MULTILINK
CONFIG_PPPOE
CONFIG_PPP_ASYNC
CONFIG_PPP_SYNC_TTY
Configs for USB network drivers:
CONFIG_USB_USBNET
CONFIG_USB_NET_QMI_WWAN
CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_RNDIS_HOST
CONFIG_USB_NET_CDC_NCM
CONFIG_USB_NET_HUAWEI_CDC_NCM
CONFIG_USB_NET_CDC_MBIM
Please relate to the Techship product specific web pages for vendor specific Linux integration guides.
Below is a selection of kernel commits relating to cellular module support in Linux kernels:
qmi_wwan: Add support for Fibocom NL678 series
qmi_wwan: Added support for Telit LN940 series
qmi_wwan: Added support for Fibocom NL668 series
USB: serial: option: add support for GosunCn ME3630 RNDIS mode
USB: serial: option: add support for Simcom SIM7500/SIM7600 RNDIS mode
USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
USB: serial: option: add Fibocom NL678 series
USB: serial: option: add Telit LN940 series
USB: serial: option: add Fibocom NL668 series
USB: serial: option: add GosunCn ZTE WeLink ME3630
qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID
If you use any of the listed cellular modules, drivers and specified USB modes in the commits above, ensure that your kernel version already include the patch or apply it to your build.
How can we establish data connection for cellular modules in Windows 8 and Windows 10 systems?
Microsoft Windows desktop versions starting from Windows 8 and newer have built in data connection manager for WWAN, Wifi etc. that can be used to configure, control and establish the data connection of cellular module that support MBIM interface, which most cellular modules do.
The connection managers settings and controls can be found and accessed on Windows desktop start menu through the network icon (see picture).
The Cellular tab can be found in Windows system settings and if needed the connection APN details can be manually entered through "Advanced options".
How to set up a simple data connection over Qualcomm QMI interface using libqmi and driver qmi_wwan in Linux?
Several cellular modules based on Qualcomm chipsets implements the Qualcomm MSM QMI RMNET Interface.
There is a open source Linux in-kernel driver supporting this interface called qmi_wwan. The helper library libqmi can be used to communicate with the cellular devices over the interface and do cellular module configurations to control and trigger the data connection over the cellular network.
Install the libqmi Linux library using e.g. your OS package manager like apt etc.
(Check out the official libqmi page here: https://www.freedesktop.org/wiki/Software/libqmi/)
Please be aware that libqmi is a 3rd party software not distributed by the chipset or module vendors. So full compatibility on all available commands should not be expected.
There are Qualcomm chipset standard QMI commands and in addition vendors specific custom QMI commands not supported by all manufacturers, but still available in libqmi. There are also new QMI commands not supported in older chipsets and vice versa, old QMI commands no longer supported in new chipset series.
Verify that you have the Linux in-kernel qmi_wwan driver installed and loaded for the cellular modules QMI interface endpoint over USB:
lsusb -t
Can look like this:
...
|__ Port 1: Dev 3, If 2, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
...
If the driver is not loaded correctly, please verify that the cellular module is set to expose QMI RMNET network interface endpoint in its configuration. How to do so can often be found in AT commands guides, Linux implementation guides and similar from the cellular module vendors.
Libqmi library include a command line tool qmicli that can be used in a more convenient way communicate directly with the module over QMI interface for testing, scripting and troubleshooting.
The qmicli help will output information about all commands available:
qmicli --help-all
The qmi_wwan network control interfaces for modules are usually named like cdc-wdm# under /dev/ path.
Use the attribute --device or -d to specify it for qmicli in your command execution:
qmicli --device=/dev/cdc-wdm0
qmicli -d /dev/cdc-wdm0
In order to ease usage of the QMI interface and handle parallell command requests, libqmi include a proxy function to handle it correctly on the QMI interface, To use it, make sure to have the the attribute present in the qmicli command:
-p
--device-open-proxy
Example commands on how to communicate
Request module manufacturer:
qmicli -p -d /dev/cdc-wdm0 --dms-get-manufacturer
Get module model:
qmicli -p -d /dev/cdc-wdm0 --dms-get-model
Get firmware version:
qmicli -p -d /dev/cdc-wdm0 --dms-get-revision
Get module IDs (IMEI etc.):
qmicli -p -d /dev/cdc-wdm0 --dms-get-ids
Get SIM card status:
qmicli -p -d /dev/cdc-wdm0 --uim-get-card-status
The script qmi-network can be used to establish a simple data connection, it will automatically try to verify the IP framing type match them correctly between qmi_wwan driver and module (Raw-IP vs. 802.3 IP framing).
Create a config file containing your network operator APN details and if needed, the username and password.
Save it e.g. in the default location /etc/qmi-network.conf
The parameter --profile=[PATH] can be used to define the path to config when executing qmi-network.
Example config file content: APN details and enabling of proxy usage.
Add the username and password lines if it is needed for your APN:
APN=my-network-operators-apn
APN_USER=my-apn-username
APN_PASS=my-apn-password
PROXY=yes
Once the APN information is saved, you can start the network connection with the command:
qmi-network /dev/cdc-wdm0 start
The name of the related network interface in the Linux system can be acquired with the command:
qmicli -p -d /dev/cdc-wdm0 --get-wwan-iface
Once you see "Network started successfully" message, you can send a DHCP request on the network interface.
Please note that not all DHCP clients in Linux can handle Raw-IP format but udhcpc support it.
udhcpc -q -f -i wwan0
The IP information from the cellular network can also be acquired and set manually to the network interface by the user or scripting, the correct address details can be acquired from the cellular module over QMI with command:
qmicli -p -d /dev/cdc-wdm0 --wds-get-current-settings
If the connection was successfully set up and established, you now have a data connection. Ping request to a remote server using the cellular network interface can prove this:
ping -I wwan0 8.8.8.8
The ifconfig Linux tool can show the current details for the network interface:
ifconfig wwan0
To bring down and stop the cellular network connection, please use the stop command bellow:
qmi-network /dev/cdc-wdm0 stop
The ModemManager tool for Linux is based on libqmi. NetworkManager and ModemManager . Please note however that these two tools expect the cellular module interfaces to only be used by them so if you manually want to use the libqmi library or AT commands interfaces, please turn off/disable ModemManager and NetworkManager first.
The libqmi is a generic open source library for Linux systems and QMI protocol from Qualcomm, therefor there are several commands only working on selected devices and not necessarily on supported in the specific device you use, resulting in an error message.
We cannot acquire an DHCP address over qmi_wwan driver when using Raspbian Linux OS?
Raspbian uses dhcpd to probe all available network interfaces found in the system, which is problematic for the qmi_wwan driver interface, if it is done before being configured properly when using cellular modules supporting only Raw-IP.
This can be avoided by setting dhcpd to deny the related cellular module network interface (most often named wwan0 by the system).
Add to the /etc/dhcpcd.conf file in Raspbian the following line (in the end):
denyinterfaces wwan0
Now, restart the system (preferably re-power it) so cellular module fully restarts also.
At next startup, the settings should be applied and you can now configure and use the qmi interface as described in some of the others faq's, found on the Techship webpage.
MiniPCIe based cellular modules supporting both USB2 and USB3 are not detected in the host system? Such as Sierra Wireless MC74** series, and Telit LM940/LM960 series modules.
From start the PCI-SIG miniPCIe form factor standard only included support for PCIe + USB2 data interface and had designated signal lines for these between host system and the miniPCIe module. Since revision 2.1 of the PCI-SIG miniPCIe standard it is defined that the PCIe data lanes can be shared/used for USB3 also.
Cellular modules mainly rely on USB2 interface but as the cellular throughput speeds have increased, the USB2 can become a bottleneck on LTE Cat 6 modules and higher. To address this, USB3 data interface was introduced on the higher data throughput mobile broadband cellular modules and made available in parallel to USB2 interface. However due to limited amount of pin lanes available in the miniPCIe socket they share location with the PCIe data interface pin lanes.
When the host system and module are powered on, the cellular module will try to probe if USB3 interface is present on the pin lanes and if communication can be established, otherwise the module will revert to using the USB2 data interface instead.
However, in some host systems where PCIe data interface also is implemented on the shared pin lanes, the signals will interfere with the cellular modules probing for USB3 interface making it not fall back to USB2 data interface. This usually result in the cellular module not being detected at all in the host operating system.
The USB3 auto-sensing functionality is enabled by default but can be disabled by using AT commands to write the memory changes to the internal NV memory which is stored between restarts. After the module is restarted it will use only the USB2 pin lanes for data interface. Please also check and validate if the host system BIOS support disabling of the PCIe interface in the miniPCIe socket.
Related AT commands for configuring USB3/USB2 modes:
Telit LM940/LM960 modules:
AT#USBSWITCH=1
AT#REBOOT
For Sierra Wireless MC74 series: (firmware version dependent)
AT!ENTERCND="A710"
AT!USBSPEED=0
AT!RESET
For troubleshooting this issue in hardware, you can try isolating the USB3 data interface pins #23, 25, 31, 33 on the top side of the miniPCIe data cards card socket so no signalling to and from the hosts can occur. This could be done in the board design or with adapter.
Why should we use USB3 instead of USB2 as host system data interface if the cellular module can support both?
Cellular modules supporting higher data throughput rates like LTE Advanced, category 6 and above (300Mbps downlink and 50Mbps uplink) often support both USB3 interface as well as USB2 interface towards the host system.
It is recommended to implement and use the USB3 data interface rather than the older USB2 interface on these modules between host system and the cellular module. This because USB3 can support around 10 times higher data throughput rate compared to USB2 and avoid a possible bottleneck / limitation in the data interface between host and cellular module.
If a miniPCIe based cellular module implementing USB3 are used, please verify that conflicts don't occur towards your hosts miniPCIe socket, as the USB3 interface is not implemented by default in the miniPCIe standard and therefore signal collisions can happen between USB3 pins and PCIe data interface pins situated on same locations. Refer to the cellular module hardware guides and host system hardware guides to verify this.
How do I select specific bands on my Telit module?
The AT command AT#BND can be used to select what specific GSM, UMTS and LTE bands that you want to be active on your module.
If you are experiencing poor DL or UL speeds, one solutions may be to only select the bands that you know are available, which can increase the transfer speeds.
When entering AT#BND? it will return a reply looking like (for example):
AT#BND?
#BND: 0,18,A7E0BB0F38DF,42 (for Generic)
OK
(Please note that the following examples are when using a LM960A18)
The "0" is referring to GSM bands, "18" to UMTS bands, "A7E0BB0F38DF" to LTE bands and "42" to LTE extended bands.
Starting at the GSM band (at chapter "Select Band - #BND" in the AT command reference manual) we can see that 0 corresponds to "GSM 900MHz + DCS 1800MHz (default value depending on module)"
In the same chapter we can read that 18 corresponds to 2100MHz (FDD I) + 1900MHz (FDD II) + 1700MHz (FDD IV) +
850MHz (FDD V) + 900MHz (FDD VIII) + JAPAN1800(FDD IX) + JAPAN800(FDD XIX) (default value depending on product)"
Now for LTE, which is probably what is a little tricky to understand. If we start the Windows Calculator and change to Programmer mode. If you copy the "A7E0BB0F38DF" into the calculator window it should convert it to binary.
HEX: A7E0 BB0F 38DF
BIN: 1010 0111 1110 0000 1011 1011 0000 1111 0011 1000 1101 1111
If you look at the line of BIN above you can see what band are active (1) and which are not (0). Looking from right to left, the first bit corresponds to B1, second bit to B2, third bit B3, and so on…
HEX: A7E0 BB0F 38DF
BIN: 1010 0111 1110 0000 1011 1011 0000 1111 0011 1000 1101 1111
Selected bands: B1+B2+B3+B4+B5+B7+B8+B12+B13+B14+B17+B18+B19+B20+B25+B26+B28+B29+B30+B32+B38+B39+B40+B41+B42+B43+B46+B48
So if I, for example, only want the GSM bands "GSM 900MHz + DCS 1800MHz", the UMTS band "1900MHz (FDD II)" and LTE bands "B1, B4, B7, B28" I would enter the following:
AT#BND=0,1,8000049
Since the first "0" corresponds to "GSM 900MHz + DCS 1800MHz", the "1" corresponds to "1900MHz (FDD II)" and lastly "8000049" corresponds to B1, B4, B7 and B28 as shown below:
Bands: B1, B4, B7, B28
Binary: 1000 0000 0000 0000 0000 0100 1001
Hexadecimal: 800 0049
For further information please take a look at the AT command user guide available on the product's specific page under "technical documentation", which is available for download once logged in.
How-to automatically set up and maintain the cellular data connection in headless Raspberry Pi OS / Raspbian systems?
The open-source tools NetworkManager and ModemManager can be uesd to establish, control and maintain a cellular connection even if the enironment and antenna RF circumstances vary.
First ensure that the cellular module have been detected in the Raspbian system, and that Linux in-kernel driver alternatives have been loaded correctly for the USB interfaces.
This can be verified through different tools like lsusb and usb-devices, and by checking the dmesg log.
Look at the Driver output, serial interface typically use option or qcserial driver and the network interfaces typically bind to the qmi_wwan or cdc_mbim drivers.
The in-kernel drivers, as well as NetworkManager and ModemManager tools are continously improved, due to the rapid progress in wirelless connectivity. Therefore it is recommended to use fairly recent Linux kernel and distribution versions, which is more likely to have device support out of the box.
lsusb
Bus 001 Device 012: ID 1e0e:9001 Qualcomm / Option
lsusb -t
|__ Port 4: Dev 12, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 12, If 4, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 12, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 12, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 12, If 5, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
|__ Port 4: Dev 12, If 3, Class=Vendor Specific Class, Driver=option, 480M
usb-devices
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#= 12 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1e0e ProdID=9001 Rev=03.18
S: Manufacturer=SimTech, Incorporated
S: Product=SimTech, Incorporated
S: SerialNumber=0123456789ABCDEF
C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I: If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I: If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
If drivers aren't loaded for all the USB interfaces, please see the following general FAQ on kernel configs and patches for cellular modules.
FAQ: Common Linux kernel modules and configs necessary for communicating with cellular modules over USB interface
On Raspberry Pi OS / Raspbian uses dhcpcd to configure networks, this causes problems for several cellular devices, so it is recommended to exclude the cellular modules wwan interfaces, see following FAQ for how-to details:
FAQ: We cannot acquire an DHCP address over qmi_wwan driver when using Raspbian Linux OS?
Update the system and install NetworkManager and ModemManager:
apt update
apt upgrade
apt install network-manager modemmanager libmbim-utils libmbim-proxy libqmi-utils libqmi-proxy
Once they are installed and services running, set the cellular module to be a managed interface for NetworkManager.
(The control interface is typically called cdc-wdm0 for cellular devices using qmi_wwan / cdc_mbim driver.)
nmcli device set cdc-wdm0 managed true
Now you can go ahead and establish the cellular data connection as described in FAQ below:
FAQ: Using NetworkManager and ModemManager in Linux to automatically establish and maintain a connection
How-to change the cellular modulesUSB composition mode to Mobile Broadband Interface Model (MBIM) used by Windows 8 and 10 systems for controlling and establishing data connectivity through the built-in connection manager in Windows?
This is done by sending a set of AT commands to the cellular modules Modem or AT serial interface found in Windows Device Manager. Please see list below for associated AT commands.
(For additional details, refer to the product specific software, ports, and AT commands guides found on the Techship product web pages under technical documentation tab).
After the AT commands have been received by the module and has restarted, the USB interface endpoint composition should have changed to include MBIM interface as well.
You can find the correct Serial COM port number by checking Windows Device Manager, under the Modems drop down -> (right click and see properties for selected COM port info) or under the Ports (COM & LPT) drop down.
Vendor specific commands to use:
Sierra Wireless EM74x0, MC74x0 series module:
AT!ENTERCND=”A710”
AT!USBCOMP=1,1,100D
AT!RESET
(See test command AT!USBCOMP=? for full usage description)
Sierra Wireless EM75xx, EM74x1, MC74x1 series module:
AT!ENTERCND=”A710”
AT!USBCOMP=1,3,100D
AT!RESET
(See test command AT!USBCOMP=? for full usage description)
Sierra Wireless EM73xx, MC73xx series module:
AT!ENTERCND=”A710”
AT!UDUSBCOMP=8
AT!RESET
Simcom SIM7100, SIM7500 and SIM7600 series modules:
AT+CUSBPIDSWITCH=9003,1,1
AT+CRESET
ZTE Welink ME3630 series:
AT+ZSWITCH=8
AT+ZRST
Telit LE910C1 and LE910C4 series:
AT#USBCFG=2
AT#REBOOT
Telit LM940 and LM940A11:
AT#USBCFG=2
AT#REBOOT
Telit LM960 and LM960A18:
AT#USBCFG=2
AT#REBOOT
Telit LE910 V2 series:
AT#USBCFG=3
AT#REBOOT
On Huawei and Telit LN94x series modules the USB mode changing is done automatically by the modules Windows drivers based on current Windows version.
Please be aware that some USB mode configurations do not include any serial interfaces, making it impossible to revert the changes using AT commands.
How-to guide: How can we control, configure and establish a simple data connection for a cellular module in Linux systems using the open source ModemManager tool for modem control and connection management.
ModemManager is a open source tool for Linux that can be used to communicate with cellular devices for configuration, status check, connection triggering etc. It is capable of communicate over several types of device control channels such as QMI/RMNET, MBIM, MODEM / AT command etc.
It is hosted by the Freedesktop.org community and driven by Aleksander Morgado and other contributors, please visit https://www.freedesktop.org/wiki/Software/ModemManager/ for latest information, source code, API reference manuals, debugging tips, contribution, mailing list etc.
Keep in mind that ModemManager is not directly developed or driven by cellular device vendors and the compatibility cannot be guaranteed for the specific device you aim to use. Some vendors contribute with code to make their devices fully compatible, while others don't. However many cellular devices can be set to expose standardized types of USB network interface and control channel such as MBIM interface by USB-IF or the Qualcomm proprietary interface QMI that ModemManager will try to identify, and often manage to work successfully with.
Before continuing with ModemManager, a good thing to ensure is that you have common Linux driver modules available in your kernel build.
You can compare your own systems kernel config with the ones listed in the following FAQ:
Common Linux kernel modules and configs necessary for communicating with cellular modules over USB interface
Selections of these are commonly used by cellular devices and need to be available in order to have device drivers correctly loaded when devices are detected.
Start by installing ModemManager and its dependencies to your Linux system.
You can build it from source code release tarball found at freedesktop.org (install instructions included in the archive)
If you have a package manager in your Linux distribution, it can usually be installed through them also.
E.g. on Ubuntu using apt to install it and related dependencies:
apt install modemmanager libmbim-utils libqmi-utils
Keep in mind that Linux distributions sometimes rely on fairly old releases in their repositories and the development of ModemManager, libqmi and libmbim are on-going continuously. So is also the development of the cellular devices when the cellular technologies evolve. It is therefore recommended that you have a fairly recent version of ModemManager, libqmi and libmbim running in your system as well as when it comes to kernel version since the driver modules sometimes acquire patch fixes to be compatible with new chipset features etc.
Check Freedesktop.org pages for details on the latest ModemManager, NetworkManager, Libqmi and Libmbim releases.
Once you've installed ModemManager and rebooted your system, the service daemon should be running already in background.
Mmcli is the related command line interface tool which can be used to interact with ModemManager daemon through command line commands.
Check the version by command:
mmcli -V
<< mmcli 1.13.0
<< Copyright (2011 - 2020) Aleksander Morgado
<< License GPLv2+: GNU GPL version 2 or later
<< This is free software: you are free to change and redistribute it.
<< There is NO WARRANTY, to the extent permitted by law.
Print general mmcli help message:
mmcli --help
ModemManager normally listen, probes and detects cellular devices automatically when operating correctly but a forced scan can be triggered with command:
mmcli --scan-modems
<< successfully requested to scan devices
To list detected cellular devices use command:
mmcli --list-modems
<< /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated] MC7455
Here ModemManager have detected a Sierra Wireless cellular device and it has here been given the the identifier number 0 by ModemManager.
To acquire more device information and status use the --modem command and identifier value.
mmcli --modem=0
<< -----------------------------
<< General | dbus path: /org/freedesktop/ModemManager1/Modem/0
<< | device id: 3a2f5fad8e91dbf417694f23165017c1f8a6e061
<< -----------------------------
<< Hardware | manufacturer: Sierra Wireless, Incorporated
<< | model: MC7455
<< | firmware revision: SWI9X30C_02.32.11.00 r8042 CARMD-EV-FRMWR2 2019/05/15 21:52:20
<< | carrier config: default
<< | h/w revision: 1.0
<< | supported: gsm-umts, lte
<< | current: gsm-umts, lte
<< | equipment id: 359072066171840
<< -----------------------------
<< System | device: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
<< | drivers: qcserial, qmi_wwan
<< | plugin: sierra
<< | primary port: cdc-wdm0
<< | ports: cdc-wdm0 (qmi), wwan1 (net), ttyUSB2 (at), wwan0 (net),
<< | cdc-wdm1 (qmi), ttyUSB1 (gps), ttyUSB0 (qcdm)
<< -----------------------------
<< Status | lock: sim-pin
<< | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (0), sim-puk2 (10)
<< | state: locked
<< | power state: on
<< | signal quality: 0% (cached)
<< -----------------------------
<< Modes | supported: allowed: 3g; preferred: none
<< | allowed: 4g; preferred: none
<< | allowed: 3g, 4g; preferred: 4g
<< | allowed: 3g, 4g; preferred: 3g
<< | current: allowed: 3g, 4g; preferred: 4g
<< -----------------------------
<< Bands | supported: utran-1, utran-3, utran-4, utran-5, utran-8, utran-2,
<< | eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
<< | eutran-12, eutran-13, eutran-20, eutran-25, eutran-26, eutran-29,
<< | eutran-30, eutran-41
<< | current: utran-1, utran-3, utran-4, utran-5, utran-8, utran-2,
<< | eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
<< | eutran-12, eutran-13, eutran-20, eutran-25, eutran-26, eutran-29,
<< | eutran-30, eutran-41
<< -----------------------------
<< IP | supported: ipv4, ipv6, ipv4v6
<< -----------------------------
<< SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
A detailed summary of device status, configs and system drivers, paths and IDs are returned.
Currently the device status indicates that inserted SIM card is PIN locked, so a unlock by --pin command is necessary:
mmcli --modem=0 --sim=0 --pin=****
<< successfully sent PIN code to the SIM
Now we can change device state to enabled using command:
mmcli --modem=0 --enable
<< successfully enabled the modem
if we're check device status again we can see that device:
mmcli --modem=0
…
<< --------------------------------
<< Status | lock: sim-puk2
<< | unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (0), sim-puk2 (10)
<< | state: registered
<< | power state: on
<< | access tech: lte
<< | signal quality: 96% (recent)
…
<< 3GPP | imei: 359072066171840
<< | operator id: 24002
<< | operator name: 3
<< | registration: home
<< --------------------------------
<< 3GPP EPS | ue mode of operation: csps-2
<< --------------------------------
<< SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
The status output shows that devices is registered in network using LTE technology with a good signal strength.
It is now time to activate the data connection with --simple-connect command.
ModemManager will tie the data bearer for our given subscription APN to the qmi_wwan network interface, typically named wwan0 (unless renamed by Linux distribution or user)
Fill in the details as below but for your modem number, subscription APN and the IP type it can work with (ipv4 / ipv6 ipv4v6)
mmcli -m 0 --simple-connect='apn=data.tre.se,ip-type=ipv4v6'
<< successfully connected the modem
if we check modem status again we can see that a bearer have been established.
mmcli --modem=0
…
<< --------------------------------
<< Bearer | dbus path: /org/freedesktop/ModemManager1/Bearer/0
…
The bearer have got identifier number 0 so we can request more details for it to acquire the IP details:
mmcli --modem=0 --bearer=0
<< ------------------------------------
<< General | dbus path: /org/freedesktop/ModemManager1/Bearer/0
<< | type: default
<< ------------------------------------
<< Status | connected: yes
<< | suspended: no
<< | interface: wwan1
<< | ip timeout: 20
<< ------------------------------------
<< Properties | apn: data.tre.se
<< | roaming: allowed
<< | ip type: ipv4v6
<< ------------------------------------
<< IPv4 configuration | method: static
<< | address: 2.68.206.100
<< | prefix: 29
<< | gateway: 2.68.206.101
<< | dns: 80.251.201.177, 80.251.201.178
<< | mtu: 1500
<< ------------------------------------
<< IPv6 configuration | method: static
<< | address: 2a02:aa1:1010:b6bb:6d12:d0dc:978e:3982
<< | prefix: 64
<< | gateway: 2a02:aa1:1010:b6bb:21ea:c721:62c3:9760
<< | dns: 2a02:aa0::55, 2a02:aa0::56
<< | mtu: 1500
<< ------------------------------------
<< Statistics | duration: 450
<< | bytes rx: 6693
<< | attempts: 1
<< | total-duration: 450
<< | total-bytes rx: 6693
From here we can see the IP details we've been assigned by the cellular network.
ModemManager does not assign IPv4 address details to the cellular modules network interface in Linux by itself.
When ModemManager is used in conjunction with NetworkManager and the cellular connection is managed by it, then the IPv4 address details will be collected by NetworkManager through ModemManager and automatically assigned to network interface when connection is established.
If the system does not implement NetworkManager, then the IP and routing configuration needs to be handled by user software/scripting.
Example:
Enable network interface in Linux:
ip link set wwan0 up
Set the IPv4 address acquired from bearer information above, the CIDR subnet mask can always be set to 32:
ip addr add 2.68.206.100/32 dev wwan0
Disable ARP:
ip link set dev wwan0 arp off
Set MTU value acquired from network:
ip link set dev wwan0 mtu 1500
Add a default or other type of route to the cellular network device (e.g. with a metric to set which route to prefer)
ip route add default dev wwan0 metric 200
Add the DNS servers reported by cellular network or use other public/desired ones.
DNS server addresses are handled in different ways depending on the Linux distribution and network manager used. Therefore please refer to related dist documentation for best practice to add / maintain DNS server addresses in your specific system.
sh -c "echo 'nameserver 80.251.201.177' >> /etc/resolv.conf"
sh -c "echo 'nameserver 80.251.201.178' >> /etc/resolv.conf"
We should now have a network interface passing data successfully, we can try it out by doing ping requests:
IPv4 data:
ping -4 -c 4 -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 2.68.206.100 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=50.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=48.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=24.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=44.8 ms
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 23.979/42.115/50.840/10.694 ms
IPv6 data:
ping -6 -c 4 -I wwan0 2600::
PING 2600::(2600::) from 2a02:aa1:1010:b6bb:8962:7405:b81c:7627 wwan0: 56 data bytes
64 bytes from 2600::: icmp_seq=1 ttl=47 time=179 ms
64 bytes from 2600::: icmp_seq=2 ttl=47 time=176 ms
64 bytes from 2600::: icmp_seq=3 ttl=47 time=175 ms
64 bytes from 2600::: icmp_seq=4 ttl=47 time=177 ms
--- 2600:: ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 175.411/176.935/179.268/1.446 ms
How to use NetworkManager and ModemManager in Linux to automatically establish a cellular data connection and configure IP details?
Using NetworkManager and ModemManager in Linux to automatically establish a connection and configure IP details
In this FAQ we will show how to set up NetworkManager to automatically configure, establish the cellular data connection in your system.
NetworkManager and ModemManager are open source tool for Linux to manage several types of networks and interfaces such as ethernet, wifi, etc. It can also manage cellular WWAN interfaces through the ModemManager tool.
It is hosted by the Freedesktop.org community and driven by Aleksander Morgado and other contributors. please visit https://wiki.gnome.org/Projects/NetworkManager and https://www.freedesktop.org/wiki/Software/ModemManager/ for latest information, source code, API reference manuals, debugging tips, contribution, mailing list etc.
ModemManager is capable of communicating over several types of device control channels such as QMI/RMNET, MBIM, MODEM / AT command etc. But support for vendor proprietary or out-of-kernel drivers are none or very limited. Such drivers are gobinet, simcom_wwan and other drivers provided by the vendors directly.
Many Linux distributions have NetworkManager and ModemManager pre-installed or they can typically easily be installed through the systems package manager.
In Ubuntu for example apt can install it for you by command if not already installed:
apt install network-manager
Check with commands below that you have both tools installed in system and their versions.
NetworkManager -V
ModemManager -V
ModemManager (and NetworkManager) are continuously developed for better compatibility with the cellular devices, therefore it is recommend to use a recent version of the tools and in case of problem situations, evaluate the latest versions from source and check the mailing list archives for possible discussions on the problem experienced.
Keep in mind that NetworkManager and ModemManager projects are not directly developed or driven by the cellular device vendors and the compatibility with the device you aim to use can be limited. Some vendors contribute with code to make their devices fully compatible, while others don't. Many cellular devices can be set to expose standardized types of USB network interface and control channel such as MBIM interface by USB-IF or the Qualcomm proprietary interface QMI that ModemManager will try to identify, and often manage to work successfully with but there are exceptions also.
Both NetworkManager and ModemManager have command line interfaces (nmcli and mmcli respectively) where you can interact with the management tools.
Relate to the following FAQ if you want more details for using ModemManager only to configure and control the cellular device but manually establish, maintain the connection and network interface IP address details.
How-to guide: control and set up a data connection in Linux using ModemManager as connection manager?
Have ModemManager list all the cellular device it has detected. Here we use the Alcatel IK41 series with MBIM interface in this example:
mmcli --list-modems
/org/freedesktop/ModemManager1/Modem/0 [Alcatel] Mobilebroadband
General details and status of them modem can be listed with "--modem" option.
mmcli --modem=0
-----------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: 998e478c5b14c75e16bffe6abaacabef22fb2f5b
-----------------------------
Hardware | manufacturer: Alcatel
| model: Mobilebroadband
| firmware revision: MPSS.JO.2.0.2.c1.7-00004-9607_
| carrier config: default
| h/w revision: 0
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id:
-----------------------------
System | device: /sys/devices/pci0000:00/0000:00:14.0/usb3/3-1
| drivers: option1, cdc_mbim
| plugin: Generic
| primary port: cdc-wdm0
| ports: cdc-wdm0 (mbim), ttyUSB0 (at), ttyUSB2 (at), wwan0 (net),
| ttyUSB1 (qcdm)
-----------------------------
Status | lock: sim-pin
| unlock retries: sim-pin (3)
| state: locked
| power state: on
| signal quality: 0% (cached)
-----------------------------
Modes | supported: allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 4g; preferred: 4g
| allowed: 2g, 4g; preferred: 2g
| allowed: 3g, 4g; preferred: 3g
| allowed: 3g, 4g; preferred: 4g
| allowed: 2g, 3g, 4g; preferred: 4g
| allowed: 2g, 3g, 4g; preferred: 3g
| allowed: 2g, 3g, 4g; preferred: 2g
| current: allowed: 2g, 3g, 4g; preferred: 2g
-----------------------------
Bands | supported: egsm, dcs, pcs, g850, utran-1, utran-8, eutran-1, eutran-3,
| eutran-7, eutran-8, eutran-20, eutran-28
| current: egsm, dcs, pcs, g850, utran-1, utran-8, eutran-1, eutran-3,
| eutran-7, eutran-8, eutran-20, eutran-28
-----------------------------
IP | supported: ipv4, ipv6, ipv4v6
-----------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
Check that the cellular device is managed by NetworkManager by not having state "unmanaged" listed for it.
nmcli device status
DEVICE TYPE STATE CONNECTION
cdc-wdm0 gsm disconnected --
enp3s0 ethernet unmanaged --
lo loopback unmanaged --
Now you should create a connection profile in NetworkManager for your specific network carrier and SIM card with the "nmcli connection add" command:
For example:
nmcli connection add type gsm ifname '*' con-name '3-sweden' apn 'data.tre.se' connection.autoconnect yes gsm.pin 0000
- type is gsm for all typical cellular connections unless it is of cdma type.
- ifname is the control interface name, in this case cdc-wdm0, wildcard can be used also to have it autoselect.
- con-name is the profile name you want to give it.
- apn is provided by your network carrier and tells the modem what attach point it should use for the data connection.
- connection.autoconnect set to yes will make NetworkManager always try to auto connect and maintain this profile connection.
- gsm.pin lets you provide a pin code for the SIM card, that NetworkManager will try to use if PIN check is enabled for SIM card.
There are several additional commands and attributes available such as username and password settings for the APNs etc. Refer to the NetworkManager help and manual pages for full details on the commands.
If successful you should receive a reply similar to this one:
Connection '3-sweden' (cad6fcbf-2cb1-4796-b7e6-67b9f9635aef) successfully added.
You can check the status now by command:
nmcli device status
DEVICE TYPE STATE CONNECTION
cdc-wdm0 gsm connected 3-sweden
enp3s0 ethernet unmanaged --
lo loopback unmanaged --
Where connected should be listed as state if the connection establishment was successful.
If the connection is not successful or you want more details about the device and connection you can check commands:
You can list the current status with command:
nmcli radio
WIFI-HW WIFI WWAN-HW WWAN
enabled enabled enabled enabled
nmcli device show cdc-wdm
GENERAL.DEVICE: cdc-wdm0
GENERAL.TYPE: gsm
GENERAL.HWADDR: (unknown)
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: 3-sweden
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/18
IP4.ADDRESS[1]: 2.68.73.130/30
IP4.GATEWAY: 2.68.73.129
IP4.ROUTE[1]: dst = 2.68.73.128/30, nh = 0.0.0.0, mt = 700
IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 2.68.73.129, mt = 700
IP4.DNS[1]: 80.251.201.177
IP4.DNS[2]: 80.251.201.178
IP6.ADDRESS[1]: 2a02:aa1:1017:6d11:1060:3dff:feac:e92f/64
IP6.ADDRESS[2]: 2a02:aa1:1017:6d11:6474:7254:7b72:eb09/64
IP6.GATEWAY: 2a02:aa1:1017:6d11:21e6:9049:6cfb:8ac3
IP6.ROUTE[1]: dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[2]: dst = 2a02:aa1:1017:6d11::/64, nh = ::, mt = 700
IP6.ROUTE[3]: dst = ::/0, nh = fe80::21e6:9049:6cfb:8ac3, mt = 1024
IP6.ROUTE[4]: dst = 2a02:aa1:1017:6d11::/64, nh = ::, mt = 256
IP6.ROUTE[5]: dst = ::/0, nh = 2a02:aa1:1017:6d11:21e6:9049:6cfb:8ac3, mt = 700
IP6.DNS[1]: 2a02:aa0::55
IP6.DNS[2]: 2a02:aa0::56
nmcli connection show
NAME UUID TYPE DEVICE
3-sweden e946017f-2e9c-477b-89ad-4c31e7331d65 gsm cdc-wdm0
Ifconfig should now show the related IP address details already set to the network interface by NetworkManager:
ifconfig
wwan0: flags=4291 mtu 1500
inet 2.68.73.130 netmask 255.255.255.252 broadcast 2.68.73.131
inet6 2a02:aa1:1017:6d11:6474:7254:7b72:eb09 prefixlen 64 scopeid 0x0
inet6 2a02:aa1:1017:6d11:1060:3dff:feac:e92f prefixlen 64 scopeid 0x0
ether 12:60:3d:ac:e9:2f txqueuelen 1000 (Ethernet)
RX packets 186 bytes 10886 (10.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5 bytes 480 (480.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
You can now for example test the connection over the network interface by sending ping requests.
Testing IPV4 connection:
ping -4 -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 2.68.73.130 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=55.8 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=45.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=42.9 ms
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 42.918/48.053/55.845/5.601 ms
Testing IPV6 connection: (if your cellular device, network subscription and APN supports it)
ping -6 -I wwan0 2600::
PING 2600::(2600::) from 2a02:aa1:1017:6d11:1060:3dff:feac:e92f wwan0: 56 data bytes
64 bytes from 2600::: icmp_seq=1 ttl=46 time=172 ms
64 bytes from 2600::: icmp_seq=2 ttl=46 time=171 ms
64 bytes from 2600::: icmp_seq=3 ttl=46 time=169 ms
64 bytes from 2600::: icmp_seq=4 ttl=46 time=168 ms
--- 2600:: ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 167.921/170.037/172.272/1.651 ms
The connection is successful and automatic reconnect is working when testing to unplug and plug in the device again.
For additional configurations, commands and available attributes, please relate to the manual pages for NetworkManager and ModemManager.
Troubleshooting logs:
NetworkManager and ModemManager write log messages to the Linux syslog file /var/log/syslog.
In case of problems with establishing a cellular data connection, please copy the logfile after the problem have appeared and include it in a Techship technical support ticket.
In some situations more detailed debug logs are needed, these can be acquired by changing the log levels for NetworkManager and ModemManager and run them manually.
To capture debug logs, please first disable and stop the normal services:
systemctl stop NetworkManager ModemManager
systemctl disable NetworkManager ModemManager
Run them manually in background with debug level set:
/usr/sbin/ModemManager --log-level=DEBUG &> /dev/null &
/usr/sbin/NetworkManager --log-level=DEBUG &
Reproduce the cellular data connection problem.
Once completed, kill the processes:
killall -TERM NetworkManager ModemManager
Copy the relate messages in syslog to a mm-nm-sys-debug.log logfile:
grep -E 'ModemManager|NetworkManager|systemd|dbus-daemon|dhclient' /var/log/syslog > mm-nm-sys-debug.log
Activate and start the services again:
systemctl enable NetworkManager ModemManager
systemctl start NetworkManager ModemManager
Include the mm-nm-sys-debug.log in a technical support ticket at Techship.com where you describe the issue in details and include other relevant information also such as kernel version, ModemManager and NetworkManager versions, dmesg log etc.
How to connect the Telit LM940A11 to a Mikrotik board using RouterOS?
It is recommended to have a generic mPCIe to USB adapter available to easily configure, firmware update and troubleshoot the module if needed. Such as the following adapter: https://techship.com/products/mpcie-to-usb-adapter-card/.
First, make sure that your MiktroTik board is compatible with the module by comparing the boards pin-out configuration with the modules (found in the hardware design guide).
If you have not used RouterOS or WinBox before, please refer to this guide from MikroTiks wiki page for first time start up: https://help.mikrotik.com/docs/display/ROS/First+Time+Configuration.
Make sure RouterOS is running at least version 6.46. In order to upgrade or downgrade, please follow these instructions: https://help.mikrotik.com/docs/display/ROS/Upgrading+and+installation.
Open the RouterOS terminal. Change the boot delay time to make sure the module is fully booted before the board tries to connect. This is done by going to:
/system routerboard settings
and changing "boot-delay" to 15 (seconds).
In order to use your module in RouterOS the network interface need to be set to ECM and USB 2.0 only mode. This is done by using AT commands. If you are unsure on how to send AT commands to your module, please follow this FAQ: https://techship.com/faq/how-can-i-send-at-commands-to-a-cellular-module/.
To change the network interface to ECM mode send the following AT command:
AT#USBCFG=3
The modem device will reset automatically and new USB composition is applied from the next boot up time, if this command is done successfully. Hence, in order to use "AT#USBCFG?" to double check that the new network interface was set, you may need to change the COM port.
To force the module to USB 2.0 mode only send the AT command found below. Please see this FAQ for further details: https://techship.com/faq/minipcie-based-cellular-modules-supporting-usb3-are-not-detected-in-the-host-system/.
AT#USBSWITCH=1
Now, connect your module to your MikroTik board.
Your module should now appear in the Interface list found under "Interfaces > LTE".
How can we acquire IMSI and ICCID using Libqmi's command line interface qmicli in Linux systems for Qualcomm QMI devices not supporting deprecated commands: "--dms-uim-get-iccid" and "--dms-uim-get-imsi"?
Cellular modules based on recent Qualcomm MSM Interface (QMI) (MDM9240 etc.) do not support the deprecated QMI commands for requesting the SIM cards related ICCID code and subscription related IMSI code.
They can instead be read directly from the module using the command option and addresses bellow. The result will be represented as sequences of bytes in hex format with most significant bit to the right as read from the SIM card according to 3GPP standard ETSI TS 131 102.
ICCID :
--uim-read-transparent=0x3F00,0x2FE2
Example:
qmicli -p -d /dev/cdc-wdm0 --uim-read-transparent=0x3F00,0x2FE2
[/dev/cdc-wdm0] Successfully read information from the UIM:
Card result:
SW1: '0x90'
SW2: '0x00'
Read result:
98:54:40:12:51:50:72:40:09:98
Resulting in ICC Identification ID:
89 45 04 21 15 05 27 04 90 89
IMSI :
--uim-read-transparent=0x3F00,0x7FFF,0x6F07
Example:
qmicli -p -d /dev/cdc-wdm0 --uim-read-transparent=0x3F00,0x7FFF,0x6F07
[/dev/cdc-wdm0] Successfully read information from the UIM:
Card result:
SW1: '0x90'
SW2: '0x00'
Read result:
08:29:83:02:78:00:21:28:87
Resulting in IMSI (15 digit long):
2 38 20 87 00 12 82 78
How to set up a simple data connection over the MBIM interface using libmbim and driver cdc_mbim in Linux?
Most 4G/LTE cellular modules implements the USB Implementers Forums Mobile Broadband Interface Model (MBIM) Interface. This because Microsoft request cellular module vendors to include the MBIM interface for good compatibility with Windows 8, 8.1, 10 and later systems. The Windows built-in connection manager also rely on MBIM interface for control of the cellular modules.
There is a open source Linux in-kernel driver supporting MBIM interface and it is called cdc_mbim. The library libmbim can be used to communicate with the cellular devices over the interface and do necessary configurations to trigger the data connection over the cellular network.
First install the libmbim Linux library using your system package manager like apt etc. (more details about libmbim here: https://www.freedesktop.org/wiki/Software/libmbim/)
Please relate to the FAQ bellow regarding how to set the cellular module into correct USB mode for usage with MBIM mode:
How to change USB composition mode to MBIM in cellular module, used by Windows 8 and 10 systems for data connectivity?
Verify that you have the Linux in-kernel cdc_mbim driver installed for the cellular modules exposed MBIM interface endpoint over USB:
lsusb -t
Can look e.g. like this:
...
|__ Port 1: Dev 12, If 12, Class=Communications, Driver=cdc_mbim, 480M
...
|__ Port 1: Dev 12, If 13, Class=CDC Data, Driver=cdc_mbim, 480M
...
Using libmbim with the command line interface mbimcli:
List all available options for mbimcli:
mbimcli --help-all
Check version
mbimcli --version
The cellular modules mbim interface is usually named cdc-wdm* among the devices. For mbimcli this is defined by --device=/dev/cdc-wdm0 parameter. You should also use the proxy function to enable parallel commands to be sent to module even if the interface already is in use by a data connection. This is done by including --device-open-proxy or -p in every mbimcli requst to module.
Command example to query device capabilities and information (firmware & IMEI code etc.):
mbimcli --device=/dev/cdc-wdm0 --device-open-proxy --query-device-caps
The libmbim tool: mbim-network can be used to establish a simple data connection.
First create a config file containing your network operators APN details. Save it in the default location where mbim-network searches for the file: /etc/mbim-network.conf . The parameter --profile=[PATH] can be used to alter this path when executing mbim-network.
Save the APN details, (and username, password and authentication type if necessary) into the configuration file /etc/mbim-network.conf:
APN=internet
APN_USER=
APN_PASS=
APN_AUTH=
PROXY=yes
If the APN requires a username and password then it is also required to fill in the APN_AUTH protocol type with either PAP, CHAP or MSCHAPV2.
How to start a data connection after configuration file is in place:
Enter SIM PIN (if necessary for SIM card):
mbimcli -d /dev/cdc-wdm0 -p --enter-pin=1234
Start the mbim data connection with command bellow, if successful it will print "Network started successfully"
mbim-network /dev/cdc-wdm0 start
You can now execute the mbim-set-ip script (download found bellow related to this FAQ) with sufficient system privileges:
./mbim-set-ip /dev/cdc-wdm0 wwan0
This script will collect the network interface IP configurations from the cellular module over MBIM interface using mbimcli, parse them and apply them to the network interface in Linux, this because DHCP requests are generally not supported over MBIM interfaces.
Once you have started the data connection and set the details with the mbim-set-ip script you should be able to ping the data connection:
IPv4 ping: (only supported if IPv4 address was acquired from cellular module)
ping -4 -I wwan0 8.8.8.8
ping -4 -I wwan0 google.com
IPv6 ping: (only supported if IPv6 address was acquired from cellular module)
ping -6 -I wwan0 2001:4860:4860::8888
ping -6 -I wwan0 google.com
The cellular data connection can be disconnected by commands:
Stop mbim data connection:
mbim-network /dev/cdc-wdm0 stop
Set network interface down:
ip link set wwan0 down
Other useful commands:
Query device capabilities and information (firmware & IMEI code etc.):
mbimcli -d /dev/cdc-wdm0 -p --query-device-caps
Query SIM card information:
mbimcli -d /dev/cdc-wdm0 -p --query-subscriber-ready-status
Query network registration state:
mbimcli -d /dev/cdc-wdm0 -p --query-registration-state
Query connection ip information:
mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration=0