TECHSHIP IS A GLOBAL SUPPLIER OF WIRELESS COMPONENTS

Register
FAQs /

Recently added

Question

What firmware versions are related to the specific SKU/BOM codes of cellular modules?

Solution

Sierra Wireless

10839 Sierra Wireless EM7565, CAT-12, M.2 CBRS ENABLED
SKU: 1104207 Firmware: 01.07.02.00 GENERIC

10692 Sierra Wireless EM7565 LTE CAT-12 M.2
SKU: 1103520 Firmware: 01.07.02.00 GENERIC

10375 Sierra Wireless EM7455 LTE Cat 6
SKU: 1103582 Firmware: 02.24.05.06 GENERIC/AT&T/SPRINT/VERIZON
SKU: 1103780 Firmware: 02.24.05.06 GENERIC/AT&T/SPRINT/VERIZON

10427 Sierra Wireless EM7430
SKU: 1103733 Firmware: 02.24.05.06 GENERIC/DOCOMO/KDDI/SOFTBANK/TELSTRA

10374 Sierra Wireless MC7455 LTE Cat 6
SKU: 1103789 Firmware: 02.24.05.06 GENERIC/AT&T/BELL/ROGERS/SPRINT/TELUS/US CELLULAR/VERIZON/VODAFONE

10397 Sierra Wireless MC7430 mPCIe
SKU: 1103737 Firmware: 02.24.05.06 GENERIC/DOCOMO/KDDI/SOFTBANK/TELSTRA

10840 Sierra Wireless EM7511
SKU: 1103989 Firmware: 01.07.02.00 AT&T/GENERIC

Question

How to change USB mode from storage to cellular device for Huawei MS2372-series USB 4G/LTE cellular sticks in Linux systems?

Solution

The Huawei cellular 4G/LTE USB-Sticks will show up as USB mass storage devices when first loaded and enumerated in Linux systems.

lsusb
Bus 001 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)

lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
|__ Port 4: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 480M

This mode is not the operational mode to use the device in for cellular connectivity, therefore a USB mode switch is necessary to perform.
It can easily be done with the tool usb_modeswitch in Linux.

You can download and install it 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

Once you have it installed it, open the file 40-usb_modeswitch.rules with a text editor, e.g:
nano /lib/udev/rules.d/40-usb_modeswitch.rules

Ensure that you find:
# Generic entry for most Huawei devices, excluding Android phones
ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '/%k'"

If not, add the following entry bellow and save the file:
# Huawei MS2372
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14fe", RUN+="usb_modeswitch '/%k'"


Create a new empty text file in the folder /etc/usb_modeswitch.d/ called 12d1:14fe e.g. as bellow:
nano /etc/usb_modeswitch.d/12d1:14fe

Paste in the following configuration lines in the file:
# Huawei MS2372 series
TargetVendor=0x12d1
TargetProductList="1506"
HuaweiNewMode=1
NoDriverLoading=1

Now save the file.

You can run the command bellow to update the udev rules for what system should do when a new device of this kind is detected:
udevadm control --reload-rules && udevadm trigger

If you restart the system or unplug and plug in the MS2372 series USB-stick again now, USB mode switching should be done automatically, and the device appear in the correct mode in the system as bellow:
lsusb
Bus 001 Device 004: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
|__ Port 4: Dev 4, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 4, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 4, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 4, If 3, Class=Vendor Specific Class, Driver=huawei_cdc_ncm, 480M

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.

Question

How can we integrate the Simcom SIM7500/SIM7600 Series Linux NDIS driver in Linux kernel without rebuilding it?

Solution

The Simcom SIM7500/SIM7600 series Linux NDIS network driver can be built and installed without rebuilding the complete Linux kernel your OS distribution uses. Please see steps and pre-requirements bellow and download the attached "Simcom SIM7500 and SIM7600 Series Linux Network NDIS driver installation files and guide (without kernel rebuild)" archive to get started.

Should you instead want to include the NDIS driver into your customized Linux kernel build, please relate to "SIMCom SIM7500 - SIM7600 series modules Linux NDIS driver and system integration guide V2.01" attached to the FAQ.

All commands are supposed to be executed with elevated system privileges/as root user.

Ensure that your original kernel was built with the following config options enabled, this will allow the option and usbnet driver pre-requirments to be included in kernel. (usually already included in larger distributions)
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_WWAN=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_USBNET=y

Build-tools and Linux header files for your kernel version are also required, these can be installed e.g. through your OS distributions package manager, on Debian/Ubuntu systems:
apt-get install build-essential make gcc
apt-get install linux-headers-`uname -r`

The in-kernel qmi_wwan driver should be blacklisted and prevented from loading as it will block the Simcom wwan driver, this is how it can be done e.g. in Ubuntu systems:
grep -q -F 'blacklist qmi_wwan' /etc/modprobe.d/blacklist-modem.conf || echo 'blacklist qmi_wwan' >> /etc/modprobe.d/blacklist-modem.conf

Build and install the driver:
Unzip the archive and copy the folder sim7600 to your selected working directory.
Navigate to it, e.g.:
cd /usr/src/sim7600/

Build and install the drivers:
make install

Some warnings might appear, but verify that no errors are reported.

Restarting the host system should now result in the correct network drivers being loaded for the cellular module once the USB device is detected in the system.

It can be verified by finding lsusb -t listing "Driver=simcom_wwan" for a USB endpoint:
lsusb
Bus 001 Device 005: ID 1e0e:9001 Qualcomm / Option

lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
|__ Port 4: Dev 5, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 5, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 5, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 5, If 3, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 5, If 4, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 5, If 5, Class=Vendor Specific Class, Driver=simcom_wwan, 480M

dmesg | grep 'simcom_wwan'
simcom_wwan 1-4:1.5 wwan0: register 'simcom_wwan' at usb-0000:00:15.0-4, SIMCOM wwan/QMI device, 8a:d8:ff:c2:87:11

Additional make options and information:
If you've built the driver previously already, first clean out any old builds with:
make clean

If you only want to build the driver but not install it into /lib/modules/4.18.0-041800-generic/kernel/drivers/net/usb/, use make without install parameter:
make

Testing of the cellular connection can easily be done by first performing the necessary initiation AT commands to the cellular module over Modem/AT commands serial interface normally located on /dev/ttyUSB2. Use e.g. minicom tool to communicate with it.
Can be installed e.g. through the distributions package manager:
apt-get install minicom

Access the serial interface:
minicom -D /dev/ttyUSB2

Please relate to AT commands guide for full details on what commands are supported.
Issue AT and check that you get OK as reply.
AT

Enable echo on characters sent to module:
ATE1

Request general info about module:
ATI

Enter the SIM pin code (if necessary for SIM card)
AT+CPIN=****

Enter your operators APN details:
AT+CGDCONT=1,"IP","my.operator.apn"

Enter APN authentication details (if necessary) further details found in the AT commands guide.
AT+CGAUTH=CID,auth_type,”password”,”username”

Check network registration:
AT+CREG?

Activate and connect the cellular data connection to the network interface installed in Linux system:
AT$QCRMCALL=1,1

When you get the reply $QCRMCALL: 1, V4 from cellular module it means that the data connection to your network operator is fully established and you can now exit the minicom tool (CTRL+A followed by Z key and Q key and select yes to exit).

Once here you can now perform a DHCP request on the cellular network interface in the Linux system by using your favorite DHCP client in Linux e.g. dhclient or udhc e.g.:
dhclient -v wwan0
udhcpc --interface=wwan0

The cellular network interfaces are normally named starting from wwan0 but might get renamed by some Linux distributions automatically. All available network interfaces can be listed with command:
ip link show

The network interface can be tested e.g. by sending ping requests to a remote server over the selected network interface:
ping -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.163.183.209 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=120 time=191 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=120 time=46.1 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=120 time=52.8 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=120 time=43.3 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 43.350/83.407/191.281/62.376 ms

Question

How to activate the data connection for Huawei cellular USB-sticks (MS2372 series) using the NCM network interface exposed by module in Linux?

Solution

The first step is to assure that the Huawei cellular module is properly loaded in the Linux system. Huawei modules are most often automatically detected in recent Linux kernels, this can be verified in different ways, e.g. by commands bellow:

The lsusb command shows what physical USB devices are detected in the Linux operating system:
lsusb
Bus 001 Device 017: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard

The lsusb -t command shows the USB endpoints exposed by the detected USB devices and the related drivers loaded for them:
lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
|__ Port 4: Dev 17, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 17, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 17, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 4: Dev 17, If 3, Class=Vendor Specific Class, Driver=huawei_cdc_ncm, 480M

If the device shows up as a USB mass storage device please see FAQ linked bellow on how to change USB mode:
lsusb
Bus 001 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)

Techship.com: How to change USB mode from storage to cellular device for Huawei MS2372-series USB 4G/LTE cellular sticks in Linux systems?
https://techship.com/faq/how-to-change-usb-mode-from-storage-to-cellular-device-for-huawei-ms2372-series-usb-4g-lte-cellular-sticks-in-linux-systems/


The dmesg lists all the driver loading logs since system boot up:
dmesg
usb 1-4: new high-speed USB device number 16 using xhci_hcd
usb 1-4: New USB device found, idVendor=12d1, idProduct=14fe, bcdDevice= 1.02
usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-4: Product: HUAWEI_MOBILE
usb 1-4: Manufacturer: HUAWEI_MOBILE
usb 1-4: SerialNumber: 0123456789ABCDEF
usb-storage 1-4:1.0: USB Mass Storage device detected
scsi host2: usb-storage 1-4:1.0
scsi 2:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
sr 2:0:0:0: Power-on or device reset occurred
sr 2:0:0:0: [sr0] scsi-1 drive
sr 2:0:0:0: Attached scsi CD-ROM sr0
sr 2:0:0:0: Attached scsi generic sg0 type 5
usb 1-4: USB disconnect, device number 16
usb 1-4: new high-speed USB device number 17 using xhci_hcd
usb 1-4: New USB device found, idVendor=12d1, idProduct=1506, bcdDevice= 1.02
usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-4: Product: HUAWEI_MOBILE
usb 1-4: Manufacturer: HUAWEI_MOBILE
huawei_cdc_ncm 1-4:1.3: resetting NTB format to 16-bit
huawei_cdc_ncm 1-4:1.3: MAC-Address: 00:1e:10:1f:00:00
huawei_cdc_ncm 1-4:1.3: setting rx_max = 16384
huawei_cdc_ncm 1-4:1.3: NDP will be placed at end of frame for this device.
huawei_cdc_ncm 1-4:1.3: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-4:1.3 wwan0: register 'huawei_cdc_ncm' at usb-0000:00:15.0-4, Huawei CDC NCM device, 00:1e:10:1f:00:00
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-4:1.0: GSM modem (1-port) converter detected
usb 1-4: GSM modem (1-port) converter now attached to ttyUSB0
option 1-4:1.1: GSM modem (1-port) converter detected
usb 1-4: GSM modem (1-port) converter now attached to ttyUSB1
option 1-4:1.2: GSM modem (1-port) converter detected
usb 1-4: GSM modem (1-port) converter now attached to ttyUSB2


The command ifconfig -a will list all network interfaces loaded in the Linux system, the cellular module interface can be named differently depending on the distribution used but generally named wwan0 initially.
ifconfig -a
wwan0: flags=4098 mtu 1500
ether 00:1e:10:1f:00:00 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


the command ls can list the USB serial interfaces detected:
ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2

Once this far we can now start communicate with the cellular module over AT commands. There are different applications available in Linux that enables manual communication with serial interfaces:

minicom -D /dev/ttyUSB2
socat - /dev/ttyUSB2,crnl
etc.

Basic AT commands for information and how to set up the data connection:

Print general information about cellular module and firmware versions, IMEI etc.
ATI

Enter the SIM PIN code:
AT+CPIN=1234

Set the operator APN name to use for the data connectivity
AT+CGDCONT=1,"IP","m2m.tele2.com"

Activate the data connection for the network interface exposed to host system with the APN profile previously created.
AT^NDISDUP=1,1,

Once: ^NDISSTAT:1,,,"IPV4" is received you now have a active data connection to the network operator.

Now you can use a DHCP client in your host system to request the IP address from the cellular network, e.g. by using any of the following one:
udhcpc --interface=wwan0 -q
dhclient -v wwan0

If successful you now have a working cellular network data connection in your Linux system.

ifconfig wwan0
wwan0: flags=4163 mtu 1500
inet 100.77.146.21 netmask 255.255.255.252 broadcast 100.77.146.23
inet6 fe80::21e:10ff:fe1f:0 prefixlen 64 scopeid 0x20
ether 00:1e:10:1f:00:00 txqueuelen 1000 (Ethernet)
RX packets 37 bytes 4286 (4.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27 bytes 4474 (4.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

It can be verified e.g. by dong ping requests over the dedicated network interface:
ping -I wwan0 8.8.8.8

PING 8.8.8.8 (8.8.8.8) from 100.77.146.21 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=120 time=147 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=120 time=57.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=120 time=51.5 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=120 time=49.6 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 49.656/76.500/147.083/40.859 ms

Additional details on how the AT commands can be used to enter APN credentials, initial LTE attach APN information etc. can be found in the AT commands manual

Question

How to access the serial AT command interfaces for Huawei HiSilicon chipset based modules in systems with Windows 8 and later?

Solution

Serial interfaces for cellular modules are recommended to be disabled by default by Microsoft for systems running Windows 8 and later.

The serial interfaces for AT commands etc. can however be exposed again by first using the tool in linked archive: "Huawei AT commands over MBIM interface tool for Windows 8-10 systems and usage guide" and send module the command bellow once (stored in module memory):
AT^SETMODE=1
(instead of the default value AT^SETMODE=0)
The module will now reboot and new end-points will be visible for the module once re-appearing.

By installing the linked drivers: "Huawei Debug Driver V.2.0.6.1 for HiSilicon" the correct end point drivers can also be loaded for the cellular module when used in this mode.

You should now be able to find AT commands accepting serial interface as following:
Huawei ME909s, and ME906s series:
HUAWEI Mobile Connect - PC UI Interface

Question

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"?

Solution

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

Question

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?

Solution

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.

Question

How do we configure the Simcom SIM7100, SIM7500 and SIM7600 series cellular modules for usage in Windows 8 and 10 systems and support Windows built-in connection manager?

Solution

The Simcom modules comes default set in a USB configuration used by Linux and Windows 7 systems. If you want the module to be fully supported in Windows 8, 8.1, 10 systems and later and take advantage of the Windows integrated connection manager you have to do a one time configuration and set the module to expose Mobile Broadband Interface Model (MBIM) interface as bellow:

Start by installing the latest Simcom SIM7 series Windows drivers (instructions included in download package). They can be found on on our dedicated product web pages.

In Windows device manager you can now find a serial interface called "SimTech HS-USB AT Port 9001 (COM5)" Memorize the COM* interface number in your system.

Open a command prompt with admin rights (right click Windows icon in bottom left corner). Copy and paste the command bellow, edit port number to match the one in your system and hit enter. The command will then be sent to module overt the serial interface.
ECHO AT+CUSBPIDSWITCH=9004,1,1 >\\.\COM5

If the command is received successfully by module, a restart of the cellular module will be performed and it appears with the new USB endpoints supporting Windows 8 systems and later.

Make sure that all Simcom module end points are correctly loaded in Windows device manager, a system restart might be necessary also.

By clicking the Windows network connection symbol in the start bar or navigating to the "Cellular" topic in Windows system settings you can now activate the connection and configure APN details and enter PIN code if it is necessary for the cellular connection and subscription you have.

Question

How can we use Sierra Wireless MC/EM74 and EM75 series cellular modules in Linux with the MBIM control and data interface?

Solution

The Sierra Wireless MC/EM74 and EM75 series cellular modules can expose the Mobile Broadband Interface Model (MBIM) Interface.

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 and libmbim-utils Linux library using your system package manager like apt etc. (more details about libmbim here: https://www.freedesktop.org/wiki/Software/libmbim/)

Check with lsusb that you have the Sierra wireless module loaded, vid:pid value 1199:9091 or 1199:9071 should be present.
lsusb
Bus 002 Device 003: ID 1199:9091 Sierra Wireless, Inc.
or:
Bus 002 Device 003: ID 1199:9071 Sierra Wireless, Inc.

Verify with lsusb -t that the Linux in-kernel cdc_mbim driver is correctly loaded for the cellular module. It can look e.g. like this:
lsusb -t
...
|__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 3: Dev 3, If 2, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 3: Dev 3, If 3, Class=Vendor Specific Class, Driver=qcserial, 5000M
|__ Port 3: Dev 3, If 12, Class=Communications, Driver=cdc_mbim, 5000M
|__ Port 3: Dev 3, If 13, Class=CDC Data, Driver=cdc_mbim, 5000M
...

If this is not the case, you will have to change USB end points the cellular module exposes. This can be done through AT commands sent to the modules serial interfaces accepting AT commands. Usually located at dev/ttyUSB2 if the qcserial drivers are correctly loaded.

MC74xx/EM74xx series:
AT!ENTERCND="A710"
AT#USBCOMP=1,1,100D
AT!RESET

EM75xx series:
AT!ENTERCND="A710"
AT#USBCOMP=1,3,100D
AT!RESET

(Applications like Minicom or Picocom can be used to send AT commands over the serial interfaces)

Should you have no serial interface loaded, it is because the driver has not been loaded for the USB serial endpoints due to missing vid:pid values in the qcserial driver. You can then use the commands bellow to temporarily load the driver for new vid:pid combinations.
modprobe qcserial
EM75 series:
echo 1199 9091 > /sys/bus/usb-serial/drivers/qcserial/new_id
MC74xx/EM74xx series:
echo 1199 9071 > /sys/bus/usb-serial/drivers/qcserial/new_id

When you have changed the cellular modules USB endpoint configuration to expose MBIM interface and module have restarted, then you can use libmbim's command line interface to control the cellular module.

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:
APN=
APN_USER=
APN_PASS=
APN_AUTH=
PROXY=yes

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

IP v6 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

Test setup:
Software: Ubuntu server 18.04 LTS with kernel 4.15.0-23-generic and mbimcli 1.14.2
Hardware: Sierra Wireless EM7565 with firmware SWI9X50C_01.07.00.00 on Aaeon UP Squared host board with 10703 M.2 to USB 3.0 Adapter.

Question

How can we use Simcom SIM7500 and SIM7600 series in Linux with the MBIM control and data interface over USB connectivity?

Solution

The Simcom SIM7500 and SIM7600 series cellular module can expose the Mobile Broadband Interface Model (MBIM) Interface.

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/)

First check with lsusb that you have the Simcom module set to expose MBIM interface, this can be verified with command lsusb and you should the vid:pid value 1e0e:9003.
lsusb
Bus 001 Device 003: ID 1e0e:9003 Qualcomm / Option

If this is not the case, you will have to change what USB end points the cellular module exposes and the vid:pid values. This can be done through AT commands sent to one of the modules serial interfaces accepting AT commands. dev/ttyUSB2 is often the correct one.
AT+CUSBPIDSWITCH=9003,1,1

Applications like Minicom or Picocom can be used to send AT commands over the serial interfaces.

Should you have no serial interfaces loaded, it is because the driver has not been loaded for the USB serial endpoints due to missing vid:pid values in the option driver, you can then use the commands bellow to temporarily load the driver for the vid:pid combination the module expose. e.g:
modprobe option
echo 1e0e 9001 > /sys/bus/usb-serial/drivers/option1/new_id

After you have changed the cellular modules USB endpoint configuration to expose MBIM interface, you can verify with lsusb -t that the Linux in-kernel cdc_mbim driver is correctly loaded for the cellular module. It can look e.g. like this:
lsusb -t
...
|__ Port 4: Dev 3, If 1, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 3, If 6, Class=CDC Data, Driver=cdc_mbim, 480M
|__ Port 4: Dev 3, If 4, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 3, If 2, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 480M
|__ Port 4: Dev 3, If 5, Class=Communications, Driver=cdc_mbim, 480M
|__ Port 4: Dev 3, If 3, Class=Vendor Specific Class, Driver=, 480M

if you have no option drivers loaded for the serial interfaces, these can be loaded temporarily with commands:
modprobe option
echo 1e0e 9003 > /sys/bus/usb-serial/drivers/option1/new_id

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:
APN=
APN_USER=
APN_PASS=
APN_AUTH=
PROXY=yes

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

IP v6 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

Test setup:
Software: Ubuntu server 18.04 LTS with kernel 4.15.0-23-generic and mbimcli 1.14.2
Hardware: SIM7600E-h miniPCIe firmware LE11B08SIM7600M22 on Aaeon UP Squared host board