TECHSHIP IS A GLOBAL SUPPLIER OF WIRELESS COMPONENTS
The Sierra Wireless EM7305 Embedded Module is an M.2 modem that provides LTE, DC-HSPA+, HSPA+, HSDPA, HSUPA, WCDMA, GSM, GPRS, EDGE, and GNSS connectivity for notebook, ultrabook, and tablet computers over several radio frequency bands. The device also supports 2G / 3G roaming.
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:
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:
The cellular modules QMI control interface are usually named cdc-wdm* e.g.:
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:
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 220.127.116.11
The ifconfig Linux tool can show the current details for the network interface:
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:
Configs for Modem/PPP support:
Configs for USB network drivers:
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 can we capture DM serial port logs for Sierra Wireless EM/MC series cellular modules in Linux?
In the Sierra Wireless QMI SDK downloadable archive there is a a DM log tool in the tools folder.
Run the dmcapture.sh script with desired filter, and the ttyUSB0 (DM port) device selected.
E.g. like this:
sudo ./dmcapture.sh -l -d /dev/ttyUSB0 -o testlog -f ./filters/v11026_Generic_GSM_WCDMA_LTE_IP.sqf
This will create a log file that can be sent for analyze and debug to Sierra Wireless.
How do I set USB-interface modes on my Sierra Wireless module?
Sierra Wireless modules can expose different USB interfaces, like MBIM, MODEM, NMEA or RMNET. The different interfaces can be combined or used individually, depending on the specific need for your project.
Here is how to set the different USB interface configurations. (In this example we use a Sierra Wireless EM7421, but it will be similar for many other Sierra Wireless modules.)
Make sure you get an OK after every AT command sent.
We start by typing:
To be able to view what we just sent to the module we type:
Since this feature is password protected we need to type:
To see what USB interface we are currently using, just type AT!USBCOMP? and you should receive something like this:
Config Index: 1
Config Type: 3 (Generic)
Interface bitmask: 0000010D (diag,nmea,modem,rmnet0)
Config index is what the type applies to and should be set to 1.
The config type means what USB composition is used. For this module USBIF-MBIM (1), PCIE USBIF (2), Legacy Generic (3) or RNDIS (4) are available.
Interface bitmask is the part where we see what USB interface our module is set to.
Now, to see what our USB interface options are we need to type:
Here we can see that for this module we have the following options:
DIAG - 0x00000001
NMEA - 0x00000004
MODEM - 0x00000008
RMNET0 - 0x00000100
MBIM - 0x00001000
These values are hexadecimal. So, for an example, if we wanted to activate all the options (DIAG, NMEA, MODEM and MBIM) we just add these values together.
If we open the Windows Calculator in Programmer mode (and make sure you have “HEX” selected!) and add all the values together like this 1 + 4+ 8 +1000, we will get 100D. (Please note, RMNET0 and MBIM cannot be used simultaneous for this module. Refer to the manual of your specific module to when setting up the USB interface.)
If we then send the following AT command to the module, we will set it to DIAG, NMEA, MODEM and MBIM:
Again, type AT!USBCOMP? to confirm we have the new settings selected, it should look like this:
Config Index: 1
Config Type: 3 (Generic)
Interface bitmask: 0000100D (diag,nmea,modem,mbim)
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.
The Sierra Wireless EM73, EM74 and EM75 series M.2 modules are not detected in the host system when used with the M.2 to USB adapter board? (USBM2, USB3M2)
Sierra Wireless EM73, EM74 and EM75 series M.2 modules DPR pin 25 compatibility with Bplus M.2 key B to USB adapters.
When using the Bplus USB3M2 and USBM2 adapter boards you will need to change the state of the jumper JP1 on the USB adapter board. This controls the Dynamic Power Control (DPR) pin in the M.2 socket to the cellular module.
Please remove the pin jumper piece and leave all 3 pins not connected / floating. This will allow the module to operate normally.
After changing this jumper state and powering on the module and adapter board, you should see the module appear and boot up normally in the host system device.
For further details, please relate to the Sierra Wireless related product technical specification as well as the assembly guide for the adapter boards.
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:
(See test command AT!USBCOMP=? for full usage description)
Sierra Wireless EM75xx, EM74x1, MC74x1 series module:
(See test command AT!USBCOMP=? for full usage description)
Sierra Wireless EM73xx, MC73xx series module:
Simcom SIM7100, SIM7500 and SIM7600 series modules:
ZTE Welink ME3630 series:
Telit LE910C1 and LE910C4 series:
Telit LM940 and LM940A11:
Telit LM960 and LM960A18:
Telit LE910 V2 series:
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 collect initial diagnostics data for Sierra Wireless EM/MC73 series cellular modules when requesting 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 module when creating a technical support ticket.
Please provide a problem description of what exact problem is and in what precise situations it is present.
Describe the host system:
-Hardware (system board, peripherals...)
-Operating system and detailed versions (E.g. Windows, Linux dist, release, kernel...)
-Drivers and driver versions
Identify the precise details of cellular module found on label:
-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:
ls -l /dev/serial/by-id
ls -l /sys/bus/usb-serial/devices
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 AT commands to module and capture the text output and include them when creating the the technical support ticket.
Sierra Wireless :
The support ticket can be created after login at: https://techship.com/technical_support/