LN940A90477TGW0000
Supplier number:
Telit LN940 A9 is a LTE Category 9 module in M.2 form factor. LN940 A9 supports up to 450 Mbps downlink and has global 3G fallback. It also comes with built in GNSS.
This compact module is uniquely designed to combine critical features with enhancements such as Adaptive Clocking, Selective Suspend, Link Power Management, Dynamic Power Reduction, and Tunable Antenna. Enablement that together deliver the most streamlined, reliable user experience possible.
This product is not recommended for new designs.
SIM Integration Design Guide Application Note for Telit modules, R17.
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".
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.
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 to collect initial diagnostics data and logs for Telit LN940 cellular modules needed when requesting Techship technical support?
In order to troubleshoot and solve a technical problem, we ask you to please provide information about your system and logs from the related Telit module when creating a technical support ticket.
Problem description of what exact problem is and in what precise situations present.
Describe the host system:
-Hardware (system board, peripherals...)
-Operating system and detailed versions (E.g. Windows, Linux release, kernel...)
-Drivers and driver versions
Identify the precise details of cellular module found on label:
-Model
-SKU/BOM or P/N code
(For RMA returns the IMEI number is required also)
If you are running on a Linux based system, please capture the terminal logs bellow:
uname -a
lsusb
lsusb -t
ifconfig -a
ls -l /dev/serial/by-id
ls -l /sys/bus/usb-serial/devices
dmesg
The logs from module firmware can be acquired by accessing one of the USB enumerated serial (COM) interfaces accepting AT commands. (In Windows this is generally modem devices or AT commands serial interfaces). Send the following commands to module and capture the text output and include them when creating the the technical support ticket.
Test AT command:
AT
Enable command echo:
ATE1
Module make, type, ID and revision:
ATI
Verbose error reporting:
AT+CMEE=2
Module model:
AT+CGMM
Firmware version:
AT+CGMR
AT+SKUID
IMEI Code:
AT+CGSN
USB PID/endpoint configuration:
AT+USBSWITCH?
USB type:
AT^USBTYPE?
Operational mode:
AT+CFUN?
Check SIM card status:
AT$QCSIMSTAT?
Check SIM PIN status:
AT+CPIN?
Access techniques and configuration:
AT+WS46?
AT$QCBANDPREF?
AT^SYSCONFIG?
AT^SYSINFO
AT$QCNSP?
AT^SLMODE?
AT^SLBAND?
AT^CA_ENABLE?
AT^BAND_PRI?
List network operator info:
AT+COPS?
Network registration status:
AT+CREG=2
AT+CREG?
AT+CGREG?
AT+CEREG?
Signal strength:
AT+CSQ
AT$QCSQ
AT$QCRPW
SIM app status:
AT$QCSIMAPP=?
Last serving cell network information:
AT$QCRSRP?
AT$QCRSRQ?
Debug information:
AT^DEBUG?
AT^RFSTS?
AT^ABAND?
AT^CA_INFO?
List APN details:
AT+CGDCONT?
AT$QCPDPP?
AT$QCAPNE?
AT$QCPDPCFGEXT?
AT$QCPRFCRT?
Attach UE to default PDP Context:
AT+CGATT=1
List default data connection details:
AT+CGCONTRDP
List IP addresses:
AT+CGPADDR
The support ticket can be created after login at: https://techship.com/technical_support/
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 can we configure Telit LN94* series cellular modules to expose QMI mode which is used by qmi_wwan or GobiNet drivers in Linux based systems?
The Telit LN94* series cellular module requires a USB mode change in order to expose the QMI network interface used by GobiNet drivers or the qmi_wwan drivers.
This procedure can be done once by AT commands (see further down) and it get stored in the modules NV memory for future on. You can also setup the common usb_modeswitch tool in Linux to this change for the Telit LN940 series modules at every device detection instead.
You can download and install usb_modeswitch tool from:
http://www.draisberghof.de/usb_modeswitch/
Or install it e.g. through a package manager if your Linux distribution supports one:
apt-get install usb-modeswitch
For manually perform the mode changing, you can execute the command bellow which alters the bConfigurationValue to 1:
usb_modeswitch -v 1bc7 -p 1900 -u 1
This will set the module to expose the QMI/RMNET interface as well as the related serial interfaces for Qualcomm diagnostics, NMEA and AT interface.
It can also be automated on every module detection in host system:
Open the file 40-usb_modeswitch.rules with a text editor found in /lib/udev/rules.d/ , e.g as bellow:
nano /lib/udev/rules.d/40-usb_modeswitch.rules
Add the following entry bellow and save the file:
#Telit LN94x series (QMI mode)
ATTR{idVendor}=="1bc7", ATTR{idProduct}=="1900", RUN+="usb_modeswitch '/%k'", RUN+="/sbin/modprobe qmi_wwan"
(the additional RUN+="/sbin/modprobe qmi_wwan" can be used to trigger the loading of qmi_wwan driver so it get assigned after mode change)
Create a new text file in the folder /etc/usb_modeswitch.d/ called 1bc7:1900 e.g:
nano /etc/usb_modeswitch.d/1bc7:1900
Paste in the following configuration lines in the editor and save the file:
# Telit LN94x series (QMI mode)
TargetVendor=0x1bc7
TargetProduct=0x1900
Configuration=1
NoDriverLoading=1
You can run the command bellow to update the udev rules in the system:
udevadm control --reload-rules && udevadm trigger
If you restart the system now, the USB mode switching should be done automatically, and the correct USB mode endpoints and drivers loaded as bellow. (Provided that you have modified the option.c and qmi_wwan.c source files and rebuilt the option and qmi_wwan modules according to Telit instructions in "Telit LN94x series Linux Driver Source Package V.0.00.01" downloadable resource.
lsusb
Bus 002 Device 002: ID 1bc7:1900 Telit Wireless Solutions
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/7p, 5000M
|__ Port 4: Dev 2, If 0, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 4: Dev 2, If 1, Class=Vendor Specific Class, Driver=qmi_wwan, 5000M
|__ Port 4: Dev 2, If 2, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 4: Dev 2, If 3, Class=Vendor Specific Class, Driver=option, 5000M
|__ Port 4: Dev 2, If 4, Class=Vendor Specific Class, Driver=option, 5000M
If this is not occurring correctly, usb_modeswitch debug logging can be turned on by editing the usb_modeswitch.conf file located in /etc/:
nano /etc/usb_modeswitch.conf
The log file can be found in:
/var/log/usb_modeswitch.log
Please note that all Linux command line commands were executed with elevated / root privileges in this example.
How to change the USB mode via AT commands:
By default configuration there is no serial interfaces available that can accept AT commands in Windows system, but a tool can be used to issue the AT commands over MBIM interface, enabling you to set the module in other configuration than the default one.
Download and install "Telit LN94x Series Microsoft Windows Driver Installer" in you Windows 10 system, now the module should be detected correctly, check e.g. in device manager.
Download and open the "Telit LN94x Series AT Commands over MBIM Interface Helper Tool" application.
In the application, open the Telit LN94x MBIM device and send the AT command according to desired mode:
AT^SETMODE=0
Default mode, MBIM interface only for Windows.
Supported in Windows 10 systems.
USB VID: 1bc7 PID: 1900
AT^SETMODE=1
MBIM mode with serial interfaces
Supported in Windows 10 systems
USB VID: 1bc7 PID: 1901
AT^SETMODE=2
QMI/RMNET and serial interfaces
Supported in Linux systems
USB VID: 1bc7 PID: 1900
Sending the AT command should result in the cellular module automatically restarting with the new usb endpoint configuration exposed.
Please note that the Windows system do not load correct drivers for the module any longer after the USB endpoint configuration is changed.